Index: code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc	(revision 1950)
+++ code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc	(revision 1953)
@@ -51,5 +51,5 @@
 
         this->ping_ = -1;
-        this->clientID_ = (unsigned int)-1;
+        this->clientID_ = network::CLIENTID_UNKNOWN;
         this->bLocalPlayer_ = Core::isStandalone();
         this->bLocalPlayer_ = false;
@@ -60,5 +60,5 @@
         this->registerVariables();
 
-        COUT(0) << "created PlayerInfo (" << this->getObjectID() << ")" << std::endl;
+//COUT(0) << "created PlayerInfo (" << this->getObjectID() << ")" << std::endl;
     }
 
@@ -68,22 +68,27 @@
         if (gametype)
             gametype->removePlayer(this);
-        COUT(0) << "destroyed PlayerInfo (" << this->getObjectID() << ")" << std::endl;
+//COUT(0) << "destroyed PlayerInfo (" << this->getObjectID() << ")" << std::endl;
     }
 
     void PlayerInfo::setConfigValues()
     {
-        SetConfigValue(playerName_, "Player").callback(this, &PlayerInfo::checkName);
+        SetConfigValue(nick_, "Player").callback(this, &PlayerInfo::checkNick);
     }
 
-    void PlayerInfo::checkName()
+    void PlayerInfo::checkNick()
     {
-std::cout << "# PI(" << this->getObjectID() << "): checkName: " << this->bLocalPlayer_ << std::endl;
-        if (this->bLocalPlayer_ && Core::isMaster())
-            this->setName(this->playerName_);
+//std::cout << "# PI(" << this->getObjectID() << "): checkName: " << this->bLocalPlayer_ << std::endl;
+        if (this->bLocalPlayer_)
+        {
+            this->playerName_ = this->nick_;
+
+            if (Core::isMaster())
+                this->setName(this->playerName_);
+        }
     }
 
     void PlayerInfo::changedName()
     {
-std::cout << "# PI(" << this->getObjectID() << "): changedName to " << this->getName() << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): changedName to " << this->getName() << std::endl;
         Gametype* gametype = Gametype::getCurrentGametype();
         if (gametype)
@@ -103,5 +108,5 @@
     void PlayerInfo::clientChangedName()
     {
-std::cout << "# PI(" << this->getObjectID() << "): clientChangedName() to " << this->playerName_ << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): clientChangedName() from " << this->getName() << " to " << this->playerName_ << std::endl;
         this->setName(this->playerName_);
     }
@@ -109,23 +114,23 @@
     void PlayerInfo::checkClientID()
     {
-std::cout << "# PI(" << this->getObjectID() << "): checkClientID()" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): checkClientID()" << std::endl;
         this->bHumanPlayer_ = true;
 
         if (this->clientID_ == network::Host::getPlayerID())
         {
-std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): it's the client's ID" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): it's the client's ID" << std::endl;
             this->bLocalPlayer_ = true;
+            this->playerName_ = this->nick_;
 //std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): name: " << this->getName() << std::endl;
 
             if (Core::isClient())
             {
-std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): we're on a client: set object mode to bidirectional" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): we're on a client: set object mode to bidirectional" << std::endl;
                 this->setObjectMode(network::direction::bidirectional);
-                this->playerName_ += "blub";
-std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): proposed name: " << this->playerName_ << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): proposed name: " << this->playerName_ << std::endl;
             }
             else
             {
-std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): we're not on a client: finish setup" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): we're not on a client: finish setup" << std::endl;
                 this->clientChangedName();
                 this->bFinishedSetup_ = true;
@@ -137,13 +142,13 @@
     void PlayerInfo::finishedSetup()
     {
-std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): " << this->bFinishedSetup_ << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): " << this->bFinishedSetup_ << std::endl;
         if (Core::isClient())
         {
-std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a client: finish setup" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a client: finish setup" << std::endl;
             this->bFinishedSetup_ = true;
         }
         else if (this->bFinishedSetup_)
         {
-std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a server: add player" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a server: add player" << std::endl;
             Gametype* gametype = Gametype::getCurrentGametype();
             if (gametype)
@@ -152,5 +157,5 @@
         else
         {
-std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a server: client not yet finished" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a server: client not yet finished" << std::endl;
         }
     }
Index: code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.h	(revision 1950)
+++ code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.h	(revision 1953)
@@ -60,5 +60,5 @@
             void checkClientID();
             void finishedSetup();
-            void checkName();
+            void checkNick();
             void clientChangedName();
 
@@ -70,4 +70,5 @@
 
             std::string playerName_;
+            std::string nick_;
     };
 }
