Index: code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.cc	(revision 2006)
@@ -57,5 +57,4 @@
         , radar_(0)
         , startLevel_(0)
-        , hud_(0)
     {
         RegisterObject(GSLevel);
@@ -83,4 +82,6 @@
         COUT(4) << "Created SceneManager: " << sceneManager_->getName() << std::endl;
 
+        this->sceneManager_->setShadowTechnique(Ogre::SHADOWTYPE_STENCIL_ADDITIVE);
+
         // temporary hack
         GraphicsEngine::getInstance().setLevelSceneManager(this->sceneManager_);
@@ -88,9 +89,4 @@
         // Start the Radar
         this->radar_ = new Radar();
-
-        // Load the HUD
-        COUT(3) << "Orxonox: Loading HUD" << std::endl;
-        hud_ = new Level(Settings::getDataPath() + "overlay/hud.oxo");
-        Loader::load(hud_);
 
         // reset game speed to normal
@@ -113,7 +109,4 @@
     void GSLevel::leave()
     {
-        Loader::unload(hud_);
-        delete this->hud_;
-
         // this call will delete every BaseObject!
         // But currently this will call methods of objects that exist no more
Index: code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.h	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.h	(revision 2006)
@@ -69,9 +69,8 @@
         Radar*                radar_;            //!< represents the Radar (not the HUD part)
         Level*                startLevel_;       //!< current hard coded default level
-        Level*                hud_;              //!< 'level' object fo the HUD
 
         // config values
         std::string           keyDetectorCallbackCode_;
-        
+
     private:
         void setConfigValues();
Index: code/branches/objecthierarchy/src/orxonox/objects/Camera.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/Camera.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/Camera.cc	(revision 2006)
@@ -70,6 +70,4 @@
   void Camera::tick(float dt)
   {
-      SUPER(Camera, tick, dt);
-
       // this stuff here may need some adjustments
       float coeff = (this->bDrag_) ? min(1.0f, 15.0f * dt) : (1.0f);
Index: code/branches/objecthierarchy/src/orxonox/objects/Camera.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/Camera.h	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/Camera.h	(revision 2006)
@@ -40,5 +40,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport Camera : public PositionableEntity//, public Tickable
+    class _OrxonoxExport Camera : public PositionableEntity, public Tickable
     {
       friend class CameraHandler;
Index: code/branches/objecthierarchy/src/orxonox/objects/CameraHandler.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/CameraHandler.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/CameraHandler.cc	(revision 2006)
@@ -46,4 +46,5 @@
     this->cam_ = GraphicsEngine::getInstance().getLevelSceneManager()->createCamera("Cam");
     GraphicsEngine::getInstance().getViewport()->setCamera(this->cam_);
+    this->cam_->setNearClipDistance(1);
     //GraphicsEngine::getInstance().getRenderWindow()->addViewport(this->cam_, 2, 0.4, 0.4, 0.2, 0.2);
     /*this->activeCamera_ = *ObjectList<Camera>::begin();
Index: code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.cc	(revision 2006)
@@ -31,5 +31,4 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConsoleCommand.h"
 #include "objects/infos/PlayerInfo.h"
 #include "objects/worldentities/pawns/Spectator.h"
@@ -39,6 +38,4 @@
 namespace orxonox
 {
-    SetConsoleCommand(Gametype, listPlayers, true);
-
     CreateUnloadableFactory(Gametype);
 
@@ -48,74 +45,6 @@
 
         this->defaultPawn_ = Class(Spectator);
-        this->getConnectedClients();
 
         COUT(0) << "created Gametype" << std::endl;
-    }
-
-    Gametype* Gametype::getCurrentGametype()
-    {
-        for (ObjectList<Gametype>::iterator it = ObjectList<Gametype>::begin(); it != ObjectList<Gametype>::end(); ++it)
-            return (*it);
-
-        return 0;
-    }
-
-    PlayerInfo* Gametype::getClient(unsigned int clientID)
-    {
-        Gametype* gametype = Gametype::getCurrentGametype();
-        if (gametype)
-        {
-            std::map<unsigned int, PlayerInfo*>::const_iterator it = gametype->clients_.find(clientID);
-            if (it != gametype->clients_.end())
-                return it->second;
-        }
-        else
-        {
-            for (ObjectList<PlayerInfo>::iterator it = ObjectList<PlayerInfo>::begin(); it != ObjectList<PlayerInfo>::end(); ++it)
-                if (it->getClientID() == clientID)
-                    return (*it);
-        }
-        return 0;
-    }
-
-    void Gametype::listPlayers()
-    {
-        Gametype* gametype = Gametype::getCurrentGametype();
-
-        if (gametype)
-        {
-            for (std::set<PlayerInfo*>::const_iterator it = gametype->players_.begin(); it != gametype->players_.end(); ++it)
-                COUT(0) << "ID: " << (*it)->getClientID() << ", Name: " << (*it)->getName() << std::endl;
-        }
-        else
-        {
-            for (ObjectList<PlayerInfo>::iterator it = ObjectList<PlayerInfo>::begin(); it != ObjectList<PlayerInfo>::end(); ++it)
-                COUT(0) << "ID: " << (*it)->getClientID() << ", Name: " << (*it)->getName() << std::endl;
-        }
-    }
-
-    void Gametype::clientConnected(unsigned int clientID)
-    {
-        COUT(0) << "client connected" << std::endl;
-
-        // create new PlayerInfo instance
-        PlayerInfo* player = new PlayerInfo();
-        player->setClientID(clientID);
-
-        // add to clients-map
-        assert(!this->clients_[clientID]);
-        this->clients_[clientID] = player;
-    }
-
-    void Gametype::clientDisconnected(unsigned int clientID)
-    {
-        COUT(0) << "client disconnected" << std::endl;
-
-        // remove from clients-map
-        PlayerInfo* player = this->clients_[clientID];
-        this->clients_.erase(clientID);
-
-        // delete PlayerInfo instance
-        delete player;
     }
 
@@ -131,7 +60,10 @@
     void Gametype::removePlayer(PlayerInfo* player)
     {
-        player->stopControl();
-        this->players_.erase(player);
-        this->playerLeft(player);
+        if (this->players_.find(player) != this->players_.end())
+        {
+            player->stopControl();
+            this->players_.erase(player);
+            this->playerLeft(player);
+        }
     }
 
Index: code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.h	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.h	(revision 2006)
@@ -36,10 +36,9 @@
 #include "core/BaseObject.h"
 #include "core/Identifier.h"
-#include "network/ClientConnectionListener.h"
 #include "objects/worldentities/ControllableEntity.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport Gametype : public BaseObject, public network::ClientConnectionListener
+    class _OrxonoxExport Gametype : public BaseObject
     {
         friend class PlayerInfo;
@@ -49,17 +48,8 @@
             virtual ~Gametype() {}
 
-            static Gametype* getCurrentGametype();
-            static void listPlayers();
-
-            inline const std::map<unsigned int, PlayerInfo*>& getClients() const
-                { return this->clients_; }
             inline const std::set<PlayerInfo*>& getPlayers() const
                 { return this->players_; }
-            static PlayerInfo* getClient(unsigned int clientID);
 
         protected:
-            virtual void clientConnected(unsigned int clientID);
-            virtual void clientDisconnected(unsigned int clientID);
-
             virtual void playerJoined(PlayerInfo* player);
             virtual void playerLeft(PlayerInfo* player);
@@ -72,5 +62,4 @@
 
             std::set<PlayerInfo*> players_;
-            std::map<unsigned int, PlayerInfo*> clients_;
             SubclassIdentifier<ControllableEntity> defaultPawn_;
     };
Index: code/branches/objecthierarchy/src/orxonox/objects/infos/LevelInfo.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/infos/LevelInfo.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/infos/LevelInfo.cc	(revision 2006)
@@ -31,13 +31,23 @@
 
 #include <OgreSceneManager.h>
+#include <OgreLight.h>
 
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "core/Core.h"
+#include "core/ConsoleCommand.h"
+#include "core/Loader.h"
+#include "core/Template.h"
 
 #include "GraphicsEngine.h"
+#include "Settings.h"
+#include "PlayerInfo.h"
+
+#include "util/Math.h"
 
 namespace orxonox
 {
+    SetConsoleCommand(LevelInfo, listPlayers, true);
+
     CreateFactory(LevelInfo);
 
@@ -46,10 +56,91 @@
         RegisterObject(LevelInfo);
 
-        this->gametypeInstance_ = 0;
+        this->rootGametype_ = 0;
         this->registerVariables();
 
+        // test test test
+        {
+            Ogre::Light* light;
+            light = GraphicsEngine::getInstance().getLevelSceneManager()->createLight("Light0");
+            light->setType(Ogre::Light::LT_DIRECTIONAL);
+            light->setDiffuseColour(ColourValue(1.0, 0.9, 0.6, 1.0));
+            light->setSpecularColour(ColourValue(1.0, 0.9, 0.6, 1.0));
+            light->setDirection(1, -0.2, 0.2);
+        }
+        // test test test
+
         COUT(0) << "created LevelInfo" << std::endl;
     }
 
+    LevelInfo* LevelInfo::getActiveLevelInfo()
+    {
+        for (ObjectList<LevelInfo>::iterator it = ObjectList<LevelInfo>::begin(); it != ObjectList<LevelInfo>::end(); ++it)
+            if (it->isActive())
+                return (*it);
+
+        return 0;
+    }
+
+    PlayerInfo* LevelInfo::getClient(unsigned int clientID)
+    {
+        LevelInfo* levelinfo = LevelInfo::getActiveLevelInfo();
+
+        if (levelinfo)
+        {
+            std::map<unsigned int, PlayerInfo*>::const_iterator it = levelinfo->clients_.find(clientID);
+            if (it != levelinfo->clients_.end())
+                return it->second;
+        }
+        else
+        {
+            for (ObjectList<PlayerInfo>::iterator it = ObjectList<PlayerInfo>::begin(); it != ObjectList<PlayerInfo>::end(); ++it)
+                if (it->getClientID() == clientID)
+                    return (*it);
+        }
+        return 0;
+    }
+
+    void LevelInfo::listPlayers()
+    {
+        LevelInfo* levelinfo = LevelInfo::getActiveLevelInfo();
+
+        if (levelinfo->getGametype())
+        {
+            for (std::set<PlayerInfo*>::const_iterator it = levelinfo->getGametype()->getPlayers().begin(); it != levelinfo->getGametype()->getPlayers().end(); ++it)
+                COUT(0) << "ID: " << (*it)->getClientID() << ", Name: " << (*it)->getName() << std::endl;
+        }
+        else
+        {
+            for (ObjectList<PlayerInfo>::iterator it = ObjectList<PlayerInfo>::begin(); it != ObjectList<PlayerInfo>::end(); ++it)
+                COUT(0) << "ID: " << (*it)->getClientID() << ", Name: " << (*it)->getName() << std::endl;
+        }
+    }
+
+    void LevelInfo::clientConnected(unsigned int clientID)
+    {
+        COUT(0) << "client connected" << std::endl;
+
+        // create new PlayerInfo instance
+        PlayerInfo* player = new PlayerInfo();
+        player->setGametype(this->getGametype());
+        player->setClientID(clientID);
+
+        // add to clients-map
+        assert(!this->clients_[clientID]);
+        this->clients_[clientID] = player;
+    }
+
+    void LevelInfo::clientDisconnected(unsigned int clientID)
+    {
+        COUT(0) << "client disconnected" << std::endl;
+
+        // remove from clients-map
+        PlayerInfo* player = this->clients_[clientID];
+        this->clients_.erase(clientID);
+
+        // delete PlayerInfo instance
+        delete player;
+    }
+
     void LevelInfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
@@ -57,15 +148,31 @@
 
         XMLPortParam(LevelInfo, "description", setDescription, getDescription, xmlelement, mode);
-        XMLPortParam(LevelInfo, "gametype", setGametype, getGametype, xmlelement, mode).defaultValues("Gametype");
+        XMLPortParam(LevelInfo, "gametype", setGametypeString, getGametypeString, xmlelement, mode).defaultValues("Gametype");
         XMLPortParam(LevelInfo, "skybox", setSkybox, getSkybox, xmlelement, mode);
         XMLPortParam(LevelInfo, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2, 0.2, 0.2, 1));
+
+        this->levelfile_ = this->getLevelfile();
     }
 
     void LevelInfo::registerVariables()
     {
-        REGISTERSTRING(name_,         network::direction::toclient, new network::NetworkCallback<LevelInfo>(this, &LevelInfo::changedName));
-        REGISTERSTRING(description_,  network::direction::toclient);
-        REGISTERSTRING(skybox_,       network::direction::toclient, new network::NetworkCallback<LevelInfo>(this, &LevelInfo::applySkybox));
-        REGISTERDATA(ambientLight_, network::direction::toclient, new network::NetworkCallback<LevelInfo>(this, &LevelInfo::applyAmbientLight));
+        REGISTERSTRING(this->levelfile_,    network::direction::toclient, new network::NetworkCallback<LevelInfo>(this, &LevelInfo::applyLevel));
+        REGISTERSTRING(this->name_,         network::direction::toclient, new network::NetworkCallback<LevelInfo>(this, &LevelInfo::changedName));
+        REGISTERSTRING(this->description_,  network::direction::toclient);
+        REGISTERSTRING(this->skybox_,       network::direction::toclient, new network::NetworkCallback<LevelInfo>(this, &LevelInfo::applySkybox));
+        REGISTERDATA(this->ambientLight_, network::direction::toclient, new network::NetworkCallback<LevelInfo>(this, &LevelInfo::applyAmbientLight));
+    }
+
+    void LevelInfo::applyLevel()
+    {
+        COUT(0) << "Loading level \"" << this->levelfile_ << "\"..." << std::endl;
+
+        ClassTreeMask mask;
+        mask.exclude(Class(BaseObject));
+        mask.include(Class(Template));
+
+        Level* level = new Level(Settings::getDataPath() + this->levelfile_, mask);
+
+        Loader::open(level);
     }
 
@@ -87,5 +194,5 @@
     }
 
-    void LevelInfo::setGametype(const std::string& gametype)
+    void LevelInfo::setGametypeString(const std::string& gametype)
     {
         Identifier* identifier = ClassByString(gametype);
@@ -94,5 +201,6 @@
             this->gametype_ = gametype;
             this->gametypeIdentifier_ = identifier;
-            this->gametypeInstance_ = this->gametypeIdentifier_.fabricate();
+            this->rootGametype_ = this->gametypeIdentifier_.fabricate();
+            this->getConnectedClients();
         }
     }
Index: code/branches/objecthierarchy/src/orxonox/objects/infos/LevelInfo.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/infos/LevelInfo.h	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/infos/LevelInfo.h	(revision 2006)
@@ -37,8 +37,9 @@
 
 #include "objects/gametypes/Gametype.h"
+#include "network/ClientConnectionListener.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport LevelInfo : public Info
+    class _OrxonoxExport LevelInfo : public Info, public network::ClientConnectionListener
     {
         public:
@@ -48,4 +49,7 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
             void registerVariables();
+
+            inline const std::map<unsigned int, PlayerInfo*>& getClients() const
+                { return this->clients_; }
 
             inline void setDescription(const std::string& description)
@@ -62,9 +66,20 @@
                 { return this->ambientLight_; }
 
-            void setGametype(const std::string& gametype);
-            inline const std::string& getGametype() const
+            void setGametypeString(const std::string& gametype);
+            inline const std::string& getGametypeString() const
                 { return this->gametype_; }
+            inline Gametype* getGametype() const
+                { return this->rootGametype_; }
+
+            static LevelInfo* getActiveLevelInfo();
+            static void listPlayers();
+            static PlayerInfo* getClient(unsigned int clientID);
 
         private:
+            virtual void clientConnected(unsigned int clientID);
+            virtual void clientDisconnected(unsigned int clientID);
+
+            void applyLevel();
+
             void applySkybox()
                 { this->setSkybox(this->skybox_); }
@@ -72,4 +87,5 @@
                 { this->setAmbientLight(this->ambientLight_); }
 
+            std::map<unsigned int, PlayerInfo*> clients_;
             std::string description_;
             std::string skybox_;
@@ -77,5 +93,6 @@
             std::string gametype_;
             SubclassIdentifier<Gametype> gametypeIdentifier_;
-            Gametype* gametypeInstance_;
+            Gametype* rootGametype_;
+            std::string levelfile_;
     };
 }
Index: code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc	(revision 2006)
@@ -38,4 +38,5 @@
 
 #include "network/Host.h"
+#include "network/ClientInformation.h"
 
 #include "GraphicsEngine.h"
@@ -57,4 +58,5 @@
         this->bHumanPlayer_ = false;
         this->bFinishedSetup_ = false;
+        this->gametype_ = 0;
 
         this->pawn_ = 0;
@@ -71,7 +73,6 @@
         if (this->isInitialized())
         {
-            Gametype* gametype = Gametype::getCurrentGametype();
-            if (gametype)
-                gametype->removePlayer(this);
+            if (this->gametype_)
+                this->gametype_->removePlayer(this);
 
             if (this->controller_)
@@ -101,7 +102,6 @@
     void PlayerInfo::changedName()
     {
-        Gametype* gametype = Gametype::getCurrentGametype();
-        if (gametype)
-            gametype->playerChangedName(this);
+        if (this->gametype_)
+            this->gametype_->playerChangedName(this);
     }
 
@@ -147,7 +147,6 @@
         else if (this->bFinishedSetup_)
         {
-            Gametype* gametype = Gametype::getCurrentGametype();
-            if (gametype)
-                gametype->addPlayer(this);
+            if (this->gametype_)
+                this->gametype_->addPlayer(this);
         }
     }
@@ -165,5 +164,6 @@
     void PlayerInfo::stopControl()
     {
-        this->pawn_->removePlayer();
+        if (this->pawn_)
+            this->pawn_->removePlayer();
         this->pawn_ = 0;
         this->pawnID_ = network::OBJECTID_UNKNOWN;
Index: code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.h	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.h	(revision 2006)
@@ -71,4 +71,9 @@
                 { return this->controller_; }
 */
+            inline void setGametype(Gametype* gametype)
+                { this->gametype_ = gametype; }
+            inline Gametype* getGametype() const
+                { return this->gametype_; }
+
         protected:
             inline void setDefaultController(Identifier* identifier)
@@ -98,4 +103,5 @@
             Controller* controller_;
             SubclassIdentifier<Controller> defaultController_;
+            Gametype* gametype_;
     };
 }
Index: code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2006)
@@ -127,5 +127,5 @@
     void ControllableEntity::startLocalControl()
     {
-        std::cout << "###### start local control" << std::endl;
+        std::cout << this->getObjectID() << " ###### start local control" << std::endl;
         this->camera_ = new Camera();
         this->camera_->requestFocus();
@@ -155,5 +155,5 @@
         {
             this->velocity_ += (dt * this->acceleration_);
-            this->node_->translate(dt * this->velocity_, Ogre::Node::TS_PARENT);
+            this->node_->translate(dt * this->velocity_, Ogre::Node::TS_LOCAL);
 
             if (Core::isMaster())
Index: code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.h	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.h	(revision 2006)
@@ -115,4 +115,7 @@
                 { this->hudtemplate_ = name; }
 
+            inline bool isLocallyControlled() const
+                { return this->bControlled_; }
+
         private:
             void overwrite();
Index: code/branches/objecthierarchy/src/orxonox/objects/worldentities/Model.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/worldentities/Model.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/worldentities/Model.cc	(revision 2006)
@@ -55,9 +55,11 @@
 
         XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
+        XMLPortParam(Model, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
     }
 
     void Model::registerVariables()
     {
-        REGISTERSTRING(this->meshSrc_, network::direction::toclient, new network::NetworkCallback<Model>(this, &Model::changedMesh));
+        REGISTERSTRING(this->meshSrc_,    network::direction::toclient, new network::NetworkCallback<Model>(this, &Model::changedMesh));
+        REGISTERDATA(this->bCastShadows_, network::direction::toclient, new network::NetworkCallback<Model>(this, &Model::changedShadows));
     }
 
@@ -68,6 +70,15 @@
 
         this->mesh_.setMeshSource(this->meshSrc_);
+
         if (this->mesh_.getEntity())
+        {
             this->getNode()->attachObject(this->mesh_.getEntity());
+            this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
+        }
+    }
+
+    void Model::changedShadows()
+    {
+        this->mesh_.setCastShadows(this->bCastShadows_);
     }
 
Index: code/branches/objecthierarchy/src/orxonox/objects/worldentities/Model.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/worldentities/Model.h	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/worldentities/Model.h	(revision 2006)
@@ -54,9 +54,16 @@
                 { return this->mesh_; }
 
+            inline void setCastShadows(bool bCastShadows)
+                { this->bCastShadows_ = bCastShadows; this->changedShadows(); }
+            inline bool getCastShadows() const
+                { return this->bCastShadows_; }
+
         private:
             void changedMesh();
+            void changedShadows();
 
             std::string meshSrc_;
             Mesh mesh_;
+            bool bCastShadows_;
     };
 }
Index: code/branches/objecthierarchy/src/orxonox/objects/worldentities/PositionableEntity.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/worldentities/PositionableEntity.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/worldentities/PositionableEntity.cc	(revision 2006)
@@ -57,10 +57,3 @@
         REGISTERDATA(this->getOrientation().z, network::direction::toclient);
     }
-
-    void PositionableEntity::tick(float dt)
-    {
-        // I don't know why but this has to be done to update the position if attached to another Entity
-        this->node_->translate(Vector3::ZERO);
-        std::cout << this->getWorldPosition() << std::endl;
-    }
 }
Index: code/branches/objecthierarchy/src/orxonox/objects/worldentities/PositionableEntity.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/worldentities/PositionableEntity.h	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/worldentities/PositionableEntity.h	(revision 2006)
@@ -32,9 +32,8 @@
 #include "OrxonoxPrereqs.h"
 #include "WorldEntity.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport PositionableEntity : public WorldEntity, public Tickable
+    class _OrxonoxExport PositionableEntity : public WorldEntity
     {
         public:
@@ -43,5 +42,4 @@
 
             void registerVariables();
-            virtual void tick(float dt);
 
             using WorldEntity::setPosition;
Index: code/branches/objecthierarchy/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 2006)
@@ -51,5 +51,5 @@
         RegisterObject(WorldEntity);
 
-        this->node_ = GraphicsEngine::getInstance().getLevelSceneManager()->createSceneNode();
+        this->node_ = GraphicsEngine::getInstance().getLevelSceneManager()->getRootSceneNode()->createChildSceneNode();
         this->parent_ = 0;
         this->parentID_ = (unsigned int)-1;
Index: code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 2006)
@@ -31,5 +31,7 @@
 
 #include "core/CoreIncludes.h"
+#include "core/Core.h"
 #include "objects/worldentities/Model.h"
+#include "tools/BillboardSet.h"
 
 namespace orxonox
@@ -51,29 +53,80 @@
         this->setDestroyWhenPlayerLeft(true);
 
-        Model* temp = new Model;
-        temp->setMeshSource("assff.mesh");
-        this->attach(temp);
+        // test test test
+        {
+            this->testmesh_ = new Mesh();
+            this->testnode_ = this->getNode()->createChildSceneNode();
+            this->testmesh_->setMeshSource("assff.mesh");
+            if (this->testmesh_->getEntity())
+                this->testnode_->attachObject(this->testmesh_->getEntity());
+            this->testnode_->pitch(Degree(-90));
+            this->testnode_->roll(Degree(+90));
+            this->testnode_->scale(10, 10, 10);
+        }
+        // test test test
+
+        this->greetingFlare_ = new BillboardSet();
+        this->greetingFlare_->setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1);
+        this->getNode()->attachObject(this->greetingFlare_->getBillboardSet());
+        this->greetingFlare_->setVisible(false);
+        this->bGreetingFlareVisible_ = false;
+        this->bGreeting_ = false;
+
+        this->registerVariables();
     }
 
     Spectator::~Spectator()
     {
+        if (this->isInitialized())
+        {
+            delete this->greetingFlare_;
+
+            // test test test
+            {
+                delete this->testmesh_;
+                delete this->testnode_;
+            }
+            // test test test
+        }
+    }
+
+    void Spectator::registerVariables()
+    {
+        REGISTERDATA(this->bGreetingFlareVisible_, network::direction::toclient, new network::NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
+        REGISTERDATA(this->bGreeting_,             network::direction::toserver, new network::NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
+    }
+
+    void Spectator::changedGreeting()
+    {
+        this->bGreetingFlareVisible_ = this->bGreeting_;
+        this->changedFlareVisibility();
+    }
+
+    void Spectator::changedFlareVisibility()
+    {
+        this->greetingFlare_->setVisible(this->bGreetingFlareVisible_);
     }
 
     void Spectator::tick(float dt)
     {
-        Vector3 velocity = this->getVelocity();
-        velocity.normalise();
-        this->setVelocity(velocity * this->speed_);
+        if (this->isLocallyControlled())
+        {
+            Vector3 velocity = this->getVelocity();
+            velocity.normalise();
+            this->setVelocity(velocity * this->speed_);
 
-        // TODO: Check why I have removed *dt (1337)
-        this->yaw(Radian(this->yaw_ * this->rotationSpeed_));
-        this->pitch(Radian(this->pitch_ * this->rotationSpeed_));
-        this->roll(Radian(this->roll_ * this->rotationSpeed_));
+            this->yaw(Radian(this->yaw_ * this->rotationSpeed_));
+            this->pitch(Radian(this->pitch_ * this->rotationSpeed_));
+            this->roll(Radian(this->roll_ * this->rotationSpeed_));
 
-        this->yaw_ = this->pitch_ = this->roll_ = 0;
+            this->yaw_ = this->pitch_ = this->roll_ = 0;
+        }
 
         SUPER(Spectator, tick, dt);
 
-        this->setVelocity(Vector3::ZERO);
+        if (this->isLocallyControlled())
+        {
+            this->setVelocity(Vector3::ZERO);
+        }
     }
 
@@ -82,5 +135,12 @@
         ControllableEntity::setPlayer(player);
 
-        this->setObjectMode(network::direction::toclient);
+//        this->setObjectMode(network::direction::toclient);
+    }
+
+    void Spectator::startLocalControl()
+    {
+        ControllableEntity::startLocalControl();
+        if (this->isLocallyControlled())
+            this->testmesh_->setVisible(false);
     }
 
@@ -118,3 +178,14 @@
     {
     }
+
+    void Spectator::greet()
+    {
+        this->bGreeting_ = !this->bGreeting_;
+
+        if (Core::isMaster())
+        {
+            this->bGreetingFlareVisible_ = this->bGreeting_;
+            this->changedFlareVisibility();
+        }
+    }
 }
Index: code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.h	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.h	(revision 2006)
@@ -42,7 +42,9 @@
             virtual ~Spectator();
 
+            void registerVariables();
             virtual void tick(float dt);
 
             virtual void setPlayer(PlayerInfo* player);
+            virtual void startLocalControl();
 
             virtual void moveFrontBack(float value);
@@ -55,6 +57,14 @@
 
             virtual void fire();
+            virtual void greet();
 
         private:
+            void changedGreeting();
+            void changedFlareVisibility();
+
+            BillboardSet* greetingFlare_;
+            bool bGreetingFlareVisible_;
+            bool bGreeting_;
+
             float speed_;
             float rotationSpeed_;
@@ -63,4 +73,9 @@
             float pitch_;
             float roll_;
+
+            // test test test
+            Mesh* testmesh_;
+            Ogre::SceneNode* testnode_;
+            // test test test
     };
 }
Index: code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc	(revision 2006)
@@ -39,5 +39,5 @@
 
 #include "GraphicsEngine.h"
-#include "objects/gametypes/Gametype.h"
+#include "objects/infos/LevelInfo.h"
 #include "objects/infos/PlayerInfo.h"
 #include "overlays/console/InGameConsole.h"
@@ -76,5 +76,5 @@
             std::string name = "unknown";
 
-            PlayerInfo* player = Gametype::getClient(senderID);
+            PlayerInfo* player = LevelInfo::getClient(senderID);
             if (player)
                 name = player->getName();
Index: code/branches/objecthierarchy/src/orxonox/tools/Mesh.cc
===================================================================
--- code/branches/objecthierarchy/src/orxonox/tools/Mesh.cc	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/tools/Mesh.cc	(revision 2006)
@@ -45,4 +45,5 @@
     {
         this->entity_ = 0;
+        this->bCastShadows_ = true;
     }
 
@@ -59,6 +60,22 @@
             if (this->entity_)
                 GraphicsEngine::getInstance().getLevelSceneManager()->destroyEntity(this->entity_);
-            this->entity_ = GraphicsEngine::getInstance().getLevelSceneManager()->createEntity("Mesh" + convertToString(Mesh::meshCounter_s++), meshsource);
+
+            try
+            {
+                this->entity_ = GraphicsEngine::getInstance().getLevelSceneManager()->createEntity("Mesh" + convertToString(Mesh::meshCounter_s++), meshsource);
+                this->entity_->setCastShadows(this->bCastShadows_);
+            }
+            catch (...)
+            {
+                COUT(1) << "Error: Couln't load mesh \"" << meshsource << "\"" << std::endl;
+            }
         }
+    }
+
+    void Mesh::setCastShadows(bool bCastShadows)
+    {
+        this->bCastShadows_ = bCastShadows;
+        if (this->entity_)
+            this->entity_->setCastShadows(this->bCastShadows_);
     }
 
Index: code/branches/objecthierarchy/src/orxonox/tools/Mesh.h
===================================================================
--- code/branches/objecthierarchy/src/orxonox/tools/Mesh.h	(revision 2004)
+++ code/branches/objecthierarchy/src/orxonox/tools/Mesh.h	(revision 2006)
@@ -53,7 +53,12 @@
             bool isVisible() const;
 
+            void setCastShadows(bool bCastShadows);
+            inline bool getCastShadows() const
+                { return this->bCastShadows_; }
+
         private:
             static unsigned int meshCounter_s;
             Ogre::Entity* entity_;
+            bool bCastShadows_;
     };
 }
