Index: branches/playability/src/world_entities/space_ships/space_ship.cc
===================================================================
--- branches/playability/src/world_entities/space_ships/space_ship.cc	(revision 10078)
+++ branches/playability/src/world_entities/space_ships/space_ship.cc	(revision 10081)
@@ -34,4 +34,6 @@
 #include "particles/emitter_node.h"
 #include "particles/sprite_particles.h"
+#include "effects/explosion.h"
+#include "effects/trail.h"
 
 #include "util/loading/factory.h"
@@ -120,4 +122,5 @@
 {
   this->init();
+  //this->setParentMode(PNODE_REPARENT_DELETE_CHILDREN);
   if (root != NULL)
     this->loadParams(root);
@@ -139,8 +142,6 @@
   PRINTF(4)("SPACESHIP INIT\n");
 
-  secWeaponMan.showCrosshair();
-
   //weapons:
-
+  /*
   Weapon* wpRight1 = new LightBlaster ();
   wpRight1->setName( "LightBlaster");
@@ -148,5 +149,5 @@
   Weapon* wpLeft1 = new LightBlaster ();
   wpLeft1->setName( "LightBlaster");
-  wpLeft1->setParent( this);
+  wpLeft1->setParent( this);*/
 
   Weapon* wpRight2 = new MediumBlaster ();
@@ -156,5 +157,5 @@
   wpLeft2->setName( "MediumBlaster");
   wpLeft2->setParent( this);
-
+  /*
   Weapon* wpRight3 = new HeavyBlaster ();
   wpRight3->setName( "HeavyBlaster");
@@ -162,5 +163,5 @@
   Weapon* wpLeft3 = new HeavyBlaster ();
   wpLeft3->setName( "HeavyBlaster");
-  wpLeft3->setParent( this);
+  wpLeft3->setParent( this);*/
 
   Weapon* cannon = new SwarmLauncher();
@@ -169,10 +170,10 @@
 
 
-  this->weaponMan.addWeapon( wpLeft1, 0, 0);
-  this->weaponMan.addWeapon( wpRight1, 0, 1);
+  //this->weaponMan.addWeapon( wpLeft1, 0, 0);
+  //this->weaponMan.addWeapon( wpRight1, 0, 1);
   this->weaponMan.addWeapon( wpLeft2, 0, 2);
   this->weaponMan.addWeapon( wpRight2, 0, 3);
-  this->weaponMan.addWeapon( wpLeft3, 0, 4);
-  this->weaponMan.addWeapon( wpRight3, 0, 5);
+  //this->weaponMan.addWeapon( wpLeft3, 0, 4);
+  //this->weaponMan.addWeapon( wpRight3, 0, 5);
 
   this->secWeaponMan.addWeapon( cannon, 1, 0);
@@ -181,10 +182,10 @@
   this->secWeaponMan.changeWeaponConfig(1);
 
-  wpRight1->requestAction(WA_ACTIVATE);
-  wpLeft1->requestAction(WA_ACTIVATE);
+  //wpRight1->requestAction(WA_ACTIVATE);
+  //wpLeft1->requestAction(WA_ACTIVATE);
   wpRight2->requestAction(WA_ACTIVATE);
   wpLeft2->requestAction(WA_ACTIVATE);
-  wpRight3->requestAction(WA_ACTIVATE);
-  wpLeft3->requestAction(WA_ACTIVATE);
+  //wpRight3->requestAction(WA_ACTIVATE);
+  //wpLeft3->requestAction(WA_ACTIVATE);
 
   cannon->requestAction(WA_ACTIVATE);
@@ -301,23 +302,4 @@
   dynamic_cast<Element2D*>(this->weaponMan.getFixedTarget())->setVisibility( false);
 
-  this->burstEmitter = new DotEmitter(800, 0.0, .01);
-  this->burstEmitter->setParent(this);
-  this->burstEmitter->setRelCoor(-1, .5, 0);
-  this->burstEmitter->setName("SpaceShip_Burst_emitter");
-  this->burstEmitter->setEmissionRate(800);
-
-  this->burstSystem = new SpriteParticles(400);
-  this->burstSystem->addEmitter(this->burstEmitter);
-  this->burstSystem->setName("SpaceShip_Burst_System");
-  ((SpriteParticles*)this->burstSystem)->setMaterialTexture("maps/radial-trans-noise.png");
-  this->burstSystem->setLifeSpan(0.3, .3);
-  this->burstSystem->setRadius(0.0, 1.0);
-  this->burstSystem->setRadius(0.05, 1.0);
-  this->burstSystem->setRadius(.5, .6);
-  this->burstSystem->setRadius(1.0, 0);
-  this->burstSystem->setColor(0.0, .7,.7,1,.5);
-  this->burstSystem->setColor(0.2, 0,0,0.8,.7);
-  this->burstSystem->setColor(0.5, .5,.5,.8,.8);
-  this->burstSystem->setColor(1.0, .8,.8,.8,.0);
 
   registerVar( new SynchronizeableBool( &bForward, &bForward, "bForward", PERMISSION_OWNER ) );
@@ -342,4 +324,17 @@
 
   this->setSupportedPlaymodes(Playable::Horizontal | Playable::Vertical);
+
+  
+  this->trail = new Trail( 15, 10, .2);
+  this->trail->setParent( this);
+  this->trail->setTexture( "maps/engine.png");
+
+  this->trailL = new Trail( 15, 10, .2);
+  this->trailL->setParent( this);
+  this->trailL->setTexture( "maps/engine.png");
+
+  this->trailR = new Trail( 15, 10, .2);
+  this->trailR->setParent( this);
+  this->trailR->setTexture( "maps/engine.png");
 }
 
@@ -376,9 +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<WorldEntity>::const_iterator it = WorldEntity::objectList().begin(); it != WorldEntity::objectList().end(); it++)
-  {
-    (*it)->toList( OM_GROUP_01);
-  }*/
   //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( true);
   //this->attachCamera();
@@ -389,9 +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<WorldEntity>::const_iterator it = WorldEntity::objectList().begin(); it != WorldEntity::objectList().end(); it++)
-  {
-    (*it)->toList( OM_GROUP_00);
-  }*/
   //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( false);
   //this->detachCamera();
@@ -424,4 +421,5 @@
 void SpaceShip::collidesWith(WorldEntity* entity, const Vector& location)
 {
+  PRINTF(0)("SPACESHIP COLLIDED WITH %s\n",entity->getCName());
 }
 
@@ -433,4 +431,21 @@
   WorldEntity::draw();
 
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+
+  float matrix[4][4];
+  glTranslatef (this->getAbsCoor ().x-1, this->getAbsCoor ().y-.2, this->getAbsCoor ().z);
+  this->getAbsDir().matrix (matrix);
+  glMultMatrixf((float*)matrix);
+  //glScalef(2.0, 2.0, 2.0);  // no double rescale
+  
+  this->trail->draw();
+  
+  glTranslatef(0,0,-.5);
+  this->trailL->draw();
+
+  glTranslatef(0,0,1);
+  this->trailR->draw();
+  glPopMatrix();
   //this->debug(0);
 }
@@ -512,7 +527,7 @@
   this->cameraNode.setRelDirSoft(this->getAbsDir(), 30.0f);
 
-  this->burstEmitter->setEmissionRate(this->cameraSpeed + (velocity.z>0)*velocity.z);
-  this->burstEmitter->setEmissionVelocity(this->cameraSpeed + (velocity.z>0)*velocity.z, travelSpeed *.1);
-
+  this->trail->tick(time);
+  this->trailL->tick(time);
+  this->trailR->tick(time);
   //orient the spaceship in direction of the mouse
   /*
@@ -585,5 +600,5 @@
 {
   PRINTF(0)("spaceship destroy\n");
-
+  /*
   EmitterNode* node  = NULL;
   DotEmitter* emitter = NULL;
@@ -613,5 +628,9 @@
   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));
@@ -619,7 +638,8 @@
 
   this->toList( OM_DEAD);
-  /*for(ObjectList<WorldEntity>::const_iterator it = WorldEntity::objectList().begin(); it != WorldEntity::objectList().end(); it++)
+  /*for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++)
   {
-    (*it)->toList( OM_DEAD);
+    if( dynamic_cast<WorldEntity*>(*it) != NULL)
+      dynamic_cast<WorldEntity*>(*it)->toList( OM_DEAD);
   }*/
     PRINTF(0)("spaceship destroy == ship translated \n");
@@ -628,12 +648,22 @@
 void SpaceShip::respawn( )
 {
-  //this->show();
-  //this->toList( OM_GROUP_00);
+  this->unhide();
+  /*for(ObjectList<PNode>::const_iterator it = this->getNodesChildren().begin(); it != this->getNodesChildren().end(); it++)
+  {
+    if( dynamic_cast<WorldEntity*>(*it) != NULL)
+      dynamic_cast<WorldEntity*>(*it)->toList( OM_GROUP_00);
+  }*/
+  /*if( this->hasPlayer())
+    this->toList( OM_GROUP_01);
+  else
+    this->toList( OM_GROUP_00);*/
+
 }
 
 
 void SpaceShip::damage(float pDamage, float eDamage){
-  PRINTF(0)("ship hit");
-  printf("Shit hit");
+  PRINTF(0)("ship hit for (%f,%f) \n",pDamage,eDamage);
+  PRINTF(0)("SHIP HIT - SHIP HIT - SHIP HIT\n");
+
   if( this->shieldActive) {
     if( this->shieldCur > pDamage) {
@@ -643,5 +673,5 @@
       this->shieldCur -=pDamage;
       this->shieldActive = false; //shield collapses
-      pDamage = pDamage - this->shieldCur;
+      pDamage += this->shieldCur;
       if( !this->shieldActive) {
         this->armorCur -= pDamage / 2; // remaining damages hits armor at half rate
Index: branches/playability/src/world_entities/space_ships/space_ship.h
===================================================================
--- branches/playability/src/world_entities/space_ships/space_ship.h	(revision 10078)
+++ branches/playability/src/world_entities/space_ships/space_ship.h	(revision 10081)
@@ -19,4 +19,5 @@
 class ParticleEmitter;
 class ParticleSystem;
+class Trail;
 
 class SpaceShip : public Playable
@@ -177,6 +178,8 @@
     byte                  oldMask;            //!< used for synchronisation
 
-    ParticleEmitter*      burstEmitter;
-    ParticleSystem*       burstSystem;
+    Trail*                trail;              //!< Burst trail
+    Trail*                trailL;              //!< Burst trail
+    Trail*                trailR;              //!< Burst trail
+
 };
 
