Index: trunk/src/world_entities/space_ships/helicopter.cc
===================================================================
--- trunk/src/world_entities/space_ships/helicopter.cc	(revision 6804)
+++ trunk/src/world_entities/space_ships/helicopter.cc	(revision 6805)
@@ -259,9 +259,4 @@
 void Helicopter::collidesWith(WorldEntity* entity, const Vector& location)
 {
-  if (entity->isA(CL_TURRET_POWER_UP))
-  {
-    this->ADDWEAPON();
-    }
-//  PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
 }
 
@@ -468,6 +463,4 @@
 
     glPopMatrix ();
-
-  this->getWeaponManager()->draw();
 }
 
@@ -515,35 +508,2 @@
     }
 }
-
-#include "weapons/aiming_turret.h"
-// FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG
-void Helicopter::ADDWEAPON()
-{
-  Weapon* turret = NULL;
-
-  if ((float)rand()/RAND_MAX < .1)
-  {
-    //if (this->getWeaponManager()->hasFreeSlot(2, WTYPE_TURRET))
-    {
-      turret = new Turret();
-      this->addWeapon(turret, 2);
-      this->getWeaponManager()->changeWeaponConfig(2);
-    }
-  }
-  else
-  {
-    //if (this->getWeaponManager()->hasFreeSlot(3))
-    {
-      turret = new AimingTurret();
-      this->addWeapon(turret, 3);
-
-      this->getWeaponManager()->changeWeaponConfig(3);
-    }
-  }
-
-  if(turret != NULL)
-  {
-    turret->setName("Turret");
-    turret->setStateDuration(WS_SHOOTING, (float)rand()/RAND_MAX*.5+.1);
-  }
-}
Index: trunk/src/world_entities/space_ships/helicopter.h
===================================================================
--- trunk/src/world_entities/space_ships/helicopter.h	(revision 6804)
+++ trunk/src/world_entities/space_ships/helicopter.h	(revision 6805)
@@ -42,7 +42,4 @@
     void calculateVelocity(float time);
 
-    // !! temporary !!
-    void ADDWEAPON();
-
     bool                  bUp;                //!< up button pressed.
     bool                  bDown;              //!< down button pressed.
Index: trunk/src/world_entities/space_ships/hover.cc
===================================================================
--- trunk/src/world_entities/space_ships/hover.cc	(revision 6804)
+++ trunk/src/world_entities/space_ships/hover.cc	(revision 6805)
@@ -39,6 +39,5 @@
  */
 Hover::~Hover ()
-{
-}
+{}
 
 /**
@@ -97,5 +96,5 @@
 void Hover::init()
 {
-//  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
+  //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
   this->setClassID(CL_HOVER, "Hover");
 
@@ -106,6 +105,5 @@
   EventHandler::getInstance()->grabEvents(true);
 
-  bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false;
-  bFire = false;
+  bForward = bBackward = bLeft = bRight = bAscend = bDescend = false;
   xMouse = yMouse = 0;
   mouseSensitivity = 0.05;
@@ -144,9 +142,4 @@
   this->loadModel("models/ships/hoverglider_wing.obj", 1.0f, 3);
   this->loadModel("models/ships/hoverglider_rotor.obj", 1.0f, 4);
-
-
-  //travelSpeed = 15.0;
-  this->velocity = Vector(0.0,0.0,0.0);
-  this->velocityDir = Vector(1.0,0.0,0.0);
 
   //add events to the eventlist
@@ -243,5 +236,4 @@
 void Hover::collidesWith(WorldEntity* entity, const Vector& location)
 {
-
 }
 
@@ -257,5 +249,5 @@
 
   if( xMouse != 0 || yMouse != 0)
-   {
+  {
     if (xMouse > controlVelocityX) xMouse = controlVelocityX;
     else if (xMouse < -controlVelocityX) xMouse = -controlVelocityX;
@@ -265,5 +257,5 @@
 
   // spaceship controlled movement
-  this->calculateVelocity(dt);
+  this->movement(dt);
 
   Vector move = (velocity)*dt;
@@ -271,5 +263,5 @@
   // this is the air friction (necessary for a smooth control)
   if(velocity.len() != 0) velocity -= velocity*0.1;
-  this->shiftCoor (move);
+    this->shiftCoor (move);
 
 }
@@ -279,118 +271,38 @@
  * @param time the timeslice since the last frame
 */
-void Hover::calculateVelocity (float time)
+void Hover::movement (float time)
 {
   Vector accel(0.0, 0.0, 0.0);
-  float rotValX = 0.0;
-  float rotValZ = 0.0;
-  /* FIXME: calculating the direction and orthDirection every timeSlice is redundant! save it somewhere */
-  /* calculate the direction in which the craft is heading  */
-
-  if( this->bUp )
-   {
-     //this->shiftCoor(this->getAbsDirX());
-     //accel -= this->getAbsDirY();
-
-     accel += Vector((this->getAbsDirX()).x,0,(this->getAbsDirX()).z);
-     if((this->getAbsDirX()).y >= -0.1) rotValZ -= time;
-   }
-   else
-   {
-       if(this->getAbsDirX().y < -.02) this->shiftDir(Quaternion(time, Vector(0,0,1)));
-   }
-
-  if( this->bDown )
-   {
-     //this->shiftCoor((this->getAbsDirX())*-1);
-     //accel -= this->getAbsDirY();
-
-     accel -= Vector((this->getAbsDirX()).x,0,(this->getAbsDirX()).z);
-     rotValZ += time;
-   }
-   else
-   {
-         if(this->getAbsDirX().y > 0.02) this->shiftDir(Quaternion(-time, Vector(0,0,1)));
-   }
-
-  if( this->bLeft /* > -this->getRelCoor().z*2*/)
-  {
-    //this->shiftDir(Quaternion(time, Vector(0,1,0)));
-    //accel -= this->getAbsDirY();
-    //velocityDir.normalize();
-
-    accel -= Vector((this->getAbsDirZ()).x,0,(this->getAbsDirZ()).z);
-    rotValX -= time;
-  }
-  else
-   {
-         if(this->getAbsDirZ().y > 0.02) this->shiftDir(Quaternion(time, Vector(1,0,0)));
-   }
-
-  if( this->bRight /* > this->getRelCoor().z*2*/)
-  {
-    //this->shiftDir(Quaternion(-time, Vector(0,1,0)));
-    //accel += this->getAbsDirY();
-    //velocityDir.normalize();
-
-    accel += Vector((this->getAbsDirZ()).x,0,(this->getAbsDirZ()).z);
-    rotValX += time;
-  }
-  else
-   {
-         if(this->getAbsDirZ().y < -0.02) this->shiftDir(Quaternion(-time, Vector(1,0,0)));
-   }
-
-  if( this->bRollL /* > -this->getRelCoor().z*2*/)
-  {
-    this->shiftDir(Quaternion(-time, Vector(1,0,0)));
-    //accel -= rightDirection;
-    //velocityDir.normalize();
-    //rot +=Vector(1,0,0);
-    //rotVal -= .4;
-  }
-  if( this->bRollR /* > this->getRelCoor().z*2*/)
-  {
-    this->shiftDir(Quaternion(time, Vector(1,0,0)));
-
-    //accel += rightDirection;
-    //velocityDir.normalize();
-    //rot += Vector(1,0,0);
-    //rotVal += .4;
-  }
-  if (this->bAscend )
-  {
-    //this->shiftDir(Quaternion(time, Vector(0,0,1)));
-
-    accel += this->getAbsDirY();
-    //rotorspeed += 0.05;
-    //if (rotorspeed >= 2) rotorspeed = 2;
-    //velocityDir.normalize();
-    //rot += Vector(0,0,1);
-    //rotVal += .4;
-  }
-  else
-  {
-    //if(rotorspeed >= 1.05) rotorspeed -= 0.05;
-  }
-
+  float rotVal = .3;
+
+  if( this->bForward )  {
+    accel += Vector(rotVal, 0, 0);
+  }
+
+  if( this->bBackward ) {
+      accel -= Vector(rotVal,0,0);
+  }
+  if( this->bLeft) {
+    accel -= Vector(0,0,rotVal);
+  }
+  if( this->bRight) {
+    accel += Vector(0,0,rotVal);
+  }
+
+  if (this->bAscend ) {
+    accel += Vector(0,rotVal,0);
+  }
   if (this->bDescend )
-  {
-    //this->shiftDir(Quaternion(-time, Vector(0,0,1)));
-
-    accel -= this->getAbsDirY();
-    //rotorspeed -= 0.05;
-    //if (rotorspeed <= 0) rotorspeed = 0;
-    //velocityDir.normalize();
-    //rot += Vector(0,0,1);
-    //rotVal -= .4;
-  }
-  else
-  {
-    //if(rotorspeed <= 0.05) rotorspeed += 0.05;
-  }
-
-  velocity += accel*3;
-  if((this->getAbsDirX()).y <= 0.3 && (this->getAbsDirX()).y >= -0.3) this->shiftDir(Quaternion(rotValZ, Vector(0,0,1)));
-  if((this->getAbsDirZ()).y <= 0.3 && (this->getAbsDirZ()).y >= -0.3) this->shiftDir(Quaternion(rotValX, Vector(1,0,0)));
+    accel -= Vector(0,rotVal,0);
+
+  velocity += accel * 3.0;
+
+  this->setRelDirSoft(this->direction * Quaternion(-accel.x, Vector(0,0,1)) * Quaternion(accel.z, Vector(1,0,0)), 5);
+
+  this->wingNodeLeft.setRelDirSoft(Quaternion(accel.z, Vector(1,0,0)), 10);
+  this->rotorNodeLeft.setRelDirSoft(Quaternion(-2.0*accel.x, Vector(0,0,1)), 10);
+
+  this->wingNodeRight.setRelDirSoft(Quaternion(accel.z, Vector(1,0,0)), 10);
+  this->rotorNodeRight.setRelDirSoft(Quaternion(-2.0*accel.x, Vector(0,0,1)), 10);
 }
 
@@ -440,18 +352,4 @@
   this->getModel(4)->draw();
   glPopMatrix ();
-
-  this->getWeaponManager()->draw();
-}
-
-
-/**
- * weapon manipulation by the player
-*/
-void Hover::weaponAction()
-{
-  if( this->bFire)
-    {
-      this->getWeaponManager()->fire();
-    }
 }
 
@@ -464,7 +362,7 @@
 
   if( event.type == KeyMapper::PEV_LEFT)
-      this->bLeft = event.bPressed;
+    this->bLeft = event.bPressed;
   else if( event.type == KeyMapper::PEV_RIGHT)
-      this->bRight = event.bPressed;
+    this->bRight = event.bPressed;
   else if( event.type == SDLK_e)
     this->bAscend = event.bPressed; //this->shiftCoor(0,.1,0);
@@ -472,7 +370,7 @@
     this->bDescend = event.bPressed; //this->shiftCoor(0,-.1,0);
   else if( event.type == KeyMapper::PEV_UP)
-    this->bUp = event.bPressed; //this->shiftCoor(0,.1,0);
+    this->bForward = event.bPressed; //this->shiftCoor(0,.1,0);
   else if( event.type == KeyMapper::PEV_DOWN)
-    this->bDown = event.bPressed; //this->shiftCoor(0,-.1,0);
+    this->bBackward = event.bPressed; //this->shiftCoor(0,-.1,0);
   else if( event.type == EV_MOUSE_MOTION)
   {
@@ -480,21 +378,21 @@
     this->yMouse = event.yRel*mouseSensitivity;
 
-    this->shiftDir(Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0)));
-
+    // rotate the Player around the y-axis
+    this->direction *= Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0));
+
+    // rotate the Camera around the z-axis
     Quaternion yDir = Quaternion(-M_PI/4*yMouse*mouseSensitivity, Vector(0,0,1));
-
-
     if ((this->cameraNode.getAbsDirY()).y < 0.5)
     {
-     if((this->cameraNode.getAbsDirX()).y > 0)
-     {
+      if((this->cameraNode.getAbsDirX()).y > 0)
+      {
         if(yMouse > 0) this->cameraNode.shiftDir(yDir);
-     }
-     else
-     {
-         if(yMouse < 0) this->cameraNode.shiftDir(yDir);
-     }
+      }
+      else
+      {
+        if(yMouse < 0) this->cameraNode.shiftDir(yDir);
+      }
     }
-    else this->cameraNode.shiftDir(yDir);;
-    }
-}
+    else this->cameraNode.shiftDir(yDir);
+  }
+}
Index: trunk/src/world_entities/space_ships/hover.h
===================================================================
--- trunk/src/world_entities/space_ships/hover.h	(revision 6804)
+++ trunk/src/world_entities/space_ships/hover.h	(revision 6805)
@@ -35,18 +35,13 @@
   private:
     void init();
+    void movement(float time);
 
   private:
-    void calculateVelocity(float time);
-    void weaponAction();
-
-    bool                  bUp;                //!< up button pressed.
-    bool                  bDown;              //!< down button pressed.
+    bool                  bForward;           //!< forward button pressed.
+    bool                  bBackward;          //!< backward button pressed.
     bool                  bLeft;              //!< left button pressed.
     bool                  bRight;             //!< right button pressed.
     bool                  bAscend;            //!< ascend button pressed.
     bool                  bDescend;           //!< descend button presses.
-    bool                  bFire;              //!< fire button pressed.
-    bool                  bRollL;             //!< rolling button pressed (left)
-    bool                  bRollR;             //!< rolling button pressed (right)
 
     float                 xMouse;             //!< mouse moved in x-Direction
@@ -65,8 +60,8 @@
     PNode                 cameraNode;
 
-    Vector                velocity;           //!< the velocity of the player.
-    Vector                velocityDir;        //!< the direction of the velocity of the spaceship
-    float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
-    float                 acceleration;       //!< the acceleration of the player.
+    Vector                velocity;           //!< the velocity of the Hover.
+    Quaternion            direction;          //!< the direction of the Hover.
+    float                 travelSpeed;        //!< the current speed of the Hove (to make soft movement)
+    float                 acceleration;       //!< the acceleration of the Hover.
     //float                 rotorspeed;         //!< the speed of the rotor.
     //float                 tailrotorspeed;     //!< the relativ speed ot the tail rotor
