Index: code/branches/buildsystem3/src/core/Identifier.h
===================================================================
--- code/branches/buildsystem3/src/core/Identifier.h	(revision 2705)
+++ code/branches/buildsystem3/src/core/Identifier.h	(revision 2706)
@@ -61,5 +61,5 @@
 #include <utility>
 #include <typeinfo>
-#include <stdlib.h>
+#include <cstdlib>
 #include <cassert>
 
Index: code/branches/buildsystem3/src/network/GamestateManager.cc
===================================================================
--- code/branches/buildsystem3/src/network/GamestateManager.cc	(revision 2705)
+++ code/branches/buildsystem3/src/network/GamestateManager.cc	(revision 2706)
@@ -118,5 +118,4 @@
       return 0;
     gs = reference->doSelection(clientID, 10000);
-//     gs = new packet::Gamestate(*reference);
     // save the (undiffed) gamestate in the clients gamestate map
     gamestateMap_[clientID][gs->getID()]=gs;
Index: code/branches/buildsystem3/src/network/packet/Gamestate.cc
===================================================================
--- code/branches/buildsystem3/src/network/packet/Gamestate.cc	(revision 2705)
+++ code/branches/buildsystem3/src/network/packet/Gamestate.cc	(revision 2706)
@@ -110,6 +110,6 @@
   for(it = ObjectList<Synchronisable>::begin(); it; ++it){
     
+    tempsize=it->getSize(id, mode);
 #ifndef NDEBUG
-    tempsize=it->getSize(id, mode);
     if(currentsize+tempsize > size){
       assert(0); // if we don't use multithreading this part shouldn't be neccessary
@@ -184,4 +184,6 @@
     {
       bool b = s->updateData(mem, mode);
+      if(!b)
+        COUT(0) << "data could not be updated" << endl;
       assert(b);
     }
Index: code/branches/buildsystem3/src/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/buildsystem3/src/network/synchronisable/Synchronisable.cc	(revision 2705)
+++ code/branches/buildsystem3/src/network/synchronisable/Synchronisable.cc	(revision 2706)
@@ -236,50 +236,4 @@
     return NULL;
   }
-
-
-  /**
-  * This function is used to register a variable to be synchronized
-  * also counts the total datasize needed to save the variables
-  * @param var pointer to the variable
-  * @param size size of the datatype the variable consists of
-  * @param t the type of the variable (DATA or STRING
-  * @param mode same as in getData
-  * @param cb callback object that should get called, if the value of the variable changes
-  */
-
-/*  void Synchronisable::registerVariable(void *var, int size, variableType t, uint8_t mode, NetworkCallbackBase *cb){
-    assert( mode==variableDirection::toclient || mode==variableDirection::toserver || mode==variableDirection::serverMaster || mode==variableDirection::clientMaster);
-    // create temporary synch.Var struct
-    synchronisableVariable *temp = new synchronisableVariable;
-    temp->size = size;
-    temp->var = var;
-    temp->mode = mode;
-    temp->type = t;
-    temp->callback = cb;
-    if( ( mode & variableDirection::bidirectional ) )
-    {
-      if(t!=STRING)
-      {
-        temp->varBuffer = new uint8_t[size];
-        memcpy(temp->varBuffer, temp->var, size); //now fill the buffer for the first time
-      }
-      else
-      {
-        temp->varBuffer=new std::string( *static_cast<std::string*>(var) );
-      }
-      temp->varReference = 0;
-    }
-    COUT(5) << "Syncronisable::registering var with size: " << temp->size << " and type: " << temp->type << std::endl;
-    //std::cout << "push temp to syncList (at the bottom) " << datasize << std::endl;
-    COUT(5) << "Syncronisable::objectID: " << objectID << " this: " << this << " name: " << this->getIdentifier()->getName() << " networkID: " << this->getIdentifier()->getNetworkID() << std::endl;
-    syncList->push_back(temp);
-#ifndef NDEBUG
-    std::list<synchronisableVariable *>::iterator it = syncList->begin();
-    while(it!=syncList->end()){
-      assert(*it!=var);
-      it++;
-    }
-#endif
-  }*/
 
 
Index: code/branches/buildsystem3/src/network/synchronisable/SynchronisableVariable.cc
===================================================================
--- code/branches/buildsystem3/src/network/synchronisable/SynchronisableVariable.cc	(revision 2705)
+++ code/branches/buildsystem3/src/network/synchronisable/SynchronisableVariable.cc	(revision 2706)
@@ -362,5 +362,6 @@
 {
   double temp;
-  *(uint64_t*)(&temp) = *(uint64_t*)(mem);
+  memcpy(&temp, mem, sizeof(uint64_t));
+  //*(uint64_t*)(&temp) = *(uint64_t*)(mem);
   *(long double*)(&this->variable_) = static_cast<const long double>(temp);
   mem += SynchronisableVariable<const long double>::returnSize();
@@ -370,5 +371,5 @@
 {
   double temp = static_cast<double>(this->variable_);
-  *(uint64_t*)(mem) = *(uint64_t*)(&temp);
+  memcpy(mem, &temp, sizeof(uint64_t));
   mem += SynchronisableVariable<const long double>::returnSize();
 }
@@ -377,5 +378,6 @@
 {
   double temp = static_cast<double>(this->variable_);
-  return *(uint64_t*)(mem) == *(uint64_t*)(&temp);
+  return memcmp(&temp, mem, sizeof(uint64_t))==0;
+  //return *(uint64_t*)(mem) == *(uint64_t*)(&temp);
 }
 
