Index: /branches/playability/src/world_entities/effects/trail.cc
===================================================================
--- /branches/playability/src/world_entities/effects/trail.cc	(revision 10094)
+++ /branches/playability/src/world_entities/effects/trail.cc	(revision 10095)
@@ -43,5 +43,5 @@
  * 
  */
-Trail::Trail (float maxLength, int sections, float radius)
+Trail::Trail (float maxLength, int sections, float radius, PNode* parent)
 {
   this->maxLength = maxLength;
@@ -49,4 +49,5 @@
   this->sections  = sections;
   this->radius    = radius;
+  this->setParent( parent);
 
   this->nodeList  = new Vector[sections];
@@ -96,5 +97,5 @@
   for( int i = 1; i < sections; i++)
   {
-    this->nodeList[i] = (this->getAbsCoor() - ((Vector(1,0,0) * (i * this->maxLength / sections))));
+    this->nodeList[i] = (this->getAbsCoor() - (((this->getParent()->getAbsDir().apply(Vector(1,1,1))).getNormalized() * (i * this->maxLength / sections))));
     //PRINTF(0)(" N%i (%f,%f,%f)",i,this->nodeList[i].x,this->nodeList[i].y,this->nodeList[i].z);
   }
@@ -277,6 +278,6 @@
     Q[3]  = now + Vector(0,-radone,0) ;
 
-	glTexCoord2f(1.0f, 0.0f); glVertex3f(Q[3].x,Q[3].y,Q[3].z);
-	glTexCoord2f(0.0f, 0.0f); glVertex3f(Q[0].x,Q[0].y,Q[0].z);
+	glTexCoord2f(1.0f, 0.0f); glVertex3f(Q[3].x,Q[3].y,Q[3].z+0.0001f);
+	glTexCoord2f(0.0f, 0.0f); glVertex3f(Q[0].x,Q[0].y,Q[0].z+0.0001f);
 
     if( i == 1)
@@ -284,6 +285,6 @@
         Q[1]  = later + Vector(0,radzero,0) ;
         Q[2]  = later + Vector(0,-radzero,0) ;
-		glTexCoord2f(1.0f, 1.0f); glVertex3f(Q[2].x,Q[2].y,Q[2].z);
-		glTexCoord2f(0.0f, 1.0f); glVertex3f(Q[1].x,Q[1].y,Q[1].z);
+		glTexCoord2f(1.0f, 1.0f); glVertex3f(Q[2].x,Q[2].y,Q[2].z+0.0001f);
+		glTexCoord2f(0.0f, 1.0f); glVertex3f(Q[1].x,Q[1].y,Q[1].z+0.0001f);
 	}
 
@@ -340,6 +341,6 @@
     Q[3]  = now + targ.cross(Vector(0,-radone,0)) ;
 
-	glTexCoord2f(0.0f, 0.0f); glVertex3f(Q[0].x,Q[0].y,Q[0].z);
-	glTexCoord2f(1.0f, 0.0f); glVertex3f(Q[3].x,Q[3].y,Q[3].z);
+	glTexCoord2f(0.0f, 0.0f); glVertex3f(Q[0].x+0.0001f,Q[0].y,Q[0].z);
+	glTexCoord2f(1.0f, 0.0f); glVertex3f(Q[3].x+0.0001f,Q[3].y,Q[3].z);
 
     if( i == 1)
@@ -347,6 +348,6 @@
         Q[1]  = later + targ.cross(Vector(0,radzero,0)) ;
         Q[2]  = later + targ.cross(Vector(0,-radzero,0)) ;
-		glTexCoord2f(0.0f, 1.0f); glVertex3f(Q[1].x,Q[1].y,Q[1].z);
-		glTexCoord2f(1.0f, 1.0f); glVertex3f(Q[2].x,Q[2].y,Q[2].z);
+		glTexCoord2f(0.0f, 1.0f); glVertex3f(Q[1].x+0.0001f,Q[1].y,Q[1].z);
+		glTexCoord2f(1.0f, 1.0f); glVertex3f(Q[2].x+0.0001f,Q[2].y,Q[2].z);
 	}
 
Index: /branches/playability/src/world_entities/effects/trail.h
===================================================================
--- /branches/playability/src/world_entities/effects/trail.h	(revision 10094)
+++ /branches/playability/src/world_entities/effects/trail.h	(revision 10095)
@@ -16,5 +16,5 @@
   ObjectListDeclaration(Trail);
   public:
-    Trail(float maxLength, int sections, float radius);
+    Trail(float maxLength, int sections, float radius, PNode* parent);
     Trail(const TiXmlElement* root = NULL);
     virtual ~Trail();
Index: /branches/playability/src/world_entities/projectiles/mbolt.cc
===================================================================
--- /branches/playability/src/world_entities/projectiles/mbolt.cc	(revision 10094)
+++ /branches/playability/src/world_entities/projectiles/mbolt.cc	(revision 10095)
@@ -77,7 +77,8 @@
 
   
-  this->trail = new Trail(6,1,.4);
-  this->trail->setParent( this);
+  this->trail = new Trail(6,4,.1, this);
+  //this->trail->setParent( this);
   this->trail->setTexture( "maps/laser.png");
+  this->trail->setAbsCoor(this->getAbsCoor() - Vector(1,0,0));
 }
 
@@ -126,5 +127,4 @@
   this->emitter->setEmissionRate(10.0);
   this->emitter->setEmissionVelocity(0);
-  this->updateNode(0);
 }
 
@@ -144,12 +144,12 @@
 void MBolt::collidesWith(WorldEntity* entity, const Vector& location)
 {
-  PRINTF(0)("MBolt collides pretest\n");
-  if( entity == NULL || dynamic_cast<SpaceShip*>(entity) == NULL)
+  PRINTF(5)("MBolt collides pretest\n");
+  if( entity == NULL)
     return;
 
   PRINTF(0)("MBolt collides\n");
   dynamic_cast<SpaceShip*>(entity)->damage( this->getPhysDamage(), this->getElecDamage());
-  entity->destroy(this);
-  this->deactivate();
+  //entity->destroy(this);
+  //this->deactivate();
 }
 
Index: /branches/playability/src/world_entities/projectiles/swarm_projectile.cc
===================================================================
--- /branches/playability/src/world_entities/projectiles/swarm_projectile.cc	(revision 10094)
+++ /branches/playability/src/world_entities/projectiles/swarm_projectile.cc	(revision 10095)
@@ -59,6 +59,6 @@
   this->physDamage = 200;
 
-  this->trail = new Trail(2.5,4,.2);
-  this->trail->setParent( this);
+  this->trail = new Trail(2.5,4,.2, this);
+  //this->trail->setParent( this);
   this->trail->setTexture( "maps/laser.png");
 }
@@ -240,4 +240,9 @@
   this->lastDir = this->curDir;
   this->curDir = this->velocity;
+  if( (this->getAbsCoor() - this->target->getAbsCoor()).len() < 4)   // FIXME  Temp fake workaround for collision :)
+  {
+    dynamic_cast<WorldEntity*>(target)->destroy( this);
+    this->destroy( this);
+  }
 }
 
Index: /branches/playability/src/world_entities/space_ships/space_ship.cc
===================================================================
--- /branches/playability/src/world_entities/space_ships/space_ship.cc	(revision 10094)
+++ /branches/playability/src/world_entities/space_ships/space_ship.cc	(revision 10095)
@@ -326,14 +326,14 @@
 
   
-  this->trail = new Trail( 15, 10, .2);
-  this->trail->setParent( this);
+  this->trail = new Trail( 3, 3, .2, this);
+  //this->trail->setParent( this);
   this->trail->setTexture( "maps/engine.png");
 
-  this->trailL = new Trail( 15, 10, .2);
-  this->trailL->setParent( this);
+  this->trailL = new Trail( 3, 3, .2, this);
+  //this->trailL->setParent( this);
   this->trailL->setTexture( "maps/engine.png");
 
-  this->trailR = new Trail( 15, 10, .2);
-  this->trailR->setParent( this);
+  this->trailR = new Trail( 3, 3, .2, this);
+  //this->trailR->setParent( this);
   this->trailR->setTexture( "maps/engine.png");
 }
@@ -371,10 +371,10 @@
 {
   this->secWeaponMan.showCrosshair();
-  /*for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++)
-  {
-    if( likely( dynamic_cast<WorldEntity*>(*it) != NULL))
-      dynamic_cast<WorldEntity*>(*it)->toList( OM_GROUP_01);
-  }*/
   this->toList( OM_GROUP_01 );
+  for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++)
+  {
+    if( likely( dynamic_cast<Weapon*>(*it) != NULL))
+      dynamic_cast<WorldEntity*>(*it)->toList( OM_GROUP_00_PROJ);
+  }
   //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( true);
   //this->attachCamera();
@@ -385,10 +385,10 @@
 {
   this->secWeaponMan.hideCrosshair();
-  /*for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++)
-  {
-    if( likely(dynamic_cast<WorldEntity*>(*it) != NULL))
-      dynamic_cast<WorldEntity*>(*it)->toList( OM_GROUP_00);
-  }*/
   this->toList( OM_GROUP_00);
+  for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++)
+  {
+    if( likely( dynamic_cast<Weapon*>(*it) != NULL))
+      dynamic_cast<WorldEntity*>(*it)->toList( OM_GROUP_01_PROJ);
+  }
   //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( false);
   //this->detachCamera();
@@ -492,33 +492,4 @@
   this->acceleration = this->travelSpeed * 2;
 
-  /*
-  if( ( xMouse != 0 || yMouse != 0 ) && this->getOwner() == SharedNetworkData::getInstance()->getHostID() )
-  {
-    if (xMouse > controlVelocityX) xMouse = controlVelocityX;
-    else if (xMouse < -controlVelocityX) xMouse = -controlVelocityX;
-    if (yMouse > controlVelocityY) yMouse = controlVelocityY;
-    else if (yMouse < -controlVelocityY) yMouse = -controlVelocityY;
-
-    pitchDir = (Quaternion(xMouse*mouseSensitivity*0.5, Vector(1,0,0)));
-
-    mouseDir *= (Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*mouseSensitivity*yInvert, Vector(0,0,1))*pitchDir);
-    xMouse = yMouse = 0;
-  }
-*/
-
-  // spaceship controlled movement fire(bool bF){ this->bFire = bF;}
-  //if (this->getOwner() == this->getHostID())
-
-  //is->calculateVelocity(time);
-
-
-  //vector move = velocity*time;
-
-  /*
-  //orient the velocity in the direction of the spaceship.
-  travelSpeed = velocity.len();
-  velocity += ((this->getAbsDirX())*travelSpeed-velocity)*airViscosity;
-  velocity = (velocity.getNormalized())*travelSpeed;
-  */
   this->movement(time);
 
@@ -527,7 +498,12 @@
   this->cameraNode.setRelDirSoft(this->getAbsDir(), 30.0f);
 
+  
+  this->velocity  = (this->getAbsCoor() - this->oldPos) / time;
+  this->oldPos    = this->getAbsCoor();
+
   this->trail->tick(time);
   this->trailL->tick(time);
   this->trailR->tick(time);
+
   //orient the spaceship in direction of the mouse
   /*
@@ -600,5 +576,5 @@
 {
   PRINTF(0)("spaceship destroy\n");
-  /*
+  
   EmitterNode* node  = NULL;
   DotEmitter* emitter = NULL;
@@ -628,19 +604,20 @@
   node->setVelocity( this->getParent()->getVelocity());
   node->setAbsCoor( this->getAbsCoor());
-  node->start();*/
+  node->start();
+/*
   PNode* node          = new PNode();
   node->setAbsCoor(this->getAbsCoor());
   Explosion* explosion = new Explosion();
   explosion->explode( node, Vector(5,5,5));
-
+*/
   this->setAbsCoor(Vector(-10000,10000,10000));
   this->hide();
 
   this->toList( OM_DEAD);
-  /*for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++)
-  {
-    if( dynamic_cast<WorldEntity*>(*it) != NULL)
+  for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++)
+  {
+    if( likely( dynamic_cast<Weapon*>(*it) != NULL))
       dynamic_cast<WorldEntity*>(*it)->toList( OM_DEAD);
-  }*/
+  }
     PRINTF(0)("spaceship destroy == ship translated \n");
 }
@@ -654,8 +631,22 @@
       dynamic_cast<WorldEntity*>(*it)->toList( OM_GROUP_00);
   }*/
-  /*if( this->hasPlayer())
+  if( this->hasPlayer())
+  {
     this->toList( OM_GROUP_01);
+    for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++)
+	{
+	  if( likely( dynamic_cast<Weapon*>(*it) != NULL))
+		dynamic_cast<WorldEntity*>(*it)->toList( OM_GROUP_00_PROJ);
+	}
+  }
   else
-    this->toList( OM_GROUP_00);*/
+  {
+    this->toList( OM_GROUP_00);
+    for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++)
+	{
+	  if( likely( dynamic_cast<Weapon*>(*it) != NULL))
+		dynamic_cast<WorldEntity*>(*it)->toList( OM_GROUP_01_PROJ);
+	}
+  }
 
 }
@@ -664,5 +655,4 @@
 void SpaceShip::damage(float pDamage, float eDamage){
   PRINTF(0)("ship hit for (%f,%f) \n",pDamage,eDamage);
-  PRINTF(0)("SHIP HIT - SHIP HIT - SHIP HIT\n");
 
   if( this->shieldActive) {
@@ -800,4 +790,5 @@
   float pi = 3.14;
   
+  Vector tempVelocity;
 
   switch(this->getPlaymode())
@@ -807,31 +798,31 @@
       // these routines will change the travel movement into zero in a short amout of time, if the player
       // doesn't press any buttons.
-      if (this->velocity.x >= 0)
-      {
-        if (this->velocity.x > airCoeff*this->acceleration * dt)
-          this->velocity.x -= airCoeff* this->acceleration * dt;
+      if (tempVelocity.x >= 0)
+      {
+        if (tempVelocity.x > airCoeff*this->acceleration * dt)
+          tempVelocity.x -= airCoeff* this->acceleration * dt;
         else
-          this->velocity.x = 0;
+          tempVelocity.x = 0;
       }
       else
       {
-        if (this->velocity.x < -airCoeff*this->acceleration * dt)
-          this->velocity.x += airCoeff* this->acceleration * dt;
+        if (tempVelocity.x < -airCoeff*this->acceleration * dt)
+          tempVelocity.x += airCoeff* this->acceleration * dt;
         else
-          this->velocity.x = 0;
-      }
-      if (this->velocity.z >= 0)
-      {
-        if (this->velocity.z > airCoeff*this->acceleration * dt)
-          this->velocity.z -= airCoeff* this->acceleration * dt;
+          tempVelocity.x = 0;
+      }
+      if (tempVelocity.z >= 0)
+      {
+        if (tempVelocity.z > airCoeff*this->acceleration * dt)
+          tempVelocity.z -= airCoeff* this->acceleration * dt;
         else
-          this->velocity.z = 0;
+          tempVelocity.z = 0;
       }
       else
       {
-        if (this->velocity.z < -airCoeff*this->acceleration * dt)
-          this->velocity.z += airCoeff* this->acceleration * dt;
+        if (tempVelocity.z < -airCoeff*this->acceleration * dt)
+          tempVelocity.z += airCoeff* this->acceleration * dt;
         else
-          this->velocity.z = 0;
+          tempVelocity.z = 0;
       }
     
@@ -851,16 +842,16 @@
         if(this->getRelCoor().x < this->travelDistancePlus.x)
         {
-          if (this->velocity.x < this->travelSpeed)
+          if (tempVelocity.x < this->travelSpeed)
           {
-            this->velocity.x += (airCoeff + 1.0)*this->acceleration*dt;
+            tempVelocity.x += (airCoeff + 1.0)*this->acceleration*dt;
           }
           else
           {
-            this->velocity.x = this->travelSpeed;
+            tempVelocity.x = this->travelSpeed;
           }
         }
         else
         {
-          this->velocity.x = 0.0f;
+          tempVelocity.x = 0.0f;
         }
       }
@@ -870,16 +861,16 @@
         if(this->getRelCoor().x > this->travelDistanceMinus.x)
         {
-          if (this->velocity.x > -this->travelSpeed)
+          if (tempVelocity.x > -this->travelSpeed)
           {
-            this->velocity.x -= (airCoeff + 1.0)*this->acceleration*dt;
+            tempVelocity.x -= (airCoeff + 1.0)*this->acceleration*dt;
           }
           else
           {
-            this->velocity.x = -this->travelSpeed;
+            tempVelocity.x = -this->travelSpeed;
           }
         }
         else
         {
-          this->velocity.x = 0.0f;
+          tempVelocity.x = 0.0f;
         }
       }
@@ -889,16 +880,16 @@
         if(this->getRelCoor().z > this->travelDistanceMinus.y)
         {
-          if (this->velocity.z > -this->travelSpeed)
+          if (tempVelocity.z > -this->travelSpeed)
           {
-            this->velocity.z -= (airCoeff + 1.0)*this->acceleration*dt;
+            tempVelocity.z -= (airCoeff + 1.0)*this->acceleration*dt;
           }
           else
           {
-            this->velocity.z = -this->travelSpeed;
+            tempVelocity.z = -this->travelSpeed;
           }
         }
         else
         {
-          this->velocity.z = 0.0f;
+          tempVelocity.z = 0.0f;
         }
         this->setRelDirSoft(Quaternion(-pi/6, Vector(1,0,0)), 6);
@@ -909,16 +900,16 @@
         if(this->getRelCoor().z < this->travelDistancePlus.y)
         {
-          if (this->velocity.z < this->travelSpeed)
+          if (tempVelocity.z < this->travelSpeed)
           {
-            this->velocity.z += (airCoeff + 1.0)*this->acceleration*dt;
+            tempVelocity.z += (airCoeff + 1.0)*this->acceleration*dt;
           }
           else
           {
-            this->velocity.z = this->travelSpeed;
+            tempVelocity.z = this->travelSpeed;
           }
         }
         else
         {
-          this->velocity.z = 0.0f;
+          tempVelocity.z = 0.0f;
         }
         this->setRelDirSoft(Quaternion(pi/6, Vector(1,0,0)), 6);
@@ -931,12 +922,12 @@
 
       this->travelNode->shiftCoor(Vector(this->cameraSpeed * dt, 0, 0));
-      this->shiftCoor (this->velocity * dt);
+      this->shiftCoor (tempVelocity * dt);
 
     //normalisation of the vectors (vector sum must be <= travelspeed)
-    float xzNorm = sqrt(pow(this->velocity.x, 2) + pow(this->velocity.z, 2));
+    float xzNorm = sqrt(pow(tempVelocity.x, 2) + pow(tempVelocity.z, 2));
     if (xzNorm > this->travelSpeed)
     {
-      this->velocity.x = this->velocity.x/xzNorm * this->travelSpeed;
-      this->velocity.z = this->velocity.z/xzNorm * this->travelSpeed;
+      tempVelocity.x = tempVelocity.x/xzNorm * this->travelSpeed;
+      tempVelocity.z = tempVelocity.z/xzNorm * this->travelSpeed;
     }
 
@@ -945,5 +936,5 @@
     
     //set new coordinates calculated through key- events. 
-    this->shiftCoor (this->velocity * dt);
+    this->shiftCoor (tempVelocity * dt);
     break;
     }
@@ -954,11 +945,15 @@
   }
   
+
+/*
   this->travelNode->shiftCoor(Vector(this->cameraSpeed * dt, 0, 0));
-  this->shiftCoor (this->velocity * dt);
-  
-  float angle = this->velocity.z / travelSpeed * pi / 3;
+  this->shiftCoor (tempVelocity * dt);
+
+  float angle = tempVelocity.z / travelSpeed * pi / 3;
   if (angle > pi/4) angle = pi/4;
   if (angle < -pi/4) angle = -pi/4;
   this->setRelDirSoft(Quaternion(angle, Vector(1,0,0)), 5.0f);
+*/
+  
 }
 
Index: /branches/playability/src/world_entities/space_ships/space_ship.h
===================================================================
--- /branches/playability/src/world_entities/space_ships/space_ship.h	(revision 10094)
+++ /branches/playability/src/world_entities/space_ships/space_ship.h	(revision 10095)
@@ -51,4 +51,6 @@
     virtual void destroy(WorldEntity* killer);
     virtual void respawn();
+
+    inline Vector getVelocity() { return this->velocity; };
 
     virtual void collidesWith(WorldEntity* entity, const Vector& location);
Index: /branches/playability/src/world_entities/weapons/medium_blaster.cc
===================================================================
--- /branches/playability/src/world_entities/weapons/medium_blaster.cc	(revision 10094)
+++ /branches/playability/src/world_entities/weapons/medium_blaster.cc	(revision 10095)
@@ -96,5 +96,5 @@
   pj->setParent(PNode::getNullParent());
 
-  pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*160);
+  pj->setVelocity(this->getParent()->getVelocity() + this->getAbsDir().apply(Vector(1,0,0))*100);
 
   pj->setAbsCoor(this->getEmissionPoint());
