Index: /code/branches/network6/src/libraries/network/ClientConnection.cc
===================================================================
--- /code/branches/network6/src/libraries/network/ClientConnection.cc	(revision 7824)
+++ /code/branches/network6/src/libraries/network/ClientConnection.cc	(revision 7825)
@@ -42,4 +42,5 @@
 
   ClientConnection::ClientConnection():
+    Connection(NETWORK_PEER_ID_SERVER),
     established_(false),
     server_(NULL)
Index: /code/branches/network6/src/libraries/network/Connection.cc
===================================================================
--- /code/branches/network6/src/libraries/network/Connection.cc	(revision 7824)
+++ /code/branches/network6/src/libraries/network/Connection.cc	(revision 7825)
@@ -43,6 +43,6 @@
   const boost::posix_time::millisec NETWORK_COMMUNICATION_THREAD_WAIT_TIME(20);
 
-  Connection::Connection():
-    host_(0), bCommunicationThreadRunning_(false), nextPeerID_(NETWORK_PEER_ID_SERVER+1)
+  Connection::Connection(uint32_t firstPeerID):
+    host_(0), bCommunicationThreadRunning_(false), nextPeerID_(firstPeerID)
   {
     enet_initialize();
Index: /code/branches/network6/src/libraries/network/Connection.h
===================================================================
--- /code/branches/network6/src/libraries/network/Connection.h	(revision 7824)
+++ /code/branches/network6/src/libraries/network/Connection.h	(revision 7825)
@@ -105,5 +105,5 @@
 
   protected:
-    Connection();
+    Connection(uint32_t firstPeerID = NETWORK_PEER_ID_SERVER+1);
     
     void startCommunicationThread();
Index: /code/branches/network6/src/libraries/network/GamestateManager.cc
===================================================================
--- /code/branches/network6/src/libraries/network/GamestateManager.cc	(revision 7824)
+++ /code/branches/network6/src/libraries/network/GamestateManager.cc	(revision 7825)
@@ -149,5 +149,8 @@
       newID = ++id_;
     else
+    {
+      assert(peerMap_.size()!=0);
       newID = peerMap_[NETWORK_PEER_ID_SERVER].lastProcessedGamestateID;
+    }
     
     if(!currentGamestate_->collectData(newID, gsMode)){ //we have no data to send
@@ -172,5 +175,5 @@
         continue;
       }
-      COUT(4) << "client id: " << peerIt->first << std::endl;
+      COUT(5) << "client id: " << peerIt->first << std::endl;
       COUT(5) << "Server: doing gamestate gamestate preparation" << std::endl;
       int peerID = peerIt->first; //get client id
@@ -244,5 +247,5 @@
 //     assert(b);
     clock.capture();
-    COUT(4) << "diff and compress time: " << clock.getDeltaTime() << endl;
+    COUT(5) << "diff and compress time: " << clock.getDeltaTime() << endl;
 //     COUT(5) << "sending gamestate with id " << gs->getID();
 //     if(gamestate->isDiffed())
Index: /code/branches/network6/src/libraries/network/packet/Gamestate.cc
===================================================================
--- /code/branches/network6/src/libraries/network/packet/Gamestate.cc	(revision 7824)
+++ /code/branches/network6/src/libraries/network/packet/Gamestate.cc	(revision 7825)
@@ -107,5 +107,5 @@
   uint32_t size = calcGamestateSize(id, mode);
 
-  COUT(4) << "G.ST.Man: producing gamestate with id: " << id << std::endl;
+  COUT(5) << "G.ST.Man: producing gamestate with id: " << id << std::endl;
   if(size==0)
     return false;
Index: /code/branches/network6/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- /code/branches/network6/src/libraries/network/synchronisable/Synchronisable.cc	(revision 7824)
+++ /code/branches/network6/src/libraries/network/synchronisable/Synchronisable.cc	(revision 7825)
@@ -295,5 +295,5 @@
    * @param mem pointer to the bytestream
    * @param mode same as in getData
-   * @param forceCallback FIXME - add doc!
+   * @param forceCallback this makes updateData call each callback
    * @return true/false
    */
@@ -372,11 +372,12 @@
    * This function determines, wheter the object should be saved to the bytestream (according to its syncmode/direction)
    * @param id gamestate id
-   * @param mode FIXME - add doc!
+   * @param mode Synchronisation mode (toclient, toserver or bidirectional)
    * @return true/false
    */
   bool Synchronisable::doSync(int32_t id, uint8_t mode)
   {
-    if(mode==0x0)
-      mode=state_;
+//     if(mode==0x0)
+//       mode=state_;
+    assert(mode!=0x0);
     return ( (this->objectMode_ & mode)!=0 && (!syncList_.empty() ) );
   }
