Index: code/branches/presentation/src/orxonox/objects/infos/Bot.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/infos/Bot.cc	(revision 2485)
+++ code/branches/presentation/src/orxonox/objects/infos/Bot.cc	(revision 2485)
@@ -0,0 +1,99 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "Bot.h"
+
+#include "core/Core.h"
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "objects/gametypes/Gametype.h"
+#include "objects/controllers/AIController.h"
+#include "util/Math.h"
+
+namespace orxonox
+{
+    CreateFactory(Bot);
+
+    Bot::Bot(BaseObject* creator) : PlayerInfo(creator)
+    {
+        RegisterObject(Bot);
+
+        this->bHumanPlayer_ = false;
+        this->bLocalPlayer_ = Core::isMaster();
+        this->bSetUnreadyAfterSpawn_ = false;
+        this->setReadyToSpawn(true);
+        this->defaultController_ = Class(AIController);
+
+        this->setConfigValues();
+
+        this->setName(this->names_[(size_t)(rnd() * this->names_.size())]);
+
+        if (this->getGametype())
+            this->getGametype()->playerEntered(this);
+
+        this->createController();
+    }
+
+    Bot::~Bot()
+    {
+    }
+
+    void Bot::setConfigValues()
+    {
+        static std::string names[] =
+        {
+            "Dr. Julius No",
+            "Rosa Klebb",
+            "Auric Goldfinger",
+            "Emilio Largo",
+            "Ernst Stavro Blofeld",
+            "Dr. Kananga",
+            "Francisco Scaramanga",
+            "Karl Stromberg",
+            "Sir Hugo Drax",
+            "Aris Kristatos",
+            "Kamal Khan",
+            "General Orlov",
+            "Max Zorin",
+            "Brad Whitaker",
+            "General Koskov",
+            "Franz Sanchez",
+            "Alec Trevelyan",
+            "Elliot Carver",
+            "Viktor Zokas",
+            "Gustav Graves",
+            "Le Chiffre",
+            "Mr. White",
+            "Dominic Greene"
+        };
+        static std::vector<std::string> defaultnames(names, names + sizeof(names) / sizeof(std::string));
+
+        SetConfigValueVector(names_, defaultnames);
+    }
+}
Index: code/branches/presentation/src/orxonox/objects/infos/Bot.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/infos/Bot.h	(revision 2485)
+++ code/branches/presentation/src/orxonox/objects/infos/Bot.h	(revision 2485)
@@ -0,0 +1,59 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Bot_H__
+#define _Bot_H__
+
+#include "OrxonoxPrereqs.h"
+#include <vector>
+
+#include "PlayerInfo.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Bot : public PlayerInfo
+    {
+        public:
+            Bot(BaseObject* creator);
+            virtual ~Bot();
+
+            void setConfigValues();
+
+            inline bool isInitialized() const
+                { return true; }
+            inline float getPing() const
+                { return 0; }
+            inline float getPacketLossRatio() const
+                { return 0; }
+
+        private:
+            std::vector<std::string> names_;
+    };
+}
+
+#endif /* _Bot_H__ */
Index: code/branches/presentation/src/orxonox/objects/infos/CMakeLists.txt
===================================================================
--- code/branches/presentation/src/orxonox/objects/infos/CMakeLists.txt	(revision 2371)
+++ code/branches/presentation/src/orxonox/objects/infos/CMakeLists.txt	(revision 2485)
@@ -1,6 +1,8 @@
 SET( SRC_FILES
+  Bot.cc
   Info.cc
   PlayerInfo.cc
   HumanPlayer.cc
+  GametypeInfo.cc
 )
 
Index: code/branches/presentation/src/orxonox/objects/infos/GametypeInfo.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/infos/GametypeInfo.cc	(revision 2485)
+++ code/branches/presentation/src/orxonox/objects/infos/GametypeInfo.cc	(revision 2485)
@@ -0,0 +1,61 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "GametypeInfo.h"
+
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateUnloadableFactory(GametypeInfo);
+
+    GametypeInfo::GametypeInfo(BaseObject* creator) : Info(creator)
+    {
+        RegisterObject(GametypeInfo);
+
+        this->bStarted_ = false;
+        this->bEnded_ = false;
+        this->startCountdown_ = 0;
+        this->bStartCountdownRunning_ = false;
+
+        this->registerVariables();
+    }
+
+    GametypeInfo::~GametypeInfo()
+    {
+    }
+
+    void GametypeInfo::registerVariables()
+    {
+        registerVariable(this->bStarted_,               variableDirection::toclient);
+        registerVariable(this->bEnded_,                 variableDirection::toclient);
+        registerVariable(this->startCountdown_,         variableDirection::toclient);
+        registerVariable(this->bStartCountdownRunning_, variableDirection::toclient);
+    }
+}
Index: code/branches/presentation/src/orxonox/objects/infos/GametypeInfo.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/infos/GametypeInfo.h	(revision 2485)
+++ code/branches/presentation/src/orxonox/objects/infos/GametypeInfo.h	(revision 2485)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _GametypeInfo_H__
+#define _GametypeInfo_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "Info.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport GametypeInfo : public Info
+    {
+        friend class Gametype;
+
+        public:
+            GametypeInfo(BaseObject* creator);
+            virtual ~GametypeInfo();
+
+            void registerVariables();
+
+            inline bool hasStarted() const
+                { return this->bStarted_; }
+            inline bool hasEnded() const
+                { return this->bEnded_; }
+
+            inline bool isStartCountdownRunning() const
+                { return this->bStartCountdownRunning_; }
+            inline float getStartCountdown() const
+                { return this->startCountdown_; }
+
+        private:
+            bool bStarted_;
+            bool bEnded_;
+            bool bStartCountdownRunning_;
+            float startCountdown_;
+    };
+}
+
+#endif /* _GametypeInfo_H__ */
Index: code/branches/presentation/src/orxonox/objects/infos/HumanPlayer.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/infos/HumanPlayer.cc	(revision 2371)
+++ code/branches/presentation/src/orxonox/objects/infos/HumanPlayer.cc	(revision 2485)
@@ -37,4 +37,5 @@
 #include "objects/controllers/HumanController.h"
 #include "objects/gametypes/Gametype.h"
+#include "overlays/OverlayGroup.h"
 
 namespace orxonox
@@ -63,4 +64,5 @@
     {
         SetConfigValue(nick_, "Player").callback(this, &HumanPlayer::configvaluecallback_changednick);
+        SetConfigValue(hudtemplate_, "defaultHUD").callback(this, &HumanPlayer::configvaluecallback_changedHUDTemplate);
     }
 
@@ -69,5 +71,5 @@
         registerVariable(this->synchronize_nick_, variableDirection::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));
 
-        registerVariable(this->clientID_,     variableDirection::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));
+        registerVariable(this->clientID_,           variableDirection::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));
         registerVariable(this->server_initialized_, variableDirection::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_initialized));
         registerVariable(this->client_initialized_, variableDirection::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_initialized));
@@ -83,4 +85,9 @@
                 this->setName(this->nick_);
         }
+    }
+
+    void HumanPlayer::configvaluecallback_changedHUDTemplate()
+    {
+        this->changedController();
     }
 
@@ -138,3 +145,14 @@
         this->networkcallback_clientIDchanged();
     }
+
+    void HumanPlayer::changedController()
+    {
+        if (this->getController())
+        {
+            this->getController()->setHUDTemplate(this->hudtemplate_);
+
+            if (this->getController() && this->getController()->getHUD())
+                this->getController()->getHUD()->setOwner(this->getControllableEntity());
+        }
+    }
 }
Index: code/branches/presentation/src/orxonox/objects/infos/HumanPlayer.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/infos/HumanPlayer.h	(revision 2371)
+++ code/branches/presentation/src/orxonox/objects/infos/HumanPlayer.h	(revision 2485)
@@ -33,6 +33,4 @@
 
 #include "PlayerInfo.h"
-#include "core/Identifier.h"
-#include "objects/controllers/Controller.h"
 
 namespace orxonox
@@ -53,6 +51,9 @@
             void setClientID(unsigned int clientID);
 
+            virtual void changedController();
+
         protected:
             void configvaluecallback_changednick();
+            void configvaluecallback_changedHUDTemplate();
             void networkcallback_changednick();
             void networkcallback_clientIDchanged();
@@ -62,4 +63,5 @@
             std::string nick_;
             std::string synchronize_nick_;
+            std::string hudtemplate_;
             bool server_initialized_;
             bool client_initialized_;
Index: code/branches/presentation/src/orxonox/objects/infos/PlayerInfo.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/infos/PlayerInfo.cc	(revision 2371)
+++ code/branches/presentation/src/orxonox/objects/infos/PlayerInfo.cc	(revision 2485)
@@ -46,4 +46,5 @@
         this->bLocalPlayer_ = false;
         this->bReadyToSpawn_ = false;
+        this->bSetUnreadyAfterSpawn_ = true;
         this->controller_ = 0;
         this->controllableEntity_ = 0;
@@ -64,4 +65,7 @@
                 this->controller_ = 0;
             }
+
+            if (this->getGametype())
+                this->getGametype()->playerLeft(this);
         }
     }
@@ -76,4 +80,6 @@
     void PlayerInfo::changedName()
     {
+        SUPER(PlayerInfo, changedName);
+
         if (this->isInitialized() && this->getGametype())
             this->getGametype()->playerChangedName(this);
@@ -109,10 +115,14 @@
         if (this->controllableEntity_)
             this->controller_->setControllableEntity(this->controllableEntity_);
+        this->changedController();
     }
 
-    void PlayerInfo::startControl(ControllableEntity* entity)
+    void PlayerInfo::startControl(ControllableEntity* entity, bool callback)
     {
+        if (entity == this->controllableEntity_)
+            return;
+
         if (this->controllableEntity_)
-            this->stopControl(this->controllableEntity_);
+            this->stopControl(this->controllableEntity_, callback);
 
         this->controllableEntity_ = entity;
@@ -122,5 +132,5 @@
             this->controllableEntityID_ = entity->getObjectID();
             entity->setPlayer(this);
-            this->bReadyToSpawn_ = false;
+            this->bReadyToSpawn_ &= (!this->bSetUnreadyAfterSpawn_);
         }
         else
Index: code/branches/presentation/src/orxonox/objects/infos/PlayerInfo.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/infos/PlayerInfo.h	(revision 2371)
+++ code/branches/presentation/src/orxonox/objects/infos/PlayerInfo.h	(revision 2485)
@@ -65,5 +65,5 @@
                 { return this->bReadyToSpawn_; }
 
-            void startControl(ControllableEntity* entity);
+            void startControl(ControllableEntity* entity, bool callback = true);
             void stopControl(ControllableEntity* entity, bool callback = true);
 
@@ -71,16 +71,24 @@
                 { return this->controllableEntity_; }
 
+            inline Controller* getController() const
+                { return this->controller_; }
+            virtual void changedController() {}
+
         protected:
             void createController();
-            void networkcallback_changedcontrollableentityID();
 
             bool bHumanPlayer_;
             bool bLocalPlayer_;
+            bool bSetUnreadyAfterSpawn_;
+            SubclassIdentifier<Controller> defaultController_;
+            unsigned int clientID_;
+
+        private:
+            void networkcallback_changedcontrollableentityID();
+
             bool bReadyToSpawn_;
-            SubclassIdentifier<Controller> defaultController_;
             Controller* controller_;
             ControllableEntity* controllableEntity_;
             unsigned int controllableEntityID_;
-            unsigned int clientID_;
     };
 }
