Index: code/branches/network3/src/network/GameStateClient.cc
===================================================================
--- code/branches/network3/src/network/GameStateClient.cc	(revision 1176)
+++ code/branches/network3/src/network/GameStateClient.cc	(revision 1177)
@@ -97,9 +97,9 @@
     while(data < state->data+state->size){
       // prepare the syncData struct
-      sync.length = (int)*data;
+      sync.length = *(int *)data;
       data+=sizeof(int);
-      sync.objectID = (int)*data;
+      sync.objectID = *(int*)data;
       data+=sizeof(int);
-      sync.classID = (int)*data;
+      sync.classID = *(int*)data;
       data+=sizeof(int);
       sync.data = data;
Index: code/branches/network3/src/network/PacketDecoder.cc
===================================================================
--- code/branches/network3/src/network/PacketDecoder.cc	(revision 1176)
+++ code/branches/network3/src/network/PacketDecoder.cc	(revision 1177)
@@ -161,23 +161,14 @@
     unsigned char* data = (unsigned char *)(packet->data);
     //copy the GameStateCompressed id into the struct, which is located at second place data+sizeof( int )
-    //memcpy( (void*)&(currentState->id), (const void*)(data+sizeof( int )), sizeof( int ) );
-    //currentState->id = *((int *)packet->data+sizeof(int));
     memcpy( (void*)&(currentState->id), (const void*)(packet->data+1*sizeof( int )), sizeof( int) );
     COUT(5) << "PacketDecoder: received gs id: " << currentState->id << std::endl;
-//     std::cout << "id: " << currentState->id << std::endl;
     //copy the size of the GameStateCompressed compressed data into the new GameStateCompressed struct, located at 3th
     //position of the data stream, data+2*sizeof( int )
     memcpy( (void*)&(currentState->compsize), (const void*)(packet->data+2*sizeof( int )), sizeof( int) );
-    //currentState->compsize = (int)*(data+2*sizeof(int));
-//     std::cout << "compsize: " << currentState->compsize << std::endl;
     //size of uncompressed data
     memcpy( (void*)&(currentState->normsize), (const void*)(packet->data+3*sizeof( int )), sizeof( int ) );
     memcpy( (void*)&(currentState->base_id), (const void*)(packet->data+4*sizeof( int )), sizeof( int ) );
-    //currentState->normsize = (int)*(data+3*sizeof(int));
-//     std::cout << "normsize. " << currentState->normsize << std::endl;
     //since the packetgenerator was changed, due to a new parameter, change this function too
     memcpy( (void*)&(currentState->diffed), (const void*)(packet->data+5*sizeof(int)), sizeof(bool));
-    //currentState->diffed = (bool)*(data+4*sizeof(int));
-//     std::cout << "diffed: " << currentState->diffed << std::endl;
     //since data is not allocated, because it's just a pointer, allocate it with size of gamestatedatastream
     if(currentState->compsize==0)
@@ -187,7 +178,5 @@
       COUT(2) << "PacketDecoder: Gamestatepacket-decoder: memory leak" << std::endl;
     //copy the GameStateCompressed data
-    //std::cout << "packet size (enet): " << packet->dataLength << std::endl;
-    //std::cout << "totallen: " << 4*sizeof(int)+sizeof(bool)+currentState->compsize << std::endl;
-    memcpy( (void*)(currentState->data), (const void*)(packet->data+4*sizeof( int ) + sizeof(bool)), currentState->compsize );
+    memcpy( (void*)(currentState->data), (const void*)(packet->data+5*sizeof( int ) + sizeof(bool)), currentState->compsize );
 
     //clean memory
Index: code/branches/network3/src/network/Synchronisable.cc
===================================================================
--- code/branches/network3/src/network/Synchronisable.cc	(revision 1176)
+++ code/branches/network3/src/network/Synchronisable.cc	(revision 1177)
@@ -141,4 +141,5 @@
   syncData Synchronisable::getData(unsigned char *mem){
     //std::cout << "inside getData" << std::endl;
+    classID=this->getIdentifier()->getNetworkID();
     std::list<synchronisableVariable *>::iterator i;
     syncData retVal;
@@ -146,4 +147,5 @@
     retVal.classID=this->classID;
     retVal.length=getSize();
+    COUT(4) << "Synchronisable getting data from objectID: " << retVal.objectID << " classID: " << retVal.classID << " length: " << retVal.length << std::endl;
     retVal.data=mem;
     // copy to location
