Index: /code/branches/netp3/src/orxonox/objects/worldentities/ControllableEntity.cc
===================================================================
--- /code/branches/netp3/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 3003)
+++ /code/branches/netp3/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 3004)
@@ -66,12 +66,12 @@
         this->mouseLookSpeed_ = 200;
 
-        this->common_position_         = Vector3::ZERO;
-//         this->client_position_         = Vector3::ZERO;
-        this->common_linear_velocity_  = Vector3::ZERO;
-//         this->client_linear_velocity_  = Vector3::ZERO;
-        this->common_orientation_      = Quaternion::IDENTITY;
-//         this->client_orientation_      = Quaternion::IDENTITY;
-        this->common_angular_velocity_ = Vector3::ZERO;
-//         this->client_angular_velocity_ = Vector3::ZERO;
+        this->server_position_         = Vector3::ZERO;
+        this->client_position_         = Vector3::ZERO;
+        this->server_linear_velocity_  = Vector3::ZERO;
+        this->client_linear_velocity_  = Vector3::ZERO;
+        this->server_orientation_      = Quaternion::IDENTITY;
+        this->client_orientation_      = Quaternion::IDENTITY;
+        this->server_angular_velocity_ = Vector3::ZERO;
+        this->client_angular_velocity_ = Vector3::ZERO;
 
 
@@ -326,18 +326,18 @@
             if (!this->isDynamic())
             {
-//                 if (GameMode::isMaster())
-//                 {
-                    this->common_position_ = this->getPosition();
-                    this->common_orientation_ = this->getOrientation();
-                    this->common_linear_velocity_ = this->getVelocity();
-                    this->common_angular_velocity_ = this->getAngularVelocity();
-//                 }
-//                 else if (this->bHasLocalController_)
-//                 {
-//                     this->client_position_ = this->getPosition();
-//                     this->client_orientation_ = this->getOrientation();
-//                     this->client_linear_velocity_ = this->getVelocity();
-//                     this->client_angular_velocity_ = this->getAngularVelocity();
-//                 }
+                if (GameMode::isMaster())
+                {
+                    this->server_position_ = this->getPosition();
+                    this->server_orientation_ = this->getOrientation();
+                    this->server_linear_velocity_ = this->getVelocity();
+                    this->server_angular_velocity_ = this->getAngularVelocity();
+                }
+                else if (this->bHasLocalController_)
+                {
+                    this->client_position_ = this->getPosition();
+                    this->client_orientation_ = this->getOrientation();
+                    this->client_linear_velocity_ = this->getVelocity();
+                    this->client_angular_velocity_ = this->getAngularVelocity();
+                }
             }
         }
@@ -349,21 +349,17 @@
         registerVariable(this->hudtemplate_,             variableDirection::toclient);
 
-//         registerVariable(this->server_position_,         variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
-//         registerVariable(this->server_linear_velocity_,  variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerLinearVelocity));
-//         registerVariable(this->server_orientation_,      variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
-//         registerVariable(this->server_angular_velocity_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerAngularVelocity));
-// 
-//         registerVariable(this->server_overwrite_,        variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
-//         registerVariable(this->client_overwrite_,        variableDirection::toserver);
-// 
-//         registerVariable(this->client_position_,         variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
-//         registerVariable(this->client_linear_velocity_,  variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientLinearVelocity));
-//         registerVariable(this->client_orientation_,      variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
-//         registerVariable(this->client_angular_velocity_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientAngularVelocity));
+        registerVariable(this->server_position_,         variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
+        registerVariable(this->server_linear_velocity_,  variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerLinearVelocity));
+        registerVariable(this->server_orientation_,      variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
+        registerVariable(this->server_angular_velocity_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerAngularVelocity));
+
+        registerVariable(this->server_overwrite_,        variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
+        registerVariable(this->client_overwrite_,        variableDirection::toserver);
+
+        registerVariable(this->client_position_,         variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
+        registerVariable(this->client_linear_velocity_,  variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientLinearVelocity));
+        registerVariable(this->client_orientation_,      variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
+        registerVariable(this->client_angular_velocity_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientAngularVelocity));
         
-        registerVariable(this->common_position_,         variableDirection::serverMaster, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition), true);
-        registerVariable(this->common_linear_velocity_,  variableDirection::serverMaster, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerLinearVelocity), true);
-        registerVariable(this->common_orientation_,      variableDirection::serverMaster, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation), true);
-        registerVariable(this->common_angular_velocity_, variableDirection::serverMaster, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerAngularVelocity), true);
 
         registerVariable(this->playerID_,                variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
@@ -373,5 +369,5 @@
     {
         if (!this->bHasLocalController_)
-            MobileEntity::setPosition(this->common_position_);
+            MobileEntity::setPosition(this->server_position_);
     }
 
@@ -379,5 +375,5 @@
     {
         if (!this->bHasLocalController_)
-            MobileEntity::setVelocity(this->common_linear_velocity_);
+            MobileEntity::setVelocity(this->server_linear_velocity_);
     }
 
@@ -385,5 +381,5 @@
     {
         if (!this->bHasLocalController_)
-            MobileEntity::setOrientation(this->common_orientation_);
+            MobileEntity::setOrientation(this->server_orientation_);
     }
 
@@ -391,5 +387,5 @@
     {
         if (!this->bHasLocalController_)
-            MobileEntity::setAngularVelocity(this->common_angular_velocity_);
+            MobileEntity::setAngularVelocity(this->server_angular_velocity_);
     }
 
@@ -398,10 +394,10 @@
         if (this->bHasLocalController_)
         {
-//             this->setPosition(this->server_position_);
-//             this->setOrientation(this->server_orientation_);
-//             this->setVelocity(this->server_linear_velocity_);
-//             this->setAngularVelocity(this->server_angular_velocity_);
-
-//             this->client_overwrite_ = this->server_overwrite_;
+            this->setPosition(this->server_position_);
+            this->setOrientation(this->server_orientation_);
+            this->setVelocity(this->server_linear_velocity_);
+            this->setAngularVelocity(this->server_angular_velocity_);
+
+            this->client_overwrite_ = this->server_overwrite_;
         }
     }
@@ -411,6 +407,6 @@
         if (this->server_overwrite_ == this->client_overwrite_)
         {
-//             MobileEntity::setPosition(this->client_position_);
-//             this->server_position_ = this->getPosition();
+            MobileEntity::setPosition(this->client_position_);
+            this->server_position_ = this->getPosition();
         }
     }
@@ -420,6 +416,6 @@
         if (this->server_overwrite_ == this->client_overwrite_)
         {
-//             MobileEntity::setVelocity(this->client_linear_velocity_);
-//             this->server_linear_velocity_ = this->getVelocity();
+            MobileEntity::setVelocity(this->client_linear_velocity_);
+            this->server_linear_velocity_ = this->getVelocity();
         }
     }
@@ -429,6 +425,6 @@
         if (this->server_overwrite_ == this->client_overwrite_)
         {
-//             MobileEntity::setOrientation(this->client_orientation_);
-//             this->server_orientation_ = this->getOrientation();
+            MobileEntity::setOrientation(this->client_orientation_);
+            this->server_orientation_ = this->getOrientation();
         }
     }
@@ -438,6 +434,6 @@
         if (this->server_overwrite_ == this->client_overwrite_)
         {
-//             MobileEntity::setAngularVelocity(this->client_angular_velocity_);
-//             this->server_angular_velocity_ = this->getAngularVelocity();
+            MobileEntity::setAngularVelocity(this->client_angular_velocity_);
+            this->server_angular_velocity_ = this->getAngularVelocity();
         }
     }
@@ -445,60 +441,60 @@
     void ControllableEntity::setPosition(const Vector3& position)
     {
-//         if (GameMode::isMaster())
-//         {
+        if (GameMode::isMaster())
+        {
             MobileEntity::setPosition(position);
-            this->common_position_ = this->getPosition();
-//             ++this->server_overwrite_;
-//         }
-//         else if (this->bHasLocalController_)
-//         {
-//             MobileEntity::setPosition(position);
-//             this->client_position_ = this->getPosition();
-//         }
+            this->server_position_ = this->getPosition();
+            ++this->server_overwrite_;
+        }
+        else if (this->bHasLocalController_)
+        {
+            MobileEntity::setPosition(position);
+            this->client_position_ = this->getPosition();
+        }
     }
 
     void ControllableEntity::setOrientation(const Quaternion& orientation)
     {
-//         if (GameMode::isMaster())
-//         {
+        if (GameMode::isMaster())
+        {
             MobileEntity::setOrientation(orientation);
-            this->common_orientation_ = this->getOrientation();
-//             ++this->server_overwrite_;
-//         }
-//         else if (this->bHasLocalController_)
-//         {
-//             MobileEntity::setOrientation(orientation);
-//             this->client_orientation_ = this->getOrientation();
-//         }
+            this->server_orientation_ = this->getOrientation();
+            ++this->server_overwrite_;
+        }
+        else if (this->bHasLocalController_)
+        {
+            MobileEntity::setOrientation(orientation);
+            this->client_orientation_ = this->getOrientation();
+        }
     }
 
     void ControllableEntity::setVelocity(const Vector3& velocity)
     {
-//         if (GameMode::isMaster())
-//         {
+        if (GameMode::isMaster())
+        {
             MobileEntity::setVelocity(velocity);
-            this->common_linear_velocity_ = this->getVelocity();
-//             ++this->server_overwrite_;
-//         }
-//         else if (this->bHasLocalController_)
-//         {
-//             MobileEntity::setVelocity(velocity);
-//             this->client_linear_velocity_ = this->getVelocity();
-//         }
+            this->server_linear_velocity_ = this->getVelocity();
+            ++this->server_overwrite_;
+        }
+        else if (this->bHasLocalController_)
+        {
+            MobileEntity::setVelocity(velocity);
+            this->client_linear_velocity_ = this->getVelocity();
+        }
     }
 
     void ControllableEntity::setAngularVelocity(const Vector3& velocity)
     {
-//         if (GameMode::isMaster())
-//         {
+        if (GameMode::isMaster())
+        {
             MobileEntity::setAngularVelocity(velocity);
-            this->common_angular_velocity_ = this->getAngularVelocity();
-//             ++this->server_overwrite_;
-//         }
-//         else if (this->bHasLocalController_)
-//         {
-//             MobileEntity::setAngularVelocity(velocity);
-//             this->client_angular_velocity_ = this->getAngularVelocity();
-//         }
+            this->server_angular_velocity_ = this->getAngularVelocity();
+            ++this->server_overwrite_;
+        }
+        else if (this->bHasLocalController_)
+        {
+            MobileEntity::setAngularVelocity(velocity);
+            this->client_angular_velocity_ = this->getAngularVelocity();
+        }
     }
 
@@ -506,18 +502,18 @@
     {
         MobileEntity::setWorldTransform(worldTrans);
-//         if (GameMode::isMaster())
-//         {
-            this->common_position_ = this->getPosition();
-            this->common_orientation_ = this->getOrientation();
-            this->common_linear_velocity_ = this->getVelocity();
-            this->common_angular_velocity_ = this->getAngularVelocity();
-//         }
-//         else if (this->bHasLocalController_)
-//         {
-//             this->client_position_ = this->getPosition();
-//             this->client_orientation_ = this->getOrientation();
-//             this->client_linear_velocity_ = this->getVelocity();
-//             this->client_angular_velocity_ = this->getAngularVelocity();
-//         }
+        if (GameMode::isMaster())
+        {
+            this->server_position_ = this->getPosition();
+            this->server_orientation_ = this->getOrientation();
+            this->server_linear_velocity_ = this->getVelocity();
+            this->server_angular_velocity_ = this->getAngularVelocity();
+        }
+        else if (this->bHasLocalController_)
+        {
+            this->client_position_ = this->getPosition();
+            this->client_orientation_ = this->getOrientation();
+            this->client_linear_velocity_ = this->getVelocity();
+            this->client_angular_velocity_ = this->getAngularVelocity();
+        }
     }
 }
Index: /code/branches/netp3/src/orxonox/objects/worldentities/ControllableEntity.h
===================================================================
--- /code/branches/netp3/src/orxonox/objects/worldentities/ControllableEntity.h	(revision 3003)
+++ /code/branches/netp3/src/orxonox/objects/worldentities/ControllableEntity.h	(revision 3004)
@@ -164,16 +164,12 @@
             bool bDestroyWhenPlayerLeft_;
 
-//             Vector3 server_position_;
-            Vector3 common_position_;
-//             Vector3 client_position_;
-//             Vector3 server_linear_velocity_;
-//             Vector3 client_linear_velocity_;
-            Vector3 common_linear_velocity_;
-//             Quaternion server_orientation_;
-//             Quaternion client_orientation_;
-            Quaternion common_orientation_;
-//             Vector3 server_angular_velocity_;
-//             Vector3 client_angular_velocity_;
-            Vector3 common_angular_velocity_;
+            Vector3 server_position_;
+            Vector3 client_position_;
+            Vector3 server_linear_velocity_;
+            Vector3 client_linear_velocity_;
+            Quaternion server_orientation_;
+            Quaternion client_orientation_;
+            Vector3 server_angular_velocity_;
+            Vector3 client_angular_velocity_;
 
             PlayerInfo* player_;
