Index: /code/branches/network/src/network/Client.cc
===================================================================
--- /code/branches/network/src/network/Client.cc	(revision 1430)
+++ /code/branches/network/src/network/Client.cc	(revision 1431)
@@ -85,4 +85,5 @@
     isConnected=false;
     isSynched_=false;
+    gameStateFailure_=false;
   }
 
@@ -95,4 +96,5 @@
     isConnected=false;
     isSynched_=false;
+    gameStateFailure_=false;
   }
 
@@ -105,4 +107,5 @@
     isConnected=false;
     isSynched_=false;
+    gameStateFailure_=false;
   }
 
@@ -247,11 +250,21 @@
     }
     int gameStateID = gamestate.processGameState();
-    if(gameStateID!=GAMESTATEID_INITIAL){
+    if(gameStateID==GAMESTATEID_INITIAL)
+      if(gameStateFailure_){
+        if(!client_connection.addPacket(pck_gen.acknowledgement(GAMESTATEID_INITIAL)))
+          COUT(3) << "could not (negatively) ack gamestate" << std::endl;
+        else 
+          COUT(4) << "negatively acked a gamestate" << std::endl;
+        }
+      else
+        gameStateFailure_=true;
+    else if(gameStateID!=0){
       // ack gamestate and set synched
       if(!isSynched_)
         isSynched_=true;
+      gameStateFailure_=false;
       if(!client_connection.addPacket(pck_gen.acknowledgement(gameStateID)))
         COUT(3) << "could not ack gamestate" << std::endl;
-    }
+    }// otherwise we had no gamestate to load
     gamestate.cleanup();
     if(!client_connection.sendPackets())
Index: /code/branches/network/src/network/Client.h
===================================================================
--- /code/branches/network/src/network/Client.h	(revision 1430)
+++ /code/branches/network/src/network/Client.h	(revision 1431)
@@ -110,4 +110,5 @@
     int clientID_;     // this is the id the server gave to us
     int shipID_;
+    bool gameStateFailure_;
   };
 
Index: /code/branches/network/src/network/ClientInformation.cc
===================================================================
--- /code/branches/network/src/network/ClientInformation.cc	(revision 1430)
+++ /code/branches/network/src/network/ClientInformation.cc	(revision 1431)
@@ -156,5 +156,5 @@
   }
 
-  bool ClientInformation::setGamestateID(int id){
+  bool ClientInformation::setGameStateID(int id){
     boost::recursive_mutex::scoped_lock lock(mutex_);
     if(!this)
Index: /code/branches/network/src/network/ClientInformation.h
===================================================================
--- /code/branches/network/src/network/ClientInformation.h	(revision 1430)
+++ /code/branches/network/src/network/ClientInformation.h	(revision 1431)
@@ -69,5 +69,5 @@
     void setID(int clientID);
     bool setPeer(ENetPeer *peer);
-    bool setGamestateID(int id);
+    bool setGameStateID(int id);
     bool setPartialGamestateID(int id);
     inline void setShipID(int id){ShipID_=id;}
Index: /code/branches/network/src/network/GameStateClient.cc
===================================================================
--- /code/branches/network/src/network/GameStateClient.cc	(revision 1430)
+++ /code/branches/network/src/network/GameStateClient.cc	(revision 1431)
@@ -117,5 +117,5 @@
   int GameStateClient::processGameState(){
     if(tempGameState_==NULL)
-      return GAMESTATEID_INITIAL;
+      return 0;
     int id=tempGameState_->id;
     bool b = saveShipCache();
@@ -176,6 +176,6 @@
           orxonox::Identifier* id = ID((unsigned int)sync.classID);
           if(!id){
-            COUT(4) << "We could not identify a new object; classid: " << sync.classID << std::endl;
-            return false;
+            COUT(3) << "We could not identify a new object; classid: " << sync.classID << " objectID: " << sync.objectID << " size: " << sync.length << std::endl;
+            return false; // most probably the gamestate is corrupted
           }
           Synchronisable *no = dynamic_cast<Synchronisable *>(id->fabricate());
@@ -278,7 +278,7 @@
     int of=0; // pointers offset
     int dest_length=0;
-    if(old->size>=diff->size)
+    /*if(old->size>=diff->size)
       dest_length=old->size;
-    else
+    else*/
       dest_length=diff->size;
 //     unsigned char *dp = (unsigned char *)malloc(dest_length*sizeof(unsigned char));
@@ -295,10 +295,10 @@
           of++;
         }
-      } else{
+      } /*else{
         while(of<dest_length){
           *(dp+of)=*(ap+of)^n;
           of++;
         }
-      }
+      }*/
     }
     // should be finished now
Index: /code/branches/network/src/network/GameStateManager.cc
===================================================================
--- /code/branches/network/src/network/GameStateManager.cc	(revision 1430)
+++ /code/branches/network/src/network/GameStateManager.cc	(revision 1431)
@@ -140,5 +140,5 @@
         client = it->second;
       GameState *server = reference;
-      COUT(3) << "client: " << client << " server: " << server << " gamestatemap: " << &gameStateMap << std::endl;
+      COUT(3) << "client: " << client << " server: " << server << " gamestatemap: " << &gameStateMap << " size: " << server->size << std::endl;
       if(client)
         return encode(client, server);
@@ -260,4 +260,6 @@
       data+=sizeof(int);
       sync.classID = *(int*)data;
+      if(sync.classID == 0) // TODO: remove this
+        COUT(3) << "received a classid 0" << std::endl;
       data+=sizeof(int);
       sync.data = data;
@@ -269,5 +271,5 @@
 
       if(!it){
-        // the object does not exist yet
+        // the objectaber ich glaub die  does not exist yet
         COUT(4) << "loadsnapshot: creating new object " << std::endl;
         //COUT(4) << "loadSnapshot:\tclassid: " << sync.classID << ", name: " << ID((unsigned int) sync.classID)->getName() << std::endl;
@@ -337,38 +339,38 @@
   }
 
-  GameState *GameStateManager::diff(GameState *a, GameState *b) {
-    unsigned char *ap = a->data, *bp = b->data;
+  GameState *GameStateManager::diff(GameState *alt, GameState *neu) {
+    unsigned char *ap = alt->data, *bp = neu->data;
     int of=0; // pointers offset
     int dest_length=0;
-    if(a->size>=b->size)
-      dest_length=a->size;
-    else
-      dest_length=b->size;
+    /*if(alt->size>neu->size)
+      dest_length=alt->size;
+    else*/
+      dest_length=neu->size;
     //unsigned char *dp = (unsigned char *)malloc(dest_length*sizeof(unsigned char));
     unsigned char *dp = new unsigned char[dest_length*sizeof(unsigned char)];
-    while(of<a->size && of<b->size){
+    while(of<alt->size && of<neu->size){
       *(dp+of)=*(ap+of)^*(bp+of); // do the xor
       ++of;
     }
-    if(a->size!=b->size){ // do we have to fill up ?
+    if(alt->size!=neu->size){ // do we have to fill up ?
       unsigned char n=0;
-      if(a->size<b->size){
+      if(alt->size<neu->size){
         while(of<dest_length){
           *(dp+of)=n^*(bp+of);
           of++;
         }
-      } else{
+      } /*else{
         while(of<dest_length){
           *(dp+of)=*(ap+of)^n;
           of++;
         }
-      }
+      }*/
     }
 
     GameState *r = new GameState;
-    r->id = b->id;
+    r->id = neu->id;
     r->size = dest_length;
     r->diffed = true;
-    r->base_id = a->id;
+    r->base_id = alt->id;
     r->data = dp;
     r->complete = true;
@@ -459,4 +461,10 @@
       return;
     int curid = temp->getGamestateID();
+    
+    if(gamestateID == GAMESTATEID_INITIAL){
+      temp->setGameStateID(GAMESTATEID_INITIAL);
+      --(gameStateUsed.find(curid)->second);
+      return;
+    }
     if(curid > gamestateID)
       // the network packets got messed up 
@@ -469,5 +477,5 @@
       --(gameStateUsed.find(curid)->second);
     ++(gameStateUsed.find(gamestateID)->second);
-    temp->setGamestateID(gamestateID);
+    temp->setGameStateID(gamestateID);
     /*
     GameState *old = clientGameState[clientID];
Index: /code/branches/network/src/network/GameStateManager.h
===================================================================
--- /code/branches/network/src/network/GameStateManager.h	(revision 1430)
+++ /code/branches/network/src/network/GameStateManager.h	(revision 1431)
@@ -86,5 +86,5 @@
     GameStateCompressed *encode(GameState *a, GameState *b);
     GameStateCompressed *encode(GameState *a);
-    GameState *diff(GameState *a, GameState *b);
+    GameState *diff(GameState *alt, GameState *neu);
     GameStateCompressed *compress_(GameState *a);
     GameState *decompress(GameStateCompressed *a);
Index: /code/branches/network/src/network/Server.cc
===================================================================
--- /code/branches/network/src/network/Server.cc	(revision 1430)
+++ /code/branches/network/src/network/Server.cc	(revision 1431)
@@ -263,5 +263,5 @@
 
   void Server::processAck( ack *data, int clientID) {
-    COUT(4) << "\b\b\b\n\n\n\n\nServer: processing ack from client: " << clientID << "; ack-id: " << data->a << std::endl;
+    COUT(4) << "Server: processing ack from client: " << clientID << "; ack-id: " << data->a << std::endl;
     gamestates->ackGameState(clientID, data->a);
     delete data;
Index: /code/branches/network/src/network/Synchronisable.cc
===================================================================
--- /code/branches/network/src/network/Synchronisable.cc	(revision 1430)
+++ /code/branches/network/src/network/Synchronisable.cc	(revision 1431)
@@ -70,5 +70,5 @@
   bool Synchronisable::create(){
     this->classID = this->getIdentifier()->getNetworkID();
-    COUT(4) << "setting classid from " << this->getIdentifier()->getName() << " to: " << classID << std::endl;
+    COUT(4) << "creating synchronisable: setting classid from " << this->getIdentifier()->getName() << " to: " << classID << std::endl;
     return true;
   }
Index: /code/branches/network/src/network/diffTest.cc
===================================================================
--- /code/branches/network/src/network/diffTest.cc	(revision 1430)
+++ /code/branches/network/src/network/diffTest.cc	(revision 1431)
@@ -549,5 +549,5 @@
 
   std::cout << "test setGamestateID" << std::endl;
-  temp->setGamestateID( 8 );
+  temp->setGameStateID( 8 );
   printClientInformationBox( temp );
 
@@ -559,5 +559,5 @@
   newInfo->setSynched( true );
   newInfo->setPeer( NULL );
-  toool->setGamestateID( 199 );
+  toool->setGameStateID( 199 );
   toool->setID( numberOfClients+1);
   toool->setSynched( true );
Index: /code/branches/network/src/orxonox/objects/SpaceShip.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/SpaceShip.cc	(revision 1430)
+++ /code/branches/network/src/orxonox/objects/SpaceShip.cc	(revision 1431)
@@ -359,4 +359,6 @@
             Projectile *p = new Projectile(this);
             p->create();
+            if(p->classID==0)
+              COUT(3) << "generated projectile with classid 0" <<  std::endl; // TODO: remove this output
 
             p->setBacksync(true);
