Index: /code/branches/objecthierarchy/src/network/Synchronisable.cc
===================================================================
--- /code/branches/objecthierarchy/src/network/Synchronisable.cc	(revision 2061)
+++ /code/branches/objecthierarchy/src/network/Synchronisable.cc	(revision 2062)
@@ -147,4 +147,10 @@
     synchronisableHeader *header = (synchronisableHeader *)mem;
 
+    if(!header->dataAvailable)
+    {
+      mem += header->size;
+      return 0;
+    }
+    
     COUT(4) << "fabricating object with id: " << header->objectID << std::endl;
 
@@ -314,8 +320,9 @@
       }
       // if the variable gets synchronised bidirectional, then add the reference to the bytestream
-      if( ( (*i)->mode & direction::bidirectional ) )
+      if( ( (*i)->mode & direction::bidirectional ) == direction::bidirectional )
       {
         *(uint8_t*)mem = (*i)->varReference;
         mem += sizeof( (*i)->varReference );
+        tempsize += sizeof( (*i)->varReference );
       }
       switch((*i)->type){
@@ -323,5 +330,5 @@
           memcpy( (void *)(mem), (void*)((*i)->var), (*i)->size);
           mem+=(*i)->size;
-          tempsize+=(*i)->size + sizeof( (*i)->varReference );
+          tempsize+=(*i)->size;
           break;
         case STRING:
@@ -332,5 +339,5 @@
           COUT(5) << "synchronisable: char: " << (const char *)(mem) << " data: " << data << " string: " << *(std::string *)((*i)->var) << std::endl;
           mem+=(*i)->size;
-          tempsize+=(*i)->size + sizeof( (*i)->varReference ) + sizeof(size_t);
+          tempsize+=(*i)->size + sizeof(size_t);
           break;
       }
@@ -381,5 +388,5 @@
       switch((*i)->type){
         case DATA:
-          if( ( (*i)->mode & direction::bidirectional ) )
+          if( ( (*i)->mode & direction::bidirectional ) == direction::bidirectional )
           {
             if( ( mode == 0x1 && (*i)->mode == direction::serverMaster ) || \
@@ -406,5 +413,5 @@
           break;
         case STRING:
-          if( ( (*i)->mode & direction::bidirectional ) )
+          if( ( (*i)->mode & direction::bidirectional ) == direction::bidirectional )
           {
             if( ( mode == 0x1 && (*i)->mode == direction::serverMaster ) || \
@@ -469,5 +476,5 @@
         break;
       }
-      if( ( (*i)->mode & direction::bidirectional ) != 0)
+      if( ( (*i)->mode & direction::bidirectional ) == direction::bidirectional )
       {
         tsize+=sizeof( (*i)->varReference );
Index: /code/branches/objecthierarchy/src/network/packet/Gamestate.cc
===================================================================
--- /code/branches/objecthierarchy/src/network/packet/Gamestate.cc	(revision 2061)
+++ /code/branches/objecthierarchy/src/network/packet/Gamestate.cc	(revision 2062)
@@ -357,5 +357,5 @@
     assert(it->second->objectID==oldobjectheader->objectID);
     *newobjectheader = *oldobjectheader;
-    objectOffset=sizeof(uint8_t)+sizeof(bool); //skip the size and the availableDate variables in the objectheader
+    objectOffset=sizeof(uint8_t)+sizeof(bool); //skip the size and the availableData variables in the objectheader
     if(it->second->doSelection(HEADER->id)){
       newobjectheader->dataAvailable=true; //TODO: probably not neccessary
Index: /code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.cc
===================================================================
--- /code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2061)
+++ /code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2062)
@@ -163,4 +163,5 @@
             if (!Core::isMaster())
             {
+                this->client_overwrite_ = this->server_overwrite_;
 COUT(0) << "CE: bidirectional synchronization" << std::endl;
                 this->setObjectMode(network::direction::bidirectional);
@@ -248,4 +249,8 @@
     {
         REGISTERSTRING(this->cameraPositionTemplate_, network::direction::toclient);
+        
+        
+        REGISTERDATA(this->client_overwrite_,   network::direction::toserver);
+        REGISTERDATA(this->server_overwrite_,   network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
 
         REGISTERDATA(this->server_position_,    network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
@@ -253,5 +258,4 @@
         REGISTERDATA(this->server_orientation_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
 
-        REGISTERDATA(this->server_overwrite_,   network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
 
         REGISTERDATA(this->client_position_,    network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
@@ -259,5 +263,4 @@
         REGISTERDATA(this->client_orientation_, network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
 
-        REGISTERDATA(this->client_overwrite_,   network::direction::toserver);
 
         REGISTERDATA(this->playerID_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
@@ -302,4 +305,6 @@
             this->server_position_ = this->client_position_;
         }
+        else
+          COUT(2) << "callback: not setting client position" << endl;
     }
 
@@ -453,5 +458,5 @@
         else if (this->bControlled_)
         {
-            this->node_->lookAt(target, relativeTo, localDirectionVector);
+//             this->node_->lookAt(target, relativeTo, localDirectionVector);
             this->client_orientation_ = this->node_->getOrientation();
         }
