Index: code/branches/network/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/branches/network/src/orxonox/objects/SpaceShip.cc	(revision 1454)
+++ code/branches/network/src/orxonox/objects/SpaceShip.cc	(revision 1479)
@@ -45,4 +45,5 @@
 #include "particle/ParticleInterface.h"
 #include "Projectile.h"
+#include "RotatingProjectile.h"
 #include "core/XMLPort.h"
 #include "core/ConsoleCommand.h"
@@ -78,6 +79,4 @@
 
     SpaceShip::SpaceShip() :
-      teamNr_(0),
-      health_(100),
       //testvector_(0,0,0),
       //bInvertYAxis_(false),
@@ -112,5 +111,7 @@
       mouseY_(0.0f),
       emitterRate_(0.0f),
-      myShip_(false)
+      myShip_(false),
+      teamNr_(0),
+      health_(100)
     {
         RegisterObject(SpaceShip);
@@ -125,4 +126,6 @@
         initialOrth_ = Vector3(0.0, 0.0, 1.0);
         currentOrth_ = initialOrth_;
+
+        this->camName_ = this->getName() + "CamNode";
 
         this->setRotationAxis(1, 0, 0);
@@ -209,18 +212,21 @@
         // END CREATING BLINKING LIGHTS
 
-        // START of testing crosshair
-        this->crosshairNear_.setBillboardSet("Orxonox/Crosshair", ColourValue(1.0, 1.0, 0.0), 1);
-        this->crosshairFar_.setBillboardSet("Orxonox/Crosshair", ColourValue(1.0, 1.0, 0.0), 1);
-
-        this->chNearNode_ = this->getNode()->createChildSceneNode(this->getName() + "near", Vector3(50.0, 0.0, 0.0));
-        this->chNearNode_->setInheritScale(false);
-        this->chFarNode_ = this->getNode()->createChildSceneNode(this->getName() + "far", Vector3(200.0, 0.0, 0.0));
-        this->chFarNode_->setInheritScale(false);
-
-        this->chNearNode_->attachObject(this->crosshairNear_.getBillboardSet());
-        this->chNearNode_->setScale(0.2, 0.2, 0.2);
-
-        this->chFarNode_->attachObject(this->crosshairFar_.getBillboardSet());
-        this->chFarNode_->setScale(0.4, 0.4, 0.4);
+        if (this->isExactlyA(Class(SpaceShip)))
+        {
+            // START of testing crosshair
+            this->crosshairNear_.setBillboardSet("Orxonox/Crosshair", ColourValue(1.0, 1.0, 0.0), 1);
+            this->crosshairFar_.setBillboardSet("Orxonox/Crosshair", ColourValue(1.0, 1.0, 0.0), 1);
+
+            this->chNearNode_ = this->getNode()->createChildSceneNode(this->getName() + "near", Vector3(50.0, 0.0, 0.0));
+            this->chNearNode_->setInheritScale(false);
+            this->chFarNode_ = this->getNode()->createChildSceneNode(this->getName() + "far", Vector3(200.0, 0.0, 0.0));
+            this->chFarNode_->setInheritScale(false);
+
+            this->chNearNode_->attachObject(this->crosshairNear_.getBillboardSet());
+            this->chNearNode_->setScale(0.2, 0.2, 0.2);
+
+            this->chFarNode_->attachObject(this->crosshairFar_.getBillboardSet());
+            this->chFarNode_->setScale(0.4, 0.4, 0.4);
+        }
 
         createCamera();
@@ -362,5 +368,10 @@
         {
 
-            Projectile *p = new Projectile(this);
+            Projectile *p;
+            if (this->isExactlyA(Class(SpaceShip)))
+                p = new RotatingProjectile(this);
+            else
+                p = new Projectile(this);
+            p->setColour(this->getProjectileColour());
             p->create();
             if(p->classID==0)
@@ -463,49 +474,57 @@
           COUT(4) << "not steering ship: " << objectID << " our ship: " << network::Client::getSingleton()->getShipID() << std::endl;*/
     }
+
     void SpaceShip::movePitch(float val)
-    {
-        SpaceShip* this_ = getLocalShip();
-        val = -val * val * sgn(val) * this_->rotationAcceleration_;
-        if (val > this_->maxRotation_)
-            val = this_->maxRotation_;
-        if (val < -this_->maxRotation_)
-            val = -this_->maxRotation_;
-        this_->mouseYRotation_ = Radian(val);
-    }
-
+    {   getLocalShip()->setMovePitch(val);   }
     void SpaceShip::moveYaw(float val)
-    {
-        SpaceShip* this_ = getLocalShip();
-        val = -val * val * sgn(val) * this_->rotationAcceleration_;
-        if (val > this_->maxRotation_)
-            val = this_->maxRotation_;
-        if (val < -this_->maxRotation_)
-            val = -this_->maxRotation_;
-        this_->mouseXRotation_ = Radian(val);
-    }
-
+    {   getLocalShip()->setMoveYaw(val);   }
     void SpaceShip::moveRoll(float val)
-    {
-        SpaceShip* this_ = getLocalShip();
-        this_->momentum_ = Radian(-this_->rotationAccelerationRadian_ * val);
-        //COUT(3) << "rotating val: " << val << " acceleration: " << this_->rotationAccelerationRadian_.valueDegrees() << std::endl;
-    }
-
+    {   getLocalShip()->setMoveRoll(val);   }
     void SpaceShip::moveLongitudinal(float val)
-    {
-        SpaceShip* this_ = getLocalShip();
-        this_->acceleration_.x = this_->translationAcceleration_ * val;
-    }
-
+    {   getLocalShip()->setMoveLongitudinal(val);   }
     void SpaceShip::moveLateral(float val)
-    {
-        SpaceShip* this_ = getLocalShip();
-        this_->acceleration_.y = -this_->translationAcceleration_ * val;
-    }
-
+    {   getLocalShip()->setMoveLateral(val);   }
     void SpaceShip::fire()
-    {
-        SpaceShip* this_ = getLocalShip();
-        this_->bLMousePressed_ = true;
+    {   getLocalShip()->doFire();   }
+
+    void SpaceShip::setMovePitch(float val)
+    {
+        val = -val * val * sgn(val) * this->rotationAcceleration_;
+        if (val > this->maxRotation_)
+            val = this->maxRotation_;
+        if (val < -this->maxRotation_)
+            val = -this->maxRotation_;
+        this->mouseYRotation_ = Radian(val);
+    }
+
+    void SpaceShip::setMoveYaw(float val)
+    {
+        val = -val * val * sgn(val) * this->rotationAcceleration_;
+        if (val > this->maxRotation_)
+            val = this->maxRotation_;
+        if (val < -this->maxRotation_)
+            val = -this->maxRotation_;
+        this->mouseXRotation_ = Radian(val);
+    }
+
+    void SpaceShip::setMoveRoll(float val)
+    {
+        this->momentum_ = Radian(-this->rotationAccelerationRadian_ * val);
+        //COUT(3) << "rotating val: " << val << " acceleration: " << this->rotationAccelerationRadian_.valueDegrees() << std::endl;
+    }
+
+    void SpaceShip::setMoveLongitudinal(float val)
+    {
+        this->acceleration_.x = this->translationAcceleration_ * val;
+    }
+
+    void SpaceShip::setMoveLateral(float val)
+    {
+        this->acceleration_.y = -this->translationAcceleration_ * val;
+    }
+
+    void SpaceShip::doFire()
+    {
+        this->bLMousePressed_ = true;
     }
 }
