Index: code/trunk/src/orxonox/objects/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/CMakeLists.txt	(revision 2171)
@@ -3,4 +3,5 @@
   EventDispatcher.cc
   EventTarget.cc
+  Level.cc
   Radar.cc
   RadarListener.cc
Index: code/trunk/src/orxonox/objects/Level.cc
===================================================================
--- code/trunk/src/orxonox/objects/Level.cc	(revision 2171)
+++ code/trunk/src/orxonox/objects/Level.cc	(revision 2171)
@@ -0,0 +1,152 @@
+/*
+ *   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 "Level.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "core/Loader.h"
+#include "core/XMLFile.h"
+#include "core/Template.h"
+
+#include "Settings.h"
+#include "LevelManager.h"
+#include "objects/infos/PlayerInfo.h"
+#include "objects/gametypes/Gametype.h"
+#include "overlays/OverlayGroup.h"
+
+#include "util/Math.h"
+
+namespace orxonox
+{
+    CreateFactory(Level);
+
+    Level::Level(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
+    {
+        RegisterObject(Level);
+
+        this->registerVariables();
+        this->xmlfilename_ = this->getFilename();
+
+        if (this->xmlfilename_.length() >= Settings::getDataPath().length())
+            this->xmlfilename_ = this->xmlfilename_.substr(Settings::getDataPath().length());
+    }
+
+    Level::~Level()
+    {
+        if (this->isInitialized())
+        {
+            if (LevelManager::getInstancePtr())
+                LevelManager::getInstance().releaseActivity(this);
+
+            if (this->xmlfile_)
+                Loader::unload(this->xmlfile_);
+        }
+    }
+
+    void Level::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Level, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Level, "description", setDescription, getDescription, xmlelement, mode);
+        XMLPortParam(Level, "gametype", setGametypeString, getGametypeString, xmlelement, mode).defaultValues("Gametype");
+
+        XMLPortObjectExtended(Level, BaseObject, "", addObject, getObject, xmlelement, mode, true, false);
+    }
+
+    void Level::registerVariables()
+    {
+        REGISTERSTRING(this->xmlfilename_, direction::toclient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
+        REGISTERSTRING(this->name_,        direction::toclient, new NetworkCallback<Level>(this, &Level::changedName));
+        REGISTERSTRING(this->description_, direction::toclient);
+    }
+
+    void Level::networkcallback_applyXMLFile()
+    {
+        COUT(0) << "Loading level \"" << this->xmlfilename_ << "\"..." << std::endl;
+
+        ClassTreeMask mask;
+        mask.exclude(Class(BaseObject));
+        mask.include(Class(Template));
+        mask.include(Class(OverlayGroup)); // HACK to include the ChatOverlay
+
+        this->xmlfile_ = new XMLFile(Settings::getDataPath() + this->xmlfilename_, mask);
+
+        Loader::open(this->xmlfile_);
+    }
+
+    void Level::setGametypeString(const std::string& gametype)
+    {
+        Identifier* identifier = ClassByString(gametype);
+        if (identifier && identifier->isA(Class(Gametype)))
+        {
+            this->gametype_ = gametype;
+
+            Gametype* rootgametype = dynamic_cast<Gametype*>(identifier->fabricate(this));
+            this->setGametype(rootgametype);
+
+            for (std::list<BaseObject*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+                (*it)->setGametype(rootgametype);
+
+            if (LevelManager::getInstancePtr())
+                LevelManager::getInstance().requestActivity(this);
+        }
+    }
+
+
+    void Level::addObject(BaseObject* object)
+    {
+        this->objects_.push_back(object);
+        object->setGametype(this->getGametype());
+    }
+
+    BaseObject* Level::getObject(unsigned int index) const
+    {
+        unsigned int i = 0;
+        for (std::list<BaseObject*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+        {
+            if (i == index)
+                return (*it);
+            ++i;
+        }
+        return 0;
+    }
+
+    void Level::playerEntered(PlayerInfo* player)
+    {
+        COUT(3) << "player entered level" << std::endl;
+        player->setGametype(this->getGametype());
+    }
+
+    void Level::playerLeft(PlayerInfo* player)
+    {
+        COUT(3) << "player left level" << std::endl;
+        player->setGametype(0);
+    }
+}
Index: code/trunk/src/orxonox/objects/Level.h
===================================================================
--- code/trunk/src/orxonox/objects/Level.h	(revision 2171)
+++ code/trunk/src/orxonox/objects/Level.h	(revision 2171)
@@ -0,0 +1,74 @@
+/*
+ *   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 _Level_H__
+#define _Level_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "network/Synchronisable.h"
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Level : public BaseObject, public Synchronisable
+    {
+        public:
+            Level(BaseObject* creator);
+            virtual ~Level();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            void registerVariables();
+
+            inline void setDescription(const std::string& description)
+                { this->description_ = description; }
+            inline const std::string& getDescription() const
+                { return this->description_; }
+
+            void playerEntered(PlayerInfo* player);
+            void playerLeft(PlayerInfo* player);
+
+        private:
+            void addObject(BaseObject* object);
+            BaseObject* getObject(unsigned int index) const;
+
+            void setGametypeString(const std::string& gametype);
+            inline const std::string& getGametypeString() const
+                { return this->gametype_; }
+
+            void networkcallback_applyXMLFile();
+
+            std::string            description_;
+            std::string            gametype_;
+            std::string            xmlfilename_;
+            XMLFile*               xmlfile_;
+            std::list<BaseObject*> objects_;
+    };
+}
+
+#endif /* _Level_H__ */
Index: code/trunk/src/orxonox/objects/Scene.cc
===================================================================
--- code/trunk/src/orxonox/objects/Scene.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/Scene.cc	(revision 2171)
@@ -43,5 +43,5 @@
     CreateFactory(Scene);
 
-    Scene::Scene(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)
+    Scene::Scene(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
     {
         RegisterObject(Scene);
@@ -114,6 +114,6 @@
     void Scene::registerVariables()
     {
-        REGISTERSTRING(this->skybox_,     network::direction::toclient, new network::NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
-        REGISTERDATA(this->ambientLight_, network::direction::toclient, new network::NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
+        REGISTERSTRING(this->skybox_,     direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
+        REGISTERDATA(this->ambientLight_, direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
     }
 
@@ -164,3 +164,12 @@
         return 0;
     }
+
+    void Scene::tick(float dt)
+    {
+        if (!Core::showsGraphics())
+        {
+            // We need to update the scene nodes if we don't render
+            this->rootSceneNode_->_update(true, false);
+        }
+    }
 }
Index: code/trunk/src/orxonox/objects/Scene.h
===================================================================
--- code/trunk/src/orxonox/objects/Scene.h	(revision 2131)
+++ code/trunk/src/orxonox/objects/Scene.h	(revision 2171)
@@ -35,8 +35,9 @@
 #include "core/BaseObject.h"
 #include "util/Math.h"
+#include "objects/Tickable.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport Scene : public BaseObject, public network::Synchronisable
+    class _OrxonoxExport Scene : public BaseObject, public Synchronisable, public Tickable
     {
         public:
@@ -64,4 +65,6 @@
                 { return this->bShadows_; }
 
+            virtual void tick(float dt);
+
         private:
             void addObject(BaseObject* object);
Index: code/trunk/src/orxonox/objects/Test.cc
===================================================================
--- code/trunk/src/orxonox/objects/Test.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/Test.cc	(revision 2171)
@@ -30,4 +30,5 @@
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
+#include "core/ConsoleCommand.h"
 #include "Test.h"
 
@@ -35,10 +36,19 @@
 {
 	CreateFactory ( Test );
+  
+  SetConsoleCommand(Test, printV1, true).accessLevel(AccessLevel::User);
+  SetConsoleCommand(Test, printV2, true).accessLevel(AccessLevel::User);
+  SetConsoleCommand(Test, printV3, true).accessLevel(AccessLevel::User);
+  SetConsoleCommand(Test, printV4, true).accessLevel(AccessLevel::User);
+  
+  Test* Test::instance_ = 0;
 
-	Test::Test(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)
+	Test::Test(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
 	{
+    assert(instance_==0);
+    instance_=this;
 		RegisterObject ( Test );
-                setConfigValues();
-                registerVariables();
+    setConfigValues();
+    registerVariables();
 		setObjectMode(0x3);
 	}
@@ -46,12 +56,13 @@
 	Test::~Test()
 	{
-
+    instance_=0;
 	}
 
 	void Test::setConfigValues()
 	{
-		SetConfigValue ( v1, 1 ).callback ( this, &Test::checkV1 );
-                SetConfigValue ( v2, 2 ).callback ( this, &Test::checkV2 );
-                SetConfigValue ( v3, 3 ).callback ( this, &Test::checkV3 );
+		SetConfigValue ( v1, 1 )/*.callback ( this, &Test::checkV1 )*/;
+    SetConfigValue ( v2, 2 )/*.callback ( this, &Test::checkV2 )*/;
+    SetConfigValue ( v3, 3 )/*.callback ( this, &Test::checkV3 )*/;
+    SetConfigValue ( v4, 4 )/*.callback ( this, &Test::checkV4 )*/;
 	}
 
@@ -59,20 +70,25 @@
 	void Test::registerVariables()
 	{
-		REGISTERDATA ( v1,network::direction::toclient, new network::NetworkCallback<Test> ( this, &Test::checkV1 ) );
-                REGISTERDATA ( v2,network::direction::toserver, new network::NetworkCallback<Test> ( this, &Test::checkV2 ) );
-		REGISTERDATA ( v3,network::direction::bidirectional, new network::NetworkCallback<Test> ( this, &Test::checkV3 ) );
+		REGISTERDATA ( v1,direction::toclient, new NetworkCallback<Test> ( this, &Test::checkV1 ) );
+    REGISTERDATA ( v2,direction::toserver, new NetworkCallback<Test> ( this, &Test::checkV2 ) );
+		REGISTERDATA ( v3,direction::serverMaster, new NetworkCallback<Test> ( this, &Test::checkV3 ) );
+    REGISTERDATA ( v4,direction::clientMaster, new NetworkCallback<Test> ( this, &Test::checkV4 ) );
 	}
 
-        void Test::checkV1(){
-                COUT(1) << "V1 changed: " << v1 << std::endl;
-        }
+  void Test::checkV1(){
+    COUT(1) << "V1 changed: " << v1 << std::endl;
+  }
 
-        void Test::checkV2(){
-                COUT(1) << "V2 changed: " << v2 << std::endl;
-        }
+  void Test::checkV2(){
+    COUT(1) << "V2 changed: " << v2 << std::endl;
+  }
 
-        void Test::checkV3(){
-                COUT(1) << "V3 changed: " << v3 << std::endl;
-        }
+  void Test::checkV3(){
+    COUT(1) << "V3 changed: " << v3 << std::endl;
+  }
+  
+  void Test::checkV4(){
+    COUT(1) << "V4 changed: " << v4 << std::endl;
+  }
 
 
Index: code/trunk/src/orxonox/objects/Test.h
===================================================================
--- code/trunk/src/orxonox/objects/Test.h	(revision 2131)
+++ code/trunk/src/orxonox/objects/Test.h	(revision 2171)
@@ -36,5 +36,5 @@
 namespace orxonox
 {
-  class _OrxonoxExport Test: public BaseObject, public network::Synchronisable
+  class _OrxonoxExport Test: public BaseObject, public Synchronisable
   {
     public:
@@ -48,8 +48,15 @@
       void setV2(unsigned int value){ v2 = value; }
       void setV3(unsigned int value){ v3 = value; }
+      void setV4(unsigned int value){ v4 = value; }
 
       void checkV1();
       void checkV2();
       void checkV3();
+      void checkV4();
+      
+      void printV1(){ instance_->checkV1(); }
+      void printV2(){ instance_->checkV2(); }
+      void printV3(){ instance_->checkV3(); }
+      void printV4(){ instance_->checkV4(); }
 
     private:
@@ -57,4 +64,7 @@
       unsigned int v2;
       unsigned int v3;
+      unsigned int v4;
+      
+      static Test* instance_;
   };
 }
Index: code/trunk/src/orxonox/objects/Tickable.h
===================================================================
--- code/trunk/src/orxonox/objects/Tickable.h	(revision 2131)
+++ code/trunk/src/orxonox/objects/Tickable.h	(revision 2171)
@@ -28,5 +28,5 @@
 
 /*!
-    @file Tickable.h
+    @file
     @brief Declaration of the Tickable interface.
 
Index: code/trunk/src/orxonox/objects/gametypes/Gametype.cc
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/Gametype.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/gametypes/Gametype.cc	(revision 2171)
@@ -67,7 +67,8 @@
         if (!this->bStarted_)
             this->checkStart();
+        else
+            this->spawnDeadPlayersIfRequested();
 
         this->assignDefaultPawnsIfNeeded();
-        this->spawnDeadPlayersIfRequested();
     }
 
@@ -88,14 +89,14 @@
     void Gametype::playerEntered(PlayerInfo* player)
     {
-        this->players_.insert(player);
+        this->players_[player] = PlayerState::Joined;
 
         std::string message = player->getName() + " entered the game";
         COUT(0) << message << std::endl;
-        network::Host::Broadcast(message);
+        Host::Broadcast(message);
     }
 
     void Gametype::playerLeft(PlayerInfo* player)
     {
-        std::set<PlayerInfo*>::iterator it = this->players_.find(player);
+        std::map<PlayerInfo*, PlayerState::Enum>::iterator it = this->players_.find(player);
         if (it != this->players_.end())
         {
@@ -104,5 +105,5 @@
             std::string message = player->getName() + " left the game";
             COUT(0) << message << std::endl;
-            network::Host::Broadcast(message);
+            Host::Broadcast(message);
         }
     }
@@ -124,5 +125,5 @@
                 std::string message = player->getOldName() + " changed name to " + player->getName();
                 COUT(0) << message << std::endl;
-                network::Host::Broadcast(message);
+                Host::Broadcast(message);
             }
         }
@@ -165,11 +166,11 @@
     }
 
-    void Gametype::assignDefaultPawnsIfNeeded() const
-    {
-        for (std::set<PlayerInfo*>::const_iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (!(*it)->getControllableEntity() && (!(*it)->isReadyToSpawn() || !this->bStarted_))
-            {
-                SpawnPoint* spawn = this->getBestSpawnPoint(*it);
+    void Gametype::assignDefaultPawnsIfNeeded()
+    {
+        for (std::map<PlayerInfo*, PlayerState::Enum>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+        {
+            if (!it->first->getControllableEntity() && (!it->first->isReadyToSpawn() || !this->bStarted_))
+            {
+                SpawnPoint* spawn = this->getBestSpawnPoint(it->first);
                 if (spawn)
                 {
@@ -177,5 +178,6 @@
                     ControllableEntity* entity = this->defaultControllableEntity_.fabricate(spawn);
                     spawn->spawn(entity);
-                    (*it)->startControl(entity);
+                    it->first->startControl(entity);
+                    it->second = PlayerState::Dead;
                 }
                 else
@@ -210,7 +212,7 @@
                 {
                     bool allplayersready = true;
-                    for (std::set<PlayerInfo*>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+                    for (std::map<PlayerInfo*, PlayerState::Enum>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
                     {
-                        if (!(*it)->isReadyToSpawn())
+                        if (!it->first->isReadyToSpawn())
                             allplayersready = false;
                     }
@@ -227,15 +229,15 @@
     void Gametype::spawnPlayersIfRequested()
     {
-        for (std::set<PlayerInfo*>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if ((*it)->isReadyToSpawn() || this->bForceSpawn_)
-                this->spawnPlayer(*it);
+        for (std::map<PlayerInfo*, PlayerState::Enum>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+            if (it->first->isReadyToSpawn() || this->bForceSpawn_)
+                this->spawnPlayer(it->first);
     }
 
     void Gametype::spawnDeadPlayersIfRequested()
     {
-        for (std::set<PlayerInfo*>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (!(*it)->getControllableEntity())
-                if ((*it)->isReadyToSpawn() || this->bForceSpawn_)
-                    this->spawnPlayer(*it);
+        for (std::map<PlayerInfo*, PlayerState::Enum>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+            if (it->second == PlayerState::Dead)
+                if (it->first->isReadyToSpawn() || this->bForceSpawn_)
+                    this->spawnPlayer(it->first);
     }
 
@@ -246,4 +248,5 @@
         {
             player->startControl(spawnpoint->spawn());
+            this->players_[player] = PlayerState::Alive;
         }
         else
Index: code/trunk/src/orxonox/objects/gametypes/Gametype.h
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/Gametype.h	(revision 2131)
+++ code/trunk/src/orxonox/objects/gametypes/Gametype.h	(revision 2171)
@@ -41,4 +41,15 @@
 namespace orxonox
 {
+    namespace PlayerState
+    {
+        enum Enum
+        {
+            Uninitialized,
+            Joined,
+            Alive,
+            Dead
+        };
+    }
+
     class _OrxonoxExport Gametype : public BaseObject, public Tickable
     {
@@ -70,5 +81,5 @@
             virtual void pawnPostSpawn(Pawn* pawn);
 
-            inline const std::set<PlayerInfo*>& getPlayers() const
+            inline const std::map<PlayerInfo*, PlayerState::Enum>& getPlayers() const
                 { return this->players_; }
 
@@ -87,5 +98,5 @@
             void removePlayer(PlayerInfo* player);
 
-            void assignDefaultPawnsIfNeeded() const;
+            void assignDefaultPawnsIfNeeded();
             void checkStart();
             void spawnPlayer(PlayerInfo* player);
@@ -102,5 +113,5 @@
             bool bStartCountdownRunning_;
 
-            std::set<PlayerInfo*> players_;
+            std::map<PlayerInfo*, PlayerState::Enum> players_;
             std::set<SpawnPoint*> spawnpoints_;
             SubclassIdentifier<ControllableEntity> defaultControllableEntity_;
Index: code/trunk/src/orxonox/objects/infos/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/infos/CMakeLists.txt	(revision 2131)
+++ code/trunk/src/orxonox/objects/infos/CMakeLists.txt	(revision 2171)
@@ -1,5 +1,4 @@
 SET( SRC_FILES
   Info.cc
-  Level.cc
   PlayerInfo.cc
   HumanPlayer.cc
Index: code/trunk/src/orxonox/objects/infos/HumanPlayer.cc
===================================================================
--- code/trunk/src/orxonox/objects/infos/HumanPlayer.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/infos/HumanPlayer.cc	(revision 2171)
@@ -46,6 +46,6 @@
         RegisterObject(HumanPlayer);
 
-        this->server_ready_ = Core::isMaster();
-        this->client_ready_ = false;
+        this->server_initialized_ = Core::isMaster();
+        this->client_initialized_ = false;
 
         this->bHumanPlayer_ = true;
@@ -67,9 +67,9 @@
     void HumanPlayer::registerVariables()
     {
-        REGISTERSTRING(this->synchronize_nick_, network::direction::toserver, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));
+        REGISTERSTRING(this->synchronize_nick_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));
 
-        REGISTERDATA(this->clientID_,     network::direction::toclient, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));
-        REGISTERDATA(this->server_ready_, network::direction::toclient, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_ready));
-        REGISTERDATA(this->client_ready_, network::direction::toserver, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_ready));
+        REGISTERDATA(this->clientID_,     direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));
+        REGISTERDATA(this->server_initialized_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_initialized));
+        REGISTERDATA(this->client_initialized_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_initialized));
     }
 
@@ -92,12 +92,12 @@
     void HumanPlayer::networkcallback_clientIDchanged()
     {
-        if (this->clientID_ == network::Host::getPlayerID())
+        if (this->clientID_ == Host::getPlayerID())
         {
             this->bLocalPlayer_ = true;
             this->synchronize_nick_ = this->nick_;
-            this->client_ready_ = true;
+            this->client_initialized_ = true;
 
             if (!Core::isMaster())
-                this->setObjectMode(network::direction::bidirectional);
+                this->setObjectMode(direction::bidirectional);
             else
                 this->setName(this->nick_);
@@ -107,10 +107,10 @@
     }
 
-    void HumanPlayer::networkcallback_server_ready()
+    void HumanPlayer::networkcallback_server_initialized()
     {
-        this->client_ready_ = true;
+        this->client_initialized_ = true;
     }
 
-    void HumanPlayer::networkcallback_client_ready()
+    void HumanPlayer::networkcallback_client_initialized()
     {
         if (this->getGametype())
@@ -118,17 +118,17 @@
     }
 
-    bool HumanPlayer::isReady() const
+    bool HumanPlayer::isInitialized() const
     {
-        return (this->server_ready_ && this->client_ready_);
+        return (this->server_initialized_ && this->client_initialized_);
     }
 
     float HumanPlayer::getPing() const
     {
-        return network::ClientInformation::findClient(this->getClientID())->getRTT();
+        return ClientInformation::findClient(this->getClientID())->getRTT();
     }
 
     float HumanPlayer::getPacketLossRatio() const
     {
-        return network::ClientInformation::findClient(this->getClientID())->getPacketLoss();
+        return ClientInformation::findClient(this->getClientID())->getPacketLoss();
     }
 
Index: code/trunk/src/orxonox/objects/infos/HumanPlayer.h
===================================================================
--- code/trunk/src/orxonox/objects/infos/HumanPlayer.h	(revision 2131)
+++ code/trunk/src/orxonox/objects/infos/HumanPlayer.h	(revision 2171)
@@ -47,5 +47,5 @@
             void setConfigValues();
 
-            bool isReady() const;
+            bool isInitialized() const;
             float getPing() const;
             float getPacketLossRatio() const;
@@ -57,11 +57,11 @@
             void networkcallback_changednick();
             void networkcallback_clientIDchanged();
-            void networkcallback_server_ready();
-            void networkcallback_client_ready();
+            void networkcallback_server_initialized();
+            void networkcallback_client_initialized();
 
             std::string nick_;
             std::string synchronize_nick_;
-            bool server_ready_;
-            bool client_ready_;
+            bool server_initialized_;
+            bool client_initialized_;
     };
 }
Index: code/trunk/src/orxonox/objects/infos/Info.cc
===================================================================
--- code/trunk/src/orxonox/objects/infos/Info.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/infos/Info.cc	(revision 2171)
@@ -34,5 +34,5 @@
 namespace orxonox
 {
-    Info::Info(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)
+    Info::Info(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
     {
         RegisterObject(Info);
Index: code/trunk/src/orxonox/objects/infos/Info.h
===================================================================
--- code/trunk/src/orxonox/objects/infos/Info.h	(revision 2131)
+++ code/trunk/src/orxonox/objects/infos/Info.h	(revision 2171)
@@ -37,5 +37,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport Info : public BaseObject, public network::Synchronisable
+    class _OrxonoxExport Info : public BaseObject, public Synchronisable
     {
         public:
Index: code/trunk/src/orxonox/objects/infos/Level.cc
===================================================================
--- code/trunk/src/orxonox/objects/infos/Level.cc	(revision 2131)
+++ 	(revision )
@@ -1,148 +1,0 @@
-/*
- *   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 "Level.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "core/Loader.h"
-#include "core/XMLFile.h"
-#include "core/Template.h"
-
-#include "Settings.h"
-#include "LevelManager.h"
-#include "PlayerInfo.h"
-#include "objects/gametypes/Gametype.h"
-
-#include "util/Math.h"
-
-namespace orxonox
-{
-    CreateFactory(Level);
-
-    Level::Level(BaseObject* creator) : Info(creator)
-    {
-        RegisterObject(Level);
-
-        this->registerVariables();
-        this->xmlfilename_ = this->getFilename();
-
-        if (this->xmlfilename_.length() >= Settings::getDataPath().length())
-            this->xmlfilename_ = this->xmlfilename_.substr(Settings::getDataPath().length());
-    }
-
-    Level::~Level()
-    {
-        if (this->isInitialized())
-        {
-            LevelManager::getInstance().releaseActivity(this);
-
-            if (this->xmlfile_)
-                Loader::unload(this->xmlfile_);
-        }
-    }
-
-    void Level::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(Level, XMLPort, xmlelement, mode);
-
-        XMLPortParam(Level, "description", setDescription, getDescription, xmlelement, mode);
-        XMLPortParam(Level, "gametype", setGametypeString, getGametypeString, xmlelement, mode).defaultValues("Gametype");
-
-        XMLPortObjectExtended(Level, BaseObject, "", addObject, getObject, xmlelement, mode, true, false);
-    }
-
-    void Level::registerVariables()
-    {
-        REGISTERSTRING(this->xmlfilename_, network::direction::toclient, new network::NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
-        REGISTERSTRING(this->name_,        network::direction::toclient, new network::NetworkCallback<Level>(this, &Level::changedName));
-        REGISTERSTRING(this->description_, network::direction::toclient);
-    }
-
-    void Level::networkcallback_applyXMLFile()
-    {
-        COUT(0) << "Loading level \"" << this->xmlfilename_ << "\"..." << std::endl;
-
-        ClassTreeMask mask;
-        mask.exclude(Class(BaseObject));
-        mask.include(Class(Template));
-
-        this->xmlfile_ = new XMLFile(Settings::getDataPath() + this->xmlfilename_, mask);
-
-        Loader::open(this->xmlfile_);
-    }
-
-    void Level::setGametypeString(const std::string& gametype)
-    {
-        Identifier* identifier = ClassByString(gametype);
-        if (identifier && identifier->isA(Class(Gametype)))
-        {
-            this->gametype_ = gametype;
-
-            Gametype* rootgametype = dynamic_cast<Gametype*>(identifier->fabricate(this));
-            this->setGametype(rootgametype);
-
-            for (std::list<BaseObject*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-                (*it)->setGametype(rootgametype);
-
-            LevelManager::getInstance().requestActivity(this);
-        }
-    }
-
-
-    void Level::addObject(BaseObject* object)
-    {
-        this->objects_.push_back(object);
-        object->setGametype(this->getGametype());
-    }
-
-    BaseObject* Level::getObject(unsigned int index) const
-    {
-        unsigned int i = 0;
-        for (std::list<BaseObject*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-        {
-            if (i == index)
-                return (*it);
-            ++i;
-        }
-        return 0;
-    }
-
-    void Level::playerEntered(PlayerInfo* player)
-    {
-        COUT(3) << "player entered level" << std::endl;
-        player->setGametype(this->getGametype());
-    }
-
-    void Level::playerLeft(PlayerInfo* player)
-    {
-        COUT(3) << "player left level" << std::endl;
-        player->setGametype(0);
-    }
-}
Index: code/trunk/src/orxonox/objects/infos/Level.h
===================================================================
--- code/trunk/src/orxonox/objects/infos/Level.h	(revision 2131)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- *   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 _Level_H__
-#define _Level_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "Info.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Level : public Info
-    {
-        public:
-            Level(BaseObject* creator);
-            virtual ~Level();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            void registerVariables();
-
-            inline void setDescription(const std::string& description)
-                { this->description_ = description; }
-            inline const std::string& getDescription() const
-                { return this->description_; }
-
-            void playerEntered(PlayerInfo* player);
-            void playerLeft(PlayerInfo* player);
-
-        private:
-            void addObject(BaseObject* object);
-            BaseObject* getObject(unsigned int index) const;
-
-            void setGametypeString(const std::string& gametype);
-            inline const std::string& getGametypeString() const
-                { return this->gametype_; }
-
-            void networkcallback_applyXMLFile();
-
-            std::string            description_;
-            std::string            gametype_;
-            std::string            xmlfilename_;
-            XMLFile*               xmlfile_;
-            std::list<BaseObject*> objects_;
-    };
-}
-
-#endif /* _Level_H__ */
Index: code/trunk/src/orxonox/objects/infos/PlayerInfo.cc
===================================================================
--- code/trunk/src/orxonox/objects/infos/PlayerInfo.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/infos/PlayerInfo.cc	(revision 2171)
@@ -42,5 +42,5 @@
         RegisterObject(PlayerInfo);
 
-        this->clientID_ = network::CLIENTID_UNKNOWN;
+        this->clientID_ = CLIENTID_UNKNOWN;
         this->bHumanPlayer_ = false;
         this->bLocalPlayer_ = false;
@@ -48,5 +48,5 @@
         this->controller_ = 0;
         this->controllableEntity_ = 0;
-        this->controllableEntityID_ = network::CLIENTID_UNKNOWN;
+        this->controllableEntityID_ = CLIENTID_UNKNOWN;
 
         this->registerVariables();
@@ -55,5 +55,5 @@
     PlayerInfo::~PlayerInfo()
     {
-        if (this->isInitialized())
+        if (this->BaseObject::isInitialized())
         {
             this->stopControl(this->controllableEntity_);
@@ -69,12 +69,12 @@
     void PlayerInfo::registerVariables()
     {
-        REGISTERSTRING(this->name_,                 network::direction::toclient, new network::NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
-        REGISTERDATA  (this->controllableEntityID_, network::direction::toclient, new network::NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
-        REGISTERDATA  (this->bReadyToSpawn_,        network::direction::toserver);
+        REGISTERSTRING(this->name_,                 direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
+        REGISTERDATA  (this->controllableEntityID_, direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
+        REGISTERDATA  (this->bReadyToSpawn_,        direction::toserver);
     }
 
     void PlayerInfo::changedName()
     {
-        if (this->isReady() && this->getGametype())
+        if (this->isInitialized() && this->getGametype())
             this->getGametype()->playerChangedName(this);
     }
@@ -82,5 +82,5 @@
     void PlayerInfo::changedGametype()
     {
-        if (this->isReady())
+        if (this->isInitialized())
         {
             if (this->getOldGametype())
@@ -126,5 +126,5 @@
         else
         {
-            this->controllableEntityID_ = network::OBJECTID_UNKNOWN;
+            this->controllableEntityID_ = OBJECTID_UNKNOWN;
         }
 
@@ -138,5 +138,5 @@
         {
             this->controllableEntity_ = 0;
-            this->controllableEntityID_ = network::OBJECTID_UNKNOWN;
+            this->controllableEntityID_ = OBJECTID_UNKNOWN;
 
             if (this->controller_)
@@ -150,5 +150,5 @@
     void PlayerInfo::networkcallback_changedcontrollableentityID()
     {
-        if (this->controllableEntityID_ != network::OBJECTID_UNKNOWN)
+        if (this->controllableEntityID_ != OBJECTID_UNKNOWN)
         {
             Synchronisable* temp = Synchronisable::getSynchronisable(this->controllableEntityID_);
Index: code/trunk/src/orxonox/objects/infos/PlayerInfo.h
===================================================================
--- code/trunk/src/orxonox/objects/infos/PlayerInfo.h	(revision 2131)
+++ code/trunk/src/orxonox/objects/infos/PlayerInfo.h	(revision 2171)
@@ -55,8 +55,6 @@
             inline unsigned int getClientID() const
                 { return this->clientID_; }
-            inline bool isReadyToSpawn() const
-                { return this->bReadyToSpawn_; }
 
-            virtual bool isReady() const = 0;
+            virtual bool isInitialized() const = 0;
             virtual float getPing() const = 0;
             virtual float getPacketLossRatio() const = 0;
@@ -64,4 +62,6 @@
             inline void setReadyToSpawn(bool bReady)
                 { this->bReadyToSpawn_ = bReady; }
+            inline bool isReadyToSpawn() const
+                { return this->bReadyToSpawn_; }
 
             void startControl(ControllableEntity* entity);
Index: code/trunk/src/orxonox/objects/worldentities/Billboard.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Billboard.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/Billboard.cc	(revision 2171)
@@ -64,6 +64,6 @@
     void Billboard::registerVariables()
     {
-        REGISTERSTRING(this->material_, network::direction::toclient, new network::NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
-        REGISTERDATA  (this->colour_,   network::direction::toclient, new network::NetworkCallback<Billboard>(this, &Billboard::changedColour));
+        REGISTERSTRING(this->material_, direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
+        REGISTERDATA  (this->colour_,   direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
     }
 
@@ -75,5 +75,6 @@
             {
                 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1);
-                this->getNode()->attachObject(this->billboard_.getBillboardSet());
+                if (this->billboard_.getBillboardSet())
+                    this->getNode()->attachObject(this->billboard_.getBillboardSet());
                 this->billboard_.setVisible(this->isVisible());
             }
@@ -90,5 +91,6 @@
             {
                 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1);
-                this->getNode()->attachObject(this->billboard_.getBillboardSet());
+                if (this->billboard_.getBillboardSet())
+                    this->getNode()->attachObject(this->billboard_.getBillboardSet());
                 this->billboard_.setVisible(this->isVisible());
             }
Index: code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc	(revision 2171)
@@ -68,7 +68,7 @@
     void BlinkingBillboard::registerVariables()
     {
-//        REGISTERDATA(this->amplitude_, network::direction::toclient);
-//        REGISTERDATA(this->frequency_, network::direction::toclient);
-//        REGISTERDATA(this->phase_,     network::direction::toclient);
+//        REGISTERDATA(this->amplitude_, direction::toclient);
+//        REGISTERDATA(this->frequency_, direction::toclient);
+//        REGISTERDATA(this->phase_,     direction::toclient);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/Camera.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Camera.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/Camera.cc	(revision 2171)
@@ -38,4 +38,5 @@
 #include <OgreViewport.h>
 
+#include "util/Exception.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
@@ -51,6 +52,6 @@
         RegisterObject(Camera);
 
-        assert(this->getScene());
-        assert(this->getScene()->getSceneManager());
+        if (!this->getScene() || !this->getScene()->getSceneManager())
+            ThrowException(AbortLoading, "Can't create Camera, no scene or no scene manager given.");
 
         this->camera_ = this->getScene()->getSceneManager()->createCamera(getUniqueNumberString());
Index: code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2171)
@@ -52,5 +52,5 @@
         this->client_overwrite_ = 0;
         this->player_ = 0;
-        this->playerID_ = network::OBJECTID_UNKNOWN;
+        this->playerID_ = OBJECTID_UNKNOWN;
         this->hud_ = 0;
         this->camera_ = 0;
@@ -165,5 +165,5 @@
                 this->client_overwrite_ = this->server_overwrite_;
 COUT(0) << "CE: bidirectional synchronization" << std::endl;
-                this->setObjectMode(network::direction::bidirectional);
+                this->setObjectMode(direction::bidirectional);
             }
         }
@@ -176,7 +176,7 @@
 
         this->player_ = 0;
-        this->playerID_ = network::OBJECTID_UNKNOWN;
+        this->playerID_ = OBJECTID_UNKNOWN;
         this->bControlled_ = false;
-        this->setObjectMode(network::direction::toclient);
+        this->setObjectMode(direction::toclient);
 
         if (this->bDestroyWhenPlayerLeft_)
@@ -187,7 +187,7 @@
     {
         // just do this in case the entity wasn't yet synchronized when the corresponding PlayerInfo got our objectID
-        if (this->playerID_ != network::OBJECTID_UNKNOWN)
-        {
-            this->player_ = dynamic_cast<PlayerInfo*>(network::Synchronisable::getSynchronisable(this->playerID_));
+        if (this->playerID_ != OBJECTID_UNKNOWN)
+        {
+            this->player_ = dynamic_cast<PlayerInfo*>(Synchronisable::getSynchronisable(this->playerID_));
             if (this->player_ && (this->player_->getControllableEntity() != this))
                 this->player_->startControl(this);
@@ -248,19 +248,19 @@
     void ControllableEntity::registerVariables()
     {
-        REGISTERSTRING(this->cameraPositionTemplate_, network::direction::toclient);
-
-        REGISTERDATA(this->server_position_,    network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
-        REGISTERDATA(this->server_velocity_,    network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity));
-        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_overwrite_,   network::direction::toserver);
-
-        REGISTERDATA(this->client_position_,    network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
-        REGISTERDATA(this->client_velocity_,    network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity));
-        REGISTERDATA(this->client_orientation_, network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
-
-
-        REGISTERDATA(this->playerID_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
+        REGISTERSTRING(this->cameraPositionTemplate_, direction::toclient);
+
+        REGISTERDATA(this->client_overwrite_,   direction::toserver);
+        
+        REGISTERDATA(this->server_position_,    direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
+        REGISTERDATA(this->server_velocity_,    direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity));
+        REGISTERDATA(this->server_orientation_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
+        REGISTERDATA(this->server_overwrite_,   direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
+
+        REGISTERDATA(this->client_position_,    direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
+        REGISTERDATA(this->client_velocity_,    direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity));
+        REGISTERDATA(this->client_orientation_, direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
+
+
+        REGISTERDATA(this->playerID_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/Light.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Light.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/Light.cc	(revision 2171)
@@ -79,8 +79,8 @@
     void Light::registerVariables()
     {
-        REGISTERDATA(this->type_, network::direction::toclient, new network::NetworkCallback<Light>(this, &Light::changedType));
-        REGISTERDATA(this->light_->getDiffuseColour(), network::direction::toclient);
-        REGISTERDATA(this->light_->getSpecularColour(), network::direction::toclient);
-        REGISTERDATA(this->light_->getDirection(), network::direction::toclient);
+        REGISTERDATA(this->type_, direction::toclient, new NetworkCallback<Light>(this, &Light::changedType));
+        REGISTERDATA(this->light_->getDiffuseColour(), direction::toclient);
+        REGISTERDATA(this->light_->getSpecularColour(), direction::toclient);
+        REGISTERDATA(this->light_->getDirection(), direction::toclient);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/Model.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Model.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/Model.cc	(revision 2171)
@@ -61,6 +61,6 @@
     void Model::registerVariables()
     {
-        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));
+        REGISTERSTRING(this->meshSrc_,    direction::toclient, new NetworkCallback<Model>(this, &Model::changedMesh));
+        REGISTERDATA(this->bCastShadows_, direction::toclient, new NetworkCallback<Model>(this, &Model::changedShadows));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 2171)
@@ -84,16 +84,16 @@
     void MovableEntity::registerVariables()
     {
-        REGISTERDATA(this->velocity_.x, network::direction::toclient);
-        REGISTERDATA(this->velocity_.y, network::direction::toclient);
-        REGISTERDATA(this->velocity_.z, network::direction::toclient);
+        REGISTERDATA(this->velocity_.x, direction::toclient);
+        REGISTERDATA(this->velocity_.y, direction::toclient);
+        REGISTERDATA(this->velocity_.z, direction::toclient);
 
-        REGISTERDATA(this->rotationAxis_.x, network::direction::toclient);
-        REGISTERDATA(this->rotationAxis_.y, network::direction::toclient);
-        REGISTERDATA(this->rotationAxis_.z, network::direction::toclient);
+        REGISTERDATA(this->rotationAxis_.x, direction::toclient);
+        REGISTERDATA(this->rotationAxis_.y, direction::toclient);
+        REGISTERDATA(this->rotationAxis_.z, direction::toclient);
 
-        REGISTERDATA(this->rotationRate_, network::direction::toclient);
+        REGISTERDATA(this->rotationRate_, direction::toclient);
 
-        REGISTERDATA(this->overwrite_position_,    network::direction::toclient, new network::NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
-        REGISTERDATA(this->overwrite_orientation_, network::direction::toclient, new network::NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
+        REGISTERDATA(this->overwrite_position_,    direction::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
+        REGISTERDATA(this->overwrite_orientation_, direction::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/MovableEntity.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/MovableEntity.h	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/MovableEntity.h	(revision 2171)
@@ -38,5 +38,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport MovableEntity : public WorldEntity, public Tickable, public network::ClientConnectionListener
+    class _OrxonoxExport MovableEntity : public WorldEntity, public Tickable, public ClientConnectionListener
     {
         public:
Index: code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc	(revision 2171)
@@ -28,5 +28,5 @@
 
 /**
-* @file ParticleInterface.cc
+* @file
 * @brief class to control praticle effects
 */
@@ -37,4 +37,5 @@
 
 #include "tools/ParticleInterface.h"
+#include "util/Exception.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
@@ -49,6 +50,6 @@
         RegisterObject(ParticleEmitter);
 
-        assert(this->getScene());
-        assert(this->getScene()->getSceneManager());
+        if (!this->getScene() || !this->getScene()->getSceneManager())
+            ThrowException(AbortLoading, "Can't create Camera, no scene or no scene manager given.");
 
         this->particles_ = 0;
@@ -74,6 +75,6 @@
     void ParticleEmitter::registerVariables()
     {
-        REGISTERSTRING(this->source_, network::direction::toclient, new network::NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
-        REGISTERDATA  (this->LOD_,    network::direction::toclient, new network::NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
+        REGISTERSTRING(this->source_, direction::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
+        REGISTERDATA  (this->LOD_,    direction::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/PositionableEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/PositionableEntity.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/PositionableEntity.cc	(revision 2171)
@@ -48,12 +48,12 @@
     void PositionableEntity::registerVariables()
     {
-        REGISTERDATA(this->getPosition().x, network::direction::toclient);
-        REGISTERDATA(this->getPosition().y, network::direction::toclient);
-        REGISTERDATA(this->getPosition().z, network::direction::toclient);
+        REGISTERDATA(this->getPosition().x, direction::toclient);
+        REGISTERDATA(this->getPosition().y, direction::toclient);
+        REGISTERDATA(this->getPosition().z, direction::toclient);
 
-        REGISTERDATA(this->getOrientation().w, network::direction::toclient);
-        REGISTERDATA(this->getOrientation().x, network::direction::toclient);
-        REGISTERDATA(this->getOrientation().y, network::direction::toclient);
-        REGISTERDATA(this->getOrientation().z, network::direction::toclient);
+        REGISTERDATA(this->getOrientation().w, direction::toclient);
+        REGISTERDATA(this->getOrientation().x, direction::toclient);
+        REGISTERDATA(this->getOrientation().y, direction::toclient);
+        REGISTERDATA(this->getOrientation().z, direction::toclient);
     }
 }
Index: code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 2171)
@@ -36,4 +36,5 @@
 #include "core/XMLPort.h"
 #include "util/Convert.h"
+#include "util/Exception.h"
 
 #include "objects/Scene.h"
@@ -48,15 +49,15 @@
     const Vector3 WorldEntity::UP    = Vector3::UNIT_Y;
 
-    WorldEntity::WorldEntity(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)
+    WorldEntity::WorldEntity(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
     {
         RegisterObject(WorldEntity);
 
-        assert(this->getScene());
-        assert(this->getScene()->getRootSceneNode());
+        if (!this->getScene() || !this->getScene()->getRootSceneNode())
+            ThrowException(AbortLoading, "Can't create WorldEntity, no scene or no root-scenenode given.");
 
         this->node_ = this->getScene()->getRootSceneNode()->createChildSceneNode();
 
         this->parent_ = 0;
-        this->parentID_ = (unsigned int)-1;
+        this->parentID_ = OBJECTID_UNKNOWN;
 
         this->node_->setPosition(Vector3::ZERO);
@@ -95,19 +96,22 @@
     void WorldEntity::registerVariables()
     {
-        REGISTERDATA(this->bActive_,  network::direction::toclient, new network::NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
-        REGISTERDATA(this->bVisible_, network::direction::toclient, new network::NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
+        REGISTERDATA(this->bActive_,  direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
+        REGISTERDATA(this->bVisible_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
 
-        REGISTERDATA(this->getScale3D().x, network::direction::toclient);
-        REGISTERDATA(this->getScale3D().y, network::direction::toclient);
-        REGISTERDATA(this->getScale3D().z, network::direction::toclient);
+        REGISTERDATA(this->getScale3D().x, direction::toclient);
+        REGISTERDATA(this->getScale3D().y, direction::toclient);
+        REGISTERDATA(this->getScale3D().z, direction::toclient);
 
-        REGISTERDATA(this->parentID_, network::direction::toclient, new network::NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent));
+        REGISTERDATA(this->parentID_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent));
     }
 
     void WorldEntity::updateParent()
     {
-        WorldEntity* parent = dynamic_cast<WorldEntity*>(Synchronisable::getSynchronisable(this->parentID_));
-        if (parent)
-            this->attachToParent(parent);
+        if (this->parentID_ != OBJECTID_UNKNOWN)
+        {
+            WorldEntity* parent = dynamic_cast<WorldEntity*>(Synchronisable::getSynchronisable(this->parentID_));
+            if (parent)
+                this->attachToParent(parent);
+        }
     }
 
@@ -134,5 +138,5 @@
         this->children_.erase(object);
         object->parent_ = 0;
-        object->parentID_ = (unsigned int)-1;
+        object->parentID_ = OBJECTID_UNKNOWN;
 
 //        this->getScene()->getRootSceneNode()->addChild(object->node_);
Index: code/trunk/src/orxonox/objects/worldentities/WorldEntity.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/WorldEntity.h	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/WorldEntity.h	(revision 2171)
@@ -42,5 +42,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport WorldEntity : public BaseObject, public network::Synchronisable
+    class _OrxonoxExport WorldEntity : public BaseObject, public Synchronisable
     {
         public:
Index: code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2171)
@@ -80,6 +80,6 @@
     void Pawn::registerVariables()
     {
-        REGISTERDATA(this->bAlive_, network::direction::toclient);
-        REGISTERDATA(this->health_, network::direction::toclient);
+        REGISTERDATA(this->bAlive_, direction::toclient);
+        REGISTERDATA(this->health_, direction::toclient);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 2171)
@@ -82,10 +82,10 @@
     void SpaceShip::registerVariables()
     {
-        REGISTERDATA(this->maxSpeed_,                network::direction::toclient);
-        REGISTERDATA(this->maxSecondarySpeed_,       network::direction::toclient);
-        REGISTERDATA(this->maxRotation_,             network::direction::toclient);
-        REGISTERDATA(this->translationAcceleration_, network::direction::toclient);
-        REGISTERDATA(this->rotationAcceleration_,    network::direction::toclient);
-        REGISTERDATA(this->translationDamping_,      network::direction::toclient);
+        REGISTERDATA(this->maxSpeed_,                direction::toclient);
+        REGISTERDATA(this->maxSecondarySpeed_,       direction::toclient);
+        REGISTERDATA(this->maxRotation_,             direction::toclient);
+        REGISTERDATA(this->translationAcceleration_, direction::toclient);
+        REGISTERDATA(this->rotationAcceleration_,    direction::toclient);
+        REGISTERDATA(this->translationDamping_,      direction::toclient);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 2171)
@@ -62,5 +62,6 @@
         this->greetingFlare_ = new BillboardSet();
         this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1);
-        this->getNode()->attachObject(this->greetingFlare_->getBillboardSet());
+        if (this->greetingFlare_->getBillboardSet())
+            this->getNode()->attachObject(this->greetingFlare_->getBillboardSet());
         this->greetingFlare_->setVisible(false);
         this->bGreetingFlareVisible_ = false;
@@ -76,5 +77,6 @@
             if (this->greetingFlare_)
             {
-                this->getNode()->detachObject(this->greetingFlare_->getBillboardSet());
+                if (this->greetingFlare_->getBillboardSet())
+                    this->getNode()->detachObject(this->greetingFlare_->getBillboardSet());
                 delete this->greetingFlare_;
             }
@@ -84,7 +86,7 @@
     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));
-        REGISTERDATA(this->hudmode_,               network::direction::toclient);
+        REGISTERDATA(this->bGreetingFlareVisible_, direction::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
+        REGISTERDATA(this->bGreeting_,             direction::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
+        REGISTERDATA(this->hudmode_,               direction::toclient);
     }
 
@@ -129,5 +131,5 @@
         ControllableEntity::setPlayer(player);
 
-//        this->setObjectMode(network::direction::toclient);
+//        this->setObjectMode(direction::toclient);
     }
 
@@ -203,5 +205,5 @@
                 {
                     if (this->getGametype()->isStartCountdownRunning())
-                        this->hudmode_ = 2 + 10*ceil(this->getGametype()->getStartCountdown());
+                        this->hudmode_ = 2 + 10*(int)ceil(this->getGametype()->getStartCountdown());
                     else
                         this->hudmode_ = 3;
Index: code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc	(revision 2131)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc	(revision 2171)
@@ -69,7 +69,9 @@
       this->debugBillboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 0.0, 0.0), 1);
       this->debugBillboard_.setVisible(false);
-    }
-
-    this->getNode()->attachObject(this->debugBillboard_.getBillboardSet());
+
+      if (this->debugBillboard_.getBillboardSet())
+        this->getNode()->attachObject(this->debugBillboard_.getBillboardSet());
+    }
+
     this->setObjectMode(0x0);
   }
@@ -310,5 +312,5 @@
   void Trigger::setBillboardColour(const ColourValue& colour)
   {
-    this->debugBillboard_.getBillboardSet()->getBillboard(0)->setColour(colour);
+    this->debugBillboard_.setColour(colour);
   }
 
