Index: /branches/network/src/lib/network/synchronizeable.h
===================================================================
--- /branches/network/src/lib/network/synchronizeable.h	(revision 6789)
+++ /branches/network/src/lib/network/synchronizeable.h	(revision 6790)
@@ -30,4 +30,7 @@
   NWT_SS_MOUSEDIRW,
   NWT_SS_PN_SYNC,
+  NWT_SS_VELX,
+  NWT_SS_VELY,
+  NWT_SS_VELZ,
   
   NWT_HS_HOST_ID,
Index: /branches/network/src/world_entities/space_ships/space_ship.cc
===================================================================
--- /branches/network/src/world_entities/space_ships/space_ship.cc	(revision 6789)
+++ /branches/network/src/world_entities/space_ships/space_ship.cc	(revision 6790)
@@ -552,4 +552,5 @@
 #define DATA_mouse       3
 #define DATA_sync        4
+#define DATA_velocity    5
 
 int SpaceShip::writeBytes( const byte * data, int length, int sender )
@@ -607,53 +608,13 @@
       continue;
     }
+    
+    if ( b == DATA_velocity )
+    {
+      SYNCHELP_READ_FLOAT( velocity.x, NWT_SS_VELX );
+      SYNCHELP_READ_FLOAT( velocity.y, NWT_SS_VELY );
+      SYNCHELP_READ_FLOAT( velocity.z, NWT_SS_VELZ );
+    }
   }
   
-#if 0
-  if ( SYNCHELP_READ_REMAINING()>0 && SYNCHELP_READ_NEXTBYTE() == DATA_state /*&& (this->getHostID()!=this->getOwner() || sender==0)*/ )
-  {
-    PRINTF(0)("GOT STATE %d\n", this->getUniqueID());
-    setRequestedSync( false );
-    setIsOutOfSync( false );
-    SYNCHELP_READ_FKT( WorldEntity::writeState, NWT_SS_WE_STATE );
-     //SYNCHELP_READ_FLOAT( cycle );
-
-    return SYNCHELP_READ_N;
-  }
-  
-  if ( this->getOwner() != this->getHostID() )
-    SYNCHELP_READ_FKT( PNode::writeSync, NWT_SS_PN_SYNC );
-
-  while ( SYNCHELP_READ_REMAINING()>0 )
-  {
-    SYNCHELP_READ_BYTE( b, NWT_SS_B );
-
-    //TODO: do not recieve data if you are the owner
-    if ( b == DATA_flags /*&& this->getHostID()!=this->getOwner()*/ )
-    {
-      int flags = 0;
-      SYNCHELP_READ_INT( flags, NWT_SS_FLAGS );
-
-      bUp = (flags & MASK_bUp) != 0;
-      bDown = (flags & MASK_bDown) != 0;
-      bLeft = (flags & MASK_bLeft) != 0;
-      bRight = (flags & MASK_bRight) != 0;
-      bAscend = (flags & MASK_bAscend) != 0;
-      bDescend = (flags & MASK_bDescend) != 0;
-      bFire = (flags & MASK_bFire) != 0;
-      bRollL = (flags & MASK_bRollL) != 0;
-      bRollR = (flags & MASK_bRollR) != 0;
-
-    }
-
-    //TODO: do not recieve data if you are the owner
-    if ( b == DATA_mouse /*&& this->getHostID()!=this->getOwner()*/ )
-    {
-      SYNCHELP_READ_FLOAT( mouseDir.w, NWT_SS_MOUSEDIRW );
-      SYNCHELP_READ_FLOAT( mouseDir.v.x, NWT_SS_MOUSEDIRX );
-      SYNCHELP_READ_FLOAT( mouseDir.v.y, NWT_SS_MOUSEDIRY );
-      SYNCHELP_READ_FLOAT( mouseDir.v.z, NWT_SS_MOUSEDIRZ );
-    }
-  };
-#endif
   return SYNCHELP_READ_N;
 }
@@ -740,4 +701,14 @@
       SYNCHELP_WRITE_FLOAT( mouseDir.v.z, NWT_SS_MOUSEDIRZ );
     }
+#define __OFFSET_VEL 0.5
+    if ( fabs( oldVelocity.x - velocity.x ) > __OFFSET_VEL ||
+         fabs( oldVelocity.y - velocity.y ) > __OFFSET_VEL ||
+         fabs( oldVelocity.z - velocity.z ) > __OFFSET_VEL )
+    {
+      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 );
+    }
 
   }
Index: /branches/network/src/world_entities/space_ships/space_ship.h
===================================================================
--- /branches/network/src/world_entities/space_ships/space_ship.h	(revision 6789)
+++ /branches/network/src/world_entities/space_ships/space_ship.h	(revision 6790)
@@ -72,4 +72,5 @@
 
     Vector                velocity;           //!< the velocity of the player.
+    Vecotr                oldVelocity;        //!< the velocity the player had last synced
     Quaternion            mouseDir;           //!< the direction where the player wants to fly
     Quaternion            oldMouseDir;        //!< the direction where the player wanted to fly
