Index: trunk/src/world_entities/planet.h
===================================================================
--- trunk/src/world_entities/planet.h	(revision 6956)
+++ trunk/src/world_entities/planet.h	(revision 6959)
@@ -22,5 +22,5 @@
   virtual ~Planet();
 
-  void loadParams(const TiXmlElement* root);
+  virtual void loadParams(const TiXmlElement* root);
 
   void setSize(float size);
Index: trunk/src/world_entities/playable.cc
===================================================================
--- trunk/src/world_entities/playable.cc	(revision 6956)
+++ trunk/src/world_entities/playable.cc	(revision 6959)
@@ -28,4 +28,8 @@
 
 
+#include "dot_emitter.h"
+#include "sprite_particles.h"
+
+
 Playable::Playable()
 {
@@ -43,4 +47,24 @@
 
   this->setSynchronized(true);
+
+  this->score = 0;
+  this->oldScore = 0;
+
+
+  this->emitter = new DotEmitter(100, 5, M_2_PI);
+  this->emitter->setParent(this);
+  this->emitter->setSpread(M_PI, M_PI);
+  this->emitter->setEmissionRate(300.0);
+  this->emitter->setEmissionVelocity(50.0);
+
+  this->explosionParticles = new SpriteParticles(1000);
+  this->explosionParticles->setName("LaserExplosionParticles");
+  this->explosionParticles->setLifeSpan(.5, .3);
+  this->explosionParticles->setRadius(0.0, 10.0);
+  this->explosionParticles->setRadius(.5, 6.0);
+  this->explosionParticles->setRadius(1.0, 3.0);
+  this->explosionParticles->setColor(0.0, 1,1,0,.9);
+  this->explosionParticles->setColor(0.5, .8,.8,0,.5);
+  this->explosionParticles->setColor(1.0, .8,.8,.7,.0);
 }
 
@@ -101,10 +125,16 @@
 void Playable::collidesWith(WorldEntity* entity, const Vector& location)
 {
-  if (entity->isA(CL_PROJECTILE))
+  if (entity->isA(CL_PROJECTILE) && !State::isOnline() )
     this->decreaseHealth(entity->getHealth());
 
   // EXTREME HACK
   if (this->getHealth() == 0.0f)
-    this->deactivateNode();
+  {
+    //this->deactivateNode();
+    this->emitter->setSystem(explosionParticles);
+    this->setAbsCoor(0, 0, 0);
+    //this->setAbsDir(Vector(1,0,0), 0);
+    this->emitter->setSystem(NULL);
+  }
 }
 
@@ -248,4 +278,7 @@
 }
 
+#define DATA_FLAGS    1
+#define DATA_SCORE    2
+
 #define FLAGS_bFire   1
 
@@ -281,4 +314,7 @@
 bool Playable::needsReadSync( )
 {
+  //if ( score != oldScore )
+  //  return true;
+
   byte flags = 0;
 
Index: trunk/src/world_entities/playable.h
===================================================================
--- trunk/src/world_entities/playable.h	(revision 6956)
+++ trunk/src/world_entities/playable.h	(revision 6959)
@@ -15,6 +15,7 @@
 
 class Weapon;
-
+class DotEmitter;
 class Player;
+class SpriteParticles;
 
 //! Basic controllable WorldEntity
@@ -58,4 +59,7 @@
     int       readSync(byte* data, int maxLength );
     bool      needsReadSync();
+    
+    inline void setScore( int score ) { this->score = score; }
+    inline int  getScore() { return this->score; }
 
   protected:
@@ -73,5 +77,11 @@
     bool                  bFire;              //!< If the Ship is firing.
     int                   oldFlags;           //!< Used for synchronisation
+    
+    int                   score;
+    int                   oldScore;
 
+    //HACK: explosion emitter
+    DotEmitter*           emitter;
+    SpriteParticles*      explosionParticles;
 };
 
Index: trunk/src/world_entities/space_ships/space_ship.cc
===================================================================
--- trunk/src/world_entities/space_ships/space_ship.cc	(revision 6956)
+++ trunk/src/world_entities/space_ships/space_ship.cc	(revision 6959)
@@ -96,5 +96,15 @@
   {
     //this->loadModel("models/ships/reap_#.obj");
-    this->loadModel( "models/ships/fighter.obj" );
+    ///HACK this is only for network multiplayer games.
+    if( this->getOwner()%2 == 0)
+    {
+      this->loadModel("models/ships/reap_#.obj");
+      this->toList(OM_GROUP_00);
+    }
+    else
+    {
+      this->loadModel( "models/ships/fighter.obj" );
+      this->toList(OM_GROUP_01);
+    }
   }
 
@@ -275,9 +285,20 @@
 {
   Playable::collidesWith(entity, location);
+
+
   if (entity->isA(CL_TURRET_POWER_UP) && entity != ref)
   {
     this->ADDWEAPON();
     ref = entity;
-    }
+  }
+
+  if( entity->isA(CL_PROJECTILE) && entity != ref)
+  {
+    if ( isServer() )
+    {
+      networkCollisionList.push_back( entity->getHealth() );
+      doCollideNetwork( entity->getHealth() );
+    }
+  }
 //  PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
 }
@@ -320,5 +341,7 @@
 
   // spaceship controlled movement
-  this->calculateVelocity(time);
+  if (this->getOwner() == this->getHostID())
+    this->calculateVelocity(time);
+
 
   Vector move = velocity*time;
@@ -450,5 +473,5 @@
   }
 
-  velocity += accel;
+  velocity += accel*time*10;
   //rot.normalize();
   //this->setRelDirSoft(Quaternion(rotVal, rot), 5);
@@ -526,4 +549,5 @@
 #define DATA_velocity    5
 #define DATA_playables   6
+#define DATA_collision   7
 
 int SpaceShip::writeBytes( const byte * data, int length, int sender )
@@ -561,5 +585,5 @@
         bRollL = (flags & MASK_bRollL) != 0;
         bRollR = (flags & MASK_bRollR) != 0;
-        
+
       }
       else
@@ -603,11 +627,11 @@
         SYNCHELP_READ_FLOAT( velocity.y, NWT_SS_VELY );
         SYNCHELP_READ_FLOAT( velocity.z, NWT_SS_VELZ );
-      }      
+      }
       else
         assert(false);
-      
+
       continue;
     }
-    
+
     if ( b == DATA_playables )
     {
@@ -619,4 +643,17 @@
         assert(false);
     }
+
+    if ( b == DATA_collision )
+    {
+      int n;
+      float energy;
+      SYNCHELP_READ_INT( n, NWT_SS_CO_N );
+
+      for ( int i = 0; i<n; i++ )
+      {
+        SYNCHELP_READ_FLOAT( energy, NWT_SS_CO_CLID );
+        doCollideNetwork( energy );
+      }
+    }
   }
 
@@ -651,11 +688,14 @@
   }
 
-  *reciever = -this->getOwner();
+  *reciever = 0 - this->getOwner();
+  //TODO: implement with SYNCHELP_WRITE_SENT()
   bool sentSomething = false;
 
-  if ( ( this->getHostID()==0 || this->getOwner() == this->getHostID() ) && PNode::needsReadSync() )
-  {
+  if ( PNode::needsReadSync() && ( this->getHostID()==0 || this->getOwner() == this->getHostID() ) )
+  {
+    PRINTF(0)("sending PNode::readSync\n");
     SYNCHELP_WRITE_BYTE( DATA_sync, NWT_SS_B );
     SYNCHELP_WRITE_FKT( PNode::readSync, NWT_SS_PN_SYNC );
+    sentSomething = true;
   }
 
@@ -683,4 +723,5 @@
     {
       oldMask = mask;
+      PRINTF(0)("sending mask\n");
       sentSomething = true;
       SYNCHELP_WRITE_BYTE( DATA_flags, NWT_SS_B );
@@ -705,19 +746,23 @@
     }
 #define __OFFSET_VEL 0.05
-    if ( fabs( oldVelocity.x - velocity.x ) > __OFFSET_VEL*velocity.x ||
-         fabs( oldVelocity.y - velocity.y ) > __OFFSET_VEL*velocity.y ||
-         fabs( oldVelocity.z - velocity.z ) > __OFFSET_VEL*velocity.z )
-    {
-      oldVelocity = velocity;
-      //PRINTF(0)("SENDING velocity\n");
-      //SYNCHELP_WRITE_BYTE( DATA_velocity, NWT_SS_B );
-      //SYNCHELP_WRITE_FLOAT( velocity.x, NWT_SS_VELX );
-      //SYNCHELP_WRITE_FLOAT( velocity.y, NWT_SS_VELY );
-      //SYNCHELP_WRITE_FLOAT( velocity.z, NWT_SS_VELZ );
-    }
-    
+    if ( fabs( oldVelocity.x - velocity.x ) > __OFFSET_VEL*fabs(oldVelocity.x)+0.1 ||
+         fabs( oldVelocity.y - velocity.y ) > __OFFSET_VEL*fabs(oldVelocity.y)+0.1 ||
+         fabs( oldVelocity.z - velocity.z ) > __OFFSET_VEL*fabs(oldVelocity.z)+0.1 )
+    {
+      oldVelocity.x = velocity.x;
+      oldVelocity.y = velocity.y;
+      oldVelocity.z = velocity.z;
+      PRINTF(0)("SENDING velocity\n");
+      sentSomething = true;
+      SYNCHELP_WRITE_BYTE( DATA_velocity, NWT_SS_B );
+      SYNCHELP_WRITE_FLOAT( velocity.x, NWT_SS_VELX );
+      SYNCHELP_WRITE_FLOAT( velocity.y, NWT_SS_VELY );
+      SYNCHELP_WRITE_FLOAT( velocity.z, NWT_SS_VELZ );
+    }
+
     if ( Playable::needsReadSync() )
     {
       sentSomething = true;
+      PRINTF(0)("SYNCHELP_WRITE_FKT( Playable::readSync, NWT_SS_PL_SYNC )\n");
       SYNCHELP_WRITE_BYTE( DATA_playables, NWT_SS_B );
       SYNCHELP_WRITE_FKT( Playable::readSync, NWT_SS_PL_SYNC );
@@ -725,10 +770,32 @@
 
   }
-  
+
   if ( !sentSomething )
-    reciever = 0;
+  {
+    *reciever = 0;
+
+    if ( networkCollisionList.size()>0 )
+    {
+      SYNCHELP_WRITE_BYTE( DATA_collision, NWT_SS_B );
+
+      SYNCHELP_WRITE_INT( networkCollisionList.size(), NWT_SS_CO_N );
+
+      for ( std::list<float>::iterator it = networkCollisionList.begin(); it!=networkCollisionList.end(); it++ )
+      {
+        SYNCHELP_WRITE_FLOAT( *it, NWT_SS_CO_CLID );
+      }
+
+      networkCollisionList.clear();
+    }
+  }
 
   return SYNCHELP_WRITE_N;
 }
 
-
+void SpaceShip::doCollideNetwork( float energy )
+{
+  this->decreaseHealth( energy );
+}
+
+
+
Index: trunk/src/world_entities/space_ships/space_ship.h
===================================================================
--- trunk/src/world_entities/space_ships/space_ship.h	(revision 6956)
+++ trunk/src/world_entities/space_ships/space_ship.h	(revision 6959)
@@ -47,4 +47,6 @@
     void calculateVelocity(float time);
 
+    void doCollideNetwork( float energy );
+
     // !! temporary !!
     void ADDWEAPON();
@@ -84,4 +86,6 @@
     ParticleEmitter*      burstEmitter;
     ParticleSystem*       burstSystem;
+
+    std::list<float>        networkCollisionList;
 };
 
Index: trunk/src/world_entities/world_entity.cc
===================================================================
--- trunk/src/world_entities/world_entity.cc	(revision 6956)
+++ trunk/src/world_entities/world_entity.cc	(revision 6959)
@@ -280,12 +280,7 @@
 
 /**
- *  this method is called by the world if the WorldEntity leaves valid gamespace
- *
- * For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a
- * place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
- *
- * NOT YET IMPLEMENTED
- */
-void WorldEntity::leftWorld ()
+ *  this method is called by the world if the WorldEntity leaves the game
+ */
+void WorldEntity::leaveWorld ()
 {}
 
Index: trunk/src/world_entities/world_entity.h
===================================================================
--- trunk/src/world_entities/world_entity.h	(revision 6956)
+++ trunk/src/world_entities/world_entity.h	(revision 6959)
@@ -54,5 +54,5 @@
 
   virtual void postSpawn ();
-  virtual void leftWorld ();
+  virtual void leaveWorld ();
 
   virtual void tick (float time);
