Index: code/branches/presentation2/src/modules/weapons/projectiles/CMakeLists.txt
===================================================================
--- code/branches/presentation2/src/modules/weapons/projectiles/CMakeLists.txt	(revision 6106)
+++ code/branches/presentation2/src/modules/weapons/projectiles/CMakeLists.txt	(revision 6107)
@@ -4,3 +4,4 @@
   Projectile.cc
   LightningGunProjectile.cc
+  Rocket.cc
 )
Index: code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc
===================================================================
--- code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc	(revision 6107)
+++ code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc	(revision 6107)
@@ -0,0 +1,256 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Scheuss
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Rocket.h"
+
+#include "core/XMLPort.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "worldentities/pawns/Pawn.h"
+#include "graphics/ParticleSpawner.h"
+#include "graphics/Model.h"
+#include "objects/collisionshapes/ConeCollisionShape.h"
+#include "infos/PlayerInfo.h"
+#include "controllers/Controller.h"
+#include "worldentities/CameraPosition.h"
+
+namespace orxonox
+{
+	CreateFactory(Rocket);    
+    // create the factory for the Rocket
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes some default values.
+    */
+    Rocket::Rocket(BaseObject* creator) : ControllableEntity(creator)
+    {
+        RegisterObject(Rocket);// - register the Rocket class to the core
+
+		this->localAngularVelocity_ = 0;
+        
+        if (GameMode::isMaster())
+        {
+            this->setCollisionType(WorldEntity::Kinematic);
+            this->setVelocity(0,0,-100);
+            this->lifetime_ = 100;
+            this->bDestroy_ = false;
+        
+            this->model_ = new Model(this);
+            this->model_->setMeshSource("rocket.mesh");
+			this->attach(this->model_);
+			ParticleSpawner* fire = new ParticleSpawner(this);
+			this->attach(fire);
+			fire->setOrientation(this->getOrientation());
+            fire->setSource("Orxonox/rocketfire");
+        
+            this->enableCollisionCallback();
+            this->setCollisionResponse(false);
+            this->setCollisionType(Kinematic);
+
+            this->collisionShape_ = new ConeCollisionShape(this);
+            this->collisionShape_->setRadius(3);
+            this->collisionShape_->setHeight(500);
+            this->attachCollisionShape(this->collisionShape_);
+
+            this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&Rocket::destroyObject, this)));
+               
+			
+        }
+        
+        this->camPosition_ = new CameraPosition(this);
+        this->camPosition_->setPosition(0,10,40);
+        this->camPosition_->setSyncMode(0x0);
+        this->attach( this->camPosition_ );
+        this->addCameraPosition( this->camPosition_ );
+    }
+
+    /**
+    @brief
+        Destructor. Destroys controller, if present.
+    */
+    Rocket::~Rocket()
+    {
+        if(this->isInitialized())
+        {
+            
+            if (GameMode::isMaster() && this->player_.get())
+            {
+                this->model_->destroy();
+                this->collisionShape_->destroy();
+                this->player_->stopTemporaryControl();
+            }
+            this->camPosition_->destroy();
+        }
+    }
+
+    /**
+    @brief
+        Method for creating a Rocket through XML.
+    */
+    void Rocket::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        // this calls the XMLPort function of the parent class
+        SUPER(Rocket, XMLPort, xmlelement, mode);
+    }
+    
+    void Rocket::setOwner(Pawn* owner)
+    {
+        this->owner_ = owner;
+        this->originalControllableEntity_ = this->owner_->getPlayer()->getControllableEntity();
+        this->player_ = this->owner_->getPlayer();
+        this->owner_->getPlayer()->startTemporaryControl(this);
+    }
+
+    /**
+    @brief
+        Defines which actions the Rocket has to take in each tick.
+    @param dt
+        The length of the tick.
+    */
+    void Rocket::tick(float dt)
+    {
+        SUPER(Rocket, tick, dt);
+        
+        if( this->hasLocalController() )
+        {
+            this->setAngularVelocity(this->getOrientation() * this->localAngularVelocity_);
+            this->setVelocity( this->getOrientation()*WorldEntity::FRONT*this->getVelocity().length() );
+            this->localAngularVelocity_ = 0;
+            
+            if( this->bDestroy_ )
+                this->destroy();
+        }
+    }
+    
+    bool Rocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+    {
+        if (!this->bDestroy_ && GameMode::isMaster())
+        {
+            if (otherObject == this->owner_)
+                return false;
+            
+            this->bDestroy_ = true;
+
+            if (this->owner_)
+            {
+                {
+                    ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
+                    effect->setPosition(this->getPosition());
+                    effect->setOrientation(this->getOrientation());
+                    effect->setDestroyAfterLife(true);
+                    effect->setSource("Orxonox/explosion4");
+                    effect->setLifetime(2.0f);
+                }
+
+                {
+                    ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
+                    effect->setPosition(this->getPosition());
+                    effect->setOrientation(this->getOrientation());
+                    effect->setDestroyAfterLife(true);
+                    effect->setSource("Orxonox/smoke4");
+                    effect->setLifetime(3.0f);
+                }
+            }
+
+            float dmg = this->damage_;
+            if (this->owner_)
+                dmg = this->owner_->getPickups().processModifiers(ModifierType::Damage, dmg, false);
+
+            Pawn* victim = orxonox_cast<Pawn*>(otherObject);
+            if (victim)
+                victim->damage(dmg, this->owner_);
+//             this->destroy();
+        }
+        return false;
+    }
+    
+    void Rocket::destroyObject()
+    {
+        if (GameMode::isMaster())
+            this->destroy();
+    }
+    
+    void Rocket::fired(unsigned int firemode)
+    {
+        if (this->owner_)
+        {
+            {
+                ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
+                effect->setPosition(this->getPosition());
+                effect->setOrientation(this->getOrientation());
+                effect->setDestroyAfterLife(true);
+                effect->setSource("Orxonox/explosion4");
+                effect->setLifetime(2.0f);
+            }
+
+            {
+                ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
+                effect->setPosition(this->getPosition());
+                effect->setOrientation(this->getOrientation());
+                effect->setDestroyAfterLife(true);
+                effect->setSource("Orxonox/smoke4");
+                effect->setLifetime(3.0f);
+            }
+            this->destroy();
+        }
+    }
+
+    /**
+    @brief
+        Rotates the Rocket around the y-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void Rocket::rotateYaw(const Vector2& value)
+    {
+        this->localAngularVelocity_.y += value.x;
+    }
+
+    /**
+    @brief
+        Rotates the Rocket around the x-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void Rocket::rotatePitch(const Vector2& value)
+    {
+        this->localAngularVelocity_.x += value.x;
+    }
+
+    /**
+    @brief
+        Rotates the Rocket around the z-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void Rocket::rotateRoll(const Vector2& value)
+    {
+        this->localAngularVelocity_.z += value.x;
+    }
+    
+}
Index: code/branches/presentation2/src/modules/weapons/projectiles/Rocket.h
===================================================================
--- code/branches/presentation2/src/modules/weapons/projectiles/Rocket.h	(revision 6107)
+++ code/branches/presentation2/src/modules/weapons/projectiles/Rocket.h	(revision 6107)
@@ -0,0 +1,131 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Scheuss
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Rocket_H__
+#define _Rocket_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "worldentities/ControllableEntity.h"
+
+namespace orxonox
+{
+    class ConeCollisionShape;
+
+    /**
+    @brief
+        Rocket, that is made to move upon a specified pattern.
+        This class was constructed for the PPS tutorial.
+    @author
+        Oli Scheuss
+    */
+    class _WeaponsExport Rocket : public ControllableEntity
+    {
+        public:
+            Rocket(BaseObject* creator);
+            virtual ~Rocket();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Rocket through XML.
+            virtual void tick(float dt); //!< Defines which actions the Rocket has to take in each tick.
+            
+            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
+            void destroyObject();
+            
+            virtual void moveFrontBack(const Vector2& value){}
+            virtual void moveRightLeft(const Vector2& value){}
+            virtual void moveUpDown(const Vector2& value){}
+
+            virtual void rotateYaw(const Vector2& value);
+            virtual void rotatePitch(const Vector2& value);
+            virtual void rotateRoll(const Vector2& value);
+            
+            /**
+            @brief Moves the Rocket in the Front/Back-direction by the specifed amount.
+            @param value  The amount by which the Rocket is to be moved.
+            */
+            inline void moveFrontBack(float value)
+            { this->moveFrontBack(Vector2(value, 0)); }
+            /**
+            @brief Moves the Rocket in the Right/Left-direction by the specifed amount.
+            @param value  The amount by which the Rocket is to be moved.
+            */
+            inline void moveRightLeft(float value)
+            { this->moveRightLeft(Vector2(value, 0)); }
+            /**
+            @brief Moves the Rocket in the Up/Down-direction by the specifed amount.
+            @param value  The amount by which the Rocket is to be moved.
+            */
+            inline void moveUpDown(float value)
+            { this->moveUpDown(Vector2(value, 0)); }
+            
+            /**
+            @brief Rotates the Rocket around the y-axis by the specifed amount.
+            @param value  The amount by which the Rocket is to be rotated.
+            */
+            inline void rotateYaw(float value)
+            { this->rotateYaw(Vector2(value, 0)); }
+            /**
+            @brief Rotates the Rocket around the x-axis by the specifed amount.
+            @param value  The amount by which the Rocket is to be rotated.
+            */
+            inline void rotatePitch(float value)
+            { this->rotatePitch(Vector2(value, 0)); }
+            /**
+            @brief Rotates the Rocket around the z-axis by the specifed amount.
+            @param value  The amount by which the Rocket is to be rotated.
+            */
+            inline void rotateRoll(float value)
+            { this->rotateRoll(Vector2(value, 0)); }
+            
+            void setOwner(Pawn* owner);
+            inline Pawn* getOwner() const
+                { return this->owner_; }
+                
+            inline void setDamage(float damage)
+                { this->damage_ = damage; }
+            inline float getDamage() const
+                { return this->damage_; }
+            virtual void fired(unsigned int firemode);
+            
+        private:
+            WeakPtr<Pawn> owner_;
+            Vector3 localAngularVelocity_;
+            float damage_;
+            bool bDestroy_;
+            ControllableEntity* originalControllableEntity_;
+            
+            Model* model_;
+            CameraPosition* camPosition_;
+            ConeCollisionShape* collisionShape_;
+            WeakPtr<PlayerInfo> player_;
+            Timer destroyTimer_;
+            float lifetime_;
+    };
+
+}
+
+#endif /* _Rocket_H__ */
Index: code/branches/presentation2/src/modules/weapons/weaponmodes/CMakeLists.txt
===================================================================
--- code/branches/presentation2/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 6106)
+++ code/branches/presentation2/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 6107)
@@ -5,3 +5,4 @@
   HsW01.cc
   LightningGun.cc
+  RocketFire.cc
 )
Index: code/branches/presentation2/src/modules/weapons/weaponmodes/RocketFire.cc
===================================================================
--- code/branches/presentation2/src/modules/weapons/weaponmodes/RocketFire.cc	(revision 6107)
+++ code/branches/presentation2/src/modules/weapons/weaponmodes/RocketFire.cc	(revision 6107)
@@ -0,0 +1,67 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Scheuss
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "RocketFire.h"
+
+#include "util/Math.h"
+#include "core/CoreIncludes.h"
+#include "weapons/projectiles/Rocket.h"
+
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(RocketFire);
+
+    RocketFire::RocketFire(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(RocketFire);
+
+        this->reloadTime_ = 0.20;
+        this->bParallelReload_ = false;
+        this->damage_ = 100;
+        this->speed_ = 500;
+
+        this->setMunitionName("RocketMunition");
+    }
+
+    void RocketFire::fire()
+    {
+        Rocket* rocket = new Rocket(this);
+
+        rocket->setOrientation(this->getMuzzleOrientation());
+        rocket->setPosition(this->getMuzzlePosition());
+        rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
+        rocket->scale(2);
+
+        rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        rocket->setDamage(this->getDamage());
+    }
+}
Index: code/branches/presentation2/src/modules/weapons/weaponmodes/RocketFire.h
===================================================================
--- code/branches/presentation2/src/modules/weapons/weaponmodes/RocketFire.h	(revision 6107)
+++ code/branches/presentation2/src/modules/weapons/weaponmodes/RocketFire.h	(revision 6107)
@@ -0,0 +1,50 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Scheuss
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _RocketFire_H__
+#define _RocketFire_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsExport RocketFire : public WeaponMode
+    {
+        public:
+            RocketFire(BaseObject* creator);
+            virtual ~RocketFire() {}
+
+            virtual void fire();
+
+        private:
+            float speed_;
+    };
+}
+
+#endif /* _RocketFire_H__ */
