Index: code/branches/tutorial/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/tutorial/src/orxonox/CMakeLists.txt	(revision 861)
+++ code/branches/tutorial/src/orxonox/CMakeLists.txt	(revision 862)
@@ -16,4 +16,5 @@
   objects/NPC.cc
   objects/Projectile.cc
+  objects/RotatingProjectile.cc
   objects/Skybox.cc
   objects/SpaceShip.cc
Index: code/branches/tutorial/src/orxonox/core/Identifier.h
===================================================================
--- code/branches/tutorial/src/orxonox/core/Identifier.h	(revision 861)
+++ code/branches/tutorial/src/orxonox/core/Identifier.h	(revision 862)
@@ -315,4 +315,9 @@
             {
                 this->identifier_ = ClassIdentifier<T>::getIdentifier();
+            }
+
+            SubclassIdentifier(Identifier* identifier)
+            {
+                this->identifier_ = identifier;
             }
 
Index: code/branches/tutorial/src/orxonox/objects/Projectile.cc
===================================================================
--- code/branches/tutorial/src/orxonox/objects/Projectile.cc	(revision 861)
+++ code/branches/tutorial/src/orxonox/objects/Projectile.cc	(revision 862)
@@ -39,5 +39,5 @@
     CreateFactory(Projectile);
 
-    Projectile::Projectile(SpaceShip* owner)
+    Projectile::Projectile()
     {
         RegisterObject(Projectile);
@@ -45,9 +45,18 @@
         this->setConfigValues();
 
-        this->owner_ = owner;
-
         this->billboard_.setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1);
         this->attachObject(this->billboard_.getBillboardSet());
         this->scale(0.5);
+
+        this->destroyTimer_.setTimer(this->lifetime_, false, this, &Projectile::destroyObject);
+    }
+
+    Projectile::~Projectile()
+    {
+    }
+
+    void Projectile::setOwner(SpaceShip* owner)
+    {
+        this->owner_ = owner;
 
         if (this->owner_)
@@ -59,10 +68,4 @@
             this->setVelocity(Vector3(1, 0, 0) * this->speed_);
         }
-
-        this->destroyTimer_.setTimer(this->lifetime_, false, this, &Projectile::destroyObject);
-    }
-
-    Projectile::~Projectile()
-    {
     }
 
Index: code/branches/tutorial/src/orxonox/objects/Projectile.h
===================================================================
--- code/branches/tutorial/src/orxonox/objects/Projectile.h	(revision 861)
+++ code/branches/tutorial/src/orxonox/objects/Projectile.h	(revision 862)
@@ -15,14 +15,17 @@
     {
         public:
-            Projectile(SpaceShip* owner = 0);
+            Projectile();
             virtual ~Projectile();
             void setConfigValues();
             void destroyObject();
             virtual void tick(float dt);
+            void setOwner(SpaceShip* owner = 0);
+
+        protected:
+            BillboardSet billboard_;
+            float speed_;
 
         private:
             SpaceShip* owner_;
-            BillboardSet billboard_;
-            float speed_;
             float lifetime_;
             Timer<Projectile> destroyTimer_;
Index: code/branches/tutorial/src/orxonox/objects/RotatingProjectile.cc
===================================================================
--- code/branches/tutorial/src/orxonox/objects/RotatingProjectile.cc	(revision 862)
+++ code/branches/tutorial/src/orxonox/objects/RotatingProjectile.cc	(revision 862)
@@ -0,0 +1,78 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "core/CoreIncludes.h"
+#include <OgreBillboard.h>
+#include "RotatingProjectile.h"
+
+namespace orxonox
+{
+    CreateFactory(RotatingProjectile);
+
+    RotatingProjectile::RotatingProjectile()
+    {
+        RegisterObject(RotatingProjectile);
+
+        this->time_ = 0;
+
+        this->rotatingBillboard1_.setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1);
+        this->rotatingBillboard2_.setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1);
+
+        this->rotatingNode1_ = this->getNode()->createChildSceneNode(this->getName() + "rotating1", Vector3(0, 50, 0));
+        this->rotatingNode2_ = this->getNode()->createChildSceneNode(this->getName() + "rotating2", Vector3(0, -50, 0));
+        this->rotatingNode1_->attachObject(this->rotatingBillboard1_.getBillboardSet());
+        this->rotatingNode2_->attachObject(this->rotatingBillboard2_.getBillboardSet());
+        this->rotatingNode1_->scale(0.7, 0.7, 0.7);
+        this->rotatingNode2_->scale(0.7, 0.7, 0.7);
+
+        this->setConfigValues();
+    }
+
+    RotatingProjectile::~RotatingProjectile()
+    {
+    }
+
+    void RotatingProjectile::setConfigValues()
+    {
+        SetConfigValue(colour_, ColourValue(1.0, 0.0, 0.0));
+
+        this->rotatingBillboard1_.getBillboardSet()->getBillboard(0)->setColour(this->colour_);
+        this->rotatingBillboard2_.getBillboardSet()->getBillboard(0)->setColour(this->colour_);
+    }
+
+    void RotatingProjectile::tick(float dt)
+    {
+        Projectile::tick(dt);
+
+        this->time_ += dt;
+
+        this->rotatingNode1_->setPosition(0, 50 * sin(this->time_ * 20), 50 * cos(this->time_ * 20));
+        this->rotatingNode2_->setPosition(0, -50 * sin(this->time_ * 20), -50 * cos(this->time_ * 20));
+    }
+}
Index: code/branches/tutorial/src/orxonox/objects/RotatingProjectile.h
===================================================================
--- code/branches/tutorial/src/orxonox/objects/RotatingProjectile.h	(revision 862)
+++ code/branches/tutorial/src/orxonox/objects/RotatingProjectile.h	(revision 862)
@@ -0,0 +1,28 @@
+#ifndef _RotatingProjectile_H__
+#define _RotatingProjectile_H__
+
+#include "../OrxonoxPrereqs.h"
+#include "util/Math.h"
+#include "Projectile.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport RotatingProjectile : public Projectile
+    {
+        public:
+            RotatingProjectile();
+            virtual ~RotatingProjectile();
+            void setConfigValues();
+            virtual void tick(float dt);
+
+        private:
+            ColourValue colour_;
+            BillboardSet rotatingBillboard1_;
+            BillboardSet rotatingBillboard2_;
+            Ogre::SceneNode* rotatingNode1_;
+            Ogre::SceneNode* rotatingNode2_;
+            float time_;
+    };
+}
+
+#endif /* _RotatingProjectile_H__ */
Index: code/branches/tutorial/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/branches/tutorial/src/orxonox/objects/SpaceShip.cc	(revision 861)
+++ code/branches/tutorial/src/orxonox/objects/SpaceShip.cc	(revision 862)
@@ -87,40 +87,5 @@
         this->setRotationAxis(1, 0, 0);
         this->setStatic(false);
-/*
-        this->moveForward_ = 0;
-        this->rotateUp_ = 0;
-        this->rotateDown_ = 0;
-        this->rotateRight_ = 0;
-        this->rotateLeft_ = 0;
-        this->loopRight_ = 0;
-        this->loopLeft_ = 0;
-        this->brakeForward_ = 0;
-        this->brakeRotate_ = 0;
-        this->brakeLoop_ = 0;
-        this->speedForward_ = 0;
-        this->speedRotateUpDown_ = 0;
-        this->speedRotateRightLeft_ = 0;
-        this->speedLoopRightLeft_ = 0;
-        this->maxSpeedForward_ = 0;
-        this->maxSpeedRotateUpDown_ = 0;
-        this->maxSpeedRotateRightLeft_ = 0;
-        this->maxSpeedLoopRightLeft_ = 0;
-        this->accelerationForward_ = 0;
-        this->accelerationRotateUpDown_ = 0;
-        this->accelerationRotateRightLeft_ = 0;
-        this->accelerationLoopRightLeft_ = 0;
-
-        this->speed = 250;
-        this->loop = 100;
-        this->rotate = 10;
-        this->mouseX = 0;
-        this->mouseY = 0;
-        this->maxMouseX = 0;
-        this->minMouseX = 0;
-        this->moved = false;
-
-        this->brakeRotate(rotate*10);
-        this->brakeLoop(loop);
-*/
+
         COUT(3) << "Info: SpaceShip was loaded" << std::endl;
     }
@@ -136,5 +101,5 @@
         SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
         SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds");
-        SetConfigValue(testvector_, Vector3()).description("asdfblah");
+        SetConfigValue(projectileName_, "Projectile").description("Projectile of the ship-weapon.");
     }
 
@@ -142,5 +107,4 @@
     {
         Model::loadParams(xmlElem);
-
 
         // START CREATING THRUSTER
@@ -148,9 +112,5 @@
         this->tt_->getParticleSystem()->setParameter("local_space","true");
         this->tt_->newEmitter();
-/*
-        this->tt_->setDirection(Vector3(0,0,1));
-        this->tt_->setPositionOfEmitter(0, Vector3(20,-1,-15));
-        this->tt_->setPositionOfEmitter(1, Vector3(-20,-1,-15));
-*/
+
         this->tt_->setDirection(Vector3(-1,0,0));
         this->tt_->setPositionOfEmitter(0, Vector3(-15,20,-1));
@@ -198,20 +158,4 @@
         // END of testing crosshair
 
-/*
-        if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
-        {
-            std::string forwardStr = xmlElem->Attribute("forward");
-            std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
-            std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
-            std::string looprightleftStr = xmlElem->Attribute("looprightleft");
-
-            String2Number<float>(this->maxSpeedForward_, forwardStr);
-            String2Number<float>(this->maxSpeedRotateUpDown_, rotateupdownStr);
-            String2Number<float>(this->maxSpeedRotateRightLeft_, rotaterightleftStr);
-            String2Number<float>(this->maxSpeedLoopRightLeft_, looprightleftStr);
-
-            COUT(4) << "Loader: Initialized spaceship steering with values " << maxSpeedForward_ << " " << maxSpeedRotateUpDown_ << " " << maxSpeedRotateRightLeft_ << " " << maxSpeedLoopRightLeft_ << " " << std::endl;
-    	}
-*/
         if (xmlElem->Attribute("maxSpeed") && xmlElem->Attribute("maxSideAndBackSpeed") && xmlElem->Attribute("maxRotation") && xmlElem->Attribute("transAcc") && xmlElem->Attribute("rotAcc") && xmlElem->Attribute("transDamp") && xmlElem->Attribute("rotDamp"))
         {
@@ -244,13 +188,6 @@
             Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
             this->camNode_ = this->getNode()->createChildSceneNode("CamNode");
-/*
-//            node->setInheritOrientation(false);
-            cam->setPosition(Vector3(0,50,-150));
-            cam->lookAt(Vector3(0,20,0));
-            cam->roll(Degree(0));
-*/
 
             cam->setPosition(Vector3(-200,0,35));
-//            cam->setPosition(Vector3(0,-350,0));
             cam->lookAt(Vector3(0,0,35));
             cam->roll(Degree(-90));
@@ -271,17 +208,4 @@
     bool SpaceShip::mouseMoved(const OIS::MouseEvent &e)
     {
-/*
-        this->mouseX += e.state.X.rel;
-        if (this->bInvertMouse_)
-            this->mouseY += e.state.Y.rel;
-        else
-            this->mouseY -= e.state.Y.rel;
-
-//        if(mouseX>maxMouseX) maxMouseX = mouseX;
-//        if(mouseX<minMouseX) minMouseX = mouseX;
-//        cout << "mouseX: " << mouseX << "\tmouseY: " << mouseY << endl;
-
-        this->moved = true;
-*/
         if (this->bRMousePressed_)
         {
@@ -379,5 +303,8 @@
         if (this->bLMousePressed_ && this->timeToReload_ <= 0)
         {
-            new Projectile(this);
+            SubclassIdentifier<Projectile> projectile = ID(this->projectileName_);
+            Projectile* newProjectile = projectile.fabricate();
+            newProjectile->setOwner(this);
+
             this->timeToReload_ = this->reloadTime_;
         }
@@ -488,227 +415,4 @@
         else
             this->tt_->setRate(0);
-
-/*
-        if (mKeyboard->isKeyDown(OIS::KC_UP) || mKeyboard->isKeyDown(OIS::KC_W))
-            this->moveForward(speed);
-        else
-            this->moveForward(0);
-
-        if(mKeyboard->isKeyDown(OIS::KC_DOWN) || mKeyboard->isKeyDown(OIS::KC_S))
-            this->brakeForward(speed);
-        else
-            this->brakeForward(speed/10);
-
-        if (mKeyboard->isKeyDown(OIS::KC_RIGHT) || mKeyboard->isKeyDown(OIS::KC_D))
-            this->loopRight(loop);
-        else
-            this->loopRight(0);
-
-        if (mKeyboard->isKeyDown(OIS::KC_LEFT) || mKeyboard->isKeyDown(OIS::KC_A))
-            this->loopLeft(loop);
-        else
-            this->loopLeft(0);
-
-        if(moved)
-        {
-            if (mouseY<=0)
-                this->rotateUp(-mouseY*rotate);
-            if (mouseY>0)
-                this->rotateDown(mouseY*rotate);
-            if (mouseX>0)
-                this->rotateRight(mouseX*rotate);
-            if (mouseX<=0)
-                this->rotateLeft(-mouseX*rotate);
-
-            mouseY = 0;
-            mouseX = 0;
-            moved = false;
-        }*/
-/*        else
-        {
-            this->rotateUp(0);
-            this->rotateDown(0);
-            this->rotateRight(0);
-            this->rotateLeft(0);
-        }*/
-/*
-        if(moveForward_ > 0)
-        {
-            accelerationForward_ = moveForward_;
-            if(speedForward_ < maxSpeedForward_)
-                speedForward_ += accelerationForward_*dt;
-            if(speedForward_ > maxSpeedForward_)
-                speedForward_ = maxSpeedForward_;
-        }
-
-        if(moveForward_ <= 0)
-        {
-            accelerationForward_ = -brakeForward_;
-            if(speedForward_ > 0)
-                speedForward_ += accelerationForward_*dt;
-            if(speedForward_ < 0)
-                speedForward_ = 0;
-        }
-
-        if(rotateUp_ > 0)
-        {
-            accelerationRotateUpDown_ = rotateUp_;
-            if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
-                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
-            if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
-            speedRotateUpDown_ = maxSpeedRotateUpDown_;
-        }
-
-        if(rotateDown_ > 0)
-        {
-            accelerationRotateUpDown_ = rotateDown_;
-            if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
-                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
-            if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
-                speedRotateUpDown_ = -maxSpeedRotateUpDown_;
-        }
-
-        if(rotateUp_ == 0 && rotateDown_ == 0)
-        {
-            accelerationRotateUpDown_ = brakeRotate_;
-            if(speedRotateUpDown_ > 0)
-                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
-            if(speedRotateUpDown_ < 0)
-                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
-            if(fabs(speedRotateUpDown_) < accelerationRotateUpDown_*dt)
-                speedRotateUpDown_ = 0;
-        }
-
-        if(rotateRight_ > 0)
-        {
-            accelerationRotateRightLeft_ = rotateRight_;
-            if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
-                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
-            if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
-                speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
-        }
-
-        if(rotateLeft_ > 0)
-        {
-            accelerationRotateRightLeft_ = rotateLeft_;
-            if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
-                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
-            if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
-                speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
-        }
-
-        if(rotateRight_ == 0 && rotateLeft_ == 0)
-        {
-            accelerationRotateRightLeft_ = brakeRotate_;
-            if(speedRotateRightLeft_ > 0)
-                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
-            if(speedRotateRightLeft_ < 0)
-                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
-            if(fabs(speedRotateRightLeft_) < accelerationRotateRightLeft_*dt)
-                speedRotateRightLeft_ = 0;
-        }
-
-        if(loopRight_ > 0)
-        {
-            accelerationLoopRightLeft_ = loopRight_;
-            if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
-                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
-            if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
-                speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
-        }
-
-        if(loopLeft_ > 0)
-        {
-            accelerationLoopRightLeft_ = loopLeft_;
-            if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
-                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
-            if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
-                speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
-        }
-
-        if(loopLeft_ == 0 && loopRight_ == 0)
-        {
-            accelerationLoopRightLeft_ = brakeLoop_;
-            if(speedLoopRightLeft_ > 0)
-                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
-            if(speedLoopRightLeft_ < 0)
-                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
-            if(fabs(speedLoopRightLeft_) < accelerationLoopRightLeft_*dt)
-                speedLoopRightLeft_ = 0;
-        }
-
-        Vector3 transVector = Vector3::ZERO;
-*/
-/*
-        transVector.z = 1;
-        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
-        this->pitch(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
-        this->yaw(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
-        this->roll(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
-*/
-/*
-        transVector.x = 1;
-        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
-        this->yaw(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
-        this->roll(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
-        this->pitch(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
-*/
-    }
-/*
-    void SpaceShip::moveForward(float moveForward) {
-        moveForward_ = moveForward;
-    }
-
-    void SpaceShip::rotateUp(float rotateUp) {
-        rotateUp_ = rotateUp;
-    }
-
-    void SpaceShip::rotateDown(float rotateDown) {
-        rotateDown_ = rotateDown;
-    }
-
-    void SpaceShip::rotateLeft(float rotateLeft) {
-        rotateLeft_ = rotateLeft;
-    }
-
-    void SpaceShip::rotateRight(float rotateRight) {
-        rotateRight_ = rotateRight;
-    }
-
-    void SpaceShip::loopLeft(float loopLeft) {
-        loopLeft_ = loopLeft;
-    }
-
-    void SpaceShip::loopRight(float loopRight) {
-        loopRight_ = loopRight;
-    }
-
-    void SpaceShip::brakeForward(float brakeForward) {
-        brakeForward_ = brakeForward;
-    }
-
-    void SpaceShip::brakeRotate(float brakeRotate) {
-        brakeRotate_ = brakeRotate;
-    }
-
-    void SpaceShip::brakeLoop(float brakeLoop) {
-        brakeLoop_ = brakeLoop;
-    }
-
-    void SpaceShip::maxSpeedForward(float maxSpeedForward) {
-        maxSpeedForward_ = maxSpeedForward;
-    }
-
-    void SpaceShip::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
-        maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
-    }
-
-    void SpaceShip::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
-        maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
-    }
-
-    void SpaceShip::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
-        maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
-    }
-*/
+    }
 }
Index: code/branches/tutorial/src/orxonox/objects/SpaceShip.h
===================================================================
--- code/branches/tutorial/src/orxonox/objects/SpaceShip.h	(revision 861)
+++ code/branches/tutorial/src/orxonox/objects/SpaceShip.h	(revision 862)
@@ -31,5 +31,6 @@
 
         private:
-            Vector3 testvector_;
+            std::string projectileName_;
+
             bool bInvertYAxis_;
             bool setMouseEventCallback_;
