Index: code/forks/sandbox_light/src/orxonox/CMakeLists.txt
===================================================================
--- code/forks/sandbox_light/src/orxonox/CMakeLists.txt	(revision 7907)
+++ code/forks/sandbox_light/src/orxonox/CMakeLists.txt	(revision 7908)
@@ -24,45 +24,9 @@
 
 SET_SOURCE_FILES(ORXONOX_SRC_FILES
-  Level.cc
-  LevelInfo.cc
-  LevelManager.cc
   Main.cc
-  MoodManager.cc
-  PawnManager.cc
-  PlayerManager.cc
-  Radar.cc
-  ChatHistory.cc
-  ChatInputHandler.cc
-#  Test.cc
-COMPILATION_BEGIN SceneCompilation.cc
-  CameraManager.cc
-  Scene.cc
-COMPILATION_END
 )
-
-ADD_SUBDIRECTORY(collisionshapes)
-ADD_SUBDIRECTORY(controllers)
-ADD_SUBDIRECTORY(gamestates)
-ADD_SUBDIRECTORY(gametypes)
-ADD_SUBDIRECTORY(graphics)
-ADD_SUBDIRECTORY(infos)
-ADD_SUBDIRECTORY(interfaces)
-ADD_SUBDIRECTORY(items)
-ADD_SUBDIRECTORY(overlays)
-ADD_SUBDIRECTORY(pickup)
-ADD_SUBDIRECTORY(sound)
-ADD_SUBDIRECTORY(weaponsystem)
-ADD_SUBDIRECTORY(worldentities)
 
 ORXONOX_ADD_LIBRARY(orxonox
   FIND_HEADER_FILES
-  TOLUA_FILES
-    ChatInputHandler.h
-    LevelInfo.h
-    LevelManager.h
-    MoodManager.h
-    controllers/HumanController.h
-    infos/PlayerInfo.h
-    sound/SoundManager.h
   PCH_FILE
     OrxonoxPrecompiledHeaders.h
@@ -70,19 +34,6 @@
     ${Boost_FILESYSTEM_LIBRARY}
     ${Boost_SYSTEM_LIBRARY} # Filesystem dependency
-    ${Boost_THREAD_LIBRARY}
-    ${Boost_DATE_TIME_LIBRARY} # Thread dependency
-    ${OGRE_LIBRARY}
-    ${OPENAL_LIBRARY}
-    ${ALUT_LIBRARY}
-    ${VORBISFILE_LIBRARY}
-    ${VORBIS_LIBRARY}
-    ${OGG_LIBRARY}
-    tinyxml_orxonox
-    tolua_orxonox
-    bullet_orxonox
     util
     core
-    network
-    tools
   SOURCE_FILES ${ORXONOX_SRC_FILES}
 )
Index: code/forks/sandbox_light/src/orxonox/CameraManager.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/CameraManager.cc	(revision 7907)
+++ 	(revision )
@@ -1,127 +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:
- *      Benjamin Knecht
- *   Co-authors:
- *      Fabian 'x3n' Landau
- *
- */
-
-#include "CameraManager.h"
-
-#include <OgreSceneManager.h>
-#include <OgreViewport.h>
-#include <OgreCompositorManager.h>
-
-#include "util/StringUtils.h"
-#include "util/ScopedSingletonManager.h"
-#include "core/GameMode.h"
-#include "core/GraphicsManager.h"
-#include "core/GUIManager.h"
-#include "core/ObjectList.h"
-#include "tools/Shader.h"
-#include "graphics/Camera.h"
-#include "Scene.h"
-
-namespace orxonox
-{
-    ManageScopedSingleton(CameraManager, ScopeID::Graphics, false);
-
-    CameraManager::CameraManager()
-        : viewport_(GraphicsManager::getInstance().getViewport())
-    {
-        assert(GameMode::showsGraphics());
-    }
-
-    CameraManager::~CameraManager()
-    {
-        GUIManager::getInstance().setCamera(0);
-    }
-
-    Camera* CameraManager::getActiveCamera() const
-    {
-        if (!this->cameraList_.empty())
-            return this->cameraList_.front();
-        else
-            return 0;
-    }
-
-    void CameraManager::requestFocus(Camera* camera)
-    {
-        // notify old camera (if it exists)
-        if (!this->cameraList_.empty())
-            this->cameraList_.front()->removeFocus();
-
-        camera->setFocus();
-
-        // make sure we don't add it twice
-        for (std::list<Camera*>::iterator it = this->cameraList_.begin(); it != this->cameraList_.end();)
-            if ((*it) == camera)
-                this->cameraList_.erase(it++);
-            else
-                ++it;
-        // add to list
-        this->cameraList_.push_front(camera);
-    }
-
-    void CameraManager::releaseFocus(Camera* camera)
-    {
-        // notify the cam of releasing the focus
-        if (!this->cameraList_.empty() && this->cameraList_.front() == camera)
-        {
-            camera->removeFocus();
-            this->cameraList_.pop_front();
-
-            // set new focus if possible
-            if (!this->cameraList_.empty())
-                this->cameraList_.front()->setFocus();
-        }
-        else
-            this->cameraList_.remove(camera);
-    }
-
-    void CameraManager::useCamera(Ogre::Camera* camera)
-    {
-        // This workaround is needed to avoid weird behaviour with active compositors while
-        // switching the camera (like freezing the image)
-        //
-        // Last known Ogre version needing this workaround:
-        // 1.4.8
-        // 1.7.2
-
-        // deactivate all compositors
-        {
-            Ogre::ResourceManager::ResourceMapIterator iterator = Ogre::CompositorManager::getSingleton().getResourceIterator();
-            while (iterator.hasMoreElements())
-                Ogre::CompositorManager::getSingleton().setCompositorEnabled(this->viewport_, iterator.getNext()->getName(), false);
-        }
-
-        this->viewport_->setCamera(camera);
-        GUIManager::getInstance().setCamera(camera);
-
-        // reactivate all visible compositors
-        {
-            for (ObjectList<Shader>::iterator it = ObjectList<Shader>::begin(); it != ObjectList<Shader>::end(); ++it)
-                it->updateVisibility();
-        }
-    }
-}
Index: code/forks/sandbox_light/src/orxonox/CameraManager.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/CameraManager.h	(revision 7907)
+++ 	(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:
- *      Benjamin Knecht
- *   Co-authors:
- *      Fabian 'x3n' Landau
- *
- */
-
- /**
- @file
- @brief Handles the instances of Camera class
- @author Benjamin Knecht <beni_at_orxonox.net>
-  */
-
-#ifndef _CameraManager_H__
-#define _CameraManager_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <cassert>
-#include <list>
-#include "util/OgreForwardRefs.h"
-#include "util/Singleton.h"
-#include "core/OrxonoxClass.h"
-#include "core/SmartPtr.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport CameraManager : public Singleton<CameraManager>, public OrxonoxClass
-    {
-            friend class Singleton<CameraManager>;
-        public:
-            CameraManager();
-            ~CameraManager();
-
-            Camera* getActiveCamera() const;
-
-            void requestFocus(Camera* camera);
-            void releaseFocus(Camera* camera);
-
-            void useCamera(Ogre::Camera* camera);
-
-        private:
-            CameraManager(const CameraManager&); // don't use
-
-            std::list<Camera*>    cameraList_;
-            Ogre::Viewport*       viewport_;
-
-            static CameraManager* singletonPtr_s;
-    };
-}
-
-#endif /* _CameraManager_H__ */
Index: code/forks/sandbox_light/src/orxonox/ChatHistory.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/ChatHistory.cc	(revision 7907)
+++ 	(revision )
@@ -1,195 +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:
- *      Sandro 'smerkli' Merkli
- *   Co-authors:
- *      ...
- *
- */
-
-#include "ChatHistory.h"
-#include "util/ScopedSingletonManager.h"
-
-#ifndef CHATTEST
-namespace orxonox
-{
-  /* singleton */
-  ManageScopedSingleton( ChatHistory, ScopeID::Root, false );
-#endif
-
-  /* constructor */
-#ifndef CHATTEST
-  //ChatHistory::ChatHistory( BaseObject* creator ) : BaseObject(creator)
-  ChatHistory::ChatHistory()
-#else
-  ChatHistory::ChatHistory()
-#endif
-  {
-    /* register the object */
-#ifndef CHATTEST
-    RegisterObject(ChatHistory);
-#endif
-
-    this->hist_log_enabled = true;
-
-    /* Read setting for logfiles */
-    if( hist_log_enabled ) /* NOTE Make this a check for the logfile setting */
-    { this->chat_hist_openlog();
-
-      /* push starting line */
-      this->chat_hist_logline( "--- Logfile opened ---" );
-    }
-
-    /* Read setting for maximum number of lines and set limit */
-    this->hist_maxlines = 200; /* NOTE to be changed, 200 is just for testing */
-  }
-
-  /* destructor */
-  ChatHistory::~ChatHistory()
-  {
-    chat_hist_closelog();
-
-    /* clear list */
-    this->hist_buffer.clear();
-  }
-
-  /* react to incoming chat */
-  void ChatHistory::incomingChat(const std::string& message,
-    unsigned int senderID)
-  {
-    /* --> a) look up the actual name of the sender */
-    std::string text;
-
-#ifndef CHATTEST
-    /* get sender ID and prepend it to the message */
-    if (senderID != CLIENTID_UNKNOWN)
-    {
-      /* if we can't find anything, use "unknown" as default */
-      std::string name = "unknown";
-
-      PlayerInfo* player = PlayerManager::getInstance().getClient(senderID);
-      if (player)
-        name = player->getName();
-
-      text = name + ": " + message;
-    }
-    else
-      text = message;
-#else
-    text = message;
-#endif
-
-    /* add the line to the history */
-    this->chat_hist_addline( text );
-
-    /* add the line to the log */
-    this->chat_hist_logline( text );
-  }
-
-  /* Synchronize logfile onto the hard drive */ /* MARK MARK */
-  int ChatHistory::syncLog()
-  {
-    //if( this->hist_logfile )
-      //this->hist_logfile.sync();
-    return 0;
-  }
-
-  /* add a line to this history */
-  int ChatHistory::chat_hist_addline( const std::string& toadd )
-  {
-    /* crop history at the end if it's too large */
-    while( this->hist_buffer.size() > this->hist_maxlines+1 )
-      this->hist_buffer.pop_front();
-
-    /* push to the front of the history */
-    this->hist_buffer.push_back( toadd );
-    return 0;
-  }
-
-  /* log a line to a logfile */
-  int ChatHistory::chat_hist_logline( const std::string& toadd )
-  {
-    /* output the line to the file if logging is enabled */
-    if( this->hist_log_enabled )
-      this->hist_logfile << toadd << std::endl;
-    return 0;
-  }
-
-  /* open logfile */
-  int ChatHistory::chat_hist_openlog()
-  {
-    /* TODO: find out the name of the file to log to via settings
-     *       and set the this->hist_logfile_path variable to it
-     */
-#ifndef CHATTEST
-    this->hist_logfile.open( (PathConfig::getInstance().getLogPathString() +
-      "chatlog.log").c_str(),
-      std::fstream::out | std::fstream::app );
-#else
-    this->hist_logfile.open( "/tmp/chatlog.log",
-      std::fstream::out | std::fstream::app );
-#endif
-
-    /* TODO check whether this works (not sure how you'd like it?) */
-    if( !this->hist_logfile )
-    { this->hist_log_enabled = false;
-#ifndef CHATTEST
-      COUT(2) << "Warning: Could not open logfile." << std::endl;
-#endif
-    }
-
-    /* if it worked */
-    return 0;
-  }
-
-  /* close logfile */
-  void ChatHistory::chat_hist_closelog()
-  {
-    /* see if we've actually got a logfile */
-    if( this->hist_logfile )
-    {
-      /* yes, we've got one, add a line that shows we're closing it */
-      this->chat_hist_logline( "--- Logfile closed ---" );
-
-      /* actually close down the file */
-      this->hist_logfile.close();
-    }
-  }
-
-  /* output history for debugging */
-  void ChatHistory::debug_printhist()
-  {
-    /* create deque iterator */
-    std::deque<std::string>::iterator it;
-
-    /* output all the strings */
-    for( it = this->hist_buffer.begin(); it != this->hist_buffer.end();
-      ++it )
-      std::cout << *it << std::endl;
-
-    /* output size */
-    std::cout << "Size: " << hist_buffer.size() << std::endl;
-  }
-
-#ifndef CHATTEST
-}
-#endif
Index: code/forks/sandbox_light/src/orxonox/ChatHistory.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/ChatHistory.h	(revision 7907)
+++ 	(revision )
@@ -1,149 +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:
- *      Sandro 'smerkli' Merkli
- *   Co-authors:
- *      ...
- *
- */
-
-#include <deque>
-#include <string>
-#include <fstream>
-#include <iostream>
-#include <cassert>
-
-/* define this if you're unit testing */
-//#define CHATTEST
-
-#ifndef CHATTEST
-#include <OrxonoxPrereqs.h>
-#include <PlayerManager.h>
-#include <infos/PlayerInfo.h>
-#include <core/BaseObject.h>
-#include <network/ChatListener.h>
-#include <core/PathConfig.h>
-#include <util/Singleton.h>
-#endif
-
-#ifndef _ChatHistory_H__
-#define _ChatHistory_H__
-
-
-/* Class to implement chat history */
-#ifndef CHATTEST
-namespace orxonox
-{
-#endif
-
-  /* constructor */
-#ifndef CHATTEST
-  class _OrxonoxExport ChatHistory : public ChatListener,
-    public Singleton<ChatHistory>
-
-#else
-  class ChatHistory
-#endif
-  {
-    public:
-      /* constructors, destructors */
-#ifndef CHATTEST
-      ChatHistory();
-      friend class Singleton<ChatHistory>;
-#else
-      ChatHistory();
-#endif
-      virtual ~ChatHistory();
-
-
-    //protected:
-      /** what to do with incoming chat
-       *
-       * \param message The incoming message
-       * \param senderID Identification number of the sender
-       */
-      virtual void incomingChat(const std::string& message,
-        unsigned int senderID);
-
-      /** Synchronize logfile onto the hard drive
-       *
-       * \return 0 for success, other for error
-       */
-      int syncLog();
-
-      /** debug-print: output the whole history to stdout */
-      void debug_printhist();
-
-    private:
-      /* FIELDS */
-      /** Vector to store the history in */
-      std::deque<std::string> hist_buffer;
-
-      /** Maximum number of lines stored in this history */
-      unsigned int hist_maxlines;
-
-      /** is logging enabled? */
-      bool hist_log_enabled;
-
-      /** path of logfile on the file system */
-      std::string hist_logfile_path;
-
-      /** Output file stream for logfile */
-      std::ofstream hist_logfile;
-
-#ifndef CHATTEST
-      static ChatHistory* singletonPtr_s;
-#endif
-
-
-
-      /* METHODS */
-      /** Append line to chat history
-       *
-       * \param toadd The line to add to the history
-       * \return 0 for success, other for error TODO: Throw exception
-       */
-      int chat_hist_addline( const std::string& toadd );
-
-      /** Append line to logfile
-       *
-       * \param toadd The line to add to the logfile
-       * \return 0 for success, other for error TODO: Throw exception
-       */
-      int chat_hist_logline( const std::string& toadd );
-
-      /** open logfile to log to
-       *
-       * \return 0 for success,s other for error
-       */
-      int chat_hist_openlog();
-
-
-      /** close logfile */
-      void chat_hist_closelog();
-  };
-
-#ifndef CHATTEST
-}
-#endif
-
-#endif /* _ChatHistory_H__ */
Index: code/forks/sandbox_light/src/orxonox/ChatInputHandler.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/ChatInputHandler.cc	(revision 7907)
+++ 	(revision )
@@ -1,343 +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:
- *      Sandro 'smerkli' Merkli
- *   Co-authors:
- *      ...
- *
- */
-
-#include "ChatInputHandler.h"
-#include "util/ScopedSingletonManager.h"
-#include "core/CoreIncludes.h"
-#include "core/GUIManager.h"
-#include "core/CorePrereqs.h"
-#include "core/command/ConsoleCommand.h"
-#include <CEGUIWindow.h>
-#include <elements/CEGUIListbox.h>
-#include <elements/CEGUIListboxItem.h>
-#include <elements/CEGUIListboxTextItem.h>
-#include <CEGUIWindowManager.h>
-#include <string>
-
-namespace orxonox
-{
-  /* singleton */
-  ManageScopedSingleton( ChatInputHandler, ScopeID::Graphics, false );
-
-  /* add commands to console */
-  SetConsoleCommand( "startchat", &ChatInputHandler::activate_static );
-  SetConsoleCommand( "startchat_small", &ChatInputHandler::activate_small_static );
-
-  /* constructor */
-  ChatInputHandler::ChatInputHandler()
-  {
-    /* register the object  */
-    RegisterObject(ChatInputHandler);
-
-    /* create necessary objects */
-    this->inpbuf = new InputBuffer();
-    this->disp_offset = 0;
-    assert( this->inpbuf != NULL );
-
-    /* generate chatbox ui and chatbox-inputonly ui */
-    GUIManager::getInstance().loadGUI( "ChatBox" );
-    GUIManager::getInstance().loadGUI( "ChatBox-inputonly" );
-
-    /* setup colors */
-    setupColors();
-
-    /* configure the input buffer */
-    configureInputBuffer();
-
-    this->inputState = InputManager::getInstance().createInputState( "chatinput", false, false, InputStatePriority::Dynamic );
-    this->inputState->setKeyHandler(this->inpbuf);
-  }
-
-  /* configure input buffer, sub for the constructor */
-  void ChatInputHandler::configureInputBuffer()
-  {
-    /* INSTALL CALLBACKS */
-    /* input has changed */
-    this->inpbuf->registerListener(this, &ChatInputHandler::inputChanged, true);
-
-    /* add a line */
-    this->inpbuf->registerListener(this, &ChatInputHandler::addline,         '\r',   false);
-    this->inpbuf->registerListener(this, &ChatInputHandler::addline,         '\n',   false);
-
-    /* backspace */
-    this->inpbuf->registerListener(this, &ChatInputHandler::backspace,       '\b',   true);
-    //this->inpbuf->registerListener(this, &ChatInputHandler::backspace,       '\177', true);
-
-    /* exit the chatinputhandler thingy (tbd) */
-    this->inpbuf->registerListener(this, &ChatInputHandler::exit,            '\033', true); // escape
-
-    /* delete character */
-    this->inpbuf->registerListener(this, &ChatInputHandler::deleteChar,      KeyCode::Delete);
-
-    /* cursor movement */
-    this->inpbuf->registerListener(this, &ChatInputHandler::cursorRight,     KeyCode::Right);
-    this->inpbuf->registerListener(this, &ChatInputHandler::cursorLeft,      KeyCode::Left);
-    this->inpbuf->registerListener(this, &ChatInputHandler::cursorEnd,       KeyCode::End);
-    this->inpbuf->registerListener(this, &ChatInputHandler::cursorHome,      KeyCode::Home);
-
-    /* GET WINDOW POINTERS */
-    input = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/input" );
-    inputonly = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox-inputonly/input" );
-
-    /* get pointer to the history window */
-    CEGUI::Window *history = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/history" );
-
-    /* cast it to a listbox */
-    lb_history = dynamic_cast<CEGUI::Listbox*>(history);
-
-    /* assert wee */
-    assert( lb_history );
-  }
-
-  /* setup the colors, sub for the constructor */
-  void ChatInputHandler::setupColors()
-  {
-    /* auto variables */
-    float red = 1.0, green = 0.5, blue = 0.5;
-    int i = 0;
-
-    // three loops: red tones, blue tones and green tones
-    // reds
-    for( i = 0; i < NumberOfColors/3; ++i )
-    { this->text_colors[ i ] = new CEGUI::colour( red, green, blue );
-      assert( this->text_colors[ i ] );
-      green += 0.2f, blue += 0.2f;
-    }
-
-    // greens
-    red = 0.5, green = 1, blue = 0.5;
-    for( ; i < NumberOfColors*2/3; ++i )
-    { this->text_colors[ i ] = new CEGUI::colour( red, green, blue );
-      assert( this->text_colors[ i ] );
-      red += 0.2f, blue += 0.2f;
-    }
-
-    // blues
-    red = 0.5, green = 0.5, blue = 1;
-    for( ; i < NumberOfColors; ++i )
-    { this->text_colors[ i ] = new CEGUI::colour( red, green, blue );
-      assert( this->text_colors[ i ] );
-      red += 0.2f, green += 0.2f;
-    }
-  }
-
-
-  /* activate, deactivate */
-  void ChatInputHandler::activate_static()
-  { ChatInputHandler::getInstance().activate( true ); }
-
-  void ChatInputHandler::activate_small_static()
-  { ChatInputHandler::getInstance().activate( false ); }
-
-  void ChatInputHandler::activate( bool full )
-  {
-    /* start listening */
-    InputManager::getInstance().enterState("chatinput");
-
-    /* MARK add spawning of chat widget stuff here.*/
-    if( full )
-      GUIManager::getInstance().showGUI( "ChatBox" );
-    else
-      GUIManager::getInstance().showGUI( "ChatBox-inputonly" );
-
-    this->fullchat = full;
-  }
-
-  void ChatInputHandler::deactivate()
-  {
-    /* stop listening */
-    InputManager::getInstance().leaveState("chatinput");
-
-    /* un-spawning of chat widget stuff */
-    GUIManager::getInstance().hideGUI( "ChatBox" );
-    GUIManager::getInstance().hideGUI( "ChatBox-inputonly" );
-  }
-
-
-  /* subs for incomingChat */
-  void ChatInputHandler::sub_setcolor( CEGUI::ListboxTextItem *tocolor,
-    std::string name )
-  {
-    /* sanity checks */
-    if( !tocolor )
-      COUT(2) << "Empty ListBoxTextItem given to "
-        "ChatInputhandler::sub_setcolor().\n";
-
-    /* "hash" the name */
-    int hash = 0;
-    for( int i = name.length(); i > 0; --i )
-      hash += name[i-1];
-    hash = hash % this->NumberOfColors;
-
-    /* set the color according to the hash */
-    tocolor->setTextColours( *(this->text_colors[ hash ]) );
-  }
-
-  /* handle incoming chat */
-  void ChatInputHandler::incomingChat(const std::string& message,
-    unsigned int senderID)
-  {
-    /* look up the actual name of the sender */
-    std::string text, name = "unknown";
-
-    /* setup player name info */
-    if (senderID != CLIENTID_UNKNOWN)
-    {
-       PlayerInfo* player = PlayerManager::getInstance().getClient(senderID);
-       if (player)
-         name = player->getName();
-    }
-
-    /* assemble the text */
-    text = name + ": " + message;
-
-    /* create item */
-    CEGUI::ListboxTextItem *toadd = new CEGUI::ListboxTextItem( text );
-
-    /* setup colors */
-    sub_setcolor( toadd, name );
-
-    /* now add */
-    this->lb_history->addItem( dynamic_cast<CEGUI::ListboxItem*>(toadd) );
-    this->lb_history->ensureItemIsVisible(
-      dynamic_cast<CEGUI::ListboxItem*>(toadd) );
-
-    /* make sure the history handles it */
-    this->lb_history->handleUpdatedItemData();
-  }
-
-
-  /* sub for inputchanged */
-  void ChatInputHandler::sub_adjust_dispoffset( int maxlen,
-    int cursorpos,
-    int inplen )
-  {
-    /* already start offsetting 5 characters before end */
-    if( cursorpos+5 > maxlen )
-    {
-      /* always stay 5 characters ahead of end, looks better */
-      ((disp_offset = cursorpos-maxlen+5) >= 0) ? 1 : disp_offset = 0;
-
-      /* enforce visibility of cursor */
-      (disp_offset > cursorpos ) ? disp_offset = 0 : 1;
-    }
-
-    /* make sure we don't die at substr */
-    if( inplen <= disp_offset ) disp_offset = 0;
-  }
-
-  /* callbacks for InputBuffer */
-  void ChatInputHandler::inputChanged()
-  {
-    /* update the cursor and the window */
-    std::string raw = this->inpbuf->get();
-    int cursorpos = this->inpbuf->getCursorPosition();
-
-    /* get string before cursor */
-    std::string left = raw.substr( 0, cursorpos );
-
-    /* see if there's a string after the cursor */
-    std::string right = "";
-    if( raw.length() >= left.length()+1 )
-      right = raw.substr( cursorpos );
-
-    /* set the text */
-    std::string assembled = "$ " + left + "|" + right;
-
-    if( this->fullchat )
-    {
-      /* adjust curser position - magic number 5 for font width */
-      sub_adjust_dispoffset( (int)(this->input->getUnclippedInnerRect().getWidth()/6),
-        cursorpos, assembled.length() );
-      this->input->setProperty( "Text", assembled.substr( disp_offset ) );
-    }
-    else
-    {
-      /* adjust curser position - magic number 5 for font width */
-      sub_adjust_dispoffset( (int)(this->inputonly->getUnclippedInnerRect().getWidth()/6),
-        cursorpos, assembled.length() );
-      this->inputonly->setProperty( "Text", assembled.substr( disp_offset) );
-    }
-
-    /* reset display offset */
-    disp_offset = 0;
-  }
-
-  void ChatInputHandler::addline()
-  {
-    /* actually do send what was input */
-    /* a) get the string out of the inputbuffer */
-    std::string msgtosend = this->inpbuf->get();
-
-    if( msgtosend.length() == 0 )
-    { this->deactivate();
-      return;
-    }
-
-    /* b) clear the input buffer */
-    if (this->inpbuf->getSize() > 0)
-      this->inpbuf->clear();
-
-    /* c) send the chat via some call */
-    Host::Chat( msgtosend );
-
-    /* d) stop listening to input - only if this is not fullchat */
-    if( !this->fullchat )
-      this->deactivate();
-
-  }
-
-  void ChatInputHandler::backspace()
-  { this->inpbuf->removeBehindCursor(); }
-
-  void ChatInputHandler::deleteChar()
-  { this->inpbuf->removeAtCursor(); }
-
-  void ChatInputHandler::cursorRight()
-  { this->inpbuf->increaseCursor(); }
-
-  void ChatInputHandler::cursorLeft()
-  { this->inpbuf->decreaseCursor(); }
-
-  void ChatInputHandler::cursorEnd()
-  { this->inpbuf->setCursorToEnd(); }
-
-  void ChatInputHandler::cursorHome()
-  { this->inpbuf->setCursorToBegin(); }
-
-  void ChatInputHandler::exit()
-  {
-    /* b) clear the input buffer */
-    if (this->inpbuf->getSize() > 0)
-      this->inpbuf->clear();
-
-    /* d) stop listening to input  */
-    this->deactivate();
-  }
-
-}
Index: code/forks/sandbox_light/src/orxonox/ChatInputHandler.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/ChatInputHandler.h	(revision 7907)
+++ 	(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:
- *      Sandro 'smerkli' Merkli
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _ChatInputHandler_H__
-#define _ChatInputHandler_H__
-
-/* std includes */
-#include <deque>
-#include <string>
-#include <fstream>
-#include <iostream>
-#include <cassert>
-#include <CEGUIForwardRefs.h>
-
-/* project includes */
-#include <OrxonoxPrereqs.h>
-#include <core/BaseObject.h>
-#include <core/PathConfig.h>
-
-#include "core/input/InputBuffer.h"
-#include "core/input/InputManager.h"
-#include "core/input/InputState.h"
-
-#include <network/ChatListener.h>
-#include <PlayerManager.h>
-#include <infos/PlayerInfo.h>
-
-#include "../libraries/network/Host.h"
-#include <util/Singleton.h>
-
-namespace orxonox // tolua_export
-{ // tolua_export
-  /* class to handle chat using an InputBuffer */
-  class _OrxonoxExport ChatInputHandler  // tolua_export
-    : public Singleton<ChatInputHandler>, public ChatListener
-  { // tolua_export
-    private:
-      /** Input buffer, to be used to catch input from the
-       * keyboard
-       */
-      InputBuffer *inpbuf;
-      int disp_offset, width;
-      bool fullchat;
-
-      /* colors for nickname coloring */
-      static const int NumberOfColors = 10;
-      CEGUI::colour *text_colors[ NumberOfColors ];
-
-      /** input state */
-      InputState *inputState;
-
-      /** setup input buffer, the constructor calls this */
-      void configureInputBuffer();
-
-      /** adjust display offset depending on cursor position */
-      void sub_adjust_dispoffset( int maxlen, int cursorpos, int inplen );
-
-      /** singleton pointer */
-      static ChatInputHandler* singletonPtr_s;
-
-      /** cegui window handles */
-      CEGUI::Window *input, *inputonly;
-
-      /** cegui handle for the history window */
-      CEGUI::Listbox *lb_history;
-
-      /* methods to deal with colors */
-      void sub_setcolor( CEGUI::ListboxTextItem *tocolor,
-        std::string name );
-
-      void setupColors();
-
-      /* callbacks for input handler */
-      void inputChanged();
-      void addline();
-      void backspace();
-      void deleteChar();
-      void cursorRight();
-      void cursorLeft();
-      void cursorEnd();
-      void cursorHome();
-      void exit();
-
-    public:
-      /** constructor */
-      ChatInputHandler();
-      friend class Singleton<ChatInputHandler>;
-
-      static ChatInputHandler& getInstance(void) { return Singleton<ChatInputHandler>::getInstance(); }  // tolua_export
-
-      /** start listening */
-      static void activate_static();
-
-      /** stop listening */
-      static void activate_small_static();
-
-      /** \param message the message text
-       * \param senderID ID of the player who sent the message
-       *
-       * Deal with incoming chat (which means in our case: Add it to the
-       * history window of the full chat window)
-       */
-      void incomingChat( const std::string& message,
-        unsigned int senderID );
-
-      /** \param full true means show full chat window with history,
-            false means show only an input line
-       *
-       * Show the chat window and redirect the game's keyboard input
-       * into it.
-       */
-      void activate( bool full );
-
-      /** Deactivate the chat window, meaning: hide it. */
-      void deactivate();  // tolua_export
-
-  };  // tolua_export
-
-
-}  // tolua_export
-
-
-#endif /*_ChatInputHandler_H__*/
Index: code/forks/sandbox_light/src/orxonox/Level.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/Level.cc	(revision 7907)
+++ 	(revision )
@@ -1,182 +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 "Level.h"
-
-#include "util/Math.h"
-#include "core/CoreIncludes.h"
-#include "core/Loader.h"
-#include "core/Template.h"
-#include "core/XMLFile.h"
-#include "core/XMLPort.h"
-
-#include "infos/PlayerInfo.h"
-#include "gametypes/Gametype.h"
-#include "overlays/OverlayGroup.h"
-#include "LevelManager.h"
-
-namespace orxonox
-{
-    CreateFactory(Level);
-
-    Level::Level(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
-    {
-        RegisterObject(Level);
-
-
-        this->registerVariables();
-        this->xmlfilename_ = this->getFilename();
-        this->xmlfile_ = 0;
-    }
-
-    Level::~Level()
-    {
-        if (this->isInitialized())
-        {
-            if (LevelManager::exists())
-                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");
-
-        XMLPortObject(Level, MeshLodInformation, "lodinformation", addLodInfo, getLodInfo, xmlelement, mode);
-        XMLPortObjectExtended(Level, BaseObject, "", addObject, getObject, xmlelement, mode, true, false);
-    }
-
-    void Level::registerVariables()
-    {
-        registerVariable(this->xmlfilename_,            VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
-        registerVariable(this->name_,                   VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::changedName));
-        registerVariable(this->description_,            VariableDirection::ToClient);
-        registerVariable(this->networkTemplateNames_,   VariableDirection::ToClient, new NetworkCallback<Level>(this, &Level::networkCallbackTemplatesChanged));
-    }
-
-    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(mask, this->xmlfilename_);
-
-        Loader::open(this->xmlfile_);
-    }
-
-    void Level::networkCallbackTemplatesChanged()
-    {
-        for( std::set<std::string>::iterator it = this->networkTemplateNames_.begin(); it!=this->networkTemplateNames_.end(); ++it )
-        {
-            assert(Template::getTemplate(*it));
-            Template::getTemplate(*it)->applyOn(this);
-        }
-    }
-
-    void Level::setGametypeString(const std::string& gametype)
-    {
-        Identifier* identifier = ClassByString(gametype);
-
-        if (!identifier || !identifier->isA(Class(Gametype)))
-        {
-            COUT(0) << "Error: \"" << gametype << "\" is not a valid gametype." << std::endl;
-            identifier = Class(Gametype);
-            this->gametype_ = "Gametype";
-        }
-        else
-            this->gametype_ = gametype;
-
-        Gametype* rootgametype = orxonox_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::exists())
-            LevelManager::getInstance().requestActivity(this);
-    }
-
-
-    void Level::addObject(BaseObject* object)
-    {
-        this->objects_.push_back(object);
-        object->setGametype(this->getGametype());
-        object->setLevel(this);
-    }
-
-    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::addLodInfo(MeshLodInformation* lodInformation)
-    {
-        std::string meshName = lodInformation->getMeshName();
-//         this->lodInformation_.insert(std::make_pair(meshName,lodInformation));
-        if( this->lodInformation_.find(meshName) != this->lodInformation_.end())
-          CCOUT(4) << "replacing lod information for " << meshName << endl;
-        this->lodInformation_[meshName] = lodInformation;
-    }
-
-    MeshLodInformation* Level::getLodInfo(std::string meshName) const
-    {
-        if(this->lodInformation_.find(meshName)!=this->lodInformation_.end())
-            return this->lodInformation_.find(meshName)->second;
-
-        return 0;
-    }
-
-    void Level::playerEntered(PlayerInfo* player)
-    {
-        COUT(3) << "player entered level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << std::endl;
-        player->setGametype(this->getGametype());
-    }
-
-    void Level::playerLeft(PlayerInfo* player)
-    {
-        COUT(3) << "player left level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << std::endl;
-        player->setGametype(0);
-    }
-}
Index: code/forks/sandbox_light/src/orxonox/Level.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/Level.h	(revision 7907)
+++ 	(revision )
@@ -1,87 +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 <list>
-#include <string>
-#include <map>
-#include "core/BaseObject.h"
-#include "network/synchronisable/Synchronisable.h"
-#include "graphics/MeshLodInformation.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Level : public BaseObject, public Synchronisable
-    {
-        public:
-            Level(BaseObject* creator);
-            virtual ~Level();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
-            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);
-
-            MeshLodInformation* getLodInfo(std::string meshName) const;
-
-
-        private:
-            void registerVariables();
-            void addObject(BaseObject* object);
-            BaseObject* getObject(unsigned int index) const;
-
-            void addLodInfo(MeshLodInformation* object);
-            void networkCallbackTemplatesChanged();
-//            const MeshLodInformation* getLodInfo(std::string meshName) const;
-//            MeshLodInformation* getLodInfo(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_;
-            std::map<std::string,MeshLodInformation*>  lodInformation_;
-    };
-}
-
-#endif /* _Level_H__ */
Index: code/forks/sandbox_light/src/orxonox/LevelInfo.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/LevelInfo.cc	(revision 7907)
+++ 	(revision )
@@ -1,210 +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:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
- */
-
-#include "LevelInfo.h"
-
-#include <sstream>
-#include <vector>
-
-#include "util/SubString.h"
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-
-#include "LevelManager.h"
-
-namespace orxonox
-{
-
-    // LevelInfoItem
-    
-    //! The list of allowed tags.
-    /*static*/ std::set<std::string> LevelInfoItem::possibleTags_s = std::set<std::string>();
-
-    /**
-    @brief
-        Default constructor.
-    */
-    LevelInfoItem::LevelInfoItem()
-    {
-
-    }
-
-    /**
-    @brief
-        Constructor. Initializes the object.
-    @param name
-        The name of the Level.
-    @param filename
-        The XML-filename of the Level.
-    */
-    LevelInfoItem::LevelInfoItem(const std::string& name, const std::string filename)
-    {
-        this->setName(name);
-        this->setXMLFilename(filename);
-    }
-
-    /**
-    @brief
-        Destructor.
-    */
-    LevelInfoItem::~LevelInfoItem()
-    {
-
-    }
-
-    /**
-    @brief
-        Initialize the set of allowed tags.
-    */
-    /*static*/ void LevelInfoItem::initializeTags(void)
-    {
-        if(!LevelInfoItem::initialized_s)
-        {
-            LevelInfoItem::possibleTags_s.insert("test");
-            LevelInfoItem::possibleTags_s.insert("singleplayer");
-            LevelInfoItem::possibleTags_s.insert("multiplayer");
-            LevelInfoItem::possibleTags_s.insert("showcase");
-            LevelInfoItem::possibleTags_s.insert("tutorial");
-            LevelInfoItem::possibleTags_s.insert("presentation");
-        }
-    }
-
-    /**
-    @brief
-        Set the tags the Level is tagged with.
-    @param tags
-        A comma-seperated string of all the tags to be set.
-    */
-    void LevelInfoItem::setTags(const std::string& tags)
-    {
-        SubString substr = SubString(tags, ",", " "); // Split the string into tags.
-        const std::vector<std::string>& strings = substr.getAllStrings();
-        for(std::vector<std::string>::const_iterator it = strings.begin(); it != strings.end(); it++)
-            this->addTag(*it, false);
-
-        this->tagsUpdated();
-    }
-
-    /**
-    @brief
-        Add a tag to the set of tags the Level is tagged with.
-    @param tag
-        The tag to be added.
-    @param update
-        Whether the comma-seperated string of all tags should be updated. Default is true.
-    @return
-        Returns true if the tag was successfully added, if the tag was already present it returns false.
-    */
-    bool LevelInfoItem::addTag(const std::string& tag, bool update)
-    {
-        if(!this->validateTag(tag))
-        {
-            COUT(2) << "Bad LevelInfo tag '" << tag << "' in " << this->getXMLFilename() << ". Ignoring..." << std::endl;
-            return false;
-        }
-        bool success = this->tags_.insert(*LevelInfoItem::possibleTags_s.find(tag)).second;
-        if(update && success)
-            this->tagsUpdated();
-        return success;
-    }
-
-    /**
-    @brief
-        Updates the comma-seperated string of all tags, if the set of tags has changed.
-    */
-    void LevelInfoItem::tagsUpdated(void)
-    {
-        std::stringstream stream;
-        std::set<std::string>::iterator temp;
-        for(std::set<std::string>::iterator it = this->tags_.begin(); it != this->tags_.end(); )
-        {
-            temp = it;
-            if(++it == this->tags_.end()) // If this is the last tag we don't add a comma.
-                stream << *temp;
-            else
-                stream << *temp << ", ";
-        }
-
-        this->tagsString_ = std::string(stream.str());
-    }
-
-    // LevelInfo
-
-    CreateFactory(LevelInfo);
-
-    /**
-    @brief
-
-    @param creator
-        The creator of this object.
-    */
-    LevelInfo::LevelInfo(BaseObject* creator) : BaseObject(creator)
-    {
-        RegisterObject(LevelInfo);
-
-        this->xmlfilename_ = this->getFilename();
-    }
-
-    /**
-    @brief
-        Destructor.
-    */
-    LevelInfo::~LevelInfo()
-    {
-
-    }
-
-    /**
-    @brief
-        Creates a LevelInfo object through XML.
-    */
-    void LevelInfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(LevelInfo, XMLPort, xmlelement, mode);
-
-        XMLPortParam(LevelInfo, "description", setDescription, getDescription, xmlelement, mode);
-        XMLPortParam(LevelInfo, "tags", setTags, getTags, xmlelement, mode);
-    }
-
-    /**
-    @brief
-        Copies the contents of this LevelInfo object to a new LevelInfoItem object.
-        This is needed, because a LeveInfo object is only created within the scope of the XML-file it is loaded with and is destroyed once that is unloaded.
-    @return
-        Returns a new LevelInfoItem with the same contents as the LevelInfo object.
-    */
-    LevelInfoItem* LevelInfo::copy(void)
-    {
-        LevelInfoItem* info = new LevelInfoItem(this->BaseObject::getName(), this->getXMLFilename());
-        info->setDescription(this->getDescription());
-        info->setTags(this->getTags());
-        return info;
-    }
-
-}
-
Index: code/forks/sandbox_light/src/orxonox/LevelInfo.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/LevelInfo.h	(revision 7907)
+++ 	(revision )
@@ -1,219 +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:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file LevelInfo.h
-    @brief Definition of the LevelInfo and LevelInfoItem class.
-    @ingroup Orxonox
-*/
-
-#ifndef _LevelInfo_H__
-#define _LevelInfo_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <set>
-#include <string>
-#include "util/StringUtils.h"
-
-#include "core/BaseObject.h"
-#include "core/OrxonoxClass.h"
-
-namespace orxonox // tolua_export
-{ // tolua_export
-
-    /**
-    @brief
-        The LevelInfoItem class stores information regarding a @ref orxonox::Level "Level" and makes that information accessible through the @ref orxonox::LevelManager "LevelManager".
-        A LevelInfoItem object is commonly created from a @ref orxonox::LevelInfo "LevelInfo" object, using its <code>copy()</code> method.
-
-    @author
-        Damian 'Mozork' Frick
-
-    @ingroup Orxonox
-    */
-    class _OrxonoxExport LevelInfoItem // tolua_export
-        : virtual public OrxonoxClass
-    { // tolua_export
-        public:
-            LevelInfoItem(); //!< Default constructor.
-            LevelInfoItem(const std::string& name, const std::string filename); //!< Constructor. Initializes the object.
-            virtual ~LevelInfoItem(); //!< Destructor.
-
-            /**
-            @brief Set the name of the Level.
-            @param name The name to be set.
-            */
-            inline void setName(const std::string& name)
-                { this->name_ = std::string(name); }
-            /**
-            @brief Get the name of the Level.
-            @return Returns the name of the Level.
-            */
-            inline const std::string& getName(void) const { return this->name_; } // tolua_export
-
-            /**
-            @brief Set the description of the Level.
-            @param description The description to be set.
-            */
-            inline void setDescription(const std::string& description)
-                { this->description_ = std::string(description); }
-            /**
-            @brief Get the description of the Level.
-            @return Returns the description of the Level.
-            */
-            inline const std::string& getDescription() const { return this->description_; } // tolua_export
-
-            void setTags(const std::string& tags); //!< Set the tags the Level is tagged with.
-            bool addTag(const std::string& tag, bool update = true); //!< Add a tag to the set of tags the Level is tagged with.
-            /**
-            @brief Get the lis of the tags the Level is tagged with.
-            @return Returns a comma-seperated string of all the tags the Level is tagged with.
-            */
-            inline const std::string& getTags(void) const
-                { return this->tagsString_; }
-            /**
-            @brief Get whether the Level has a specific tag.
-            @param tag The tag for which is checked.
-            @return Returns true if the Level is tagged with the input tag.
-            */
-            inline bool hasTag(const std::string& tag) const { return this->tags_.find(tag) != this->tags_.end(); } // tolua_export
-
-            /**
-            @brief Get the XML-filename of the Level.
-            @return Returns the XML-filename (including *.oxw extension) of the Level.
-            */
-            inline const std::string& getXMLFilename(void) { return this->xmlfilename_; } // tolua_export
-
-        protected:
-            /**
-            @brief Set the XML-filename of the Level.
-            @param filename The XML-filename to be set.
-            */
-            inline void setXMLFilename(const std::string& filename)
-                { this->xmlfilename_ = std::string(filename); }
-
-            std::string xmlfilename_; //!< The XML-filename of the Level.
-
-        private:
-            void tagsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
-
-            static void initializeTags(void); //!< Initialize the set of allowed tags.
-            /**
-            @brief Check whether an input tag is allowed.
-            @param tag The tag to check.
-            @return Returns true if the input tag is allowed, false if not.
-            */
-            static bool validateTag(const std::string& tag)
-                { LevelInfoItem::initializeTags(); return LevelInfoItem::possibleTags_s.find(tag) != LevelInfoItem::possibleTags_s.end(); }
-
-            static std::set<std::string> possibleTags_s; //!< The set of allowed tags.
-            static const bool initialized_s = false; //!< Whether the set of allowed tags has been inizialized.
-
-            std::string name_; //!< The name of the Level.
-            std::string description_; //!< The description of the Level.
-            std::set<std::string> tags_; //!< The set of tags the Level is tagged with.
-            std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with.
-    }; // tolua_export
-
-    /**
-    @brief
-        The LevelInfo class can be used to store information regarding a @ref orxonox::Level "Level" in its level file.
-        The following parameters can be specified:
-        - @b name The name of the level.
-        - @b description The description of the level.
-        - @b tags A comma-seperated string of tags. Allowed tags are: <em>test</em>, <em>singleplayer</em>, <em>multiplayer</em>, <em>showcase</em>, <em>tutorial</em>, <em>presentation</em>.
-
-        An example would be:
-        @code
-        <LevelInfo
-            name = "Levelname"lhs->compare(rhs) < 0
-            description = "This is just some awesome level."
-            tags = "test, awesome"
-        />
-        @endcode
-        The LevelInfo is best located at the top of the level file.
-
-    @author
-        Damian 'Mozork' Frick
-
-    @ingroup Orxonox
-    */
-    class _OrxonoxExport LevelInfo : public BaseObject, public LevelInfoItem
-    {
-        public:
-            LevelInfo(BaseObject* creator);
-            virtual ~LevelInfo();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a LevelInfo object through XML.
-
-            /**
-            @brief Set the description of the Level.
-            @param description The description to be set.
-            */
-            inline void setDescription(const std::string& description)
-                { this->LevelInfoItem::setDescription(description); }
-            /**
-            @brief Get the description of the Level.
-            @return Returns the description of the Level.
-            */
-            inline const std::string& getDescription() const
-                { return this->LevelInfoItem::getDescription(); }
-
-            /**
-            @brief Set the tags the Level is tagged with.
-            @param tags A comma-seperated string of all the tags to be set.
-            */
-            inline void setTags(const std::string& tags)
-                { this->LevelInfoItem::setTags(tags); }
-            /**
-            @brief Get the lis of the tags the Level is tagged with.
-            @return Returns a comma-seperated string of all the tags the Level is tagged with.
-            */
-            inline const std::string& getTags(void) const
-                { return this->LevelInfoItem::getTags(); }
-
-            LevelInfoItem* copy(void); //!< Copies the contents of this LevelInfo object to a new LevelInfoItem object.
-
-    };
-
-    /**
-    @brief
-        Struct that overloads the compare operation between two @ref orxonox::LevelInfoItem "LevelInfoItem" pointers.
-
-    @ingroup Orxonox
-    */
-    struct LevelInfoCompare
-    {
-        bool operator() (const LevelInfoItem* lhs, const LevelInfoItem* rhs) const
-            { return getLowercase(lhs->getName()).compare(getLowercase(rhs->getName())) < 0; }
-    };
-    
-} // tolua_export
-
-#endif /* _LevelInfo_H__ */
Index: code/forks/sandbox_light/src/orxonox/LevelManager.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/LevelManager.cc	(revision 7907)
+++ 	(revision )
@@ -1,281 +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:
- *      Damian 'Mozork' Frick
- *
- */
-
-/**
-    @file LevelManager.cc
-    @brief Implementation of the LevelManager singleton.
-*/
-
-#include "LevelManager.h"
-
-#include <map>
-
-#include "util/ScopedSingletonManager.h"
-#include "core/ClassTreeMask.h"
-#include "core/CommandLineParser.h"
-#include "core/ConfigValueIncludes.h"
-#include "core/CoreIncludes.h"
-#include "core/Loader.h"
-#include "core/Resource.h"
-#include "core/XMLFile.h"
-#include "Level.h"
-#include "PlayerManager.h"
-
-namespace orxonox
-{
-    SetCommandLineArgument(level, "").shortcut("l").information("Default level file (overrides LevelManager::defaultLevelName_ configValue)");
-
-    ManageScopedSingleton(LevelManager, ScopeID::Root, false);
-
-    /**
-    @brief
-        Constructor. Registers the object, sets config values and initializes variables.
-    */
-    LevelManager::LevelManager()
-    {
-        RegisterRootObject(LevelManager);
-        this->setConfigValues();
-
-        // check override
-        if (!CommandLineParser::getArgument("level")->hasDefaultValue())
-        {
-            ModifyConfigValue(defaultLevelName_, tset, CommandLineParser::getValue("level").getString());
-        }
-
-        this->compileAvailableLevelList();
-        this->nextIndex_ = 0;
-        this->nextLevel_ = this->availableLevels_.begin();
-    }
-
-    LevelManager::~LevelManager()
-    {
-    }
-
-    /**
-    @brief
-        Set the config values for this object.
-    */
-    void LevelManager::setConfigValues()
-    {
-        SetConfigValue(defaultLevelName_, "presentationDM.oxw")
-            .description("Sets the pre selection of the level in the main menu.");
-    }
-
-    /**
-    @brief
-        Request activity for the input Level.
-        The Level will be added to the list of Levels whose activity is requested. The list is accessed in a FIFO manner.
-        If the Level is the only Level in the list it will be immediately activated. If not it will be activated as soon as it reaches the front of the list.
-    @param level
-        A pointer to the Level whose activity is requested.
-    */
-    void LevelManager::requestActivity(Level* level)
-    {
-        assert( std::find(this->levels_.begin(), this->levels_.end(), level)==this->levels_.end() );
-        // If the level is already in list.
-        if( std::find(this->levels_.begin(), this->levels_.end(), level)!=this->levels_.end() )
-            return;
-        // If it isn't insert it at the back.
-        this->levels_.push_back(level);
-        // If it is the only level in the list activate it.
-        if (this->levels_.size() == 1)
-            this->activateNextLevel();
-    }
-
-    /**
-    @brief
-        Release activity for the input Level.
-        Removes the Level from the list. If the Level was the one currently active, it is deactivated and the next Level in line is activated.
-    @param level
-        A pointer to the Level whose activity is to be released.
-    */
-    void LevelManager::releaseActivity(Level* level)
-    {
-        if (this->levels_.size() > 0)
-        {
-            // If the level is the active level in the front of the list.
-            if (this->levels_.front() == level)
-            {
-                // Deactivate it, remove it from the list and activate the next level in line.
-                level->setActive(false);
-                this->levels_.pop_front();
-                this->activateNextLevel();
-            }
-            else // Else just remove it from the list.
-                this->levels_.erase(std::find(this->levels_.begin(), this->levels_.end(), level));
-        }
-    }
-
-    /**
-    @brief
-        Get the currently active Level.
-    @return
-        Returns a pointer to the currently active level or NULL if there currently are no active Levels.
-    */
-    Level* LevelManager::getActiveLevel()
-    {
-        if (this->levels_.size() > 0)
-            return this->levels_.front();
-        else
-            return 0;
-    }
-
-    /**
-    @brief
-        Activate the next Level.
-    */
-    void LevelManager::activateNextLevel()
-    {
-        if (this->levels_.size() > 0)
-        {
-            // Activate the level that is the first in the list of levels whose activity has been requested. 
-            this->levels_.front()->setActive(true);
-            // Make every player enter the newly activated level.
-            for (std::map<unsigned int, PlayerInfo*>::const_iterator it = PlayerManager::getInstance().getClients().begin(); it != PlayerManager::getInstance().getClients().end(); ++it)
-                this->levels_.front()->playerEntered(it->second);
-        }
-    }
-
-    /**
-    @brief
-        Set the default Level.
-    @param levelName
-        The filename of the default Level.
-    */
-    void LevelManager::setDefaultLevel(const std::string& levelName)
-    {
-        ModifyConfigValue(defaultLevelName_, set, levelName);
-    }
-
-    /**
-    @brief
-        Get the number of available Levels.
-        Also updates the list of available Levels.
-    @return
-        Returns the number of available Levels.
-    */
-    unsigned int LevelManager::getNumberOfLevels()
-    {
-        this->updateAvailableLevelList();
-
-        return this->availableLevels_.size();
-    }
-
-    /**
-    @brief
-        Get the LevelInfoItem at the given index in the list of available Levels.
-        The LevelInfoItems are sorted in alphabetical order accoridng to the name of the Level.
-        This method is most efficiently called with consecutive indices (or at least ascending indices).
-    @param index
-        The index of the item that should be returned.
-    @return
-        Returns a pointer to the LevelInfoItem at the given index.
-    */
-    LevelInfoItem* LevelManager::getAvailableLevelListItem(unsigned int index)
-    {
-        if(index >= this->availableLevels_.size())
-            return NULL;
-
-        // If this index directly follows the last we can optimize a lot.
-        if(index == this->nextIndex_)
-        {
-            this->nextIndex_++;
-            std::set<LevelInfoItem*, LevelInfoCompare>::iterator it = this->nextLevel_;
-            this->nextLevel_++;
-            return *it;
-        }
-        else
-        {
-            // If this index is bigger than the last, we can optimize a little.
-            if(index < this->nextIndex_)
-            {
-                this->nextIndex_ = 0;
-                this->nextLevel_ = this->availableLevels_.begin();
-            }
-            while(this->nextIndex_ != index)
-            {
-                this->nextIndex_++;
-                this->nextLevel_++;
-            }
-            this->nextIndex_++;
-            std::set<LevelInfoItem*, LevelInfoCompare>::iterator it = this->nextLevel_;
-            this->nextLevel_++;
-            return *it;
-        }
-    }
-
-    /**
-    @brief
-        Compile the list of available Levels.
-        Iterates over all *.oxw files, loads the LevelInfo objects in them and from that it creates the LevelInfoItems which are inserted in a list.
-    */
-    void LevelManager::compileAvailableLevelList()
-    {
-        Ogre::StringVectorPtr levels = Resource::findResourceNames("*.oxw");
-        // Iterate over all *.oxw level files.
-        COUT(3) << "Loading LevelInfos..." << std::endl;
-        for (Ogre::StringVector::const_iterator it = levels->begin(); it != levels->end(); ++it)
-        {
-            //TODO: Replace with tag?
-            if (it->find("old/") != 0)
-            {
-                size_t pos = it->find(".oxw");
-
-                // Load the LevelInfo object from the level file.
-                bool infoExists = false;
-                XMLFile file = XMLFile(*it);
-                ClassTreeMask mask = ClassTreeMask();
-                mask.exclude(ClassIdentifier<BaseObject>::getIdentifier());
-                mask.include(ClassIdentifier<LevelInfo>::getIdentifier());
-                Loader::load(&file, mask, false);
-                // Iterate over all LevelInfos.
-                for(ObjectList<LevelInfo>::iterator item = ObjectList<LevelInfo>::begin(); item != ObjectList<LevelInfo>::end(); ++item)
-                {
-                    LevelInfoItem* info = item->copy();
-                    if(info->getXMLFilename() == *it) // If the LevelInfo for this level exists we insert it into the list of available levels.
-                    {
-                        this->availableLevels_.insert(info);
-                        infoExists = true;
-                    }
-                }
-                Loader::unload(&file, mask);
-                if(!infoExists) // If the LevelInfo for this level doesn't exist, we create a new one and insert it into the list of available levels.
-                    this->availableLevels_.insert(new LevelInfoItem(it->substr(0, pos), *it));
-            }
-        }
-    }
-
-    /**
-    @brief
-        Update the list of available Levels.
-    */
-    void LevelManager::updateAvailableLevelList(void)
-    {
-        //TODO: Implement some kind of update?
-    }
-}
Index: code/forks/sandbox_light/src/orxonox/LevelManager.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/LevelManager.h	(revision 7907)
+++ 	(revision )
@@ -1,123 +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:
- *      Damian 'Mozork' Frick
- *
- */
-
-/**
-    @file LevelManager.h
-    @brief Definition of the LevelManager singleton.
-    @ingroup Orxonox
-*/
-
-#ifndef _LevelManager_H__
-#define _LevelManager_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <cassert>
-#include <list>
-#include <map>
-#include <string>
-
-#include "LevelInfo.h"
-
-#include "util/Singleton.h"
-#include "core/OrxonoxClass.h"
-
-// tolua_begin
-namespace orxonox
-{
-
-    /**
-    @brief
-        The LevelManager keeps track of @ref orxonox::Level "Levels" whose activity has been requested and activates the @ref orxonox::Level "Levels" in the list in a FIFO manner with exactly one Level (the first in the list) being active at all times (unless the list is empty).
-        It also serves as an access point to get a list of all available @ref orxonox::Level "Levels" (or rather their respective @ref orxonox::LevelInfoItem "LevelInfoItems").
-
-    @author
-        Fabian 'x3n' Landau
-
-    @author
-        Damian 'Mozork' Frick
-
-    @ingroup Orxonox
-    */
-    class _OrxonoxExport LevelManager
-    // tolua_end
-        : public Singleton<LevelManager>, public OrxonoxClass
-    { // tolua_export
-            friend class Singleton<LevelManager>;
-        public:
-            LevelManager();
-            virtual ~LevelManager();
-
-            void setConfigValues(); //!< Set the config values for this object.
-
-            void requestActivity(Level* level); //!< Request activity for the input Level.
-            void releaseActivity(Level* level); //!< Release activity for the input Level.
-            Level* getActiveLevel(); //!< Get the currently active Level.
-
-            // tolua_begin
-            void setDefaultLevel(const std::string& levelName); //!< Set the default Level.
-            /**
-            @brief Get the default level.
-            @return Returns the filename of the default level.
-            */
-            const std::string& getDefaultLevel() const
-                { return defaultLevelName_; }
-            unsigned int getNumberOfLevels(void);
-            LevelInfoItem* getAvailableLevelListItem(unsigned int index); //!< Get the LevelInfoItem at the given index in the list of available Levels.
-
-            /**
-            @brief Get the instance of the LevelManager.
-            @return Returns the instance of the LevelManager.
-            */
-            static LevelManager& getInstance()
-                { return Singleton<LevelManager>::getInstance(); }
-            // tolua_end
-
-        private:
-            LevelManager(const LevelManager&);
-
-            void activateNextLevel(); //!< Activate the next level.
-
-            void compileAvailableLevelList(void); //!< Compile the list of available Levels.
-            void updateAvailableLevelList(void); //!< Update the list of available Levels.
-
-            std::list<Level*> levels_; //!< A list of all the Levels whose activity has been requested, in the order in which they will become active.
-            std::set<LevelInfoItem*, LevelInfoCompare> availableLevels_; //!< The set of available Levels sorted alphabetically according to the name of the Level.
-
-            // Helpers to allow fast access to the availableLevels list.
-            unsigned int nextIndex_; //! The next expected index to be accessed.
-            std::set<LevelInfoItem*, LevelInfoCompare>::iterator nextLevel_; //! The nex expected Level to be accessed.
-
-            // config values
-            std::string defaultLevelName_;
-
-            static LevelManager* singletonPtr_s;
-    }; // tolua_export
-} // tolua_export
-
-#endif /* _LevelManager_H__ */
Index: code/forks/sandbox_light/src/orxonox/Main.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/Main.cc	(revision 7907)
+++ code/forks/sandbox_light/src/orxonox/Main.cc	(revision 7908)
@@ -37,24 +37,8 @@
 
 #include "core/CommandLineParser.h"
-#include "core/Game.h"
-#include "core/LuaState.h"
-#include "ToluaBindOrxonox.h"
-#include "ToluaBindNetwork.h"
-
-DeclareToluaInterface(Orxonox);
-DeclareToluaInterface(Network);
+#include "core/Core.h"
 
 namespace orxonox
 {
-    SetCommandLineSwitch(console).information("Start in console mode (text IO only)");
-    SetCommandLineSwitch(server).information("Start in server mode");
-    SetCommandLineSwitch(client).information("Start in client mode");
-    SetCommandLineSwitch(dedicated).information("Start in dedicated server mode");
-    SetCommandLineSwitch(standalone).information("Start in standalone mode");
-    SetCommandLineSwitch(dedicatedClient).information("Start in dedicated client mode");
-
-    /* ADD masterserver command */
-    SetCommandLineSwitch(masterserver).information("Start in masterserver mode");
-
     SetCommandLineArgument(generateDoc, "")
         .information("Generates a Doxygen file from things like SetConsoleCommand");
@@ -66,45 +50,12 @@
     int main(const std::string& strCmdLine)
     {
-        Game* game = new Game(strCmdLine);
+        Core* core = new Core(strCmdLine);
 
         if (CommandLineParser::getValue("generateDoc").getString().empty())
         {
-            /* TODO make this clear */
-            game->setStateHierarchy(
-            "root"
-            " graphics"
-            "  mainMenu"
-            "  standalone,server,client"
-            "   level"
-            " server,client,masterserver"
-            "  level"
-            );
-
-            game->requestState("root");
-
-            // Some development hacks (not really, but in the future, these calls won't make sense anymore)
-            if (CommandLineParser::getValue("standalone").getBool())
-                Game::getInstance().requestStates("graphics, standalone, level");
-            else if (CommandLineParser::getValue("server").getBool())
-                Game::getInstance().requestStates("graphics, server, level");
-            else if (CommandLineParser::getValue("client").getBool())
-                Game::getInstance().requestStates("graphics, client, level");
-            else if (CommandLineParser::getValue("dedicated").getBool())
-                Game::getInstance().requestStates("server, level");
-            else if (CommandLineParser::getValue("dedicatedClient").getBool())
-                Game::getInstance().requestStates("client, level");
-            /* ADD masterserver command */
-            else if (CommandLineParser::getValue("masterserver").getBool())
-                Game::getInstance().requestStates("masterserver");
-            else
-            {
-                if (!CommandLineParser::getValue("console").getBool())
-                    Game::getInstance().requestStates("graphics, mainMenu");
-            }
-
-            game->run();
+            // Start your program here
         }
 
-        delete game;
+        delete core;
 
         return 0;
Index: code/forks/sandbox_light/src/orxonox/MoodManager.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/MoodManager.cc	(revision 7907)
+++ 	(revision )
@@ -1,105 +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:
- *      Kevin 'youngk' Young
- *   Co-authors:
- *      ...
- *
- */
-
-#include "MoodManager.h"
-
-#include "util/ScopedSingletonManager.h"
-#include "core/ConfigValueIncludes.h"
-#include "core/CoreIncludes.h"
-#include "core/Resource.h"
-
-namespace orxonox
-{
-    ManageScopedSingleton(MoodManager, ScopeID::Root, false);
-
-    // Note: I'm (Kevin Young) not entirely sure whether that's good code style:
-    const std::string MoodManager::defaultMood_ = "default";
-
-    MoodManager::MoodManager()
-    {
-        RegisterRootObject(MoodManager);
-        this->setConfigValues();
-
-        // Need to use a variable to store old data because ResetConfigValues() doesn't seem to work.
-        oldMood_ = MoodManager::defaultMood_;
-
-        // Checking for the existence of the folder for the default mood
-        const std::string& path = "ambient/" + MoodManager::defaultMood_ + "/.";
-        if (!Resource::exists(path))
-        {
-            // TODO: Non-fatal error handling (non-critical resource missing)
-            COUT(2) << "Mood Warning: Folder for default mood (" << MoodManager::defaultMood_ << ") does not exist!" << std::endl;
-        }
-    }
-
-    void MoodManager::setConfigValues()
-    {
-        SetConfigValue(mood_, MoodManager::defaultMood_)
-            .description("Sets the mood for the current level.")
-            .callback(this, &MoodManager::checkMoodValidity);
-    }
-
-    /** Set a new mood
-     */
-    void MoodManager::setMood(const std::string& mood)
-    {
-        oldMood_ = mood_;
-        ModifyConfigValue(mood_, set, mood);
-    }
-
-    void MoodManager::checkMoodValidity()
-    {
-        //  Generic mood validation
-        const std::string& path = "ambient/" + mood_ + "/.";
-        if (!Resource::exists(path))
-        {
-            COUT(3) << "Mood " << mood_ << " does not exist. Will not change." << std::endl;
-            this->setMood(oldMood_);
-        }
-        else
-        {
-            COUT(3) << "Mood changed to " << mood_ << std::endl;
-            MoodListener::changedMood(mood_);
-        }
-    }
-
-
-    std::string MoodListener::mood_s;
-
-    MoodListener::MoodListener()
-    {
-        RegisterRootObject(MoodListener);
-    }
-
-    /*static*/ void MoodListener::changedMood(const std::string& mood)
-    {
-        mood_s = mood;
-        for (ObjectList<MoodListener>::iterator it = ObjectList<MoodListener>::begin(); it; ++it)
-            it->moodChanged(mood_s);
-    }
-}
Index: code/forks/sandbox_light/src/orxonox/MoodManager.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/MoodManager.h	(revision 7907)
+++ 	(revision )
@@ -1,91 +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:
- *      Kevin 'youngk' Young
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _MoodManager_H__
-#define _MoodManager_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <string>
-#include "util/Singleton.h"
-#include "core/OrxonoxClass.h"
-
-namespace orxonox
-{
-    /*
-    @brief
-        The MoodListener class is aware of a change in themes and directs that info to dependent classes.
-    */
-    class _OrxonoxExport MoodListener : virtual public OrxonoxClass
-    {
-        friend class MoodManager;
-
-        protected:
-            MoodListener();
-            virtual ~MoodListener() {}
-
-            const std::string& getMood() const { return mood_s; }
-
-        private:
-            virtual void moodChanged(const std::string& mood) = 0;
-
-            static void changedMood(const std::string& mood);
-            static std::string mood_s;
-    };
-
-    /*
-    @brief
-        The MoodManager class serves to allow for different musical themes in the game.
-    */
-    class _OrxonoxExport MoodManager : public Singleton<MoodManager>, public OrxonoxClass
-    {
-            friend class Singleton<MoodManager>;
-        public:
-            MoodManager();
-
-            void setConfigValues();
-
-            void setMood(const std::string& mood);
-            inline const std::string& getMood() const { return this->mood_; }
-
-            static MoodManager& getInstance() { return Singleton<MoodManager>::getInstance(); }
-
-        private:
-            ~MoodManager() {}
-            void checkMoodValidity();
-
-            // config values
-            std::string mood_;
-            std::string oldMood_;
-            static const std::string defaultMood_;
-
-            static MoodManager* singletonPtr_s;
-    };
-}
-
-#endif /* _MoodManager_H__ */
Index: code/forks/sandbox_light/src/orxonox/OrxonoxPrecompiledHeaders.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/OrxonoxPrecompiledHeaders.h	(revision 7907)
+++ code/forks/sandbox_light/src/orxonox/OrxonoxPrecompiledHeaders.h	(revision 7908)
@@ -38,59 +38,4 @@
 #include "OrxonoxConfig.h"
 
-///////////////////////////////////////////
-/////          Stable Headers         /////
-///////////////////////////////////////////
-
-#include <cassert>  // 87
-#include <cstring>  // 87
-#include <fstream>  // 87
-#include <iostream> // 87
-#include <map>      // 87
-#include <set>      // 87
-#include <sstream>  // 87
-#include <string>   // 87
-#include <vector>   // 87
-#include <list>     // 86
-#include <ctime>    // 82
-#include <cmath>    // 81
-#include <deque>    // 81
-#include <queue>    // 81
-
-#include <OgreMath.h>        // 81
-#include <OgreVector2.h>     // 81
-#include <OgreVector3.h>     // 81
-#include <OgreVector4.h>     // 81
-#include <OgreQuaternion.h>  // 81
-#include <OgreColourValue.h> // 81
-
-#include "util/OgreForwardRefs.h"     // 67
-#include <LinearMath/btMotionState.h> // 60
-#include "util/SubString.h" // 55
-#include <tinyxml/ticpp.h>  // 41
-
-//#include <OgreRenderable.h> // 14, 5.1MB
-//#include <OgreSceneNode.h>  // 13, 1MB
-//#include <OgreResourceGroupManager.h> // 12, 1.5MB
-//#include <OgreTexture.h>       // 11, 0.6MB
-//#include <OgreMovableObject.h> // 10, 1.6MB
-//#include <OgreSceneManager.h>  // 9, 8.7MB
-
-///////////////////////////////////////////
-/////       All Rebuild Headers       /////
-///////////////////////////////////////////
-
-#include "core/BaseObject.h"   // 82
-#include "core/CoreIncludes.h" // 80
-
-///////////////////////////////////////////
-/////      Not so Stable Headers      /////
-///////////////////////////////////////////
-
-#include "network/synchronisable/Synchronisable.h" // 70
-#include "util/MultiType.h"    // 65
-#include "core/command/Executor.h"     // 55
-//#include "core/XMLPort.h"     // 41
-
-
 // Just in case some header included windows.h
 #undef min
Index: code/forks/sandbox_light/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/OrxonoxPrereqs.h	(revision 7907)
+++ code/forks/sandbox_light/src/orxonox/OrxonoxPrereqs.h	(revision 7908)
@@ -37,5 +37,4 @@
 
 #include "OrxonoxConfig.h"
-#include "tools/ToolsPrereqs.h"
 
 //-----------------------------------------------------------------------
@@ -65,150 +64,5 @@
 namespace orxonox
 {
-    class CameraManager;
-    class Level;
-    class LevelInfo;
-    class LevelInfoItem;
-    class LevelManager;
-    class PawnManager;
-    class PlayerManager;
-    class Radar;
-    class Scene;
-
-    // collisionshapes
-    class CollisionShape;
-    class CompoundCollisionShape;
-    class WorldEntityCollisionShape;
-
-    // controllers
-    class AIController;
-    class ArtificialController;
-    class Controller;
-    class DroneController;
-    class HumanController;
-    class ScriptController;
-    class WaypointController;
-    class WaypointPatrolController;
-
-    // gametypes
-    class Asteroids;
-    class Deathmatch;
-    class Dynamicmatch;
-    class Gametype;
-    class LastManStanding;
-    class TeamBaseMatch;
-    class TeamDeathmatch;
-    class UnderAttack;
-
-    // graphics
-    class Backlight;
-    class Billboard;
-    class BlinkingBillboard;
-    class Camera;
-    class FadingBillboard;
-    class GlobalShader;
-    class Light;
-    class Model;
-    class ParticleEmitter;
-    class ParticleSpawner;
-
-    // infos
-    class Bot;
-    class GametypeInfo;
-    class HumanPlayer;
-    class Info;
-    class PlayerInfo;
-
-    // interfaces
-    class GametypeMessageListener;
-    class NotificationListener;
-    class Pickupable;
-    class PickupCarrier;
-    class PlayerTrigger;
-    class RadarListener;
-    class RadarViewable;
-    class Rewardable;
-    class TeamColourable;
-
-    // items
-    class Engine;
-    class Item;
-    class MultiStateEngine;
-
-    // overlays
-    class InGameConsole;
-    class Map;
-    class OrxonoxOverlay;
-    class OverlayGroup;
-
-    // pickup
-    class PickupIdentifier;
-
-    //sound
-    class AmbientSound;
-    class BaseSound;
-    class SoundBuffer;
-    class SoundManager;
-    class SoundStreamer;
-    class WorldSound;
-    class WorldAmbientSound;
-
-    // weaponsystem
-    class DefaultWeaponmodeLink;
-    class Munition;
-    class Weapon;
-    class WeaponMode;
-    class WeaponPack;
-    class WeaponSet;
-    class WeaponSlot;
-    class WeaponSystem;
-
-    // worldentities
-    class BigExplosion;
-    class CameraPosition;
-    class ControllableEntity;
-    class Drone;
-    class EffectContainer;
-    class ExplosionChunk;
-    class MobileEntity;
-    class MovableEntity;
-    class SpawnPoint;
-    class StaticEntity;
-    class TeamSpawnPoint;
-    class WorldEntity;
-    class Rocket;
-    // worldentities, pawns
-    class Destroyer;
-    class Pawn;
-    class SpaceShip;
-    class Spectator;
-    class TeamBaseMatchBase;
 }
 
-// Bullet Physics Engine
-class btTransform;
-class btVector3;
-
-class btRigidBody;
-class btCollisionObject;
-class btGhostObject;
-class btManifoldPoint;
-
-class btCollisionShape;
-class btSphereShape;
-class btCompoundShape;
-class btStaticPlaneShape;
-
-class btDiscreteDynamicsWorld;
-class bt32BitAxisSweep3;
-class btDefaultCollisionConfiguration;
-class btCollisionDispatcher;
-class btSequentialImpulseConstraintSolver;
-
-// ALUT
-typedef struct ALCcontext_struct ALCcontext;
-typedef struct ALCdevice_struct ALCdevice;
-typedef unsigned int ALuint;
-typedef int ALint;
-typedef int ALenum;
-
 #endif /* _OrxonoxPrereqs_H__ */
Index: code/forks/sandbox_light/src/orxonox/PawnManager.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/PawnManager.cc	(revision 7907)
+++ 	(revision )
@@ -1,67 +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 "PawnManager.h"
-
-#include "core/CoreIncludes.h"
-#include "worldentities/pawns/Pawn.h"
-
-namespace orxonox
-{
-    PawnManager* PawnManager::singletonPtr_s = 0;
-
-    PawnManager::PawnManager()
-    {
-        RegisterRootObject(PawnManager);
-    }
-
-    PawnManager::~PawnManager()
-    {
-    }
-
-    void PawnManager::touch()
-    {
-        if (!PawnManager::singletonPtr_s)
-            new PawnManager();
-    }
-
-    void PawnManager::tick(float dt)
-    {
-        unsigned int count = 0;
-        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++count)
-        {
-            if (!it->isAlive())
-                (it++)->destroy();
-            else
-                ++it;
-        }
-
-        if (count == 0)
-            this->destroy();
-    }
-}
Index: code/forks/sandbox_light/src/orxonox/PawnManager.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/PawnManager.h	(revision 7907)
+++ 	(revision )
@@ -1,55 +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 _PawnManager_H__
-#define _PawnManager_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "util/Singleton.h"
-#include "tools/interfaces/Tickable.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport PawnManager : protected Singleton<PawnManager>, public Tickable
-    {
-            friend class Singleton<PawnManager>;
-        public:
-            static void touch();
-
-            virtual void tick(float dt);
-
-        private:
-            PawnManager();
-            virtual ~PawnManager();
-
-            static PawnManager* singletonPtr_s;
-    };
-}
-
-#endif /* _PawnManager_H__ */
Index: code/forks/sandbox_light/src/orxonox/PlayerManager.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/PlayerManager.cc	(revision 7907)
+++ 	(revision )
@@ -1,117 +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 "PlayerManager.h"
-
-#include "core/CoreIncludes.h"
-#include "core/GameMode.h"
-#include "util/ScopedSingletonManager.h"
-
-#include "Level.h"
-#include "LevelManager.h"
-#include "infos/HumanPlayer.h"
-
-namespace orxonox
-{
-    ManageScopedSingleton(PlayerManager, ScopeID::Root, false);
-
-    PlayerManager::PlayerManager()
-    {
-        RegisterRootObject(PlayerManager);
-
-        this->getConnectedClients();
-    }
-
-    PlayerManager::~PlayerManager()
-    {
-    }
-
-    void PlayerManager::clientConnected(unsigned int clientID)
-    {
-        if (GameMode::isMaster())
-        {
-            if (clientID != 0)
-                COUT(3) << "client connected" << std::endl;
-
-            // create new HumanPlayer instance
-            HumanPlayer* player = new HumanPlayer(0);
-            player->setClientID(clientID);
-
-            // add to clients-map
-            assert(!this->clients_[clientID]);
-            this->clients_[clientID] = player;
-
-            if (LevelManager::exists() && LevelManager::getInstance().getActiveLevel())
-                LevelManager::getInstance().getActiveLevel()->playerEntered(player);
-        }
-    }
-
-    void PlayerManager::clientDisconnected(unsigned int clientID)
-    {
-        if (GameMode::isMaster())
-        {
-            if (clientID != 0)
-                COUT(3) << "client disconnected" << std::endl;
-
-            // remove from clients-map
-            PlayerInfo* player = this->clients_[clientID];
-            this->clients_.erase(clientID);
-
-            if (LevelManager::exists() && LevelManager::getInstance().getActiveLevel())
-                LevelManager::getInstance().getActiveLevel()->playerLeft(player);
-
-            // delete PlayerInfo instance
-            if (player)
-                player->destroy();
-        }
-    }
-
-    void PlayerManager::disconnectAllClients()
-    {
-        for( std::map<unsigned int, PlayerInfo*>::iterator it = this->clients_.begin(); it != this->clients_.end(); )
-            this->clientDisconnected( (it++)->first );
-    }
-
-
-    PlayerInfo* PlayerManager::getClient(unsigned int clientID) const
-    {
-        if (GameMode::isMaster())
-        {
-            std::map<unsigned int, PlayerInfo*>::const_iterator it = this->clients_.find(clientID);
-            if (it != this->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;
-    }
-}
Index: code/forks/sandbox_light/src/orxonox/PlayerManager.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/PlayerManager.h	(revision 7907)
+++ 	(revision )
@@ -1,63 +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 _PlayerManager_H__
-#define _PlayerManager_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <cassert>
-#include <map>
-#include "util/Singleton.h"
-#include "network/ClientConnectionListener.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport PlayerManager : public Singleton<PlayerManager>, public ClientConnectionListener
-    {
-            friend class Singleton<PlayerManager>;
-        public:
-            PlayerManager();
-            virtual ~PlayerManager();
-
-            PlayerInfo* getClient(unsigned int clientID) const;
-            inline const std::map<unsigned int, PlayerInfo*>& getClients() const
-                { return this->clients_; }
-
-            void clientConnected(unsigned int clientID);
-            void clientDisconnected(unsigned int clientID);
-            void disconnectAllClients();
-
-        private:
-            std::map<unsigned int, PlayerInfo*> clients_;
-
-            static PlayerManager* singletonPtr_s;
-    };
-}
-
-#endif /* _PlayerManager_H__ */
Index: code/forks/sandbox_light/src/orxonox/Radar.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/Radar.cc	(revision 7907)
+++ 	(revision )
@@ -1,213 +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:
- *      Reto Grieder
- *   Co-authors:
- *      Felix Schulthess
- *
- */
-
-/**
-@file
-@brief
-*/
-
-#include "Radar.h"
-
-#include <cassert>
-
-//#include "util/Math.h"
-#include "core/ObjectList.h"
-#include "core/command/ConsoleCommand.h"
-#include "interfaces/RadarListener.h"
-#include "controllers/HumanController.h"
-#include "worldentities/pawns/Pawn.h"
-
-namespace orxonox
-{
-
-    Radar::Radar()
-        : itFocus_(0)
-        , focus_(0)
-        , objectTypeCounter_(0)
-    {
-        // TODO: make this mapping configurable. Maybe there's a possibility with self configured
-        //       configValues..
-        this->objectTypes_["Asteroid"] = RadarViewable::Dot;
-        this->objectTypes_["SpaceShip"] = RadarViewable::Square;
-        this->objectTypes_["AsdfQwerty"] = RadarViewable::Triangle;
-
-        /*WorldEntity* object;
-        object = new WorldEntity();
-        object->setPosition(2000.0, 0.0, 0.0);
-        addRadarObject(object, ColourValue(0.5, 0, 0, 1));
-        object = new WorldEntity();
-        object->setPosition(0.0, 2000.0, 0.0);
-        addRadarObject(object, ColourValue(0.5, 0, 0, 1));
-        object = new WorldEntity();
-        object->setPosition(0.0, 0.0, 2000.0);
-        addRadarObject(object, ColourValue(0.5, 0, 0, 1));
-        object = new WorldEntity();
-        object->setPosition(10000.0,16000.0,0.0);
-        addRadarObject(object);*/
-
-    }
-
-    Radar::~Radar()
-    {
-    }
-
-    void Radar::addRadarObject(RadarViewable* rv)
-    {
-        assert( this->radarObjects_.find(rv) == this->radarObjects_.end() );
-        this->radarObjects_.insert(rv);
-        // iterate through all radarlisteners and notify them
-        for (ObjectList<RadarListener>::iterator itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener)
-        {
-            (*itListener)->addObject(rv);
-        }
-    }
-
-    void Radar::removeRadarObject(RadarViewable* rv)
-    {
-        assert( this->radarObjects_.find(rv) != this->radarObjects_.end() );
-        this->radarObjects_.erase(rv);
-        // iterate through all radarlisteners and notify them
-        for (ObjectList<RadarListener>::iterator itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener)
-        {
-            (*itListener)->removeObject(rv);
-        }
-    }
-
-    const RadarViewable* Radar::getFocus()
-    {
-        if (this->itFocus_)
-            return *(this->itFocus_);
-        else
-            return 0;
-    }
-
-    RadarViewable::Shape Radar::addObjectDescription(const std::string& name)
-    {
-        std::map<std::string, RadarViewable::Shape>::iterator it = this->objectTypes_.find(name);
-        if (it == this->objectTypes_.end())
-            return this->objectTypes_[name] = RadarViewable::Square; // default, configure!!
-        else
-            return this->objectTypes_[name];
-    }
-
-
-    void Radar::tick(float dt)
-    {
-        SUPER(Radar, tick, dt);
-
-        if (this->itFocus_ && (this->focus_ != *(this->itFocus_)))
-        {
-            // focus object was deleted, release focus
-            this->focus_ = 0;
-            this->itFocus_ = 0;
-        }
-
-        for (ObjectList<RadarListener>::iterator itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener)
-        {
-            (*itListener)->radarTick(dt);
-        }
-    }
-
-    void Radar::cycleFocus()
-    {
-        if (ObjectList<RadarViewable>::begin() == ObjectList<RadarViewable>::end())
-        {
-            // list is empty
-            this->itFocus_ = 0;
-            this->focus_ = 0;
-        }
-
-        else if (HumanController::getLocalControllerEntityAsPawn())
-        {
-            Vector3 localPosition = HumanController::getLocalControllerEntityAsPawn()->getWorldPosition();
-            Vector3 targetPosition = localPosition;
-            if (this->itFocus_ && *(this->itFocus_))
-                targetPosition = this->itFocus_->getRVWorldPosition();
-
-            // find the closest object further away than targetPosition
-            float currentDistance = localPosition.squaredDistance(targetPosition);
-            float nextDistance = FLT_MAX;
-            float minimumDistance = FLT_MAX;
-            ObjectList<RadarViewable>::iterator itFallback = 0;
-
-            for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it)
-            {
-                if (*it == static_cast<RadarViewable*>(HumanController::getLocalControllerEntityAsPawn()))
-                    continue;
-
-                float targetDistance = localPosition.squaredDistance((*it)->getRVWorldPosition());
-                if (targetDistance > currentDistance && targetDistance < nextDistance)
-                {
-                    this->itFocus_ = it;
-                    nextDistance = targetDistance;
-                }
-                if (targetDistance < minimumDistance)
-                {
-                    itFallback = it;
-                    minimumDistance = targetDistance;
-                }
-            }
-
-            if (nextDistance == FLT_MAX)
-            {
-                // we already had the furthest object
-                this->itFocus_ = itFallback;
-                this->focus_ = *itFallback;
-            }
-            else
-            {
-                this->focus_ = *(this->itFocus_);
-            }
-        }
-    }
-
-    void Radar::releaseFocus()
-    {
-        this->itFocus_ = 0;
-        this->focus_ = 0;
-    }
-
-    void Radar::listObjects() const
-    {
-        COUT(3) << "List of RadarObjects:\n";
-        // iterate through all Radar Objects
-        unsigned int i = 0;
-        for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it, ++i)
-        {
-            COUT(3) << i++ << ": " << (*it)->getRVWorldPosition() << std::endl;
-        }
-    }
-
-    void Radar::radarObjectChanged(RadarViewable* rv)
-    {
-        for (ObjectList<RadarListener>::iterator itListener = ObjectList<RadarListener>::begin(); itListener; ++itListener)
-        {
-          (*itListener)->objectChanged(rv);
-        }
-    }
-}
Index: code/forks/sandbox_light/src/orxonox/Radar.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/Radar.h	(revision 7907)
+++ 	(revision )
@@ -1,83 +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:
- *      Reto Grieder
- *   Co-authors:
- *      Felix Schulthess
- *
- */
-
-/**
-@file
-@brief
-*/
-
-#ifndef _Radar_H__
-#define _Radar_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <map>
-#include <set>
-#include <string>
-
-#include "core/ObjectListIterator.h"
-#include "interfaces/RadarViewable.h"
-#include "tools/interfaces/Tickable.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Radar : public Tickable
-    {
-        friend class RadarViewable;
-    public:
-        Radar();
-        virtual ~Radar();
-
-        virtual void tick(float dt);
-
-        const RadarViewable* getFocus();
-        RadarViewable::Shape addObjectDescription(const std::string& name);
-
-        void listObjects() const;
-        const std::set<RadarViewable*>& getRadarObjects() const
-            { return this->radarObjects_; }
-
-        void releaseFocus();
-        void cycleFocus();
-
-    private:
-        Radar(Radar& instance);
-
-        void updateFocus();
-        void addRadarObject(RadarViewable* rv);
-        void removeRadarObject(RadarViewable* rv);
-        void radarObjectChanged(RadarViewable* rv);
-
-        ObjectListIterator<RadarViewable> itFocus_;
-        RadarViewable* focus_;
-        std::map<std::string, RadarViewable::Shape> objectTypes_;
-        std::set<RadarViewable*> radarObjects_;
-        int objectTypeCounter_;
-    };
-}
-#endif /* _Radar_H__ */
Index: code/forks/sandbox_light/src/orxonox/Scene.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/Scene.cc	(revision 7907)
+++ 	(revision )
@@ -1,352 +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
- *      Reto Grieder (physics)
- *   Co-authors:
- *      ...
- *
- */
-
-#include "Scene.h"
-
-#include <OgreRoot.h>
-#include <OgreSceneManager.h>
-#include <OgreSceneManagerEnumerator.h>
-#include <OgreSceneNode.h>
-
-#include <BulletCollision/BroadphaseCollision/btAxisSweep3.h>
-#include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h>
-#include <BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h>
-#include <BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h>
-
-#include "core/CoreIncludes.h"
-#include "core/GameMode.h"
-#include "core/GUIManager.h"
-#include "core/XMLPort.h"
-#include "tools/BulletConversions.h"
-#include "Radar.h"
-#include "worldentities/WorldEntity.h"
-#include "Level.h"
-
-namespace orxonox
-{
-    CreateFactory(Scene);
-
-    Scene::Scene(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
-    {
-        RegisterObject(Scene);
-
-        this->setScene(SmartPtr<Scene>(this, false), OBJECTID_UNKNOWN);
-        this->bShadows_ = true;
-        this->soundReferenceDistance_ = 20.0;
-
-        if (GameMode::showsGraphics())
-        {
-            assert(Ogre::Root::getSingletonPtr());
-            this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
-            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
-
-            this->radar_ = new Radar();
-        }
-        else
-        {
-            // create a dummy SceneManager of our own since we don't have Ogre::Root.
-            this->sceneManager_ = new Ogre::DefaultSceneManager("");
-            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
-
-            this->radar_ = 0;
-        }
-
-        // No physics yet, XMLPort will do that.
-        const int defaultMaxWorldSize = 100000;
-        this->negativeWorldRange_ = Vector3::UNIT_SCALE * -defaultMaxWorldSize;
-        this->positiveWorldRange_ = Vector3::UNIT_SCALE *  defaultMaxWorldSize;
-        this->gravity_ = Vector3::ZERO;
-        this->physicalWorld_   = 0;
-        this->solver_          = 0;
-        this->dispatcher_      = 0;
-        this->collisionConfig_ = 0;
-        this->broadphase_      = 0;
-
-        this->registerVariables();
-    }
-
-    Scene::~Scene()
-    {
-        if (this->isInitialized())
-        {
-            if (GameMode::showsGraphics())
-                Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
-            else
-                delete this->sceneManager_;
-
-            if (this->radar_)
-                this->radar_->destroy();
-
-            this->setPhysicalWorld(false);
-        }
-    }
-
-    void Scene::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(Scene, XMLPort, xmlelement, mode);
-
-        XMLPortParam(Scene, "skybox", setSkybox, getSkybox, xmlelement, mode);
-        XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2f, 0.2f, 0.2f, 1.0f));
-        XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true);
-        XMLPortParam(Scene, "soundReferenceDistance", setSoundReferenceDistance, getSoundReferenceDistance, xmlelement, mode);
-
-        XMLPortParam(Scene, "gravity", setGravity, getGravity, xmlelement, mode);
-        XMLPortParam(Scene, "negativeWorldRange", setNegativeWorldRange, getNegativeWorldRange, xmlelement, mode);
-        XMLPortParam(Scene, "positiveWorldRange", setPositiveWorldRange, getPositiveWorldRange, xmlelement, mode);
-        XMLPortParam(Scene, "hasPhysics", setPhysicalWorld, hasPhysics, xmlelement, mode).defaultValues(true);
-
-        XMLPortObjectExtended(Scene, BaseObject, "", addObject, getObject, xmlelement, mode, true, false);
-    }
-
-    void Scene::registerVariables()
-    {
-        registerVariable(this->skybox_,             VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
-        registerVariable(this->ambientLight_,       VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
-        registerVariable(this->negativeWorldRange_, VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_negativeWorldRange));
-        registerVariable(this->positiveWorldRange_, VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_positiveWorldRange));
-        registerVariable(this->gravity_,            VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_gravity));
-        registerVariable(this->bHasPhysics_,        VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_hasPhysics));
-        registerVariable(this->bShadows_,           VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows));
-        registerVariable(this->getLevel(),          VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::changedLevel));
-    }
-
-    void Scene::setNegativeWorldRange(const Vector3& range)
-    {
-        if (range.length() < 10.0f)
-        {
-            CCOUT(2) << "Warning: Setting the negative world range to a very small value: "
-                     << multi_cast<std::string>(range) << std::endl;
-        }
-        if (this->hasPhysics())
-        {
-            CCOUT(2) << "Warning: Attempting to set the physical world range at run time. "
-                     << "This causes a complete physical reload which might take some time." << std::endl;
-            this->setPhysicalWorld(false);
-            this->negativeWorldRange_ = range;
-            this->setPhysicalWorld(true);
-        }
-        else
-            this->negativeWorldRange_ = range;
-    }
-
-    void Scene::setPositiveWorldRange(const Vector3& range)
-    {
-        if (range.length() < 10.0f)
-        {
-            CCOUT(2) << "Warning: Setting the positive world range to a very small value: "
-                     << multi_cast<std::string>(range) << std::endl;
-        }
-        if (this->hasPhysics())
-        {
-            CCOUT(2) << "Warning: Attempting to set the physical world range at run time. "
-                     << "This causes a complete physical reload which might take some time." << std::endl;
-            this->setPhysicalWorld(false);
-            this->positiveWorldRange_ = range;
-            this->setPhysicalWorld(true);
-        }
-        else
-            this->positiveWorldRange_ = range;
-    }
-
-    void Scene::setGravity(const Vector3& gravity)
-    {
-        this->gravity_ = gravity;
-        if (this->hasPhysics())
-            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
-    }
-
-    void Scene::setPhysicalWorld(bool wantPhysics)
-    {
-        this->bHasPhysics_ = wantPhysics;
-        if (wantPhysics && !hasPhysics())
-        {
-            // Note: These are all little known default classes and values.
-            //       It would require further investigation to properly dertermine the right choices.
-            this->broadphase_      = new bt32BitAxisSweep3(
-                multi_cast<btVector3>(this->negativeWorldRange_), multi_cast<btVector3>(this->positiveWorldRange_));
-            this->collisionConfig_ = new btDefaultCollisionConfiguration();
-            this->dispatcher_      = new btCollisionDispatcher(this->collisionConfig_);
-            this->solver_          = new btSequentialImpulseConstraintSolver();
-
-            this->physicalWorld_   = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_);
-            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
-
-            // also set the collision callback variable.
-            // Note: This is a global variable which we assign a static function.
-            // TODO: Check whether this (or anything about Bullet) works with multiple physics engine instances.
-            gContactAddedCallback = &Scene::collisionCallback;
-        }
-        else if (!wantPhysics && hasPhysics())
-        {
-            // Remove all WorldEntities and shove them to the queue since they would still like to be in a physical world.
-            for (std::set<WorldEntity*>::const_iterator it = this->physicalObjects_.begin();
-                it != this->physicalObjects_.end(); ++it)
-            {
-                this->physicalWorld_->removeRigidBody((*it)->physicalBody_);
-                this->physicalObjectQueue_.insert(*it);
-            }
-            this->physicalObjects_.clear();
-
-            delete this->physicalWorld_;
-            delete this->solver_;
-            delete this->dispatcher_;
-            delete this->collisionConfig_;
-            delete this->broadphase_;
-            this->physicalWorld_   = 0;
-            this->solver_          = 0;
-            this->dispatcher_      = 0;
-            this->collisionConfig_ = 0;
-            this->broadphase_      = 0;
-        }
-    }
-
-    void Scene::tick(float dt)
-    {
-        if (!GameMode::showsGraphics())
-        {
-            // We need to update the scene nodes if we don't render
-            this->rootSceneNode_->_update(true, false);
-        }
-        if (this->hasPhysics())
-        {
-            // TODO: This here is bad practice! It will slow down the first tick() by ages.
-            //       Rather have an initialise() method as well, called by the Level after everything has been loaded.
-            if (this->physicalObjectQueue_.size() > 0)
-            {
-                // Add all scheduled WorldEntities
-                for (std::set<WorldEntity*>::const_iterator it = this->physicalObjectQueue_.begin();
-                    it != this->physicalObjectQueue_.end(); ++it)
-                {
-                    this->physicalWorld_->addRigidBody((*it)->physicalBody_);
-                    this->physicalObjects_.insert(*it);
-                }
-                this->physicalObjectQueue_.clear();
-            }
-
-            // Note: 60 means that Bullet will do physics correctly down to 1 frames per seconds.
-            //       Under that mark, the simulation will "loose time" and get unusable.
-            physicalWorld_->stepSimulation(dt, 60);
-        }
-    }
-
-    void Scene::setSkybox(const std::string& skybox)
-    {
-        if (GameMode::showsGraphics() && this->sceneManager_)
-            this->sceneManager_->setSkyBox(true, skybox);
-
-        this->skybox_ = skybox;
-    }
-
-    void Scene::setAmbientLight(const ColourValue& colour)
-    {
-        if (GameMode::showsGraphics() && this->sceneManager_)
-            this->sceneManager_->setAmbientLight(colour);
-
-        this->ambientLight_ = colour;
-    }
-
-    void Scene::setShadow(bool bShadow)
-    {
-        if (GameMode::showsGraphics() && this->sceneManager_)
-        {
-            if (bShadow)
-                this->sceneManager_->setShadowTechnique(Ogre::SHADOWTYPE_STENCIL_ADDITIVE);
-            else
-                this->sceneManager_->setShadowTechnique(Ogre::SHADOWTYPE_NONE);
-        }
-
-        this->bShadows_ = bShadow;
-    }
-
-    void Scene::addObject(BaseObject* object)
-    {
-        this->objects_.push_back(object);
-        object->setScene(this, this->getObjectID());
-    }
-
-    BaseObject* Scene::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 Scene::addPhysicalObject(WorldEntity* object)
-    {
-        if (object)
-        {
-            std::set<WorldEntity*>::iterator it = this->physicalObjects_.find(object);
-            if (it != this->physicalObjects_.end())
-                return;
-
-            this->physicalObjectQueue_.insert(object);
-        }
-    }
-
-    void Scene::removePhysicalObject(WorldEntity* object)
-    {
-        // check queue first
-        std::set<WorldEntity*>::iterator it = this->physicalObjectQueue_.find(object);
-        if (it != this->physicalObjectQueue_.end())
-        {
-            this->physicalObjectQueue_.erase(it);
-            return;
-        }
-
-        it = this->physicalObjects_.find(object);
-        if (it == this->physicalObjects_.end())
-            return;
-        this->physicalObjects_.erase(it);
-
-        if (this->hasPhysics())
-            this->physicalWorld_->removeRigidBody(object->physicalBody_);
-    }
-
-    /*static*/ bool Scene::collisionCallback(btManifoldPoint& cp, const btCollisionObject* colObj0, int partId0,
-                                             int index0, const btCollisionObject* colObj1, int partId1, int index1)
-    {
-        // get the WorldEntity pointers
-        SmartPtr<WorldEntity> object0 = static_cast<WorldEntity*>(colObj0->getUserPointer());
-        SmartPtr<WorldEntity> object1 = static_cast<WorldEntity*>(colObj1->getUserPointer());
-
-        // false means that bullet will assume we didn't modify the contact
-        bool modified = false;
-        if (object0->isCollisionCallbackActive())
-            modified |= object0->collidesAgainst(object1, cp);
-        if (object1->isCollisionCallbackActive())
-            modified |= object1->collidesAgainst(object0, cp);
-
-        return modified;
-    }
-}
Index: code/forks/sandbox_light/src/orxonox/Scene.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/Scene.h	(revision 7907)
+++ 	(revision )
@@ -1,161 +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
- *      Reto Grieder (physics)
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Scene_H__
-#define _Scene_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <list>
-#include <set>
-#include <string>
-
-#include "util/Math.h"
-#include "util/OgreForwardRefs.h"
-#include "core/BaseObject.h"
-#include "network/synchronisable/Synchronisable.h"
-#include "tools/interfaces/Tickable.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Scene : public BaseObject, public Synchronisable, public Tickable
-    {
-        public:
-            Scene(BaseObject* creator);
-            virtual ~Scene();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            void registerVariables();
-
-            inline Ogre::SceneManager* getSceneManager() const
-                { return this->sceneManager_; }
-            inline Ogre::SceneNode* getRootSceneNode() const
-                { return this->rootSceneNode_; }
-
-            void setSkybox(const std::string& skybox);
-            inline const std::string& getSkybox() const
-                { return this->skybox_; }
-
-            void setAmbientLight(const ColourValue& colour);
-            inline const ColourValue& getAmbientLight() const
-                { return this->ambientLight_; }
-
-            void setShadow(bool bShadow);
-            inline bool getShadow() const
-                { return this->bShadows_; }
-
-            inline void setSoundReferenceDistance(float distance)
-                { this->soundReferenceDistance_ = distance; }
-            inline float getSoundReferenceDistance() const
-                { return this->soundReferenceDistance_; }
-
-            inline Radar* getRadar()
-                { return this->radar_; }
-
-            inline virtual uint32_t getSceneID() const { return this->getObjectID(); }
-
-            virtual void tick(float dt);
-
-        private:
-            void addObject(BaseObject* object);
-            BaseObject* getObject(unsigned int index) const;
-
-            void networkcallback_applySkybox()
-                { this->setSkybox(this->skybox_); }
-            void networkcallback_applyAmbientLight()
-                { this->setAmbientLight(this->ambientLight_); }
-            void networkcallback_applyShadows()
-                { this->setShadow(this->bShadows_); }
-
-            Ogre::SceneManager*      sceneManager_;
-            Ogre::SceneNode*         rootSceneNode_;
-
-            std::string              skybox_;
-            ColourValue              ambientLight_;
-            std::list<BaseObject*>   objects_;
-            bool                     bShadows_;
-            float                    soundReferenceDistance_;
-            Radar*                   radar_;
-
-
-        /////////////
-        // Physics //
-        /////////////
-
-        public:
-            inline bool hasPhysics()
-                { return this->physicalWorld_ != 0; }
-            void setPhysicalWorld(bool wantsPhysics);
-
-            void setNegativeWorldRange(const Vector3& range);
-            inline const Vector3& getNegativeWorldRange() const
-                { return this->negativeWorldRange_; }
-
-            void setPositiveWorldRange(const Vector3& range);
-            inline const Vector3& getPositiveWorldRange() const
-                { return this->positiveWorldRange_; }
-
-            void setGravity(const Vector3& gravity);
-            inline const Vector3& getGravity() const
-                { return this->gravity_; }
-
-            void addPhysicalObject(WorldEntity* object);
-            void removePhysicalObject(WorldEntity* object);
-
-        private:
-            inline void networkcallback_hasPhysics()
-                { this->setPhysicalWorld(this->bHasPhysics_); }
-            inline void networkcallback_negativeWorldRange()
-                { this->setNegativeWorldRange(this->negativeWorldRange_); }
-            inline void networkcallback_positiveWorldRange()
-                { this->setPositiveWorldRange(this->positiveWorldRange_); }
-            inline void networkcallback_gravity()
-                { this->setGravity(this->gravity_); }
-
-            // collision callback from bullet
-            static bool collisionCallback(btManifoldPoint& cp, const btCollisionObject* colObj0, int partId0,
-                                          int index0, const btCollisionObject* colObj1, int partId1, int index1);
-
-            // Bullet objects
-            btDiscreteDynamicsWorld*             physicalWorld_;
-            bt32BitAxisSweep3*                   broadphase_;
-            btDefaultCollisionConfiguration*     collisionConfig_;
-            btCollisionDispatcher*               dispatcher_;
-            btSequentialImpulseConstraintSolver* solver_;
-
-            std::set<WorldEntity*>               physicalObjectQueue_;
-            std::set<WorldEntity*>               physicalObjects_;
-            bool                                 bHasPhysics_;
-            Vector3                              negativeWorldRange_;
-            Vector3                              positiveWorldRange_;
-            Vector3                              gravity_;
-    };
-}
-
-#endif /* _Scene_H__ */
Index: code/forks/sandbox_light/src/orxonox/Test.cc
===================================================================
--- code/forks/sandbox_light/src/orxonox/Test.cc	(revision 7907)
+++ 	(revision )
@@ -1,152 +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:
- *      Oli Scheuss
- *   Co-authors:
- *      ...
- *
- */
-
-#include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
-#include "core/command/ConsoleCommand.h"
-#include "network/NetworkFunction.h"
-#include "Test.h"
-#include "util/MultiType.h"
-
-namespace orxonox
-{
-    CreateFactory ( Test );
-
-    SetConsoleCommand("Test", "printV1", &Test::printV1).addShortcut();
-    SetConsoleCommand("Test", "printV2", &Test::printV2).addShortcut();
-    SetConsoleCommand("Test", "printV3", &Test::printV3).addShortcut();
-    SetConsoleCommand("Test", "printV4", &Test::printV4).addShortcut();
-    SetConsoleCommand("Test", "call",    &Test::call).addShortcut();
-    SetConsoleCommand("Test", "call2",   &Test::call2).addShortcut();
-
-
-  //void=* aaaaa = copyPtr<sizeof(&Test::printV1)>( &NETWORK_FUNCTION_POINTER, &Test::printV1 );
-  //void* NETWORK_FUNCTION_TEST_B = memcpy(&NETWORK_FUNCTION_POINTER, &a, sizeof(a));
-//   NetworkFunctionBase* NETWORK_FUNCTION_TEST_C = new NetworkFunctionStatic( createFunctor(&Test::printV1), "bla", NETWORK_FUNCTION_POINTER );
-
-    registerStaticNetworkFunction( &Test::printV1 );
-    registerMemberNetworkFunction( Test, checkU1 );
-    registerMemberNetworkFunction( Test, printBlaBla );
-
-    Test* Test::instance_ = 0;
-
-    Test::Test(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
-    {
-        assert(instance_==0);
-        instance_=this;
-        RegisterObject ( Test );
-        setConfigValues();
-        registerVariables();
-        setSyncMode(0x3);
-        this->pointer_ = 0;
-    }
-
-    Test::~Test()
-    {
-        instance_=0;
-    }
-
-    void Test::setConfigValues()
-    {
-        SetConfigValue ( u1, 1 )/*.callback ( this, &Test::checkV1 )*/;
-        SetConfigValue ( u2, 2 )/*.callback ( this, &Test::checkV2 )*/;
-        SetConfigValue ( u3, 3 )/*.callback ( this, &Test::checkV3 )*/;
-        SetConfigValue ( u4, 4 )/*.callback ( this, &Test::checkV4 )*/;
-
-        SetConfigValue ( s1, 1 )/*.callback ( this, &Test::checkV1 )*/;
-        SetConfigValue ( s2, 2 )/*.callback ( this, &Test::checkV2 )*/;
-        SetConfigValue ( s3, 3 )/*.callback ( this, &Test::checkV3 )*/;
-        SetConfigValue ( s4, 4 )/*.callback ( this, &Test::checkV4 )*/;
-    }
-
-
-    void Test::registerVariables()
-    {
-        registerVariable ( this->mySet_, VariableDirection::ToClient );
-
-//         registerVariable ( u1, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::checkU1 ));
-//         registerVariable ( u2, VariableDirection::ToServer, new NetworkCallback<Test> ( this, &Test::checkU2 ));
-//         registerVariable ( u3, Bidirectionality::ServerMaster, new NetworkCallback<Test> ( this, &Test::checkU3 ), true );
-//         registerVariable ( u4, Bidirectionality::ClientMaster, new NetworkCallback<Test> ( this, &Test::checkU4 ), true );
-
-//         registerVariable ( s1, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::checkS1 ));
-//         registerVariable ( s2, VariableDirection::ToServer, new NetworkCallback<Test> ( this, &Test::checkS2 ));
-//         registerVariable ( s3, Bidirectionality::ServerMaster, new NetworkCallback<Test> ( this, &Test::checkS3 ), true );
-//         registerVariable ( s4, Bidirectionality::ClientMaster, new NetworkCallback<Test> ( this, &Test::checkS4 ), true );
-
-//         registerVariable ( pointer_, VariableDirection::ToClient, new NetworkCallback<Test> ( this, &Test::printPointer ) );
-    }
-
-  void Test::call(unsigned int clientID)
-    {
-        callStaticNetworkFunction( &Test::printV1, clientID );
-        callStaticNetworkFunction( &Test::printV1, clientID );
-    }
-
-    void Test::call2(unsigned int clientID, std::string s1, std::string s2, std::string s3, std::string s4)
-    {
-        callMemberNetworkFunction( Test, printBlaBla, this->getObjectID(), clientID, s1, s2, s3, s4, s4 );
-    }
-
-    void Test::tick(float dt)
-    {
-    //     std::string str1 = "blub";
-    //     //MultiType mt1(std::string("blub"));
-    //     MultiType mt1(str1);
-    //     uint8_t* mem = new uint8_t[mt1.getNetworkSize()];
-    //     uint8_t* temp = mem;
-    //     mt1.exportData( temp );
-    //     assert( temp-mem == mt1.getNetworkSize() );
-    //     MultiType mt2;
-    //     temp = mem;
-    //     mt2.importData( temp );
-    //     assert( temp-mem == mt1.getNetworkSize() );
-    //     COUT(0) << mt2 << endl;
-    //     if(!Core::isMaster())
-    //       call2(0, "bal", "a", "n", "ce");
-    //       callMemberNetworkFunction( Test, checkU1, this->getObjectID(), 0 );
-    }
-
-    void Test::printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5)
-    {
-        COUT(0) << s1 << s2 << s3 << s4 << s5 << endl;
-    }
-
-    void Test::checkU1(){ COUT(1) << "U1 changed: " << u1 << std::endl; }
-    void Test::checkU2(){ COUT(1) << "U2 changed: " << u2 << std::endl; }
-    void Test::checkU3(){ COUT(1) << "U3 changed: " << u3 << std::endl; }
-    void Test::checkU4(){ COUT(1) << "U4 changed: " << u4 << std::endl; }
-
-    void Test::checkS1(){ COUT(1) << "S1 changed: " << s1 << std::endl; }
-    void Test::checkS2(){ COUT(1) << "S2 changed: " << s2 << std::endl; }
-    void Test::checkS3(){ COUT(1) << "S3 changed: " << s3 << std::endl; }
-    void Test::checkS4(){ COUT(1) << "S4 changed: " << s4 << std::endl; }
-
-    void Test::printPointer(){ CCOUT(1) << "pointer: " << this->pointer_ << endl; }
-
-}
Index: code/forks/sandbox_light/src/orxonox/Test.h
===================================================================
--- code/forks/sandbox_light/src/orxonox/Test.h	(revision 7907)
+++ 	(revision )
@@ -1,114 +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:
- *      Oli Scheuss
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Test_H__
-#define _Test_H__
-
-#include "OrxonoxPrereqs.h"
-#include "core/BaseObject.h"
-#include "network/synchronisable/Synchronisable.h"
-#include "tools/interfaces/Tickable.h"
-
-#include <set>
-
-typedef int TYPE;
-typedef unsigned int UTYPE;
-
-
-namespace orxonox
-{
-  class _OrxonoxExport Test: public BaseObject, public Synchronisable, public Tickable
-  {
-    public:
-      Test(BaseObject* creator);
-      virtual ~Test();
-
-      void setConfigValues();
-
-      static void call(unsigned int clientID);
-      void call2(unsigned int clientID, std::string s1, std::string s2, std::string s3, std::string s4);
-      virtual void tick(float dt);
-
-
-      //unsigned functions
-      void setU1(UTYPE value){ u1 = value; }
-      void setU2(UTYPE value){ u2 = value; }
-      void setU3(UTYPE value){ u3 = value; }
-      void setU4(UTYPE value){ u4 = value; }
-      void checkU1();
-      void checkU2();
-      void checkU3();
-      void checkU4();
-
-      //signed functions
-      void setS1(TYPE value){ s1 = value; }
-      void setS2(TYPE value){ s2 = value; }
-      void setS3(TYPE value){ s3 = value; }
-      void setS4(TYPE value){ s4 = value; }
-      void checkS1();
-      void checkS2();
-      void checkS3();
-      void checkS4();
-
-      void printPointer();
-
-      static void printV1(){ instance_->blub(); }
-      static void printV2(){ instance_->blub2(); }
-      static void printV3(){ instance_->checkU3(); }
-      static void printV4(){ instance_->checkU4(); }
-
-      void printBlaBla(std::string s1, std::string s2, std::string s3, std::string s4, std::string s5);
-
-    private:
-      void registerVariables();
-
-      UTYPE u1;
-      UTYPE u2;
-      UTYPE u3;
-      UTYPE u4;
-
-      TYPE s1;
-      TYPE s2;
-      TYPE s3;
-      TYPE s4;
-
-      Test* pointer_;
-      
-      std::set<uint32_t> mySet_;
-
-      static Test* instance_;
-      
-      void blub()
-      { mySet_.insert(2); }
-      
-      void blub2()
-      { for( std::set<uint32_t>::iterator it=mySet_.begin(); it!=mySet_.end(); ++it ) COUT(0) << *it << endl; }
-  };
-}
-
-#endif /* _Test_H__ */
