Index: code/trunk/src/modules/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/CMakeLists.txt	(revision 5774)
+++ code/trunk/src/modules/CMakeLists.txt	(revision 5781)
@@ -26,2 +26,9 @@
 
 ################ Sub Directories ################
+
+ADD_SUBDIRECTORY(gamestates)
+ADD_SUBDIRECTORY(objects)
+ADD_SUBDIRECTORY(overlays)
+ADD_SUBDIRECTORY(pong)
+ADD_SUBDIRECTORY(questsystem)
+ADD_SUBDIRECTORY(weapons)
Index: code/trunk/src/modules/gamestates/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/gamestates/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/gamestates/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,23 @@
+SET_SOURCE_FILES(GAMESTATES_SRC_FILES
+  GSClient.cc
+  GSDedicated.cc
+  GSGraphics.cc
+  GSIOConsole.cc
+  GSLevel.cc
+  GSMainMenu.cc
+  GSRoot.cc
+  GSServer.cc
+  GSStandalone.cc
+)
+
+ORXONOX_ADD_LIBRARY(gamestates
+  MODULE
+  FIND_HEADER_FILES
+  PCH_FILE
+    GameStatesPrecompiledHeaders.h
+  DEFINE_SYMBOL
+    "GAMESTATES_SHARED_BUILD"
+  LINK_LIBRARIES
+    orxonox
+  SOURCE_FILES ${GAMESTATES_SRC_FILES}
+)
Index: code/trunk/src/modules/gamestates/GSClient.cc
===================================================================
--- code/trunk/src/modules/gamestates/GSClient.cc	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSClient.cc	(revision 5781)
@@ -0,0 +1,80 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+#include "GSClient.h"
+
+#include "util/Exception.h"
+#include "core/Clock.h"
+#include "core/CommandLine.h"
+#include "core/Game.h"
+#include "core/GameMode.h"
+#include "network/Client.h"
+
+namespace orxonox
+{
+    DeclareGameState(GSClient, "client", false, true);
+
+    SetCommandLineArgument(ip, "127.0.0.1").information("Sever IP as string in the form #.#.#.#");
+
+    GSClient::GSClient(const GameStateInfo& info)
+        : GameState(info)
+        , client_(0)
+    {
+    }
+
+    GSClient::~GSClient()
+    {
+    }
+
+    void GSClient::activate()
+    {
+        GameMode::setIsClient(true);
+
+        this->client_ = new Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port"));
+
+        if(!client_->establishConnection())
+            ThrowException(InitialisationFailed, "Could not establish connection with server.");
+
+        client_->update(Game::getInstance().getGameClock());
+    }
+
+    void GSClient::deactivate()
+    {
+        client_->closeConnection();
+
+        // destroy client
+        delete this->client_;
+
+        GameMode::setIsClient(false);
+    }
+
+    void GSClient::update(const Clock& time)
+    {
+        client_->update(time);
+    }
+}
Index: code/trunk/src/modules/gamestates/GSClient.h
===================================================================
--- code/trunk/src/modules/gamestates/GSClient.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSClient.h	(revision 5781)
@@ -0,0 +1,54 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _GSClient_H__
+#define _GSClient_H__
+
+#include "gamestates/GameStatesPrereqs.h"
+
+#include "core/GameState.h"
+#include "network/NetworkPrereqs.h"
+
+namespace orxonox
+{
+    class _GameStatesExport GSClient : public GameState
+    {
+    public:
+        GSClient(const GameStateInfo& info);
+        ~GSClient();
+
+        void activate();
+        void deactivate();
+        void update(const Clock& time);
+
+    private:
+        Client* client_;
+    };
+}
+
+#endif /* _GSClient_H__ */
Index: code/trunk/src/modules/gamestates/GSDedicated.cc
===================================================================
--- code/trunk/src/modules/gamestates/GSDedicated.cc	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSDedicated.cc	(revision 5781)
@@ -0,0 +1,301 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+#include "GSDedicated.h"
+
+#include <iomanip>
+#include <iostream>
+#include <boost/bind.hpp>
+
+#include "util/Debug.h"
+#include "util/Sleep.h"
+#include "core/Clock.h"
+#include "core/CommandLine.h"
+#include "core/CommandExecutor.h"
+#include "core/Game.h"
+#include "core/GameMode.h"
+#include "network/Server.h"
+
+#ifdef ORXONOX_PLATFORM_UNIX
+#include <termios.h>
+#endif
+
+
+namespace orxonox
+{
+    const unsigned int MAX_COMMAND_LENGTH = 255;
+    
+    DeclareGameState(GSDedicated, "dedicated", false, false);
+    
+    termios* GSDedicated::originalTerminalSettings_;
+
+    GSDedicated::GSDedicated(const GameStateInfo& info)
+        : GameState(info)
+        , server_(0)
+        , closeThread_(false)
+        , cleanLine_(true)
+        , inputIterator_(0)
+        , cursorX_(0)
+        , cursorY_(0)
+    {
+    }
+
+    GSDedicated::~GSDedicated()
+    {
+    }
+
+    void GSDedicated::activate()
+    {
+        GameMode::setHasServer(true);
+        
+        this->inputThread_ = new boost::thread(boost::bind(&GSDedicated::inputThread, this));
+        
+#ifndef ORXONOX_PLATFORM_WINDOWS
+        this->originalTerminalSettings_ = new termios;
+        this->setTerminalMode();
+#endif
+
+        this->server_ = new Server(CommandLine::getValue("port"));
+        COUT(0) << "Loading scene in server mode" << std::endl;
+
+        server_->open();
+    }
+
+    void GSDedicated::deactivate()
+    {
+        this->server_->close();
+        delete this->server_;
+        
+        closeThread_ = true;
+#ifdef ORXONOX_PLATFORM_UNIX
+        std::cout << "\033[0G\033[K";
+        std::cout.flush();
+        resetTerminalMode();
+        delete this->originalTerminalSettings_;
+#else
+        COUT(0) << "Press enter to end the game..." << std::endl;
+#endif
+        inputThread_->join();
+        delete this->inputThread_;
+
+        GameMode::setHasServer(false);
+    }
+
+    void GSDedicated::update(const Clock& time)
+    {
+        server_->update(time);
+        processQueue();
+        printLine();
+    }
+    
+    void GSDedicated::inputThread()
+    {
+        this->commandLine_ = new unsigned char[MAX_COMMAND_LENGTH];
+//         memset( this->commandLine_, 0, MAX_COMMAND_LENGTH );
+        unsigned char c;
+        unsigned int  escapeChar=0;
+        while(!closeThread_)
+        {
+#ifdef ORXONOX_PLATFORM_UNIX
+            size_t count = read(STDIN_FILENO, &c, 1);
+            if (count == 1)
+#else
+            c = getchar();
+#endif
+            {
+//                 boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
+                if ( inputIterator_>=MAX_COMMAND_LENGTH-1 && c!='\n' )
+                    continue;
+                if( escapeChar > 0 )
+                {
+                    if( c == '[' )
+                    {
+                        escapeChar = 2;
+                        continue;
+                    }
+                    else if ( escapeChar == 2 )
+                    {
+                        switch (c)
+                        {
+                            case 'A': //keyup
+                                
+                                break;
+                            case 'B': //keydown
+                                
+                                break;
+                            case 'C': //keyright
+                                if(cursorX_<inputIterator_)
+                                    ++cursorX_;
+                                break;
+                            case 'D': //keyleft
+                                if(cursorX_>0)
+                                    --cursorX_;
+                                break;
+                            default: //not supported...
+//                                 std::cout << endl << c << endl;
+                                break;
+                        }
+                        escapeChar = 0;
+                    }
+                }
+                else // not in escape sequence mode
+                {
+                    switch (c)
+                    {
+                        case '\n':
+                            this->cleanLine_ = true;
+                            {
+                                boost::recursive_mutex::scoped_lock(this->inputQueueMutex_);
+                                boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
+                                this->commandQueue_.push( std::string((const char*)this->commandLine_,inputIterator_) );
+                            }
+                            memset( this->commandLine_, 0, inputIterator_ );
+                            inputIterator_ = 0;
+                            this->cursorX_ = 0;
+                            this->cursorY_ = 0;
+                            std::cout << endl;
+                            break;
+                        case 127: // backspace
+                        case '\b':
+                            deleteCharacter( this->cursorX_ );
+                            break;
+                        case '\t':
+                        {
+//                             boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
+                            std::cout << endl << CommandExecutor::hint( std::string((const char*)this->commandLine_,inputIterator_) ) << endl;
+                            strncpy(reinterpret_cast<char*>(this->commandLine_), CommandExecutor::complete( std::string(reinterpret_cast<char*>(this->commandLine_),inputIterator_) ).c_str(), MAX_COMMAND_LENGTH);
+                            this->inputIterator_ = strlen((const char*)this->commandLine_);
+                            this->cursorX_ = this->inputIterator_;
+                            break;
+                        }
+                        case '\033': // 1. escape character
+                            escapeChar = 1;
+                            break;
+                        default:
+                            insertCharacter( this->cursorX_, c );
+                            break;
+                    }
+                }
+            }
+        }
+
+        delete[] this->commandLine_;
+    }
+    
+    void GSDedicated::printLine()
+    {
+#ifdef ORXONOX_PLATFORM_UNIX
+        // set cursor to the begining of the line and erase the line
+        std::cout << "\033[0G\033[K";
+//         boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
+        // print status line
+        std::cout << std::fixed << std::setprecision(2) << std::setw(5) << Game::getInstance().getAvgFPS() << " fps, " << std::setprecision(2) << std::setw(5) << Game::getInstance().getAvgTickTime() << " ms avg ticktime # ";
+        //save cursor position
+        std::cout << "\033[s";
+        //print commandLine buffer
+        std::cout << std::string((const char*)this->commandLine_, inputIterator_);
+        //restore cursor position and move it cursorX_ to the right
+        std::cout << "\033[u";
+        if( this->cursorX_ > 0 )
+            std::cout << "\033[" << this->cursorX_ << "C";
+        std::cout.flush();
+#endif
+    }
+    
+    void GSDedicated::processQueue()
+    {
+        std::string tempstr;
+        {
+            boost::recursive_mutex::scoped_lock lock1(this->inputQueueMutex_);
+            while(true)
+            {
+                if ( !this->commandQueue_.empty() )
+                {
+                    tempstr = this->commandQueue_.front();
+                    this->commandQueue_.pop();
+                    lock1.unlock();
+                }
+                else
+                    break;
+                CommandExecutor::execute(tempstr, true);
+            }
+        }
+    }
+    
+    void GSDedicated::setTerminalMode()
+    {
+#ifdef ORXONOX_PLATFORM_UNIX
+        termios new_settings;
+     
+        tcgetattr(0,this->originalTerminalSettings_);
+        new_settings = *this->originalTerminalSettings_;
+        new_settings.c_lflag &= ~( ICANON | ECHO );
+//         new_settings.c_lflag |= ( ISIG | IEXTEN );
+        new_settings.c_cc[VTIME] = 1;
+        new_settings.c_cc[VMIN] = 0;
+        tcsetattr(0,TCSANOW,&new_settings);
+        COUT(0) << endl;
+//       atexit(&GSDedicated::resetTerminalMode);
+#endif
+    }
+    
+    void GSDedicated::resetTerminalMode()
+    {
+#ifdef ORXONOX_PLATFORM_UNIX
+        tcsetattr(0, TCSANOW, GSDedicated::originalTerminalSettings_);
+#endif
+    }
+    
+    void GSDedicated::insertCharacter( unsigned int position, char c )
+    {
+//         std::cout << endl << static_cast<unsigned int>(c) << endl;
+        // check that we do not exceed MAX_COMMAND_LENGTH
+        if( inputIterator_+1 < MAX_COMMAND_LENGTH )
+        {
+            // if cursor not at end of line then move the rest of the line
+            if( position != this->inputIterator_ )
+                    memmove( this->commandLine_+position+1, this->commandLine_+position, this->inputIterator_-position);
+//             boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
+            this->commandLine_[position] = c;
+            ++this->cursorX_;
+            ++this->inputIterator_;
+        }
+    }
+    void GSDedicated::deleteCharacter( unsigned int position )
+    {
+//         boost::recursive_mutex::scoped_lock(this->inputLineMutex_);
+        if ( this->inputIterator_>0 && position>0 )
+        {
+            if ( position != this->inputIterator_ )
+                memmove( this->commandLine_+position-1, this->commandLine_+position, this->inputIterator_-position);
+            --this->cursorX_;
+            --this->inputIterator_;
+        }
+    }
+    
+}
Index: code/trunk/src/modules/gamestates/GSDedicated.h
===================================================================
--- code/trunk/src/modules/gamestates/GSDedicated.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSDedicated.h	(revision 5781)
@@ -0,0 +1,84 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _GSDedicated_H__
+#define _GSDedicated_H__
+
+#include "gamestates/GameStatesPrereqs.h"
+
+#include "core/GameState.h"
+#include "network/NetworkPrereqs.h"
+#include <queue>
+#include <cstring>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/recursive_mutex.hpp>
+
+struct termios;
+
+namespace orxonox
+{
+
+    class _GameStatesExport GSDedicated : public GameState
+    {
+    public:
+        GSDedicated(const GameStateInfo& info);
+        ~GSDedicated();
+
+        void activate();
+        void deactivate();
+        void update(const Clock& time);
+
+    private:
+        void inputThread();
+        void printLine();
+        void processQueue();
+        void setTerminalMode();
+        static void resetTerminalMode();
+
+        void insertCharacter( unsigned int position, char c );
+        void deleteCharacter( unsigned int position );
+
+        Server*                 server_;
+
+        boost::thread           *inputThread_;
+        boost::recursive_mutex  inputLineMutex_;
+        boost::recursive_mutex  inputQueueMutex_;
+        bool                    closeThread_;
+        bool                    cleanLine_;
+        unsigned char*          commandLine_;
+        unsigned int            inputIterator_;
+        std::queue<std::string> commandQueue_;
+        static termios*         originalTerminalSettings_;
+
+        unsigned int            cursorX_;
+        unsigned int            cursorY_;
+    };
+}
+
+#endif /* _GSDedicated_H__ */
Index: code/trunk/src/modules/gamestates/GSGraphics.cc
===================================================================
--- code/trunk/src/modules/gamestates/GSGraphics.cc	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSGraphics.cc	(revision 5781)
@@ -0,0 +1,178 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *
+ */
+
+/**
+@file
+@brief
+    Implementation of Graphics GameState class.
+ */
+
+#include "GSGraphics.h"
+
+#include "util/Convert.h"
+#include "core/Clock.h"
+#include "core/CommandExecutor.h"
+#include "core/ConsoleCommand.h"
+#include "core/Core.h"
+#include "core/Game.h"
+#include "core/GUIManager.h"
+#include "core/input/InputManager.h"
+#include "core/input/KeyBinder.h"
+#include "core/input/InputState.h"
+#include "core/Loader.h"
+#include "core/XMLFile.h"
+#include "overlays/InGameConsole.h"
+#include "sound/SoundManager.h"
+
+// HACK:
+#include "overlays/Map.h"
+
+namespace orxonox
+{
+    DeclareGameState(GSGraphics, "graphics", false, true);
+
+    GSGraphics::GSGraphics(const GameStateInfo& info)
+        : GameState(info)
+        , console_(0)
+        , soundManager_(0)
+        , masterKeyBinder_(0)
+        , masterInputState_(0)
+        , debugOverlay_(0)
+    {
+        // load master key bindings
+        masterInputState_ = InputManager::getInstance().createInputState("master", true);
+        masterKeyBinder_ = new KeyBinder();
+        masterInputState_->setKeyHandler(masterKeyBinder_);
+    }
+
+    GSGraphics::~GSGraphics()
+    {
+        InputManager::getInstance().destroyState("master");
+        delete this->masterKeyBinder_;
+    }
+
+    /**
+    @brief
+        This function is called when we enter this game state.
+
+        Since graphics is very important for our game this function does quite a lot:
+        \li starts graphics manager
+        \li loads debug overlay
+        \li manages render window
+        \li creates input manager
+        \li loads master key bindings
+        \li loads the SoundManager
+        \li loads ingame console
+        \li loads GUI interface (GUIManager)
+        \li creates console command to toggle GUI
+    */
+    void GSGraphics::activate()
+    {
+        // load debug overlay
+        COUT(3) << "Loading Debug Overlay..." << std::endl;
+        this->debugOverlay_ = new XMLFile("debug.oxo");
+        Loader::open(debugOverlay_);
+
+        masterKeyBinder_->loadBindings("masterKeybindings.ini");
+
+        // Load the SoundManager
+        soundManager_ = new SoundManager();
+
+        // Load the InGameConsole
+        console_ = new InGameConsole();
+        console_->initialise();
+
+        // add console command to toggle GUI
+        FunctorMember<GSGraphics>* functor = createFunctor(&GSGraphics::toggleGUI);
+        functor->setObject(this);
+        this->ccToggleGUI_ = createConsoleCommand(functor, "toggleGUI");
+        CommandExecutor::addConsoleCommandShortcut(this->ccToggleGUI_);
+
+        // enable master input
+        InputManager::getInstance().enterState("master");
+    }
+
+    /**
+    @brief
+        This function is called when the game state is left
+
+        Created references, input states and console commands are deleted.
+    */
+    void GSGraphics::deactivate()
+    {
+/*
+        if (this->ccToggleGUI_)
+        {
+            delete this->ccToggleGUI_;
+            this->ccToggleGUI_ = 0;
+        }
+*/
+
+        delete this->console_;
+
+        Loader::unload(this->debugOverlay_);
+        delete this->debugOverlay_;
+
+        delete this->soundManager_;
+
+        // HACK: (destroys a resource smart pointer)
+        Map::hackDestroyMap();
+    }
+
+    /**
+    @brief
+        Toggles the visibility of the current GUI
+
+        This function just executes a Lua function in the main script of the GUI by accessing the GUIManager.
+        For more details on this function check out the Lua code.
+    */
+    void GSGraphics::toggleGUI()
+    {
+        GUIManager::getInstance().executeCode("toggleGUI()");
+    }
+
+    /**
+    @note
+        A note about the Ogre::FrameListener: Even though we don't use them,
+        they still get called. However, the delta times are not correct (except
+        for timeSinceLastFrame, which is the most important). A little research
+        as shown that there is probably only one FrameListener that doesn't even
+        need the time. So we shouldn't run into problems.
+    */
+    void GSGraphics::update(const Clock& time)
+    {
+        if (this->getActivity().topState)
+        {
+            // This state can not 'survive' on its own.
+            // Load a user interface therefore
+            Game::getInstance().requestState("mainMenu");
+        }
+
+        this->console_->update(time);
+    }
+}
Index: code/trunk/src/modules/gamestates/GSGraphics.h
===================================================================
--- code/trunk/src/modules/gamestates/GSGraphics.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSGraphics.h	(revision 5781)
@@ -0,0 +1,73 @@
+/*
+ *   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:
+ *      Benjamin Knecht (documentation)
+ *
+ */
+
+/**
+@file
+@brief
+    Declaration of the Graphics GameState class.
+*/
+
+#ifndef _GSGraphics_H__
+#define _GSGraphics_H__
+
+#include "gamestates/GameStatesPrereqs.h"
+#include "core/GameState.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Game state used when displaying graphics of any kind. Another blubb resides here.
+
+        This game state is only left out if we start a dedicated server where no graphics are present.
+    */
+    class _GameStatesExport GSGraphics : public GameState
+    {
+    public:
+        GSGraphics(const GameStateInfo& info);
+        ~GSGraphics();
+
+        void activate();
+        void deactivate();
+        void update(const Clock& time);
+
+        void toggleGUI();
+
+    private:
+        // managed singletons
+        InGameConsole*        console_;
+        SoundManager*         soundManager_;        //!< Keeps track of SoundBase objects
+
+        KeyBinder*            masterKeyBinder_;     //!< Key binder for master key bindings
+        InputState*           masterInputState_;    //!< Special input state for master input
+        XMLFile*              debugOverlay_;
+        ConsoleCommand*       ccToggleGUI_;         //!< Console command to toggle GUI
+    };
+}
+
+#endif /* _GSGraphics_H__ */
Index: code/trunk/src/modules/gamestates/GSIOConsole.cc
===================================================================
--- code/trunk/src/modules/gamestates/GSIOConsole.cc	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSIOConsole.cc	(revision 5781)
@@ -0,0 +1,83 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "GSIOConsole.h"
+
+#include <iostream>
+
+#include "core/ConsoleCommand.h"
+#include "core/Game.h"
+
+namespace orxonox
+{
+    DeclareGameState(GSIOConsole, "ioConsole", false, false);
+
+    GSIOConsole::GSIOConsole(const GameStateInfo& info)
+        : GameState(info)
+    {
+    }
+
+    GSIOConsole::~GSIOConsole()
+    {
+    }
+
+    void GSIOConsole::activate()
+    {
+        {
+            FunctorMember<GSIOConsole>* functor = createFunctor(&GSIOConsole::loadMenu);
+            functor->setObject(this);
+            this->ccLoadMenu_ = createConsoleCommand(functor, "loadMenu");
+            CommandExecutor::addConsoleCommandShortcut(this->ccLoadMenu_);
+        }
+    }
+
+    void GSIOConsole::deactivate()
+    {
+/*
+        if (this->ccLoadMenu_)
+        {
+            delete this->ccLoadMenu_;
+            this->ccLoadMenu_ = 0;
+        }
+*/
+    }
+
+    void GSIOConsole::update(const Clock& time)
+    {
+        std::cout << ">";
+        std::string command;
+        std::getline(std::cin, command);
+        CommandExecutor::execute(command, true);
+    }
+
+    void GSIOConsole::loadMenu()
+    {
+        Game::getInstance().popState();
+        Game::getInstance().requestStates("graphics, mainMenu");
+    }
+}
Index: code/trunk/src/modules/gamestates/GSIOConsole.h
===================================================================
--- code/trunk/src/modules/gamestates/GSIOConsole.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSIOConsole.h	(revision 5781)
@@ -0,0 +1,55 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _GSIOConsole_H__
+#define _GSIOConsole_H__
+
+#include "gamestates/GameStatesPrereqs.h"
+#include "core/GameState.h"
+
+namespace orxonox
+{
+    class _GameStatesExport GSIOConsole : public GameState
+    {
+    public:
+        GSIOConsole(const GameStateInfo& info);
+        ~GSIOConsole();
+
+        void activate();
+        void deactivate();
+        void update(const Clock& time);
+
+    private:
+        void loadMenu();
+
+        // console commands
+        ConsoleCommand* ccLoadMenu_;
+    };
+}
+
+#endif /* _GSIOConsole_H__ */
Index: code/trunk/src/modules/gamestates/GSLevel.cc
===================================================================
--- code/trunk/src/modules/gamestates/GSLevel.cc	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSLevel.cc	(revision 5781)
@@ -0,0 +1,307 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *      Benjamin Knecht
+ *
+ */
+
+#include "GSLevel.h"
+
+#include <OgreCompositorManager.h>
+
+#include "core/input/InputManager.h"
+#include "core/input/InputState.h"
+#include "core/input/KeyBinder.h"
+#include "core/Clock.h"
+#include "core/ConsoleCommand.h"
+#include "core/ConfigValueIncludes.h"
+#include "core/CoreIncludes.h"
+#include "core/Game.h"
+#include "core/GameMode.h"
+#include "core/Core.h"
+#include "core/GraphicsManager.h"
+#include "core/GUIManager.h"
+#include "core/Loader.h"
+#include "core/XMLFile.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "Radar.h"
+#include "CameraManager.h"
+#include "LevelManager.h"
+#include "PlayerManager.h"
+
+namespace orxonox
+{
+    DeclareGameState(GSLevel, "level", false, false);
+    SetConsoleCommand(GSLevel, showIngameGUI, true);
+
+    XMLFile* GSLevel::startFile_s = NULL;
+
+    GSLevel::GSLevel(const GameStateInfo& info)
+        : GameState(info)
+        , keyBinder_(0)
+        , gameInputState_(0)
+        , guiMouseOnlyInputState_(0)
+        , guiKeysOnlyInputState_(0)
+        , radar_(0)
+        , cameraManager_(0)
+    {
+        RegisterObject(GSLevel);
+
+        this->ccKeybind_ = 0;
+        this->ccTkeybind_ = 0;
+    }
+
+    GSLevel::~GSLevel()
+    {
+    }
+
+    void GSLevel::setConfigValues()
+    {
+        SetConfigValue(keyDetectorCallbackCode_, "KeybindBindingStringKeyName=");
+    }
+
+    void GSLevel::activate()
+    {
+        setConfigValues();
+
+        if (GameMode::showsGraphics())
+        {
+            gameInputState_ = InputManager::getInstance().createInputState("game");
+            keyBinder_ = new KeyBinder();
+            keyBinder_->loadBindings("keybindings.ini");
+            gameInputState_->setHandler(keyBinder_);
+
+            guiMouseOnlyInputState_ = InputManager::getInstance().createInputState("guiMouseOnly");
+            guiMouseOnlyInputState_->setMouseHandler(GUIManager::getInstancePtr());
+
+            guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly");
+            guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr());
+
+            // create the global CameraManager
+            this->cameraManager_ = new CameraManager(GraphicsManager::getInstance().getViewport());
+
+            // Start the Radar
+            this->radar_ = new Radar();
+        }
+
+        this->playerManager_ = new PlayerManager();
+
+        this->scope_GSLevel_ = new Scope<ScopeID::GSLevel>();
+
+        if (GameMode::isMaster())
+        {
+            this->loadLevel();
+        }
+
+        if (GameMode::showsGraphics())
+        {
+            // keybind console command
+            FunctorMember<GSLevel>* functor1 = createFunctor(&GSLevel::keybind);
+            functor1->setObject(this);
+            ccKeybind_ = createConsoleCommand(functor1, "keybind");
+            CommandExecutor::addConsoleCommandShortcut(ccKeybind_);
+            FunctorMember<GSLevel>* functor2 = createFunctor(&GSLevel::tkeybind);
+            functor2->setObject(this);
+            ccTkeybind_ = createConsoleCommand(functor2, "tkeybind");
+            CommandExecutor::addConsoleCommandShortcut(ccTkeybind_);
+            // set our console command as callback for the key detector
+            InputManager::getInstance().setKeyDetectorCallback(std::string("keybind ") + keyDetectorCallbackCode_);
+
+            // level is loaded: we can start capturing the input
+            InputManager::getInstance().enterState("game");
+        }
+    }
+
+    void GSLevel::showIngameGUI(bool show)
+    {
+        if (show)
+        {
+            GUIManager::getInstance().showGUI("inGameTest");
+            GUIManager::getInstance().executeCode("showCursor()");
+            InputManager::getInstance().enterState("guiMouseOnly");
+        }
+        else
+        {
+            GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");
+            GUIManager::getInstance().executeCode("hideCursor()");
+            InputManager::getInstance().leaveState("guiMouseOnly");
+        }
+    }
+
+    void GSLevel::deactivate()
+    {
+/*
+        // destroy console commands
+        if (this->ccKeybind_)
+        {
+            delete this->ccKeybind_;
+            this->ccKeybind_ = 0;
+        }
+        if (this->ccTkeybind_)
+        {
+            delete this->ccTkeybind_;
+            this->ccTkeybind_ = 0;
+        }
+*/
+
+        if (GameMode::showsGraphics())
+        {
+            // unload all compositors (this is only necessary because we don't yet destroy all resources!)
+            Ogre::CompositorManager::getSingleton().removeAll();
+        }
+
+        // this call will delete every BaseObject!
+        // But currently this will call methods of objects that exist no more
+        // The only 'memory leak' is the ParticleSpawer. They would be deleted here
+        // and call a sceneNode method that has already been destroy by the corresponding space ship.
+        //Loader::close();
+
+        if (GameMode::showsGraphics())
+            InputManager::getInstance().leaveState("game");
+
+        if (GameMode::isMaster())
+            this->unloadLevel();
+
+        if (this->radar_)
+        {
+            delete this->radar_;
+            this->radar_ = 0;
+        }
+
+        if (this->cameraManager_)
+        {
+            delete this->cameraManager_;
+            this->cameraManager_ = 0;
+        }
+
+        if (this->playerManager_)
+        {
+            delete this->playerManager_;
+            this->playerManager_ = 0;
+        }
+
+        if (this->scope_GSLevel_)
+        {
+            delete this->scope_GSLevel_;
+            this->scope_GSLevel_ = NULL;
+        }
+
+        if (GameMode::showsGraphics())
+        {
+            gameInputState_->setHandler(0);
+            guiMouseOnlyInputState_->setHandler(0);
+            guiKeysOnlyInputState_->setHandler(0);
+            InputManager::getInstance().destroyState("game");
+            if (this->keyBinder_)
+            {
+                delete this->keyBinder_;
+                this->keyBinder_ = 0;
+            }
+        }
+    }
+
+    void GSLevel::update(const Clock& time)
+    {
+        // Note: Temporarily moved to GSGraphics.
+        //// Call the scene objects
+        //for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; ++it)
+        //    it->tick(time.getDeltaTime() * this->timeFactor_);
+    }
+
+    void GSLevel::loadLevel()
+    {
+        // call the loader
+        COUT(0) << "Loading level..." << std::endl;
+        startFile_s = new XMLFile(LevelManager::getInstance().getDefaultLevel());
+        Loader::open(startFile_s);
+    }
+
+    void GSLevel::unloadLevel()
+    {
+        //////////////////////////////////////////////////////////////////////////////////////////
+        // TODO // TODO // TODO // TODO // TODO // TODO // TODO // TODO // TODO // TODO // TODO //
+        //////////////////////////////////////////////////////////////////////////////////////////
+        // Loader::unload(startFile_); // TODO: REACTIVATE THIS IF LOADER::UNLOAD WORKS PROPERLY /
+        //////////////////////////////////////////////////////////////////////////////////////////
+
+        delete startFile_s;
+    }
+
+    void GSLevel::keybind(const std::string &command)
+    {
+        this->keybindInternal(command, false);
+    }
+
+    void GSLevel::tkeybind(const std::string &command)
+    {
+        this->keybindInternal(command, true);
+    }
+
+    /**
+    @brief
+        Assigns a command string to a key/button/axis. The name is determined via KeyDetector.
+    @param command
+        Command string that can be executed by the CommandExecutor
+        OR: Internal string "KeybindBindingStringKeyName=" used for the second call to identify
+        the key/button/axis that has been activated. This is configured above in activate().
+    */
+    void GSLevel::keybindInternal(const std::string& command, bool bTemporary)
+    {
+        if (GameMode::showsGraphics())
+        {
+            static std::string bindingString = "";
+            static bool bTemporarySaved = false;
+            static bool bound = true;
+            // note: We use a long name to make 'sure' that the user doesn't use it accidentally.
+            // Howerver there will be no real issue if it happens anyway.
+            if (command.find(keyDetectorCallbackCode_) != 0)
+            {
+                if (bound)
+                {
+                    COUT(0) << "Press any button/key or move a mouse/joystick axis" << std::endl;
+                    InputManager::getInstance().enterState("detector");
+                    bindingString = command;
+                    bTemporarySaved = bTemporary;
+                    bound = false;
+                }
+                //else:  We're still in a keybind command. ignore this call.
+            }
+            else
+            {
+                if (!bound)
+                {
+                    // user has pressed the key
+                    std::string name = command.substr(this->keyDetectorCallbackCode_.size());
+                    COUT(0) << "Binding string \"" << bindingString << "\" on key '" << name << "'" << std::endl;
+                    this->keyBinder_->setBinding(bindingString, name, bTemporarySaved);
+                    InputManager::getInstance().leaveState("detector");
+                    bound = true;
+                }
+                // else: A key was pressed within the same tick, ignore it.
+            }
+        }
+    }
+}
Index: code/trunk/src/modules/gamestates/GSLevel.h
===================================================================
--- code/trunk/src/modules/gamestates/GSLevel.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSLevel.h	(revision 5781)
@@ -0,0 +1,83 @@
+/*
+ *   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:
+ *      Benjamin Knecht
+ *
+ */
+
+#ifndef _GSLevel_H__
+#define _GSLevel_H__
+
+#include "gamestates/GameStatesPrereqs.h"
+
+#include <string>
+#include "util/Scope.h"
+#include "core/OrxonoxClass.h"
+#include "core/GameState.h"
+
+namespace orxonox
+{
+    class _GameStatesExport GSLevel : public GameState, public OrxonoxClass
+    {
+    public:
+        GSLevel(const GameStateInfo& info);
+        ~GSLevel();
+        void setConfigValues();
+
+        void activate();
+        void deactivate();
+        void update(const Clock& time);
+
+        static void showIngameGUI(bool show);
+
+        static XMLFile* startFile_s;
+
+    protected:
+        void loadLevel();
+        void unloadLevel();
+
+        // console commands
+        void keybind(const std::string& command);
+        void tkeybind(const std::string& command);
+        void keybindInternal(const std::string& command, bool bTemporary);
+
+        KeyBinder*               keyBinder_;               //!< tool that loads and manages the input bindings
+        InputState*              gameInputState_;          //!< input state for normal ingame playing
+        InputState*              guiMouseOnlyInputState_;  //!< input state if we only need the mouse to use the GUI
+        InputState*              guiKeysOnlyInputState_;   //!< input state if we only need the keys to use the GUI
+        Radar*                   radar_;                   //!< represents the Radar (not the HUD part)
+        CameraManager*           cameraManager_;           //!< camera manager for this level
+        PlayerManager*           playerManager_;           //!< player manager for this level
+        Scope<ScopeID::GSLevel>* scope_GSLevel_;
+
+        //##### ConfigValues #####
+        std::string           keyDetectorCallbackCode_;
+
+        // console commands
+        ConsoleCommand*       ccKeybind_;
+        ConsoleCommand*       ccTkeybind_;
+    };
+}
+
+#endif /* _GSLevel_H__ */
Index: code/trunk/src/modules/gamestates/GSMainMenu.cc
===================================================================
--- code/trunk/src/modules/gamestates/GSMainMenu.cc	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSMainMenu.cc	(revision 5781)
@@ -0,0 +1,158 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "GSMainMenu.h"
+
+#include <OgreSceneManager.h>
+
+#include "core/input/InputManager.h"
+#include "core/input/InputState.h"
+#include "core/Game.h"
+#include "core/Clock.h"
+#include "core/ConsoleCommand.h"
+#include "core/GraphicsManager.h"
+#include "core/GUIManager.h"
+#include "Scene.h"
+#include "sound/SoundMainMenu.h"
+
+namespace orxonox
+{
+    DeclareGameState(GSMainMenu, "mainMenu", false, true);
+
+    GSMainMenu::GSMainMenu(const GameStateInfo& info)
+        : GameState(info)
+        , inputState_(0)
+    {
+        inputState_ = InputManager::getInstance().createInputState("mainMenu");
+        inputState_->setHandler(GUIManager::getInstancePtr());
+        inputState_->setJoyStickHandler(&InputHandler::EMPTY);
+        inputState_->setIsExclusiveMouse(false);
+
+        // create an empty Scene
+        this->scene_ = new Scene(0);
+        // and a Camera
+        this->camera_ = this->scene_->getSceneManager()->createCamera("mainMenu/Camera");
+    }
+
+    GSMainMenu::~GSMainMenu()
+    {
+        InputManager::getInstance().destroyState("mainMenu");
+
+        this->scene_->getSceneManager()->destroyCamera(this->camera_);
+        delete this->scene_;
+    }
+
+    void GSMainMenu::activate()
+    {
+        // show main menu
+        GUIManager::getInstance().showGUI("MainMenu");
+        GUIManager::getInstance().setCamera(this->camera_);
+        GraphicsManager::getInstance().setCamera(this->camera_);
+
+        {
+            FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startStandalone);
+            functor->setObject(this);
+            this->ccStartStandalone_ = createConsoleCommand(functor, "startGame");
+            CommandExecutor::addConsoleCommandShortcut(this->ccStartStandalone_);
+        }
+        {
+            FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startServer);
+            functor->setObject(this);
+            this->ccStartServer_ = createConsoleCommand(functor, "startServer");
+            CommandExecutor::addConsoleCommandShortcut(this->ccStartServer_);
+        }
+        {
+            FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startClient);
+            functor->setObject(this);
+            this->ccStartClient_ = createConsoleCommand(functor, "startClient");
+            CommandExecutor::addConsoleCommandShortcut(this->ccStartClient_);
+        }
+        {
+            FunctorMember<GSMainMenu>* functor = createFunctor(&GSMainMenu::startDedicated);
+            functor->setObject(this);
+            this->ccStartDedicated_ = createConsoleCommand(functor, "startDedicated");
+            CommandExecutor::addConsoleCommandShortcut(this->ccStartDedicated_);
+        }
+
+        InputManager::getInstance().enterState("mainMenu");
+
+        this->ambient_ = new SoundMainMenu();
+        this->ambient_->play(true);
+    }
+
+    void GSMainMenu::deactivate()
+    {
+        delete this->ambient_;
+
+        InputManager::getInstance().leaveState("mainMenu");
+
+        GUIManager::getInstance().setCamera(0);
+        GraphicsManager::getInstance().setCamera(0);
+
+/*
+        if (this->ccStartGame_)
+        {
+            delete this->ccStartGame_;
+            this->ccStartGame_ = 0;
+        }
+*/
+    }
+
+    void GSMainMenu::update(const Clock& time)
+    {
+    }
+
+    void GSMainMenu::startStandalone()
+    {
+        // HACK - HACK
+        Game::getInstance().popState();
+        Game::getInstance().requestStates("standalone, level");
+    }
+
+    void GSMainMenu::startServer()
+    {
+        // HACK - HACK
+        Game::getInstance().popState();
+        Game::getInstance().requestStates("server, level");
+    }
+
+    void GSMainMenu::startClient()
+    {
+        // HACK - HACK
+        Game::getInstance().popState();
+        Game::getInstance().requestStates("client, level");
+    }
+
+    void GSMainMenu::startDedicated()
+    {
+        // HACK - HACK
+        Game::getInstance().popState();
+        Game::getInstance().popState();
+        Game::getInstance().requestStates("dedicated, level");
+    }
+}
Index: code/trunk/src/modules/gamestates/GSMainMenu.h
===================================================================
--- code/trunk/src/modules/gamestates/GSMainMenu.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSMainMenu.h	(revision 5781)
@@ -0,0 +1,70 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _GSMainMenu_H__
+#define _GSMainMenu_H__
+
+#include "gamestates/GameStatesPrereqs.h"
+
+#include "util/OgreForwardRefs.h"
+#include "core/GameState.h"
+
+namespace orxonox
+{
+    class _GameStatesExport GSMainMenu : public GameState
+    {
+    public:
+        GSMainMenu(const GameStateInfo& info);
+        ~GSMainMenu();
+
+        void activate();
+        void deactivate();
+        void update(const Clock& time);
+
+        void startStandalone();
+        void startServer();
+        void startClient();
+        void startDedicated();
+
+    private:
+        InputState*       inputState_;
+        Scene*            scene_;
+        Ogre::Camera*     camera_;
+
+        // console commands
+        ConsoleCommand* ccStartStandalone_;
+        ConsoleCommand* ccStartServer_;
+        ConsoleCommand* ccStartClient_;
+        ConsoleCommand* ccStartDedicated_;
+
+        // ambient sound for the main menu
+        SoundMainMenu* ambient_;
+    };
+}
+
+#endif /* _GSMainMenu_H__ */
Index: code/trunk/src/modules/gamestates/GSRoot.cc
===================================================================
--- code/trunk/src/modules/gamestates/GSRoot.cc	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSRoot.cc	(revision 5781)
@@ -0,0 +1,171 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "GSRoot.h"
+
+#include "core/Clock.h"
+#include "core/ConsoleCommand.h"
+#include "core/Game.h"
+#include "core/GameMode.h"
+#include "network/NetworkFunction.h"
+#include "tools/Timer.h"
+#include "tools/interfaces/TimeFactorListener.h"
+#include "tools/interfaces/Tickable.h"
+#include "LevelManager.h"
+
+namespace orxonox
+{
+    DeclareGameState(GSRoot, "root", false, false);
+
+    GSRoot::GSRoot(const GameStateInfo& info)
+        : GameState(info)
+        , timeFactor_(1.0f)
+        , bPaused_(false)
+        , timeFactorPauseBackup_(1.0f)
+    {
+        this->ccSetTimeFactor_ = 0;
+        this->ccPause_ = 0;
+    }
+
+    GSRoot::~GSRoot()
+    {
+        NetworkFunctionBase::destroyAllNetworkFunctions();
+    }
+
+    void GSRoot::activate()
+    {
+        // reset game speed to normal
+        this->timeFactor_ = 1.0f;
+
+        {
+            // time factor console command
+            FunctorMember<GSRoot>* functor = createFunctor(&GSRoot::setTimeFactor);
+            functor->setObject(this);
+            this->ccSetTimeFactor_ = createConsoleCommand(functor, "setTimeFactor");
+            CommandExecutor::addConsoleCommandShortcut(this->ccSetTimeFactor_).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);
+        }
+
+        {
+            // time factor console command
+            FunctorMember<GSRoot>* functor = createFunctor(&GSRoot::pause);
+            functor->setObject(this);
+            this->ccPause_ = createConsoleCommand(functor, "pause");
+            CommandExecutor::addConsoleCommandShortcut(this->ccPause_).accessLevel(AccessLevel::Offline);
+        }
+
+        // create the LevelManager
+        this->levelManager_ = new LevelManager();
+    }
+
+    void GSRoot::deactivate()
+    {
+/*
+        if (this->ccSetTimeFactor_)
+        {
+            delete this->ccSetTimeFactor_;
+            this->ccSetTimeFactor_ = 0;
+        }
+
+        if (this->ccPause_)
+        {
+            delete this->ccPause_;
+            this->ccPause_ = 0;
+        }
+*/
+
+        delete this->levelManager_;
+    }
+
+    void GSRoot::update(const Clock& time)
+    {
+        if (this->getActivity().topState)
+        {
+            // This state can not 'survive' on its own.
+            // Load a user interface therefore
+            Game::getInstance().requestState("ioConsole");
+        }
+
+        for (ObjectList<TimerBase>::iterator it = ObjectList<TimerBase>::begin(); it; ++it)
+            it->tick(time);
+
+        /*** HACK *** HACK ***/
+        // Call the Tickable objects
+        float leveldt = time.getDeltaTime();
+        if (leveldt > 1.0f)
+        {
+            // just loaded
+            leveldt = 0.0f;
+        }
+        for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; ++it)
+            it->tick(leveldt * this->timeFactor_);
+        /*** HACK *** HACK ***/
+    }
+
+    /**
+    @brief
+        Changes the speed of Orxonox
+    @remark
+        This function is a hack when placed here!
+        Timefactor should be related to the scene (level or so), not the game
+    */
+    void GSRoot::setTimeFactor(float factor)
+    {
+        if (GameMode::isMaster())
+        {
+            if (!this->bPaused_)
+            {
+                TimeFactorListener::timefactor_s = factor;
+
+                for (ObjectList<TimeFactorListener>::iterator it = ObjectList<TimeFactorListener>::begin(); it != ObjectList<TimeFactorListener>::end(); ++it)
+                    it->changedTimeFactor(factor, this->timeFactor_);
+
+                this->timeFactor_ = factor;
+            }
+            else
+                this->timeFactorPauseBackup_ = factor;
+        }
+    }
+
+    void GSRoot::pause()
+    {
+        if (GameMode::isMaster())
+        {
+            if (!this->bPaused_)
+            {
+                this->timeFactorPauseBackup_ = this->timeFactor_;
+                this->setTimeFactor(0.0f);
+                this->bPaused_ = true;
+            }
+            else
+            {
+                this->bPaused_ = false;
+                this->setTimeFactor(this->timeFactorPauseBackup_);
+            }
+        }
+    }
+}
Index: code/trunk/src/modules/gamestates/GSRoot.h
===================================================================
--- code/trunk/src/modules/gamestates/GSRoot.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSRoot.h	(revision 5781)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _GSRoot_H__
+#define _GSRoot_H__
+
+#include "gamestates/GameStatesPrereqs.h"
+#include "core/GameState.h"
+
+namespace orxonox
+{
+    class _GameStatesExport GSRoot : public GameState
+    {
+    public:
+        GSRoot(const GameStateInfo& info);
+        ~GSRoot();
+
+        void activate();
+        void deactivate();
+        void update(const Clock& time);
+
+        // this has to be public because proteced triggers a bug in msvc
+        // when taking the function address.
+        void setTimeFactor(float factor);
+        void pause();
+        float getTimeFactor() { return this->timeFactor_; }
+
+    private:
+        float                 timeFactor_;              //!< A factor that sets the gamespeed. 1 is normal.
+        bool                  bPaused_;
+        float                 timeFactorPauseBackup_;
+
+        LevelManager*         levelManager_;            //!< global level manager
+
+        // console commands
+        ConsoleCommand*       ccSetTimeFactor_;
+        ConsoleCommand*       ccPause_;
+    };
+}
+
+#endif /* _GSRoot_H__ */
Index: code/trunk/src/modules/gamestates/GSServer.cc
===================================================================
--- code/trunk/src/modules/gamestates/GSServer.cc	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSServer.cc	(revision 5781)
@@ -0,0 +1,75 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+#include "GSServer.h"
+
+#include "util/Debug.h"
+#include "core/CommandLine.h"
+#include "core/Game.h"
+#include "core/GameMode.h"
+#include "network/Server.h"
+
+namespace orxonox
+{
+    DeclareGameState(GSServer, "server", false, true);
+
+    SetCommandLineArgument(port, 55556).shortcut("p").information("Network communication port to be used 0-65535 (default: 55556)");
+
+    GSServer::GSServer(const GameStateInfo& info)
+        : GameState(info)
+        , server_(0)
+    {
+    }
+
+    GSServer::~GSServer()
+    {
+    }
+
+    void GSServer::activate()
+    {
+        GameMode::setHasServer(true);
+
+        this->server_ = new Server(CommandLine::getValue("port"));
+        COUT(0) << "Loading scene in server mode" << std::endl;
+
+        server_->open();
+    }
+
+    void GSServer::deactivate()
+    {
+        this->server_->close();
+        delete this->server_;
+
+        GameMode::setHasServer(false);
+    }
+
+    void GSServer::update(const Clock& time)
+    {
+        server_->update(time);
+    }
+}
Index: code/trunk/src/modules/gamestates/GSServer.h
===================================================================
--- code/trunk/src/modules/gamestates/GSServer.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSServer.h	(revision 5781)
@@ -0,0 +1,54 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _GSServer_H__
+#define _GSServer_H__
+
+#include "gamestates/GameStatesPrereqs.h"
+
+#include "core/GameState.h"
+#include "network/NetworkPrereqs.h"
+
+namespace orxonox
+{
+    class _GameStatesExport GSServer : public GameState
+    {
+    public:
+        GSServer(const GameStateInfo& info);
+        ~GSServer();
+
+        void activate();
+        void deactivate();
+        void update(const Clock& time);
+
+    private:
+        Server* server_;
+    };
+}
+
+#endif /* _GSServer_H__ */
Index: code/trunk/src/modules/gamestates/GSStandalone.cc
===================================================================
--- code/trunk/src/modules/gamestates/GSStandalone.cc	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSStandalone.cc	(revision 5781)
@@ -0,0 +1,61 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+#include "GSStandalone.h"
+
+#include "core/Game.h"
+#include "core/GameMode.h"
+
+namespace orxonox
+{
+    DeclareGameState(GSStandalone, "standalone", false, true);
+
+    GSStandalone::GSStandalone(const GameStateInfo& info)
+        : GameState(info)
+    {
+    }
+
+    GSStandalone::~GSStandalone()
+    {
+    }
+
+
+    void GSStandalone::activate()
+    {
+        GameMode::setIsStandalone(true);
+    }
+
+    void GSStandalone::deactivate()
+    {
+        GameMode::setIsStandalone(false);
+    }
+
+    void GSStandalone::update(const Clock& time)
+    {
+    }
+}
Index: code/trunk/src/modules/gamestates/GSStandalone.h
===================================================================
--- code/trunk/src/modules/gamestates/GSStandalone.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GSStandalone.h	(revision 5781)
@@ -0,0 +1,51 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _GSStandalone_H__
+#define _GSStandalone_H__
+
+#include "gamestates/GameStatesPrereqs.h"
+#include "core/GameState.h"
+
+namespace orxonox
+{
+    class _GameStatesExport GSStandalone : public GameState
+    {
+    public:
+        GSStandalone(const GameStateInfo& info);
+        ~GSStandalone();
+
+        void activate();
+        void deactivate();
+        void update(const Clock& time);
+
+    private:
+    };
+}
+
+#endif /* _GSStandalone_H__ */
Index: code/trunk/src/modules/gamestates/GameStatesPrecompiledHeaders.h
===================================================================
--- code/trunk/src/modules/gamestates/GameStatesPrecompiledHeaders.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GameStatesPrecompiledHeaders.h	(revision 5781)
@@ -0,0 +1,58 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Compilation of the most often used header files in the game states module
+@details
+    Updated: 19. September 2009
+    Total Files: 9
+*/
+
+#include "OrxonoxConfig.h"
+
+///////////////////////////////////////////
+/////          Stable Headers         /////
+///////////////////////////////////////////
+
+#include "util/SubString.h"       // 6
+#include "util/OgreForwardRefs.h" // 6
+
+///////////////////////////////////////////
+/////       All Rebuild Headers       /////
+///////////////////////////////////////////
+
+#include "core/GameState.h" // 9
+#include "core/Game.h"      // 9
+#include "util/MultiType.h" // 8
+
+
+// Just in case some header included windows.h
+#undef min
+#undef max
Index: code/trunk/src/modules/gamestates/GameStatesPrereqs.h
===================================================================
--- code/trunk/src/modules/gamestates/GameStatesPrereqs.h	(revision 5781)
+++ code/trunk/src/modules/gamestates/GameStatesPrereqs.h	(revision 5781)
@@ -0,0 +1,60 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+  @file
+  @brief Contains all the necessary forward declarations for all classes and structs.
+*/
+
+#ifndef _GameStatesPrereqs_H__
+#define _GameStatesPrereqs_H__
+
+#include "OrxonoxConfig.h"
+
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD)
+#  ifdef GAMESTATES_SHARED_BUILD
+#    define _GameStatesExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _GameStatesExport
+#    else
+#      define _GameStatesExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _GameStatesExport  __attribute__ ((visibility("default")))
+#else
+#  define _GameStatesExport
+#endif
+
+#endif /* _GameStatesPrereqs_H__ */
Index: code/trunk/src/modules/objects/Attacher.cc
===================================================================
--- code/trunk/src/modules/objects/Attacher.cc	(revision 5781)
+++ code/trunk/src/modules/objects/Attacher.cc	(revision 5781)
@@ -0,0 +1,120 @@
+/*
+ *   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 "Attacher.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(Attacher);
+
+    Attacher::Attacher(BaseObject* creator) : StaticEntity(creator)
+    {
+        RegisterObject(Attacher);
+
+        this->target_ = 0;
+    }
+
+    void Attacher::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Attacher, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Attacher, "target", setTarget, getTarget, xmlelement, mode);
+        XMLPortObject(Attacher, WorldEntity, "", addObject, getObject, xmlelement, mode);
+    }
+
+    void Attacher::processEvent(Event& event)
+    {
+        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+            (*it)->fireEvent(event);
+    }
+
+    void Attacher::changedActivity()
+    {
+        SUPER(Attacher, changedActivity);
+
+        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+            (*it)->setActive(this->isActive());
+    }
+
+    void Attacher::changedVisibility()
+    {
+        SUPER(Attacher, changedVisibility);
+
+        for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+            (*it)->setVisible(this->isVisible());
+    }
+
+    void Attacher::addObject(WorldEntity* object)
+    {
+        this->objects_.push_back(object);
+
+        this->attach(object);
+    }
+
+    WorldEntity* Attacher::getObject(unsigned int index) const
+    {
+        unsigned int i = 0;
+        for (std::list<WorldEntity*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+        {
+            if (i == index)
+                return (*it);
+
+            ++i;
+        }
+        return 0;
+    }
+
+    void Attacher::setTarget(const std::string& target)
+    {
+        this->targetname_ = target;
+        this->target_ = 0;
+
+        if (this->targetname_ == "")
+            return;
+
+        for (ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it != ObjectList<WorldEntity>::end(); ++it)
+            if (it->getName() == this->targetname_)
+                this->attachToParent(*it);
+    }
+
+    void Attacher::loadedNewXMLName(BaseObject* object)
+    {
+        if (this->target_ || this->targetname_ == "")
+            return;
+
+        WorldEntity* entity = orxonox_cast<WorldEntity*>(object);
+        if (entity && entity->getName() == this->targetname_)
+        {
+            this->target_ = entity;
+            this->attachToParent(entity);
+        }
+    }
+}
Index: code/trunk/src/modules/objects/Attacher.h
===================================================================
--- code/trunk/src/modules/objects/Attacher.h	(revision 5781)
+++ code/trunk/src/modules/objects/Attacher.h	(revision 5781)
@@ -0,0 +1,69 @@
+/*
+ *   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 _Attacher_H__
+#define _Attacher_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include <list>
+#include <string>
+#include "core/XMLNameListener.h"
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    class _ObjectsExport Attacher : public StaticEntity, public XMLNameListener
+    {
+        public:
+            Attacher(BaseObject* creator);
+            virtual ~Attacher() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void processEvent(Event& event);
+            virtual void changedActivity();
+            virtual void changedVisibility();
+
+            void addObject(WorldEntity* object);
+            WorldEntity* getObject(unsigned int index) const;
+
+            void setTarget(const std::string& target);
+            inline const std::string& getTarget() const
+                { return this->targetname_; }
+
+            void loadedNewXMLName(BaseObject* object);
+
+        private:
+            WorldEntity* target_;
+            std::string targetname_;
+            std::list<WorldEntity*> objects_;
+    };
+}
+
+#endif /* _Attacher_H__ */
Index: code/trunk/src/modules/objects/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/objects/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/objects/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,22 @@
+SET_SOURCE_FILES(OBJECTS_SRC_FILES
+  Attacher.cc
+  ForceField.cc
+  Planet.cc
+  Script.cc
+)
+
+ADD_SUBDIRECTORY(collisionshapes)
+ADD_SUBDIRECTORY(eventsystem)
+ADD_SUBDIRECTORY(triggers)
+
+ORXONOX_ADD_LIBRARY(objects
+  MODULE
+  FIND_HEADER_FILES
+  PCH_FILE
+    ObjectsPrecompiledHeaders.h
+  DEFINE_SYMBOL
+    "OBJECTS_SHARED_BUILD"
+  LINK_LIBRARIES
+    orxonox
+  SOURCE_FILES ${OBJECTS_SRC_FILES}
+)
Index: code/trunk/src/modules/objects/ForceField.cc
===================================================================
--- code/trunk/src/modules/objects/ForceField.cc	(revision 5781)
+++ code/trunk/src/modules/objects/ForceField.cc	(revision 5781)
@@ -0,0 +1,87 @@
+/*
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ForceField.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/MobileEntity.h"
+
+namespace orxonox
+{
+    CreateFactory(ForceField);
+
+    ForceField::ForceField(BaseObject* creator) : StaticEntity(creator)
+    {
+        RegisterObject(ForceField);
+
+        //Standard Values
+        this->setDirection(Vector3::ZERO);
+        velocity_ = 100;
+        diameter_ = 500;
+        length_ = 5000;
+    }
+
+    ForceField::~ForceField() {}
+
+    void ForceField::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ForceField, XMLPort, xmlelement, mode);
+
+        //For correct xml import use: position, direction, velocity, scale
+        XMLPortParam(ForceField, "velocity", setVelocity, getVelocity, xmlelement, mode).defaultValues(100);
+        XMLPortParam(ForceField, "diameter", setDiameter, getDiameter, xmlelement, mode).defaultValues(500);
+        XMLPortParam(ForceField, "length"  , setLength  , getLength  , xmlelement, mode).defaultValues(2000);
+    }
+
+    void ForceField::tick(float dt)
+    {
+        for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
+        {
+            //calculate from
+            Vector3 directionVec = this->getOrientation() * WorldEntity::FRONT;
+            directionVec.normalise();
+
+            Vector3 distanceVec = it->getWorldPosition() - (this->getWorldPosition() + (this->length_ / 2 * directionVec));
+
+            //distance from centervector of the field (
+            float distFromCenterVec = ((it->getWorldPosition() - this->getWorldPosition()).crossProduct(directionVec)).length();
+
+            if (distanceVec.length() < this->length_ / 2 && distFromCenterVec < diameter_ / 2)
+            {
+                //normalize distance from center
+                it->applyCentralForce(((diameter_ / 2 - distFromCenterVec) / (diameter_ / 2)) * directionVec * velocity_);
+            }
+        }
+    }
+}
+
+
+
+
+
Index: code/trunk/src/modules/objects/ForceField.h
===================================================================
--- code/trunk/src/modules/objects/ForceField.h	(revision 5781)
+++ code/trunk/src/modules/objects/ForceField.h	(revision 5781)
@@ -0,0 +1,74 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _ForceField_H__
+#define _ForceField_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    class _ObjectsExport ForceField : public StaticEntity, public Tickable
+    {
+    public:
+        ForceField(BaseObject* creator);
+        virtual ~ForceField();
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+        virtual void tick(float dt);
+
+        inline void setVelocity(float vel)
+            { this->velocity_ = vel; }
+
+        inline float getVelocity()
+            { return velocity_; }
+
+        inline void setDiameter(float diam)
+            { this->diameter_ = diam; }
+
+        inline float getDiameter()
+            { return diameter_; }
+
+        inline void setLength(float l)
+            { this->length_ = l; }
+
+        inline float getLength()
+            { return length_; }
+
+    private:
+        float velocity_;
+        float diameter_;
+        float length_;
+  };
+}
+
+#endif
+
Index: code/trunk/src/modules/objects/ObjectsPrecompiledHeaders.h
===================================================================
--- code/trunk/src/modules/objects/ObjectsPrecompiledHeaders.h	(revision 5781)
+++ code/trunk/src/modules/objects/ObjectsPrecompiledHeaders.h	(revision 5781)
@@ -0,0 +1,64 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Compilation of the most often used header files in the objects module
+@details
+    Updated: 19. September 2009
+    Total Files: 15
+*/
+
+#include "OrxonoxConfig.h"
+
+///////////////////////////////////////////
+/////          Stable Headers         /////
+///////////////////////////////////////////
+
+#include <LinearMath/btTransform.h> // 11
+
+///////////////////////////////////////////
+/////       All Rebuild Headers       /////
+///////////////////////////////////////////
+
+#include "core/BaseObject.h"   // 15
+#include "core/CoreIncludes.h" // 15
+#include "core/XMLPort.h"      // 13
+
+///////////////////////////////////////////
+/////      Not so Stable Headers      /////
+///////////////////////////////////////////
+
+#include "network/synchronisable/Synchronisable.h" // 11
+//#include "orxonox/worldentities/StaticEntity.h" // 7
+
+
+// Just in case some header included windows.h
+#undef min
+#undef max
Index: code/trunk/src/modules/objects/ObjectsPrereqs.h
===================================================================
--- code/trunk/src/modules/objects/ObjectsPrereqs.h	(revision 5781)
+++ code/trunk/src/modules/objects/ObjectsPrereqs.h	(revision 5781)
@@ -0,0 +1,89 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+  @file
+  @brief Contains all the necessary forward declarations for all classes and structs.
+*/
+
+#ifndef _ObjectsPrereqs_H__
+#define _ObjectsPrereqs_H__
+
+#include "OrxonoxConfig.h"
+
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD)
+#  ifdef OBJECTS_SHARED_BUILD
+#    define _ObjectsExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _ObjectsExport
+#    else
+#      define _ObjectsExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _ObjectsExport  __attribute__ ((visibility("default")))
+#else
+#  define _ObjectsExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class Attacher;
+    class ForceField;
+    class Planet;
+    class Script;
+
+    // collisionshapes
+    class BoxCollisionShape;
+    class ConeCollisionShape;
+    class PlaneCollisionShape;
+    class SphereCollisionShape;
+
+    // eventsystem
+    class EventListener;
+    class EventDispatcher;
+    class EventTarget;
+
+    // triggers
+    class Trigger;
+    class DistanceTrigger;
+    class EventTrigger;
+    class CheckPoint;
+}
+
+#endif /* _ObjectsPrereqs_H__ */
Index: code/trunk/src/modules/objects/Planet.cc
===================================================================
--- code/trunk/src/modules/objects/Planet.cc	(revision 5781)
+++ code/trunk/src/modules/objects/Planet.cc	(revision 5781)
@@ -0,0 +1,175 @@
+/*
+ *   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:
+ *      Marian Runo
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Planet.h"
+
+#include <OgreEntity.h>
+#include <OgreBillboardSet.h>
+#include <OgreProgressiveMesh.h>
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
+#include "Scene.h"
+#include "graphics/Camera.h"
+#include "CameraManager.h"
+
+namespace orxonox
+{
+    CreateFactory(Planet);
+
+    /**
+     * @brief Constructor
+     */
+    Planet::Planet(BaseObject* creator): MovableEntity(creator)
+    {
+        RegisterObject(Planet);
+        this->registerVariables();
+    }
+
+    /**
+     * @brief Destructor
+     */
+    Planet::~Planet()
+    {
+        if (this->isInitialized() && this->mesh_.getEntity())
+            this->detachOgreObject(this->mesh_.getEntity());
+    }
+
+    void Planet::tick(float dt)
+    {
+        if(!this->isVisible())
+            return;
+
+        if (GameMode::showsGraphics())
+        {
+            Camera* activeCamera = CameraManager::getInstance().getActiveCamera();
+            if(activeCamera)
+            {
+                float distance = this->getPosition().distance( activeCamera->getWorldPosition() );
+                //             COUT(2) << distance << std::endl;
+                float planetRadius = this->getScale();
+
+                float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);
+                float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize));
+                newScale = tempTest;
+
+                this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale);
+            }
+        }
+
+        SUPER(Planet, tick, dt);
+    }
+
+    void Planet::init()
+    {
+        float scaleFactor = this->getScale();
+
+        this->distList.push_back(10.0f*scaleFactor);
+        this->distList.push_back(19.0f*scaleFactor);
+        this->distList.push_back(27.0f*scaleFactor);
+        this->distList.push_back(34.0f*scaleFactor);
+        this->distList.push_back(40.0f*scaleFactor);
+        this->distList.push_back(45.0f*scaleFactor);
+        this->distList.push_back(49.0f*scaleFactor);
+        this->distList.push_back(52.0f*scaleFactor);
+        this->distList.push_back(54.0f*scaleFactor);
+        this->distList.push_back(55.0f*scaleFactor);
+
+        float reductionValue = 0.2f;
+
+        this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
+        billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
+
+        this->attachOgreObject(this->billboard_.getBillboardSet());
+        this->billboard_.getBillboardSet()->setUseAccurateFacing(true);
+        this->setCastShadows(true);
+        this->billboard_.getBillboardSet()->setRenderQueueGroup(this->mesh_.getEntity()->getRenderQueueGroup());
+        this->mesh_.setCastShadows(true);
+    }
+
+    void Planet::changedMesh()
+    {
+        if (this->mesh_.getEntity())
+            this->detachOgreObject(this->mesh_.getEntity());
+
+        this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
+
+        if (this->mesh_.getEntity())
+        {
+            this->attachOgreObject(this->mesh_.getEntity());
+            this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
+            this->mesh_.setVisible(this->isVisible());
+        }
+        this->init();
+    }
+
+    void Planet::changedShadows()
+    {
+        this->mesh_.setCastShadows(this->bCastShadows_);
+    }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    void Planet::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Planet, XMLPort, xmlelement, mode);
+
+        if (GameMode::showsGraphics())
+        {
+            XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere");
+            XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode);
+            XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode);
+            XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
+            XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
+        }
+    }
+
+    void Planet::registerVariables()
+    {
+        registerVariable(this->atmosphere_, VariableDirection::ToClient);
+        registerVariable(this->meshSrc_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
+        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
+        registerVariable(this->atmosphereSize, VariableDirection::ToClient);
+        registerVariable(this->imageSize, VariableDirection::ToClient);
+    }
+
+    void Planet::changedVisibility()
+    {
+        SUPER(Planet, changedVisibility);
+        if (this->isInitialized())
+        {
+            this->mesh_.setVisible(this->isVisible());
+            this->billboard_.setVisible(this->isVisible());
+        }
+    }
+}
Index: code/trunk/src/modules/objects/Planet.h
===================================================================
--- code/trunk/src/modules/objects/Planet.h	(revision 5781)
+++ code/trunk/src/modules/objects/Planet.h	(revision 5781)
@@ -0,0 +1,116 @@
+/*
+ *   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:
+ *      Marian Runo
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Planet_H__
+#define _Planet_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include <string>
+#include "tools/BillboardSet.h"
+#include "tools/Mesh.h"
+#include "worldentities/MovableEntity.h"
+
+namespace orxonox
+{
+    class _ObjectsExport Planet : public MovableEntity
+    {
+        public:
+            Planet(BaseObject* creator);
+
+            virtual ~Planet();
+
+            void init();
+            virtual void tick(float dt);
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void changedVisibility();
+
+            inline void setMeshSource(const std::string& meshname)
+                { this->meshSrc_ = meshname; this->changedMesh(); }
+
+            inline const std::string& getMeshSource() const
+                { return this->meshSrc_; }
+
+            inline void setCastShadows(bool bCastShadows)
+                { this->bCastShadows_ = bCastShadows; this->changedShadows(); }
+
+            inline bool getCastShadows() const
+                { return this->bCastShadows_; }
+
+            inline const std::string& getMesh() const{
+                return this->meshSrc_;
+            }
+
+            inline void setAtmosphereSize(float size){
+                this->atmosphereSize = size;
+            }
+
+            inline float getAtmosphereSize(){
+                return this->atmosphereSize;
+            }
+
+            inline void setAtmosphere(const std::string& atmosphere){
+                this->atmosphere_ = atmosphere;
+            }
+
+            inline const std::string& getAtmosphere(){
+                return this->atmosphere_;
+            }
+
+            inline void setImageSize(float size){
+                this->imageSize = size;
+            }
+
+            inline float getImageSize(){
+                return this->imageSize;
+            }
+
+        protected:
+            void registerVariables();
+
+        private:
+
+            void changedMesh();
+            void changedShadows();
+
+            std::string meshSrc_;
+            std::string atmosphere_;
+            Mesh mesh_;
+            float atmosphereSize;
+            float imageSize;
+            std::vector<float> distList;
+            BillboardSet billboard_;
+            bool bCastShadows_;
+
+    };
+}
+
+#endif
+
Index: code/trunk/src/modules/objects/Script.cc
===================================================================
--- code/trunk/src/modules/objects/Script.cc	(revision 5781)
+++ code/trunk/src/modules/objects/Script.cc	(revision 5781)
@@ -0,0 +1,64 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "Script.h"
+
+#include "core/CoreIncludes.h"
+#include "core/LuaState.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(Script);
+
+    Script::Script(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(Script);
+
+        // Get a new LuaState
+        luaState_ = new LuaState();
+    }
+
+    Script::~Script()
+    {
+        if (this->isInitialized())
+            delete luaState_;
+    }
+
+    void Script::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        BaseObject::XMLPort(xmlelement, mode);
+
+        XMLPortParam(Script, "code", setCode, getCode, xmlelement, mode);
+    }
+
+    void Script::execute()
+    {
+        luaState_->doString(code_);
+    }
+}
Index: code/trunk/src/modules/objects/Script.h
===================================================================
--- code/trunk/src/modules/objects/Script.h	(revision 5781)
+++ code/trunk/src/modules/objects/Script.h	(revision 5781)
@@ -0,0 +1,56 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _Script_H__
+#define _Script_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include <string>
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    class _ObjectsExport Script : public BaseObject
+    {
+    public:
+        Script(BaseObject* creator);
+        ~Script();
+        void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+        void execute();
+
+        void setCode(const std::string& code) { code_ = code; }
+        const std::string& getCode() const { return code_; }
+
+    private:
+        std::string code_;
+        LuaState* luaState_;
+    };
+}
+
+#endif /* _Script_H__ */
Index: code/trunk/src/modules/objects/collisionshapes/BoxCollisionShape.cc
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/BoxCollisionShape.cc	(revision 5781)
+++ code/trunk/src/modules/objects/collisionshapes/BoxCollisionShape.cc	(revision 5781)
@@ -0,0 +1,76 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "BoxCollisionShape.h"
+
+#include <BulletCollision/CollisionShapes/btBoxShape.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/BulletConversions.h"
+
+namespace orxonox
+{
+    CreateFactory(BoxCollisionShape);
+
+    BoxCollisionShape::BoxCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(BoxCollisionShape);
+
+        this->halfExtents_ = Vector3(1, 1, 1);
+        updateShape();
+
+        this->registerVariables();
+    }
+
+    BoxCollisionShape::~BoxCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    void BoxCollisionShape::registerVariables()
+    {
+        registerVariable(this->halfExtents_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+    }
+
+    void BoxCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(BoxCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(BoxCollisionShape, "halfExtents",  setHalfExtents,  getHalfExtents,  xmlelement, mode);
+        XMLPortParamLoadOnly(BoxCollisionShape, "width",  setWidth,  xmlelement, mode);
+        XMLPortParamLoadOnly(BoxCollisionShape, "height", setHeight, xmlelement, mode);    
+        XMLPortParamLoadOnly(BoxCollisionShape, "length", setLength, xmlelement, mode);    
+    }
+
+    btCollisionShape* BoxCollisionShape::createNewShape() const
+    {
+        return new btBoxShape(multi_cast<btVector3>(this->halfExtents_));
+    }
+}
Index: code/trunk/src/modules/objects/collisionshapes/BoxCollisionShape.h
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/BoxCollisionShape.h	(revision 5781)
+++ code/trunk/src/modules/objects/collisionshapes/BoxCollisionShape.h	(revision 5781)
@@ -0,0 +1,75 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _BoxCollisionShape_H__
+#define _BoxCollisionShape_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include "util/Math.h"
+#include "collisionshapes/CollisionShape.h"
+
+namespace orxonox
+{
+    class _ObjectsExport BoxCollisionShape : public CollisionShape
+    {
+        public:
+            BoxCollisionShape(BaseObject* creator);
+            virtual ~BoxCollisionShape();
+
+            void registerVariables();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void setHalfExtents(const Vector3& extents)
+                { this->halfExtents_ = extents; updateShape(); }
+            inline const Vector3& getHalfExtents() const
+                { return halfExtents_;}
+
+            inline void setWidth(float value)
+                { this->halfExtents_.z = value / 2; updateShape(); }
+            inline float getWidth() const
+                { return this->halfExtents_.z * 2; }
+
+            inline void setHeight(float value)
+                { this->halfExtents_.y = value / 2; updateShape(); }
+            inline float getHeight() const
+                { return this->halfExtents_.y * 2; }
+
+            inline void setLength(float value)
+                { this->halfExtents_.x = value / 2; updateShape(); }
+            inline float getLength() const
+                { return this->halfExtents_.x * 2; }
+
+        private:
+            btCollisionShape* createNewShape() const;
+
+            Vector3 halfExtents_;
+     };
+}
+
+#endif /* _BoxCollisionShape_H__ */
Index: code/trunk/src/modules/objects/collisionshapes/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/objects/collisionshapes/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,6 @@
+ADD_SOURCE_FILES(OBJECTS_SRC_FILES
+  BoxCollisionShape.cc
+  ConeCollisionShape.cc
+  PlaneCollisionShape.cc
+  SphereCollisionShape.cc
+)
Index: code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.cc
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.cc	(revision 5781)
+++ code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.cc	(revision 5781)
@@ -0,0 +1,75 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "ConeCollisionShape.h"
+
+#include <BulletCollision/CollisionShapes/btConeShape.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(ConeCollisionShape);
+
+    ConeCollisionShape::ConeCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(ConeCollisionShape);
+
+        this->radius_ = 1.0f;
+        this->height_ = 1.0f;
+        updateShape();
+
+        this->registerVariables();
+    }
+
+    ConeCollisionShape::~ConeCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    void ConeCollisionShape::registerVariables()
+    {
+        registerVariable(this->radius_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+        registerVariable(this->height_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+    }
+
+    void ConeCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ConeCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(ConeCollisionShape, "radius", setRadius, getRadius, xmlelement, mode);
+        XMLPortParam(ConeCollisionShape, "height", setHeight, getHeight, xmlelement, mode);    
+    }
+
+    btCollisionShape* ConeCollisionShape::createNewShape() const
+    {
+        return new btConeShape(this->radius_, this->height_);
+    }
+}
Index: code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.h
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.h	(revision 5781)
+++ code/trunk/src/modules/objects/collisionshapes/ConeCollisionShape.h	(revision 5781)
@@ -0,0 +1,64 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _ConeCollisionShape_H__
+#define _ConeCollisionShape_H__
+
+#include "objects/ObjectsPrereqs.h"
+#include "collisionshapes/CollisionShape.h"
+
+namespace orxonox
+{
+    class _ObjectsExport ConeCollisionShape : public CollisionShape
+    {
+        public:
+            ConeCollisionShape(BaseObject* creator);
+            virtual ~ConeCollisionShape();
+
+            void registerVariables();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void setRadius(float value)
+                { this->radius_ = value; updateShape(); }
+            inline float getRadius() const
+                { return radius_; }
+
+            inline void setHeight(float value)
+                { this->height_ = value; updateShape(); }
+            inline float getHeight() const
+                { return this->height_; }
+
+        private:
+            btCollisionShape* createNewShape() const;
+
+            float radius_;
+            float height_;
+     };
+}
+
+#endif /* _ConeCollisionShape_H__ */
Index: code/trunk/src/modules/objects/collisionshapes/PlaneCollisionShape.cc
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/PlaneCollisionShape.cc	(revision 5781)
+++ code/trunk/src/modules/objects/collisionshapes/PlaneCollisionShape.cc	(revision 5781)
@@ -0,0 +1,76 @@
+/*
+ *   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:
+ *      Martin Stypinski
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "PlaneCollisionShape.h"
+
+#include <BulletCollision/CollisionShapes/btStaticPlaneShape.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/BulletConversions.h"
+
+namespace orxonox
+{
+    CreateFactory(PlaneCollisionShape);
+
+    PlaneCollisionShape::PlaneCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(PlaneCollisionShape);
+
+        this->normal_ = Vector3(0, 1, 0);
+        this->offset_ = 0.0f;
+        updateShape();
+
+        this->registerVariables();
+    }
+
+    PlaneCollisionShape::~PlaneCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    void PlaneCollisionShape::registerVariables()
+    {
+        registerVariable(this->normal_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+        registerVariable(this->offset_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+    }
+
+    void PlaneCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(PlaneCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(PlaneCollisionShape, "normal", setNormal, getNormal, xmlelement, mode);
+        XMLPortParam(PlaneCollisionShape, "offset", setOffset, getOffset, xmlelement, mode);    
+    }
+
+    btCollisionShape* PlaneCollisionShape::createNewShape() const
+    {
+        return new btStaticPlaneShape(multi_cast<btVector3>(this->normal_), this->offset_);
+    }
+}
Index: code/trunk/src/modules/objects/collisionshapes/PlaneCollisionShape.h
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/PlaneCollisionShape.h	(revision 5781)
+++ code/trunk/src/modules/objects/collisionshapes/PlaneCollisionShape.h	(revision 5781)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Martin Stypinski
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _PlaneCollisionShape_H__
+#define _PlaneCollisionShape_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include "util/Math.h"
+#include "collisionshapes/CollisionShape.h"
+
+namespace orxonox
+{
+    class _ObjectsExport PlaneCollisionShape : public CollisionShape
+    {
+        public:
+            PlaneCollisionShape(BaseObject* creator);
+            virtual ~PlaneCollisionShape();
+
+            void registerVariables();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void setNormal(const Vector3& normal)
+                { this->normal_ = normal; updateShape(); }
+            inline const Vector3& getNormal()
+                { return normal_;}
+
+            inline void setOffset(float offset)
+                { this->offset_ = offset; updateShape(); }
+            inline float getOffset()
+                { return this->offset_;}
+
+        private:
+            btCollisionShape* createNewShape()const;
+
+            Vector3 normal_;
+            float   offset_;
+     };
+}
+
+#endif /* _PlaneCollisionShape_H__ */
Index: code/trunk/src/modules/objects/collisionshapes/SphereCollisionShape.cc
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/SphereCollisionShape.cc	(revision 5781)
+++ code/trunk/src/modules/objects/collisionshapes/SphereCollisionShape.cc	(revision 5781)
@@ -0,0 +1,72 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "SphereCollisionShape.h"
+
+#include <BulletCollision/CollisionShapes/btSphereShape.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(SphereCollisionShape);
+
+    SphereCollisionShape::SphereCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(SphereCollisionShape);
+
+        this->radius_ = 1.0f;
+        updateShape();
+
+        this->registerVariables();
+    }
+
+    SphereCollisionShape::~SphereCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    void SphereCollisionShape::registerVariables()
+    {
+        registerVariable(this->radius_, VariableDirection::ToClient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+    }
+
+    void SphereCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SphereCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(SphereCollisionShape, "radius", setRadius, getRadius, xmlelement, mode);
+    }
+
+    btCollisionShape* SphereCollisionShape::createNewShape() const
+    {
+        return new btSphereShape(this->radius_);
+    }
+}
Index: code/trunk/src/modules/objects/collisionshapes/SphereCollisionShape.h
===================================================================
--- code/trunk/src/modules/objects/collisionshapes/SphereCollisionShape.h	(revision 5781)
+++ code/trunk/src/modules/objects/collisionshapes/SphereCollisionShape.h	(revision 5781)
@@ -0,0 +1,58 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _SphereCollisionShape_H__
+#define _SphereCollisionShape_H__
+
+#include "objects/ObjectsPrereqs.h"
+#include "collisionshapes/CollisionShape.h"
+
+namespace orxonox
+{
+    class _ObjectsExport SphereCollisionShape : public CollisionShape
+    {
+        public:
+            SphereCollisionShape(BaseObject* creator);
+            virtual ~SphereCollisionShape();
+
+            void registerVariables();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void setRadius(float radius)
+                { this->radius_ = radius; updateShape(); }
+            inline float getRadius() const
+                { return this->radius_; }
+
+        private:
+            btCollisionShape* createNewShape() const;
+
+            float radius_;
+    };
+}
+
+#endif /* _SphereCollisionShape_H__ */
Index: code/trunk/src/modules/objects/eventsystem/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/objects/eventsystem/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/objects/eventsystem/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,5 @@
+ADD_SOURCE_FILES(OBJECTS_SRC_FILES
+  EventDispatcher.cc
+  EventListener.cc
+  EventTarget.cc
+)
Index: code/trunk/src/modules/objects/eventsystem/EventDispatcher.cc
===================================================================
--- code/trunk/src/modules/objects/eventsystem/EventDispatcher.cc	(revision 5781)
+++ code/trunk/src/modules/objects/eventsystem/EventDispatcher.cc	(revision 5781)
@@ -0,0 +1,81 @@
+/*
+ *   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 "EventDispatcher.h"
+
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+#include "core/XMLPort.h"
+#include "EventTarget.h"
+
+namespace orxonox
+{
+    CreateFactory(EventDispatcher);
+
+    EventDispatcher::EventDispatcher(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(EventDispatcher);
+    }
+
+    EventDispatcher::~EventDispatcher()
+    {
+        if (this->isInitialized())
+            for (std::list<EventTarget*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
+                delete (*it);
+    }
+
+    void EventDispatcher::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(EventDispatcher, XMLPort, xmlelement, mode);
+
+        XMLPortObject(EventDispatcher, EventTarget, "targets", addTarget, getTarget, xmlelement, mode);
+    }
+
+    void EventDispatcher::processEvent(Event& event)
+    {
+        for (std::list<EventTarget*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
+            (*it)->fireEvent(event);
+    }
+
+    void EventDispatcher::addTarget(EventTarget* target)
+    {
+        this->targets_.push_back(target);
+    }
+
+    EventTarget* EventDispatcher::getTarget(unsigned int index) const
+    {
+        unsigned int i = 0;
+        for (std::list<EventTarget*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
+        {
+            if (i == index)
+                return (*it);
+            ++i;
+        }
+        return 0;
+    }
+}
Index: code/trunk/src/modules/objects/eventsystem/EventDispatcher.h
===================================================================
--- code/trunk/src/modules/objects/eventsystem/EventDispatcher.h	(revision 5781)
+++ code/trunk/src/modules/objects/eventsystem/EventDispatcher.h	(revision 5781)
@@ -0,0 +1,57 @@
+/*
+ *   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 _EventDispatcher_H__
+#define _EventDispatcher_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include <list>
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    class _ObjectsExport EventDispatcher : public BaseObject
+    {
+        public:
+            EventDispatcher(BaseObject* creator);
+            virtual ~EventDispatcher();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void processEvent(Event& event);
+
+            void addTarget(EventTarget* target);
+            EventTarget* getTarget(unsigned int index) const;
+
+        private:
+            std::list<EventTarget*> targets_;
+    };
+}
+
+#endif /* _EventDispatcher_H__ */
Index: code/trunk/src/modules/objects/eventsystem/EventListener.cc
===================================================================
--- code/trunk/src/modules/objects/eventsystem/EventListener.cc	(revision 5781)
+++ code/trunk/src/modules/objects/eventsystem/EventListener.cc	(revision 5781)
@@ -0,0 +1,96 @@
+/*
+ *   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 "EventListener.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(EventListener);
+
+    EventListener::EventListener(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(EventListener);
+
+        this->bActive_ = false;
+    }
+
+    EventListener::~EventListener()
+    {
+    }
+
+    void EventListener::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(EventListener, XMLPort, xmlelement, mode);
+
+        XMLPortParam(EventListener, "event", setEventName, getEventName, xmlelement, mode);
+    }
+
+    void EventListener::processEvent(Event& event)
+    {
+        if (this->bActive_)
+        {
+            COUT(2) << "Warning: Detected Event loop in EventListener \"" << this->getName() << "\"" << std::endl;
+            return;
+        }
+
+        this->bActive_ = true;
+
+        this->fireEvent(event.activate_, event.originator_);
+
+        this->bActive_ = false;
+    }
+
+    void EventListener::setEventName(const std::string& eventname)
+    {
+        this->eventName_ = eventname;
+
+        if (this->eventName_ == "")
+            return;
+
+        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
+            if (it->getName() == this->eventName_)
+                this->registerAsListener(*it);
+    }
+
+    void EventListener::loadedNewXMLName(BaseObject* object)
+    {
+        if (this->eventName_ == "")
+            return;
+
+        if (object->getName() == this->eventName_)
+            this->registerAsListener(object);
+    }
+
+    void EventListener::registerAsListener(BaseObject* object)
+    {
+        object->registerEventListener(this, "");
+    }
+}
Index: code/trunk/src/modules/objects/eventsystem/EventListener.h
===================================================================
--- code/trunk/src/modules/objects/eventsystem/EventListener.h	(revision 5781)
+++ code/trunk/src/modules/objects/eventsystem/EventListener.h	(revision 5781)
@@ -0,0 +1,63 @@
+/*
+ *   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 _EventListener_H__
+#define _EventListener_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include <string>
+#include "core/BaseObject.h"
+#include "core/XMLNameListener.h"
+
+namespace orxonox
+{
+    class _ObjectsExport EventListener : public BaseObject, public XMLNameListener
+    {
+        public:
+            EventListener(BaseObject* creator);
+            virtual ~EventListener();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void processEvent(Event& event);
+
+            void setEventName(const std::string& eventname);
+            inline const std::string& getEventName() const
+                { return this->eventName_; }
+
+        private:
+            virtual void loadedNewXMLName(BaseObject* object);
+            void registerAsListener(BaseObject* object);
+
+            std::string eventName_;
+            bool bActive_;
+    };
+}
+
+#endif /* _EventListener_H__ */
Index: code/trunk/src/modules/objects/eventsystem/EventTarget.cc
===================================================================
--- code/trunk/src/modules/objects/eventsystem/EventTarget.cc	(revision 5781)
+++ code/trunk/src/modules/objects/eventsystem/EventTarget.cc	(revision 5781)
@@ -0,0 +1,68 @@
+/*
+ *   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 "EventTarget.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(EventTarget);
+
+    EventTarget::EventTarget(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(EventTarget);
+    }
+
+    EventTarget::~EventTarget()
+    {
+    }
+
+    void EventTarget::changedName()
+    {
+        SUPER(EventTarget, changedName);
+
+        for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
+            if (it->getName() == this->getName())
+                this->addAsEvent(*it);
+    }
+
+    void EventTarget::loadedNewXMLName(BaseObject* object)
+    {
+        if (this->getName() == "")
+            return;
+
+        if (object->getName() == this->getName())
+            this->addAsEvent(object);
+    }
+
+    void EventTarget::addAsEvent(BaseObject* object)
+    {
+        if (object != static_cast<BaseObject*>(this))
+            object->addEvent(this, "");
+    }
+}
Index: code/trunk/src/modules/objects/eventsystem/EventTarget.h
===================================================================
--- code/trunk/src/modules/objects/eventsystem/EventTarget.h	(revision 5781)
+++ code/trunk/src/modules/objects/eventsystem/EventTarget.h	(revision 5781)
@@ -0,0 +1,53 @@
+/*
+ *   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 _EventTarget_H__
+#define _EventTarget_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include "core/BaseObject.h"
+#include "core/XMLNameListener.h"
+
+namespace orxonox
+{
+    class _ObjectsExport EventTarget : public BaseObject, public XMLNameListener
+    {
+        public:
+            EventTarget(BaseObject* creator);
+            virtual ~EventTarget();
+
+            virtual void changedName();
+
+        private:
+            virtual void loadedNewXMLName(BaseObject* object);
+            void addAsEvent(BaseObject* object);
+    };
+}
+
+#endif /* _EventTarget_H__ */
Index: code/trunk/src/modules/objects/triggers/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/objects/triggers/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/objects/triggers/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,6 @@
+ADD_SOURCE_FILES(OBJECTS_SRC_FILES
+  Trigger.cc
+  DistanceTrigger.cc
+  EventTrigger.cc
+  CheckPoint.cc
+)
Index: code/trunk/src/modules/objects/triggers/CheckPoint.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/CheckPoint.cc	(revision 5781)
+++ code/trunk/src/modules/objects/triggers/CheckPoint.cc	(revision 5781)
@@ -0,0 +1,120 @@
+/*
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "CheckPoint.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "gametypes/Asteroids.h"
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+    CreateFactory(CheckPoint);
+
+    CheckPoint::CheckPoint(BaseObject* creator) : DistanceTrigger(creator)
+    {
+        RegisterObject(CheckPoint);
+
+        this->setStayActive(true);
+        this->setDistance(50);
+        this->bIsFirst_ = false;
+        this->bIsDestination_ = false;
+
+        this->setRadarObjectColour(ColourValue::Green);
+        this->setRadarObjectShape(RadarViewable::Dot);
+        this->setRadarVisibility(false);
+
+        this->notifyMaskUpdate();
+    }
+
+    CheckPoint::~CheckPoint()
+    {
+    }
+
+    void CheckPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(CheckPoint, XMLPort, xmlelement, mode);
+
+        XMLPortParam(CheckPoint, "isfirst", setFirst, getFirst, xmlelement, mode).defaultValues(false);
+        XMLPortParam(CheckPoint, "isdestination", setDestination, getDestination, xmlelement, mode).defaultValues(false);
+        XMLPortParam(CheckPoint, "addtime", setAddTime, getAddTime, xmlelement, mode).defaultValues(30);
+    }
+
+    void CheckPoint::changedActivity()
+    {
+        SUPER(CheckPoint, changedActivity);
+
+        if (this->BaseObject::isActive())
+        {
+            this->setRadarVisibility(true);
+        }
+        else
+        {
+            this->setRadarVisibility(false);
+        }
+    }
+
+    void CheckPoint::triggered(bool bIsTriggered)
+    {
+        DistanceTrigger::triggered(bIsTriggered);
+
+        Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype());
+        if (gametype)
+        {
+            gametype->addTime(addTime_);
+            this->setRadarVisibility(false);
+
+            if (bIsTriggered)
+            {
+                if (bIsFirst_)
+                {
+                    gametype->setTimeLimit(addTime_);
+                    gametype->firstCheckpointReached(true);
+                }
+
+                if (bIsDestination_)
+                {
+                    const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage("Congratulations - you have won the match!");
+                    gametype->end();
+                }
+
+                if (!bIsFirst_ && !bIsDestination_)
+                {
+                    const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage("Checkpoint reached");
+                }
+            }
+        }
+    }
+
+    void CheckPoint::notifyMaskUpdate()
+    {
+        this->targetMask_.exclude(Class(BaseObject));
+        this->targetMask_.include(Class(Pawn));
+    }
+}
Index: code/trunk/src/modules/objects/triggers/CheckPoint.h
===================================================================
--- code/trunk/src/modules/objects/triggers/CheckPoint.h	(revision 5781)
+++ code/trunk/src/modules/objects/triggers/CheckPoint.h	(revision 5781)
@@ -0,0 +1,84 @@
+/*
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief
+*/
+
+#ifndef _CheckPoint_H__
+#define _CheckPoint_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include "interfaces/RadarViewable.h"
+#include "DistanceTrigger.h"
+
+namespace orxonox
+{
+    class _ObjectsExport CheckPoint : public DistanceTrigger, public RadarViewable
+    {
+    public:
+        CheckPoint(BaseObject* creator);
+        virtual ~CheckPoint();
+
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a CheckPoint object through XML.
+        virtual void changedActivity();
+
+    private:
+        virtual void triggered(bool bIsTriggered);
+        virtual void notifyMaskUpdate();
+
+        inline void setDestination(bool isDestination)
+            { bIsDestination_ = isDestination; }
+
+        inline const WorldEntity* getWorldEntity() const
+            { return this; }
+
+        inline bool getDestination()
+            { return bIsDestination_; }
+
+        inline void setFirst(bool isFirst)
+            { this->bIsFirst_ = isFirst; }
+
+        inline bool getFirst()
+            { return this->bIsFirst_; }
+
+        inline void setAddTime(float time)
+            { this->addTime_ = time; }
+
+        inline bool getAddTime()
+            { return this->addTime_; }
+
+        bool bIsFirst_;
+        bool bIsDestination_;
+        float addTime_;
+    };
+}
+
+#endif /* _CheckPoint_H__ */
Index: code/trunk/src/modules/objects/triggers/DistanceTrigger.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/DistanceTrigger.cc	(revision 5781)
+++ code/trunk/src/modules/objects/triggers/DistanceTrigger.cc	(revision 5781)
@@ -0,0 +1,152 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DistanceTrigger.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+  CreateFactory(DistanceTrigger);
+
+  DistanceTrigger::DistanceTrigger(BaseObject* creator) : Trigger(creator)
+  {
+    RegisterObject(DistanceTrigger);
+
+    this->distance_ = 100;
+    this->targetMask_.exclude(Class(BaseObject));
+    this->setForPlayer(false); //!< Normally hasn't just ControllableEntities as targets.
+  }
+
+  DistanceTrigger::~DistanceTrigger()
+  {
+  }
+
+  void DistanceTrigger::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+  {
+    SUPER(DistanceTrigger, XMLPort, xmlelement, mode);
+
+    XMLPortParam(DistanceTrigger, "distance", setDistance, getDistance, xmlelement, mode).defaultValues(100.0f);
+    XMLPortParamLoadOnly(DistanceTrigger, "target", addTargets, xmlelement, mode).defaultValues("ControllableEntity");
+  }
+
+  void DistanceTrigger::addTarget(Ogre::Node* targetNode)
+  {
+    this->targetSet_.insert(targetNode);
+  }
+
+  void DistanceTrigger::removeTarget(Ogre::Node* targetNode)
+  {
+    int returnval = this->targetSet_.erase(targetNode);
+    if (returnval == 0)
+    {
+      COUT(2) << "Warning: Node " << targetNode << " did not exist in targetSet of trigger " << this << " !" << std::endl;
+      COUT(4) << "Content of targetSet of trigger " << this << " :" << std::endl;
+      std::set<Ogre::Node*>::iterator it;
+      for (it = this->targetSet_.begin(); it != this->targetSet_.end(); ++it)
+      {
+        COUT(4) << *it << std::endl;
+      }
+      COUT(4) << "End of targetSet of trigger " << this << std::endl;
+    }
+  }
+
+  void DistanceTrigger::addTargets(const std::string& targets)
+  {
+    Identifier* targetId = ClassByString(targets);
+
+    //! Checks whether the target is (or is derived from) a ControllableEntity.
+    Identifier* controllableEntityId = Class(ControllableEntity);
+    if(targetId->isA(controllableEntityId))
+    {
+      this->setForPlayer(true);
+    }
+
+    if (!targetId)
+    {
+        COUT(1) << "Error: \"" << targets << "\" is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ")" << std::endl;
+        return;
+    }
+
+    this->targetMask_.include(targetId);
+
+    // trigger shouldn't react on itself or other triggers
+    this->targetMask_.exclude(Class(Trigger), true);
+
+    // we only want WorldEntities
+    ClassTreeMask WEMask;
+    WEMask.include(Class(WorldEntity));
+    this->targetMask_ *= WEMask;
+
+    this->notifyMaskUpdate();
+  }
+
+  void DistanceTrigger::removeTargets(const std::string& targets)
+  {
+    Identifier* targetId = ClassByString(targets);
+    this->targetMask_.exclude(targetId);
+  }
+
+  bool DistanceTrigger::checkDistance()
+  {
+    // Iterate through all objects
+    for (ClassTreeMaskObjectIterator it = this->targetMask_.begin(); it != this->targetMask_.end(); ++it)
+    {
+      WorldEntity* entity = orxonox_cast<WorldEntity*>(*it);
+      if (!entity)
+        continue;
+
+      Vector3 distanceVec = entity->getWorldPosition() - this->getWorldPosition();
+      if (distanceVec.length() < this->distance_)
+      {
+
+        // If the target is a player (resp. is a, or is derived from a, ControllableEntity) the triggeringPlayer is set to the target entity.
+        if(this->isForPlayer())
+        {
+          Pawn* player = orxonox_cast<Pawn*>(entity);
+          this->setTriggeringPlayer(player);
+        }
+
+        return true;
+      }
+    }
+    return false;
+  }
+
+  bool DistanceTrigger::isTriggered(TriggerMode::Value mode)
+  {
+    if (Trigger::isTriggered(mode))
+    {
+      return checkDistance();
+    }
+    else
+      return false;
+  }
+}
Index: code/trunk/src/modules/objects/triggers/DistanceTrigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/DistanceTrigger.h	(revision 5781)
+++ code/trunk/src/modules/objects/triggers/DistanceTrigger.h	(revision 5781)
@@ -0,0 +1,74 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Benjamin Knecht
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _DistanceTrigger_H__
+#define _DistanceTrigger_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include <set>
+#include "core/ClassTreeMask.h"
+#include "Trigger.h"
+#include "interfaces/PlayerTrigger.h"
+
+namespace orxonox
+{
+  class _ObjectsExport DistanceTrigger : public Trigger, public PlayerTrigger
+  {
+    public:
+      DistanceTrigger(BaseObject* creator);
+      virtual ~DistanceTrigger();
+
+      virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+      void addTarget(Ogre::Node* targetNode);
+      void addTargets(const std::string& targets);
+      void removeTarget(Ogre::Node* targetNode);
+      void removeTargets(const std::string& targets);
+
+      inline void setDistance(float distance)
+        { this->distance_ = distance; }
+      inline float getDistance() const
+        { return this->distance_; }
+
+      bool checkDistance();
+
+    protected:
+      virtual bool isTriggered(TriggerMode::Value mode);
+      virtual void notifyMaskUpdate() {}
+
+      ClassTreeMask targetMask_;
+
+    private:
+      std::set<Ogre::Node*> targetSet_;
+      float distance_;
+
+  };
+}
+
+#endif /* _DistanceTrigger_H__ */
Index: code/trunk/src/modules/objects/triggers/EventTrigger.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/EventTrigger.cc	(revision 5781)
+++ code/trunk/src/modules/objects/triggers/EventTrigger.cc	(revision 5781)
@@ -0,0 +1,63 @@
+/*
+ *   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 "EventTrigger.h"
+
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(EventTrigger);
+
+    EventTrigger::EventTrigger(BaseObject* creator) : Trigger(creator)
+    {
+        RegisterObject(EventTrigger);
+
+        this->bEventTriggered_ = false;
+    }
+
+    EventTrigger::~EventTrigger()
+    {
+    }
+
+    void EventTrigger::processEvent(Event& event)
+    {
+        SUPER(EventTrigger, processEvent, event);
+
+        ORXONOX_SET_EVENT(EventTrigger, "trigger", trigger, event);
+    }
+
+    bool EventTrigger::isTriggered(TriggerMode::Value mode)
+    {
+        if (Trigger::isTriggered(mode))
+            return this->bEventTriggered_;
+        else
+            return false;
+    }
+}
Index: code/trunk/src/modules/objects/triggers/EventTrigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/EventTrigger.h	(revision 5781)
+++ code/trunk/src/modules/objects/triggers/EventTrigger.h	(revision 5781)
@@ -0,0 +1,56 @@
+/*
+ *   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 _EventTrigger_H__
+#define _EventTrigger_H__
+
+#include "objects/ObjectsPrereqs.h"
+#include "Trigger.h"
+
+namespace orxonox
+{
+    class _ObjectsExport EventTrigger : public Trigger
+    {
+        public:
+            EventTrigger(BaseObject* creator);
+            virtual ~EventTrigger();
+
+            virtual void processEvent(Event& event);
+
+            inline void trigger(bool bTriggered)
+                { this->bEventTriggered_ = bTriggered; this->tick(0); }
+
+        protected:
+            virtual bool isTriggered(TriggerMode::Value mode);
+
+        private:
+            bool bEventTriggered_;
+    };
+}
+
+#endif /* _EventTrigger_H__ */
Index: code/trunk/src/modules/objects/triggers/Trigger.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/Trigger.cc	(revision 5781)
+++ code/trunk/src/modules/objects/triggers/Trigger.cc	(revision 5781)
@@ -0,0 +1,328 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "Trigger.h"
+
+#include "core/CoreIncludes.h"
+#include "core/ConsoleCommand.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
+#include "Scene.h"
+
+namespace orxonox
+{
+
+  SetConsoleCommand(Trigger, debugFlares, false).defaultValues(false);
+
+  CreateFactory(Trigger);
+
+  Trigger::Trigger(BaseObject* creator) : StaticEntity(creator)
+  {
+    RegisterObject(Trigger);
+
+    this->mode_ = TriggerMode::EventTriggerAND;
+
+    this->bFirstTick_ = true;
+    this->bActive_ = false;
+    this->bTriggered_ = false;
+    this->latestState_ = 0x0;
+
+    this->bInvertMode_ = false;
+    this->bSwitch_ = false;
+    this->bStayActive_ = false;
+    this->delay_ = 0.0f;
+    this->remainingTime_ = 0.0f;
+    this->timeSinceLastEvent_ = 0.0f;
+    this->remainingActivations_ = -1;
+
+//    this->bUpdating_ = false;
+
+    if (this->getScene() && GameMode::showsGraphics())
+    {
+      this->debugBillboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 0.0, 0.0), 1);
+      this->debugBillboard_.setVisible(false);
+
+      if (this->debugBillboard_.getBillboardSet())
+          this->attachOgreObject(this->debugBillboard_.getBillboardSet());
+    }
+
+    this->setObjectMode(0x0);
+  }
+
+  Trigger::~Trigger()
+  {
+  }
+
+  void Trigger::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+  {
+    SUPER(Trigger, XMLPort, xmlelement, mode);
+
+    XMLPortParam(Trigger, "delay",       setDelay,       getDelay,       xmlelement, mode).defaultValues(0.0f);
+    XMLPortParam(Trigger, "switch",      setSwitch,      getSwitch,      xmlelement, mode).defaultValues(false);
+    XMLPortParam(Trigger, "stayactive",  setStayActive,  getStayActive,  xmlelement, mode).defaultValues(false);
+    XMLPortParam(Trigger, "activations", setActivations, getActivations, xmlelement, mode).defaultValues(-1);
+    XMLPortParam(Trigger, "invert",      setInvert,      getInvert,      xmlelement, mode).defaultValues(false);
+    XMLPortParamTemplate(Trigger, "mode", setMode, getModeString, xmlelement, mode, const std::string&).defaultValues("or");
+
+    XMLPortObject(Trigger, Trigger, "", addTrigger, getTrigger, xmlelement, mode);
+  }
+
+  void Trigger::tick(float dt)
+  {
+    if (this->bFirstTick_)
+    {
+      this->bFirstTick_ = false;
+      this->triggered(false);
+    }
+
+    // Check if the object is active (this is NOT Trigger::isActive()!)
+    if (!this->BaseObject::isActive())
+        return;
+
+    SUPER(Trigger, tick, dt);
+
+    bool newTriggered = this->isTriggered() ^ this->bInvertMode_;
+
+    // check if new triggering event is really new
+    if ((this->latestState_ & 0x1) != newTriggered)
+    {
+      // create new state
+      if (newTriggered)
+      {
+        this->latestState_ |= 1; // set trigger bit to 1
+        this->switchState();
+      }
+      else
+      {
+        this->latestState_ &= 0xFE; // set trigger bit to 0
+        if (!this->bSwitch_)
+          this->switchState();
+      }
+    }
+
+    if (this->remainingTime_ > 0.0)
+    {
+      this->remainingTime_ -= dt;
+      // only increase when acctually waiting for a state in the queue
+      if (this->timeSinceLastEvent_ >= 0.0)
+        this->timeSinceLastEvent_ += dt;
+    }
+
+    while (this->remainingTime_ <= 0.0 && this->stateChanges_.size() > 0)
+    {
+      // time ran out, change state to new one
+      char newState = this->stateChanges_.front().second;
+      this->bTriggered_ = (newState & 0x1);
+      this->bActive_ = newState & 2;
+      this->triggered(this->bActive_);
+      this->stateChanges_.pop();
+      if (this->stateChanges_.size() != 0)
+        this->remainingTime_ = this->stateChanges_.front().first;
+      else
+        this->timeSinceLastEvent_ = this->delay_;
+    }
+
+    if (this->bTriggered_ && this->bActive_)
+      this->setBillboardColour(ColourValue(0.5, 1.0, 0.0));
+    else if (!this->bTriggered_ && this->bActive_)
+      this->setBillboardColour(ColourValue(0.0, 1.0, 0.0));
+    else if (this->bTriggered_ && !this->bActive_)
+      this->setBillboardColour(ColourValue(1.0, 0.5, 0.0));
+    else
+      this->setBillboardColour(ColourValue(1.0, 0.0, 0.0));
+  }
+
+  void Trigger::triggered(bool bIsTriggered)
+  {
+    this->fireEvent(bIsTriggered);
+  }
+
+  bool Trigger::isTriggered(TriggerMode::Value mode)
+  {
+//    if (this->bUpdating_)
+//      return this->bTriggered_;
+
+//    this->bUpdating_ = true;
+    if (this->children_.size() != 0)
+    {
+      bool returnval = false;
+
+      switch (mode)
+      {
+        case TriggerMode::EventTriggerAND:
+          returnval = checkAnd();
+          break;
+        case TriggerMode::EventTriggerOR:
+          returnval = checkOr();
+          break;
+        case TriggerMode::EventTriggerXOR:
+          returnval = checkXor();
+          break;
+        default:
+          returnval = false;
+          break;
+      }
+//      this->bUpdating_ = false;
+
+      return returnval;
+    }
+    return true;
+  }
+
+  bool Trigger::checkAnd()
+  {
+    std::set<Trigger*>::iterator it;
+    for(it = this->children_.begin(); it != this->children_.end(); ++it)
+    {
+      if (!(*it)->isActive())
+        return false;
+    }
+    return true;
+  }
+
+  bool Trigger::checkOr()
+  {
+    std::set<Trigger*>::iterator it;
+    for(it = this->children_.begin(); it != this->children_.end(); ++it)
+    {
+      if ((*it)->isActive())
+        return true;
+    }
+    return false;
+  }
+
+  bool Trigger::checkXor()
+  {
+    std::set<Trigger*>::iterator it;
+    bool test = false;
+    for(it = this->children_.begin(); it != this->children_.end(); ++it)
+    {
+      if (test && (*it)->isActive())
+        return false;
+      if ((*it)->isActive())
+        test = true;
+    }
+    return test;
+  }
+
+  bool Trigger::switchState()
+  {
+    if (( (this->latestState_ & 2) && this->bStayActive_ && (this->remainingActivations_ <= 0))
+     || (!(this->latestState_ & 2)                       && (this->remainingActivations_ == 0)))
+      return false;
+    else
+    {
+      this->latestState_ ^= 2; // toggle state bit
+
+      // increase activation count
+      if (this->latestState_ & 2 && this->remainingActivations_ > 0)
+        this->remainingActivations_--;
+
+      this->storeState();
+
+      return true;
+    }
+  }
+
+  void Trigger::storeState()
+  {
+    // put state change into queue
+    this->stateChanges_.push(std::pair<float, char>(this->timeSinceLastEvent_, this->latestState_));
+    // reset time since last event
+    this->timeSinceLastEvent_ = 0.0;
+
+    if (this->stateChanges_.size() == 1)
+      this->remainingTime_ = this->stateChanges_.front().first;
+  }
+
+  void Trigger::setDelay(float delay)
+  {
+    this->delay_ = delay;
+    this->timeSinceLastEvent_ = delay;
+  }
+
+  void Trigger::setMode(const std::string& modeName)
+  {
+    if (modeName == "and")
+      this->setMode(TriggerMode::EventTriggerAND);
+    else if (modeName == "or")
+      this->setMode(TriggerMode::EventTriggerOR);
+    else if (modeName == "xor")
+      this->setMode(TriggerMode::EventTriggerXOR);
+  }
+
+  std::string Trigger::getModeString() const
+  {
+    if (this->mode_ == TriggerMode::EventTriggerAND)
+      return std::string("and");
+    else if (this->mode_ == TriggerMode::EventTriggerOR)
+      return std::string("or");
+    else if (this->mode_ == TriggerMode::EventTriggerXOR)
+      return std::string("xor");
+    else
+      return std::string("and");
+  }
+
+  void Trigger::addTrigger(Trigger* trigger)
+  {
+    if (this != trigger)
+      this->children_.insert(trigger);
+  }
+
+  const Trigger* Trigger::getTrigger(unsigned int index) const
+  {
+    if (this->children_.size() <= index)
+      return NULL;
+
+    std::set<Trigger*>::const_iterator it;
+    it = this->children_.begin();
+
+    for (unsigned int i = 0; i != index; ++i)
+      ++it;
+
+    return (*it);
+  }
+
+  void Trigger::debugFlares(bool bVisible)
+  {
+    for (ObjectList<Trigger>::iterator it = ObjectList<Trigger>::begin(); it != ObjectList<Trigger>::end(); ++it)
+      it->setVisible(bVisible);
+  }
+
+  void Trigger::setBillboardColour(const ColourValue& colour)
+  {
+    this->debugBillboard_.setColour(colour);
+  }
+
+  void Trigger::changedVisibility()
+  {
+    SUPER(Trigger, changedVisibility);
+
+    this->debugBillboard_.setVisible(this->isVisible());
+  }
+}
Index: code/trunk/src/modules/objects/triggers/Trigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/Trigger.h	(revision 5781)
+++ code/trunk/src/modules/objects/triggers/Trigger.h	(revision 5781)
@@ -0,0 +1,143 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _Trigger_H__
+#define _Trigger_H__
+
+#include "objects/ObjectsPrereqs.h"
+
+#include <set>
+#include <queue>
+
+#include "tools/BillboardSet.h"
+#include "tools/interfaces/Tickable.h"
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+  namespace TriggerMode
+  {
+    enum Value
+    {
+      EventTriggerAND,
+      EventTriggerOR,
+      EventTriggerXOR,
+    };
+  }
+
+  class _ObjectsExport Trigger : public StaticEntity, public Tickable
+  {
+    public:
+      Trigger(BaseObject* creator);
+      virtual ~Trigger();
+
+      virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+      virtual void tick(float dt);
+
+      inline bool isActive() const
+        { return bActive_; }
+
+      void addTrigger(Trigger* trigger);
+      const Trigger* getTrigger(unsigned int index) const;
+
+      void setMode(const std::string& modeName);
+      inline void setMode(TriggerMode::Value mode)
+        { this->mode_ = mode; }
+      inline TriggerMode::Value getMode() const
+        { return mode_; }
+
+      inline void setInvert(bool bInvert)
+        { this->bInvertMode_ = bInvert; }
+      inline bool getInvert() const
+        { return this->bInvertMode_; }
+
+      inline void setSwitch(bool bSwitch)
+        { this->bSwitch_ = bSwitch; }
+      inline bool getSwitch() const
+        { return this->bSwitch_; }
+
+      inline void setStayActive(bool bStayActive)
+        { this->bStayActive_ = bStayActive; }
+      inline bool getStayActive() const
+        { return this->bStayActive_; }
+
+      inline void setActivations(int activations)
+        { this->remainingActivations_ = activations; }
+      inline int getActivations() const
+        { return this->remainingActivations_; }
+
+      inline void setVisible(bool visibility)
+        { this->debugBillboard_.setVisible(visibility); }
+
+      void setDelay(float delay);
+      inline float getDelay() const
+        { return this->delay_; }
+
+      bool switchState();
+
+      static void debugFlares(bool bVisible);
+      virtual void changedVisibility();
+
+    protected:
+      inline bool isTriggered() { return this->isTriggered(this->mode_); }
+      virtual bool isTriggered(TriggerMode::Value mode);
+      virtual void triggered(bool bIsTriggered);
+
+    private:
+      bool checkAnd();
+      bool checkOr();
+      bool checkXor();
+      void setBillboardColour(const ColourValue& colour);
+      void storeState();
+      std::string getModeString() const;
+
+      bool bActive_;
+      bool bTriggered_;
+      bool bFirstTick_;
+
+      TriggerMode::Value mode_;
+      bool bInvertMode_;
+      bool bSwitch_;
+      bool bStayActive_;
+      float delay_;
+      int remainingActivations_;
+
+      char latestState_;
+      float remainingTime_;
+      float timeSinceLastEvent_;
+
+//      bool bUpdating_;
+      BillboardSet debugBillboard_;
+
+      std::set<Trigger*> children_;
+      std::queue<std::pair<float, char> > stateChanges_;
+  };
+
+}
+
+#endif /* _Trigger_H__ */
Index: code/trunk/src/modules/overlays/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/overlays/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/overlays/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,21 @@
+SET_SOURCE_FILES(OVERLAYS_SRC_FILES
+  OverlayText.cc
+  FadeoutText.cc
+  GUIOverlay.cc
+)
+
+ADD_SUBDIRECTORY(debugging)
+ADD_SUBDIRECTORY(hud)
+ADD_SUBDIRECTORY(stats)
+
+ORXONOX_ADD_LIBRARY(overlays
+  MODULE
+  FIND_HEADER_FILES
+  PCH_FILE
+    OverlaysPrecompiledHeaders.h
+  DEFINE_SYMBOL
+    "OVERLAYS_SHARED_BUILD"
+  LINK_LIBRARIES
+    orxonox
+  SOURCE_FILES ${OVERLAYS_SRC_FILES}
+)
Index: code/trunk/src/modules/overlays/FadeoutText.cc
===================================================================
--- code/trunk/src/modules/overlays/FadeoutText.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/FadeoutText.cc	(revision 5781)
@@ -0,0 +1,116 @@
+/*
+ *   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 "FadeoutText.h"
+
+#include <OgreTextAreaOverlayElement.h>
+#include "util/Math.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(FadeoutText);
+
+    FadeoutText::FadeoutText(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(FadeoutText);
+
+        this->delay_ = 3.0f;
+        this->fadeouttime_ = 1.0f;
+
+        this->bFadingOut_ = false;
+        this->fadeouttimer_.setTimer(3.0f, false, this, createExecutor(createFunctor(&FadeoutText::fadeout)));
+        this->fadeouttimer_.stopTimer();
+
+        this->initialAlpha_ = 1.0f;
+    }
+
+    void FadeoutText::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(FadeoutText, XMLPort, xmlelement, mode);
+
+        XMLPortParam(FadeoutText, "delay", setDelay, getDelay, xmlelement, mode);
+        XMLPortParam(FadeoutText, "fadeout", setFadeouttime, getFadeouttime, xmlelement, mode);
+    }
+
+    void FadeoutText::tick(float dt)
+    {
+        if (this->bFadingOut_)
+        {
+            ColourValue colour = this->getColour();
+
+            if (colour.a > 0)
+            {
+                float alpha = colour.a;
+
+                alpha -= dt / this->fadeouttime_;
+                if (alpha < 0)
+                    alpha = 0;
+                colour.a = alpha;
+
+                this->text_->setColour(colour);
+            }
+            else
+            {
+                this->text_->setCaption("");
+                this->reset();
+            }
+        }
+    }
+
+    void FadeoutText::fadeout()
+    {
+        this->bFadingOut_ = true;
+    }
+
+    void FadeoutText::reset()
+    {
+        this->bFadingOut_ = false;
+
+        ColourValue colour = this->getColour();
+        colour.a = this->initialAlpha_;
+        this->text_->setColour(colour);
+    }
+
+    void FadeoutText::changedColour()
+    {
+        OverlayText::changedColour();
+
+        this->initialAlpha_ = this->getColour().a;
+    }
+
+    void FadeoutText::changedCaption()
+    {
+        OverlayText::changedCaption();
+
+        this->reset();
+        this->fadeouttimer_.setInterval(this->delay_);
+        this->fadeouttimer_.startTimer();
+    }
+}
Index: code/trunk/src/modules/overlays/FadeoutText.h
===================================================================
--- code/trunk/src/modules/overlays/FadeoutText.h	(revision 5781)
+++ code/trunk/src/modules/overlays/FadeoutText.h	(revision 5781)
@@ -0,0 +1,75 @@
+/*
+ *   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 _FadeoutText_H__
+#define _FadeoutText_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/Timer.h"
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport FadeoutText : public OverlayText, public Tickable
+    {
+        public:
+            FadeoutText(BaseObject* creator);
+            virtual ~FadeoutText() {}
+
+            virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+            virtual void tick(float dt);
+
+            inline void setDelay(float delay)
+                { this->delay_ = delay; }
+            inline float getDelay() const
+                { return this->delay_; }
+
+            inline void setFadeouttime(float fadeouttime)
+                { this->fadeouttime_ = fadeouttime; }
+            inline float getFadeouttime() const
+                { return this->fadeouttime_; }
+
+        private:
+            virtual void changedColour();
+            virtual void changedCaption();
+
+            void fadeout();
+            void reset();
+
+            float delay_;
+            float fadeouttime_;
+
+            bool bFadingOut_;
+            Timer<FadeoutText> fadeouttimer_;
+
+            float initialAlpha_;
+    };
+}
+#endif /* _FadeoutText_H__ */
Index: code/trunk/src/modules/overlays/GUIOverlay.cc
===================================================================
--- code/trunk/src/modules/overlays/GUIOverlay.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/GUIOverlay.cc	(revision 5781)
@@ -0,0 +1,91 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "GUIOverlay.h"
+
+#include <string>
+#include <sstream>
+
+#include "core/input/InputManager.h"
+#include "core/CoreIncludes.h"
+#include "core/GUIManager.h"
+#include "core/XMLPort.h"
+#include "infos/PlayerInfo.h"
+#include "worldentities/ControllableEntity.h"
+
+namespace orxonox
+{
+    CreateFactory(GUIOverlay);
+
+    GUIOverlay::GUIOverlay(BaseObject* creator) : OrxonoxOverlay(creator)
+    {
+        RegisterObject(GUIOverlay);
+    }
+
+    GUIOverlay::~GUIOverlay()
+    {
+    }
+
+    void GUIOverlay::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(GUIOverlay, XMLPort, xmlElement, mode);
+
+        XMLPortParam(GUIOverlay, "guiname", setGUIName, getGUIName, xmlElement, mode);
+    }
+
+    void GUIOverlay::changedVisibility()
+    {
+        SUPER(GUIOverlay, changedVisibility);
+
+        //Setting player now.
+        GUIManager::getInstance().setPlayer(this->guiName_, (orxonox_cast<ControllableEntity*>(this->getOwner()))->getPlayer());
+
+        if (this->isVisible())
+        {
+            std::string str;
+            std::stringstream out;
+            out << reinterpret_cast<long>(this);
+            str = out.str();
+            GUIManager::getInstance().executeCode("showCursor()");
+            InputManager::getInstance().enterState("guiMouseOnly");
+            GUIManager::getInstance().executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")");
+        }
+        else
+        {
+            GUIManager::getInstance().executeCode("hideGUI(\"" + this->guiName_ + "\")");
+            GUIManager::getInstance().executeCode("hideCursor()");
+            InputManager::getInstance().leaveState("guiMouseOnly");
+        }
+    }
+
+    void GUIOverlay::setGUIName(const std::string& name)
+    {
+        this->guiName_ = name;
+        GUIManager::getInstance().setPlayer(name, orxonox_cast<PlayerInfo*>(this->getOwner())); //Set Player is going to be NULL, so it needs to be set in changedVisibility() as well.
+    }
+}
Index: code/trunk/src/modules/overlays/GUIOverlay.h
===================================================================
--- code/trunk/src/modules/overlays/GUIOverlay.h	(revision 5781)
+++ code/trunk/src/modules/overlays/GUIOverlay.h	(revision 5781)
@@ -0,0 +1,58 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _GUIOverlay_H__
+#define _GUIOverlay_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <string>
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport GUIOverlay : public OrxonoxOverlay
+    {
+        public:
+
+            GUIOverlay(BaseObject* creator);
+            virtual ~GUIOverlay();
+
+            virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+
+            void setGUIName(const std::string& name);
+            inline const std::string& getGUIName() const { return this->guiName_; }
+
+            virtual void changedVisibility();
+
+        private:
+            std::string guiName_;
+    };
+}
+
+#endif
Index: code/trunk/src/modules/overlays/OverlayText.cc
===================================================================
--- code/trunk/src/modules/overlays/OverlayText.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/OverlayText.cc	(revision 5781)
@@ -0,0 +1,170 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "OverlayText.h"
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h>
+#include <OgreTextAreaOverlayElement.h>
+#include <boost/static_assert.hpp>
+
+#include "util/StringUtils.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+
+namespace orxonox
+{
+    CreateFactory(OverlayText);
+
+    BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Left   == (int)OverlayText::Left);
+    BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Center == (int)OverlayText::Center);
+    BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Right  == (int)OverlayText::Right);
+
+    OverlayText::OverlayText(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+    {
+        RegisterObject(OverlayText);
+
+        this->text_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("TextArea", "OverlayText_text_" + getUniqueNumberString()));
+        this->text_->setCharHeight(1.0);
+
+        this->setFont("Monofur");
+        this->setColour(ColourValue(1.0, 1.0, 1.0, 1.0));
+        this->setCaption("");
+        this->setTextSize(1.0f);
+        this->setAlignmentString("left");
+
+        this->background_->addChild(this->text_);
+    }
+
+    OverlayText::~OverlayText()
+    {
+        if (this->isInitialized())
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->text_);
+    }
+
+    void OverlayText::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(OverlayText, XMLPort, xmlElement, mode);
+
+        XMLPortParam(OverlayText, "font",       setFont,            getFont,            xmlElement, mode);
+        XMLPortParam(OverlayText, "colour",     setColour,          getColour,          xmlElement, mode);
+        XMLPortParam(OverlayText, "caption",    setCaption,         getCaption,         xmlElement, mode);
+        XMLPortParam(OverlayText, "textsize",   setTextSize,        getTextSize,        xmlElement, mode);
+        XMLPortParam(OverlayText, "align",      setAlignmentString, getAlignmentString, xmlElement, mode);
+        XMLPortParam(OverlayText, "spacewidth", setSpaceWidth,      getSpaceWidth,      xmlElement, mode);
+    }
+
+    void OverlayText::setAlignmentString(const std::string& alignment)
+    {
+        if (alignment == "right")
+            this->setAlignment(OverlayText::Right);
+        else if (alignment == "center")
+            this->setAlignment(OverlayText::Center);
+        else // "left" and default
+            this->setAlignment(OverlayText::Left);
+    }
+
+    std::string OverlayText::getAlignmentString() const
+    {
+        Ogre::TextAreaOverlayElement::Alignment alignment = this->text_->getAlignment();
+
+        switch (alignment)
+        {
+            case Ogre::TextAreaOverlayElement::Right:
+                return "right";
+            case Ogre::TextAreaOverlayElement::Center:
+                return "center";
+            case Ogre::TextAreaOverlayElement::Left:
+                return "left";
+            default:
+                assert(false); return "";
+        }
+    }
+
+    void OverlayText::sizeChanged()
+    {
+        if (this->rotState_ == Horizontal)
+            this->overlay_->setScale(size_.y * sizeCorrection_.y, size_.y * sizeCorrection_.y);
+        else if (this->rotState_ == Vertical)
+            this->overlay_->setScale(size_.y / (sizeCorrection_.y * sizeCorrection_.y), size_.y * sizeCorrection_.y);
+        else
+            this->overlay_->setScale(size_.y, size_.y);
+
+        positionChanged();
+    }
+
+    void OverlayText::setCaption(const std::string& caption)
+    {
+        this->text_->setCaption(caption);
+        this->changedCaption();
+    }
+    std::string OverlayText::getCaption() const
+    {
+        return this->text_->getCaption();
+    }
+
+    void OverlayText::setFont(const std::string& font)
+    {
+        if (font != "")
+            this->text_->setFontName(font);
+    }
+    const std::string& OverlayText::getFont() const
+    {
+        return this->text_->getFontName();
+    }
+
+    void OverlayText::setSpaceWidth(float width)
+    {
+        this->text_->setSpaceWidth(width);
+    }
+    float OverlayText::getSpaceWidth() const
+    {
+        return this->text_->getSpaceWidth();
+    }
+
+    void OverlayText::setColour(const ColourValue& colour)
+    {
+        this->text_->setColour(colour); this->changedColour();
+    }
+    const ColourValue& OverlayText::getColour() const
+    {
+        return this->text_->getColour();
+    }
+
+    void OverlayText::setAlignment(OverlayText::Alignment alignment)
+    {
+        this->text_->setAlignment(static_cast<Ogre::TextAreaOverlayElement::Alignment>(alignment));
+    }
+    OverlayText::Alignment OverlayText::getAlignment() const
+    {
+        return static_cast<OverlayText::Alignment>(this->text_->getAlignment());
+    }
+}
Index: code/trunk/src/modules/overlays/OverlayText.h
===================================================================
--- code/trunk/src/modules/overlays/OverlayText.h	(revision 5781)
+++ code/trunk/src/modules/overlays/OverlayText.h	(revision 5781)
@@ -0,0 +1,85 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _OverlayText_H__
+#define _OverlayText_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <string>
+#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport OverlayText : public OrxonoxOverlay
+    {
+    public:
+        enum Alignment
+        {
+            Left,
+            Right,
+            Center
+        };
+
+        OverlayText(BaseObject* creator);
+        virtual ~OverlayText();
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+
+        void setCaption(const std::string& caption);
+        std::string getCaption() const;
+
+        void setFont(const std::string& font);
+        const std::string& getFont() const;
+
+        void setSpaceWidth(float width);
+        float getSpaceWidth() const;
+
+        void setColour(const ColourValue& colour);
+        const ColourValue& getColour() const;
+
+        void setAlignment(OverlayText::Alignment alignment);
+        OverlayText::Alignment getAlignment() const;
+
+        void setAlignmentString(const std::string& alignment);
+        std::string getAlignmentString() const;
+
+        inline void setTextSize(float size) { this->setSize(Vector2(size, size)); }
+        inline float getTextSize() const    { return this->getSize().y; }
+
+    protected:
+        virtual void sizeChanged();
+        virtual void changedColour() {}
+        virtual void changedCaption() {}
+
+        Ogre::TextAreaOverlayElement* text_;
+    };
+}
+#endif /* _OverlayText_H__ */
Index: code/trunk/src/modules/overlays/OverlaysPrecompiledHeaders.h
===================================================================
--- code/trunk/src/modules/overlays/OverlaysPrecompiledHeaders.h	(revision 5781)
+++ code/trunk/src/modules/overlays/OverlaysPrecompiledHeaders.h	(revision 5781)
@@ -0,0 +1,67 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Compilation of the most often used header files in the overlays module
+@details
+    Updated: 19. September 2009
+    Total Files: 21
+*/
+
+#include "OrxonoxConfig.h"
+
+///////////////////////////////////////////
+/////          Stable Headers         /////
+///////////////////////////////////////////
+
+#include <tinyxml/ticpp.h> // 14
+//#include <OgreOverlayelement.h> // 7, 7.2MB
+#include <bullet/LinearMath/btMotionState.h> // 6
+//#include <OgrePanelOverlayelement.h> // 5
+
+///////////////////////////////////////////
+/////       All Rebuild Headers       /////
+///////////////////////////////////////////
+
+#include "overlays/OrxonoxOverlay.h" // 21
+#include "core/CoreIncludes.h"       // 20
+
+///////////////////////////////////////////
+/////      Not so Stable Headers      /////
+///////////////////////////////////////////
+
+#include "core/Executor.h"     // 13
+//#include "network/synchronisable/Synchronisable.h" // 13
+//#include "core/XMLPort.h"    // 9
+
+
+// Just in case some header included windows.h
+#undef min
+#undef max
Index: code/trunk/src/modules/overlays/OverlaysPrereqs.h
===================================================================
--- code/trunk/src/modules/overlays/OverlaysPrereqs.h	(revision 5781)
+++ code/trunk/src/modules/overlays/OverlaysPrereqs.h	(revision 5781)
@@ -0,0 +1,88 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+  @file
+  @brief Contains all the necessary forward declarations for all classes and structs.
+*/
+
+#ifndef _OverlaysPrereqs_H__
+#define _OverlaysPrereqs_H__
+
+#include "OrxonoxConfig.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD)
+#  ifdef OVERLAYS_SHARED_BUILD
+#    define _OverlaysExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _OverlaysExport
+#    else
+#      define _OverlaysExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _OverlaysExport  __attribute__ ((visibility("default")))
+#else
+#  define _OverlaysExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class BarColour;
+    class DebugFPSText;
+    class DebugRTRText;
+    class GUIOverlay;
+    class HUDBar;
+    class HUDNavigation;
+    class HUDRadar;
+    class HUDSpeedBar;
+    class HUDHealthBar;
+    class HUDTimer;
+    class OrxonoxOverlay;
+    class OverlayGroup;
+    class OverlayText;
+    class FadeoutText;
+    class GametypeStatus;
+    class AnnounceMessage;
+    class KillMessage;
+    class DeathMessage;
+
+    class CreateLines;
+    class Scoreboard;
+    class Stats;
+}
+
+#endif /* _OverlaysPrereqs_H__ */
Index: code/trunk/src/modules/overlays/debugging/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/overlays/debugging/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/overlays/debugging/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,4 @@
+ADD_SOURCE_FILES(OVERLAYS_SRC_FILES
+  DebugFPSText.cc
+  DebugRTRText.cc
+)
Index: code/trunk/src/modules/overlays/debugging/DebugFPSText.cc
===================================================================
--- code/trunk/src/modules/overlays/debugging/DebugFPSText.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/debugging/DebugFPSText.cc	(revision 5781)
@@ -0,0 +1,55 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "DebugFPSText.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/Game.h"
+
+namespace orxonox
+{
+    CreateFactory(DebugFPSText);
+
+    DebugFPSText::DebugFPSText(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(DebugFPSText);
+    }
+
+    DebugFPSText::~DebugFPSText()
+    {
+    }
+
+    void DebugFPSText::tick(float dt)
+    {
+        SUPER(DebugFPSText, tick, dt);
+
+        float fps = Game::getInstance().getAvgFPS();
+        this->setCaption(multi_cast<std::string>(fps));
+    }
+}
Index: code/trunk/src/modules/overlays/debugging/DebugFPSText.h
===================================================================
--- code/trunk/src/modules/overlays/debugging/DebugFPSText.h	(revision 5781)
+++ code/trunk/src/modules/overlays/debugging/DebugFPSText.h	(revision 5781)
@@ -0,0 +1,48 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _DebugFPSText_H__
+#define _DebugFPSText_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport DebugFPSText : public OverlayText, public Tickable
+    {
+    public:
+        DebugFPSText(BaseObject* creator);
+        virtual ~DebugFPSText();
+
+        virtual void tick(float dt);
+    };
+}
+#endif /* _DebugFPSText_H__ */
Index: code/trunk/src/modules/overlays/debugging/DebugRTRText.cc
===================================================================
--- code/trunk/src/modules/overlays/debugging/DebugRTRText.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/debugging/DebugRTRText.cc	(revision 5781)
@@ -0,0 +1,55 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "DebugRTRText.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/Game.h"
+
+namespace orxonox
+{
+    CreateFactory(DebugRTRText);
+
+    DebugRTRText::DebugRTRText(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(DebugRTRText);
+    }
+
+    DebugRTRText::~DebugRTRText()
+    {
+    }
+
+    void DebugRTRText::tick(float dt)
+    {
+        SUPER(DebugRTRText, tick, dt);
+
+        float rtr = Game::getInstance().getAvgTickTime();
+        this->setCaption(multi_cast<std::string>(rtr));
+    }
+}
Index: code/trunk/src/modules/overlays/debugging/DebugRTRText.h
===================================================================
--- code/trunk/src/modules/overlays/debugging/DebugRTRText.h	(revision 5781)
+++ code/trunk/src/modules/overlays/debugging/DebugRTRText.h	(revision 5781)
@@ -0,0 +1,48 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _DebugRTRText_H__
+#define _DebugRTRText_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport DebugRTRText : public OverlayText, public Tickable
+    {
+    public:
+        DebugRTRText(BaseObject* creator);
+        virtual ~DebugRTRText();
+
+        virtual void tick(float dt);
+    };
+}
+#endif /* _DebugRTRText_H__ */
Index: code/trunk/src/modules/overlays/hud/AnnounceMessage.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/AnnounceMessage.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/AnnounceMessage.cc	(revision 5781)
@@ -0,0 +1,60 @@
+/*
+ *   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 "AnnounceMessage.h"
+
+#include "core/CoreIncludes.h"
+#include "infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(AnnounceMessage);
+
+    AnnounceMessage::AnnounceMessage(BaseObject* creator) : FadeoutText(creator)
+    {
+        RegisterObject(AnnounceMessage);
+
+        this->owner_ = 0;
+
+        this->setDelay(3.0f);
+        this->setFadeouttime(1.0f);
+    }
+
+    void AnnounceMessage::announcemessage(const GametypeInfo* gtinfo, const std::string& message)
+    {
+        if (this->owner_ && this->owner_->getGametypeInfo() == gtinfo)
+            this->setCaption(message);
+    }
+
+    void AnnounceMessage::changedOwner()
+    {
+        SUPER(AnnounceMessage, changedOwner);
+
+        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
+    }
+}
Index: code/trunk/src/modules/overlays/hud/AnnounceMessage.h
===================================================================
--- code/trunk/src/modules/overlays/hud/AnnounceMessage.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/AnnounceMessage.h	(revision 5781)
@@ -0,0 +1,53 @@
+/*
+ *   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 _AnnounceMessage_H__
+#define _AnnounceMessage_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "interfaces/GametypeMessageListener.h"
+#include "overlays/FadeoutText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport AnnounceMessage : public FadeoutText, public GametypeMessageListener
+    {
+        public:
+            AnnounceMessage(BaseObject* creator);
+            virtual ~AnnounceMessage() {}
+
+            virtual void changedOwner();
+
+            void announcemessage(const GametypeInfo* gtinfo, const std::string& message);
+
+        private:
+            PlayerInfo* owner_;
+    };
+}
+#endif /* _AnnounceMessage_H__ */
Index: code/trunk/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/overlays/hud/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,15 @@
+ADD_SOURCE_FILES(OVERLAYS_SRC_FILES
+  HUDBar.cc
+  HUDNavigation.cc
+  HUDRadar.cc
+  HUDSpeedBar.cc
+  HUDHealthBar.cc
+  HUDTimer.cc
+  ChatOverlay.cc
+  GametypeStatus.cc
+  AnnounceMessage.cc
+  KillMessage.cc
+  DeathMessage.cc
+  UnderAttackHealthBar.cc
+  TeamBaseMatchScore.cc
+)
Index: code/trunk/src/modules/overlays/hud/ChatOverlay.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/ChatOverlay.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/ChatOverlay.cc	(revision 5781)
@@ -0,0 +1,110 @@
+/*
+ *   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 "ChatOverlay.h"
+
+#include <string>
+#include <OgreTextAreaOverlayElement.h>
+
+#include "util/Convert.h"
+#include "util/UTFStringConversions.h"
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "core/Executor.h"
+
+#include "tools/Timer.h"
+#include "infos/PlayerInfo.h"
+#include "PlayerManager.h"
+
+namespace orxonox
+{
+    CreateFactory(ChatOverlay);
+
+    ChatOverlay::ChatOverlay(BaseObject* creator)
+        : OverlayText(creator)
+    {
+        RegisterObject(ChatOverlay);
+
+        this->displayTime_ = 0.0;
+
+        this->setConfigValues();
+    }
+
+    ChatOverlay::~ChatOverlay()
+    {
+    }
+
+    void ChatOverlay::setConfigValues()
+    {
+        SetConfigValue(displayTime_, 6.0f);
+    }
+
+    void ChatOverlay::incomingChat(const std::string& message, unsigned int senderID)
+    {
+        std::string text;
+
+        if (senderID != CLIENTID_UNKNOWN)
+        {
+            std::string name = "unknown";
+
+            PlayerInfo* player = PlayerManager::getInstance().getClient(senderID);
+            if (player)
+                name = player->getName();
+
+            text = name + ": " + message;
+        }
+        else
+        {
+            text = message;
+        }
+
+        this->messages_.push_back(multi_cast<Ogre::UTFString>(text));
+        COUT(0) << "Chat: " << text << std::endl;
+
+        new Timer<ChatOverlay>(this->displayTime_, false, this, createExecutor(createFunctor(&ChatOverlay::dropMessage)), true);
+
+        this->updateOverlayText();
+    }
+
+    void ChatOverlay::dropMessage()
+    {
+        if (this->messages_.size() > 0)
+            this->messages_.pop_front();
+        this->updateOverlayText();
+    }
+
+    void ChatOverlay::updateOverlayText()
+    {
+        this->text_->setCaption("");
+
+        for (std::list<Ogre::UTFString>::reverse_iterator it = this->messages_.rbegin(); it != this->messages_.rend(); ++it)
+        {
+            this->text_->setCaption(this->text_->getCaption() + "\n" + (*it));
+        }
+    }
+}
Index: code/trunk/src/modules/overlays/hud/ChatOverlay.h
===================================================================
--- code/trunk/src/modules/overlays/hud/ChatOverlay.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/ChatOverlay.h	(revision 5781)
@@ -0,0 +1,62 @@
+/*
+ *   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 _ChatOverlay_H__
+#define _ChatOverlay_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <list>
+#include <OgreUTFString.h>
+
+#include "network/ChatListener.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport ChatOverlay : public OverlayText, public ChatListener
+    {
+        public:
+            ChatOverlay(BaseObject* creator);
+            virtual ~ChatOverlay();
+
+            void setConfigValues();
+
+        protected:
+            virtual void incomingChat(const std::string& message, unsigned int senderID);
+
+            std::list<Ogre::UTFString> messages_;
+
+        private:
+            void updateOverlayText();
+            void dropMessage();
+
+            float displayTime_;
+    };
+}
+#endif /* _DebugFPSText_H__ */
Index: code/trunk/src/modules/overlays/hud/DeathMessage.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/DeathMessage.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/DeathMessage.cc	(revision 5781)
@@ -0,0 +1,60 @@
+/*
+ *   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 "DeathMessage.h"
+
+#include "core/CoreIncludes.h"
+#include "infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(DeathMessage);
+
+    DeathMessage::DeathMessage(BaseObject* creator) : FadeoutText(creator)
+    {
+        RegisterObject(DeathMessage);
+
+        this->owner_ = 0;
+
+        this->setDelay(2.0f);
+        this->setFadeouttime(0.5f);
+    }
+
+    void DeathMessage::deathmessage(const GametypeInfo* gtinfo, const std::string& message)
+    {
+        if (this->owner_ && this->owner_->getGametypeInfo() == gtinfo)
+            this->setCaption(message);
+    }
+
+    void DeathMessage::changedOwner()
+    {
+        SUPER(DeathMessage, changedOwner);
+
+        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
+    }
+}
Index: code/trunk/src/modules/overlays/hud/DeathMessage.h
===================================================================
--- code/trunk/src/modules/overlays/hud/DeathMessage.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/DeathMessage.h	(revision 5781)
@@ -0,0 +1,53 @@
+/*
+ *   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 _DeathMessage_H__
+#define _DeathMessage_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "interfaces/GametypeMessageListener.h"
+#include "overlays/FadeoutText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport DeathMessage : public FadeoutText, public GametypeMessageListener
+    {
+        public:
+            DeathMessage(BaseObject* creator);
+            virtual ~DeathMessage() {}
+
+            virtual void changedOwner();
+
+            void deathmessage(const GametypeInfo* gtinfo, const std::string& message);
+
+        private:
+            PlayerInfo* owner_;
+    };
+}
+#endif /* _DeathMessage_H__ */
Index: code/trunk/src/modules/overlays/hud/GametypeStatus.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/GametypeStatus.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/GametypeStatus.cc	(revision 5781)
@@ -0,0 +1,90 @@
+/*
+ *   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 "GametypeStatus.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "infos/GametypeInfo.h"
+#include "infos/PlayerInfo.h"
+#include "worldentities/ControllableEntity.h"
+#include "worldentities/pawns/Spectator.h"
+
+namespace orxonox
+{
+    CreateFactory(GametypeStatus);
+
+    GametypeStatus::GametypeStatus(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(GametypeStatus);
+
+        this->owner_ = 0;
+    }
+
+    GametypeStatus::~GametypeStatus()
+    {
+    }
+
+    void GametypeStatus::tick(float dt)
+    {
+        SUPER(GametypeStatus, tick, dt);
+
+        if (this->owner_ && this->owner_->getGametypeInfo() && this->owner_->getControllableEntity())
+        {
+            const GametypeInfo* gtinfo = this->owner_->getGametypeInfo();
+            ControllableEntity* ce = this->owner_->getControllableEntity();
+
+            if (!gtinfo->hasStarted() && !gtinfo->isStartCountdownRunning())
+            {
+                if (!this->owner_->isReadyToSpawn())
+                    this->setCaption("Press [Fire] to start the match");
+                else
+                    this->setCaption("Waiting for other players");
+            }
+            else if (!gtinfo->hasEnded())
+            {
+                if (gtinfo->isStartCountdownRunning())
+                    this->setCaption(multi_cast<std::string>(static_cast<int>(ceil(gtinfo->getStartCountdown()))));
+                else if (ce->isA(Class(Spectator)))
+                    this->setCaption("Press [Fire] to respawn");
+                else
+                    this->setCaption("");
+            }
+            else
+                this->setCaption("Game has ended");
+        }
+    }
+
+
+    void GametypeStatus::changedOwner()
+    {
+        SUPER(GametypeStatus, changedOwner);
+
+        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
+    }
+}
Index: code/trunk/src/modules/overlays/hud/GametypeStatus.h
===================================================================
--- code/trunk/src/modules/overlays/hud/GametypeStatus.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/GametypeStatus.h	(revision 5781)
@@ -0,0 +1,52 @@
+/*
+ *   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 _GametypeStatus_H__
+#define _GametypeStatus_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport GametypeStatus : public OverlayText, public Tickable
+    {
+        public:
+            GametypeStatus(BaseObject* creator);
+            virtual ~GametypeStatus();
+
+            virtual void tick(float dt);
+            virtual void changedOwner();
+
+        private:
+            PlayerInfo* owner_;
+    };
+}
+#endif /* _GametypeStatus_H__ */
Index: code/trunk/src/modules/overlays/hud/HUDBar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDBar.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDBar.cc	(revision 5781)
@@ -0,0 +1,202 @@
+/*
+ *   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:
+ *      Yuning Chai
+ *   Co-authors:
+ *      Felix Schulthess
+ *      Fabian 'x3n' Landau
+ *      Reto Grieder
+ *
+ */
+
+#include "HUDBar.h"
+
+#include <OgreOverlayManager.h>
+#include <OgreMaterialManager.h>
+#include <OgreTechnique.h>
+#include <OgrePass.h>
+#include <OgrePanelOverlayElement.h>
+
+#include "util/Convert.h"
+#include "util/StringUtils.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(BarColour);
+
+    BarColour::BarColour(BaseObject* creator)
+        : BaseObject(creator)
+    {
+        RegisterObject(BarColour);
+
+        this->setColour(ColourValue(1.0, 1.0, 1.0, 1.0));
+        this->setPosition(0.0);
+    }
+
+    void BarColour::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(BarColour, XMLPort, xmlElement, mode);
+
+        XMLPortParam(BarColour, "colour", setColour, getColour, xmlElement, mode);
+        XMLPortParam(BarColour, "position", setPosition, getPosition, xmlElement, mode);
+    }
+
+
+    unsigned int HUDBar::materialcount_s = 0;
+
+    HUDBar::HUDBar(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+    {
+        RegisterObject(HUDBar);
+
+        // create new material
+        std::string materialname = "barmaterial" + multi_cast<std::string>(materialcount_s++);
+        Ogre::MaterialPtr material = static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().create(materialname, "General"));
+        material->getTechnique(0)->getPass(0)->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
+        this->textureUnitState_ = material->getTechnique(0)->getPass(0)->createTextureUnitState();
+        this->textureUnitState_->setTextureName("bar2.tga");
+        // use the default colour
+        this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, ColourValue(0.2f, 0.7f, 0.2f));
+
+        this->bar_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("Panel", "HUDBar_bar_" + getUniqueNumberString()));
+        this->bar_->setMaterialName(materialname);
+
+        this->value_ = 1.0f;  // initielize with 1.0f to trigger a change when calling setValue(0.0f) on the line below
+        this->setValue(0.0f); // <--
+        this->setRightToLeft(false);
+        this->setAutoColour(true);
+        this->currentColour_ = ColourValue::White;
+
+        this->background_->addChild(bar_);
+    }
+
+    HUDBar::~HUDBar()
+    {
+        if (this->isInitialized())
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->bar_);
+    }
+
+    void HUDBar::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(HUDBar, XMLPort, xmlElement, mode);
+
+        XMLPortParam(HUDBar, "initialvalue", setValue,       getValue,       xmlElement, mode);
+        XMLPortParam(HUDBar, "righttoleft",  setRightToLeft, getRightToLeft, xmlElement, mode);
+        XMLPortParam(HUDBar, "autocolour",   setAutoColour,  getAutoColour,  xmlElement, mode);
+        XMLPortParam(HUDBar, "bartexture",   setBarTexture,  getBarTexture, xmlElement, mode);
+        XMLPortObject(HUDBar, BarColour, "", addColour, getColour, xmlElement, mode);
+    }
+
+    void HUDBar::valueChanged()
+    {
+        if (this->autoColour_ && this->textureUnitState_)
+        {
+            // set colour
+            if (this->colours_.size() > 0)
+            {
+                ColourValue colour1(0, 0, 0, 1);
+                ColourValue colour2 = (*this->colours_.rbegin()).second;
+                float value1(0);
+                float value2 = (*this->colours_.rbegin()).first;
+                for (std::map<float, ColourValue>::reverse_iterator it = this->colours_.rbegin(); it != this->colours_.rend(); ++it)
+                {
+                    colour1 = colour2;
+                    value1 = value2;
+                    colour2 = (*it).second;
+                    value2 = (*it).first;
+
+                    if (value2 < this->value_)
+                        break;
+                }
+
+                if (value2 > this->value_)
+                {
+                    this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour2);
+                    this->currentColour_ = colour2;
+                }
+                else if (value1 < this->value_)
+                {
+                    this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour1);
+                    this->currentColour_ = colour1;
+                }
+                else
+                {
+                    //float interpolationfactor = (this->value_ - value2) / (value1 - value2);
+                    float interpolationfactor = interpolateSmooth((this->value_ - value2) / (value1 - value2), 0.0f, 1.0f);
+                    this->currentColour_ = colour1 * interpolationfactor + colour2 * (1 - interpolationfactor);
+                    this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, this->currentColour_);
+
+                }
+            }
+        }
+
+        // set value
+        if (this->right2Left_)
+        {
+            // backward casew
+            this->bar_->setPosition(0.06f + 0.88f * (1 - this->value_), 0.0f);
+            this->bar_->setDimensions(0.88f * this->value_, 1.0f);
+        }
+        else
+        {
+            // default case
+            this->bar_->setPosition(0.06f, 0.0f);
+            this->bar_->setDimensions(0.88f * this->value_, 1.0f);
+        }
+        if (this->value_ != 0)
+            this->bar_->setTiling(this->value_, 1.0);
+    }
+
+    void HUDBar::addColour(BarColour* colour)
+    {
+        float value = clamp<float>(colour->getPosition(), 0.0, 1.0);
+        this->colours_[value] = colour->getColour();
+
+        this->barColours_.push_back(colour);
+    }
+
+    BarColour* HUDBar::getColour(unsigned int index)
+    {
+        if (index < this->barColours_.size())
+            return barColours_[index];
+        else
+            return 0;
+    }
+
+    void HUDBar::clearColours()
+    {
+        this->colours_.clear();
+    }
+
+    void HUDBar::setBarTexture(const std::string& texture)
+    {
+        this->textureUnitState_->setTextureName(texture);
+    }
+
+    const std::string& HUDBar::getBarTexture() const
+    {
+        return this->textureUnitState_->getTextureName();
+    }
+}
Index: code/trunk/src/modules/overlays/hud/HUDBar.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDBar.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDBar.h	(revision 5781)
@@ -0,0 +1,139 @@
+/*
+ *   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:
+ *      Yuning Chai
+ *   Co-authors:
+ *      Felix Schulthess
+ *      Fabian 'x3n' Landau
+ *      Reto Grieder
+ *
+ */
+
+#ifndef _HUDBar_H__
+#define _HUDBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+
+#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
+#include "core/BaseObject.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport BarColour : public BaseObject
+    {
+    public:
+        BarColour(BaseObject* creator);
+        virtual ~BarColour() { }
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+
+        void setColour(const ColourValue& colour) { this->colour_ = colour; }
+        const ColourValue& getColour() const { return this->colour_; }
+
+        void setPosition(float pos) { this->position_ = pos; }
+        float getPosition() const    { return this->position_; }
+
+    private:
+        ColourValue colour_;
+        float position_;
+    };
+
+
+    class _OverlaysExport HUDBar : public OrxonoxOverlay
+    {
+    public:
+        HUDBar(BaseObject* creator);
+        virtual ~HUDBar();
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+
+        void clearColours();
+
+        inline void setRightToLeft(bool r2l)
+        {
+            if (r2l != this->right2Left_)
+            {
+                this->right2Left_ = r2l;
+                this->valueChanged();
+            }
+        }
+        inline bool getRightToLeft() const
+            { return this->right2Left_; }
+
+        inline void setValue(float value)
+        {
+            float temp = clamp(value, 0.0f, 1.0f);
+            if (temp != this->value_)
+            {
+                this->value_ = temp;
+                this->valueChanged();
+            }
+        }
+        inline float getValue() const
+            { return this->value_; }
+
+        inline void setAutoColour(bool val)
+        {
+            if (val != this->autoColour_)
+            {
+                this->autoColour_ = val;
+                this->valueChanged();
+
+                if (!val)
+                    this->currentColour_ = ColourValue::White;
+            }
+        }
+        inline bool getAutoColour() const
+            { return this->autoColour_; }
+
+        void setBarTexture(const std::string& texture);
+        const std::string& getBarTexture() const;
+
+        inline const ColourValue& getCurrentBarColour() const
+            { return this->currentColour_; }
+
+    protected:
+        virtual void valueChanged();
+
+    private:
+        void addColour(BarColour* colour);
+        BarColour* getColour(unsigned int index);
+
+        bool right2Left_;
+        bool autoColour_;                   //!< whether bar changes colour automatically
+        float value_;                       //!< progress of bar
+        ColourValue currentColour_;
+
+        Ogre::PanelOverlayElement* bar_;
+        Ogre::TextureUnitState* textureUnitState_;
+        std::map<float, ColourValue> colours_;
+        std::vector<BarColour*> barColours_;
+
+        static unsigned int materialcount_s;
+    };
+}
+#endif /* _HUDBar_H__ */
Index: code/trunk/src/modules/overlays/hud/HUDHealthBar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDHealthBar.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDHealthBar.cc	(revision 5781)
@@ -0,0 +1,133 @@
+/*
+ *   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 "HUDHealthBar.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
+
+namespace orxonox
+{
+    CreateFactory(HUDHealthBar);
+
+    HUDHealthBar::HUDHealthBar(BaseObject* creator) : HUDBar(creator)
+    {
+        RegisterObject(HUDHealthBar);
+
+        this->owner_ = 0;
+        this->bUseBarColour_ = false;
+
+        this->textoverlay_ = new OverlayText(this);
+
+        assert(this->textoverlay_);
+
+        this->textoverlay_->setCaption("");
+    }
+
+    HUDHealthBar::~HUDHealthBar()
+    {
+        if (this->isInitialized())
+            delete this->textoverlay_;
+    }
+
+    void HUDHealthBar::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(HUDHealthBar, XMLPort, xmlelement, mode);
+
+        XMLPortParam(HUDHealthBar, "showtext",          setTextVisible,          getTextVisible,          xmlelement, mode).defaultValues(true);
+        XMLPortParam(HUDHealthBar, "textfont",          setTextFont,             getTextFont,             xmlelement, mode).defaultValues("Monofur");
+        XMLPortParam(HUDHealthBar, "textusebarcolour",  setTextUseBarColour,     getTextUseBarColour,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(HUDHealthBar, "textcolour",        setTextColour,           getTextColour,           xmlelement, mode).defaultValues(ColourValue(1.0, 1.0, 1.0, 1.0));
+        XMLPortParam(HUDHealthBar, "textsize",          setTextSize,             getTextSize,             xmlelement, mode).defaultValues(1.0f);
+        XMLPortParam(HUDHealthBar, "textalign",         setTextAlignmentString,  getTextAlignmentString,  xmlelement, mode).defaultValues("left");
+        XMLPortParam(HUDHealthBar, "textoffset",        setTextOffset,           getTextOffset,           xmlelement, mode).defaultValues(Vector2::ZERO);
+        XMLPortParam(HUDHealthBar, "textpickpoint",     setTextPickPoint,        getTextPickPoint,        xmlelement, mode).defaultValues(Vector2::ZERO);
+        XMLPortParam(HUDHealthBar, "textrotation",      setTextRotation,         getTextRotation,         xmlelement, mode).defaultValues(0.0f);
+        XMLPortParam(HUDHealthBar, "textcorrectaspect", setTextAspectCorrection, getTextAspectCorrection, xmlelement, mode).defaultValues(true);
+        XMLPortParam(HUDHealthBar, "textspacewidth",    setTextSpaceWidth,       getTextSpaceWidth,       xmlelement, mode).defaultValues(true);
+    }
+
+    void HUDHealthBar::tick(float dt)
+    {
+        SUPER(HUDHealthBar, tick, dt);
+
+        if (this->owner_)
+        {
+            this->setValue(this->owner_->getHealth() / this->owner_->getInitialHealth());
+            this->textoverlay_->setCaption(multi_cast<std::string>(static_cast<int>(this->owner_->getHealth())));
+        }
+
+        if (this->bUseBarColour_)
+            this->textoverlay_->setColour(this->getCurrentBarColour());
+    }
+
+    void HUDHealthBar::changedOwner()
+    {
+        SUPER(HUDHealthBar, changedOwner);
+
+        this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+    }
+
+    void HUDHealthBar::changedOverlayGroup()
+    {
+        SUPER(HUDHealthBar, changedOverlayGroup);
+
+        this->getOverlayGroup()->addElement(this->textoverlay_);
+    }
+
+    void HUDHealthBar::changedVisibility()
+    {
+        SUPER(HUDHealthBar, changedVisibility);
+
+        this->textoverlay_->setVisible(this->isVisible());
+    }
+
+    void HUDHealthBar::changedName()
+    {
+        SUPER(HUDHealthBar, changedName);
+
+        this->textoverlay_->setName(this->getName() + "text");
+    }
+
+    void HUDHealthBar::setTextColour(const ColourValue& colour)
+    {
+        this->textColour_ = colour;
+        if (!this->bUseBarColour_)
+            this->textoverlay_->setColour(colour);
+    }
+
+    void HUDHealthBar::setTextUseBarColour(bool bUseBarColour)
+    {
+        this->bUseBarColour_ = bUseBarColour;
+        if (!bUseBarColour)
+            this->textoverlay_->setColour(this->textColour_);
+    }
+}
Index: code/trunk/src/modules/overlays/hud/HUDHealthBar.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDHealthBar.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDHealthBar.h	(revision 5781)
@@ -0,0 +1,119 @@
+/*
+ *   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 _HUDHealthBar_H__
+#define _HUDHealthBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "util/Math.h"
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+#include "HUDBar.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDHealthBar : public HUDBar, public Tickable
+    {
+        public:
+            HUDHealthBar(BaseObject* creator);
+            virtual ~HUDHealthBar();
+
+            virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+            virtual void tick(float dt);
+            virtual void changedOwner();
+            virtual void changedOverlayGroup();
+            virtual void changedVisibility();
+            virtual void changedName();
+
+            inline void setTextFont(const std::string& font)
+                { if (font != "") { this->textoverlay_->setFont(font); } }
+            inline const std::string& getTextFont() const
+                { return this->textoverlay_->getFont(); }
+
+            void setTextColour(const ColourValue& colour);
+            inline const ColourValue& getTextColour() const
+                { return this->textoverlay_->getColour(); }
+
+            void setTextUseBarColour(bool bUseBarColour);
+            inline bool getTextUseBarColour() const
+                { return this->bUseBarColour_; }
+
+            inline void setTextAlignment(OverlayText::Alignment alignment)
+                { this->textoverlay_->setAlignment(alignment); }
+            inline OverlayText::Alignment getTextAlignment() const
+                { return this->textoverlay_->getAlignment(); }
+
+            void setTextAlignmentString(const std::string& alignment)
+                { this->textoverlay_->setAlignmentString(alignment); }
+            std::string getTextAlignmentString() const
+                { return this->textoverlay_->getAlignmentString(); }
+
+            inline void setTextSize(float size)
+                { this->textoverlay_->setTextSize(size); }
+            inline float getTextSize() const
+                { return this->textoverlay_->getTextSize(); }
+
+            inline void setTextVisible(bool bVisible)
+                { this->textoverlay_->setVisible(bVisible); }
+            inline bool getTextVisible() const
+                { return this->textoverlay_->isVisible(); }
+
+            inline void setTextPickPoint(const Vector2& pickpoint)
+                { this->textoverlay_->setPickPoint(pickpoint); }
+            inline Vector2 getTextPickPoint() const
+                { return this->textoverlay_->getPickPoint(); }
+
+            inline void setTextOffset(const Vector2& position)
+                { this->textoverlay_->setPosition(this->getPosition() + (position - this->getPickPoint()) * this->getSize()); }
+            inline Vector2 getTextOffset() const
+                { return (this->textoverlay_->getPosition() - this->getPosition()) / this->getSize() + this->getPickPoint(); }
+
+            inline void setTextAspectCorrection(bool correct)
+                { this->textoverlay_->setAspectCorrection(correct); }
+            inline bool getTextAspectCorrection() const
+                { return this->textoverlay_->getAspectCorrection(); }
+
+            inline void setTextRotation(const Degree& angle)
+                { this->textoverlay_->setRotation(angle); }
+            inline const Degree& getTextRotation() const
+                { return this->textoverlay_->getRotation(); }
+
+            inline void setTextSpaceWidth(float width)
+                { this->textoverlay_->setSpaceWidth(width); }
+            inline float getTextSpaceWidth() const
+                { return this->textoverlay_->getSpaceWidth(); }
+
+        private:
+            Pawn* owner_;
+            OverlayText* textoverlay_;
+            bool bUseBarColour_;
+            ColourValue textColour_;
+    };
+}
+#endif /* _HUDHealthBar_H__ */
Index: code/trunk/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDNavigation.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDNavigation.cc	(revision 5781)
@@ -0,0 +1,275 @@
+/*
+ *   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:
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Reto Grieder
+ *
+ */
+
+#include "HUDNavigation.h"
+
+#include <string>
+#include <OgreOverlayManager.h>
+#include <OgreTextAreaOverlayElement.h>
+#include <OgrePanelOverlayElement.h>
+
+#include "util/Math.h"
+#include "util/StringUtils.h"
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "Radar.h"
+
+namespace orxonox
+{
+    CreateFactory(HUDNavigation);
+
+    HUDNavigation::HUDNavigation(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+    {
+        RegisterObject(HUDNavigation);
+
+        // create nav text
+        navText_ = static_cast<Ogre::TextAreaOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("TextArea", "HUDNavigation_navText_" + getUniqueNumberString()));
+
+        // create nav marker
+        navMarker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("Panel", "HUDNavigation_navMarker_" + getUniqueNumberString()));
+        navMarker_->setMaterialName("Orxonox/NavArrows");
+
+        // create aim marker
+        aimMarker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("Panel", "HUDNavigation_aimMarker_" + getUniqueNumberString()));
+        aimMarker_->setMaterialName("Orxonox/NavCrosshair");
+        this->wasOutOfView_ = true; // Ensure the material is changed right the first time..
+
+        setFont("Monofur");
+        setTextSize(0.05f);
+        setNavMarkerSize(0.05f);
+        setAimMarkerSize(0.04f);
+
+        background_->addChild(navMarker_);
+        background_->addChild(aimMarker_);
+        background_->addChild(navText_);
+
+        // hide at first
+        this->setVisible(false);
+    }
+
+    HUDNavigation::~HUDNavigation()
+    {
+        if (this->isInitialized())
+        {
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->navMarker_);
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->navText_);
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->aimMarker_);
+        }
+    }
+
+    void HUDNavigation::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(HUDNavigation, XMLPort, xmlElement, mode);
+
+        XMLPortParam(HUDNavigation, "font",     setFont,     getFont,     xmlElement, mode);
+        XMLPortParam(HUDNavigation, "textSize", setTextSize, getTextSize, xmlElement, mode);
+        XMLPortParam(HUDNavigation, "navMarkerSize", setNavMarkerSize, getNavMarkerSize, xmlElement, mode);
+        XMLPortParam(HUDNavigation, "aimMarkerSize", setAimMarkerSize, getAimMarkerSize, xmlElement, mode);
+    }
+
+    void HUDNavigation::setFont(const std::string& font)
+    {
+        if (this->navText_ && font != "")
+            this->navText_->setFontName(font);
+    }
+
+    const std::string& HUDNavigation::getFont() const
+    {
+        if (this->navText_)
+            return this->navText_->getFontName();
+        else
+            return BLANKSTRING;
+    }
+
+    void HUDNavigation::setTextSize(float size)
+    {
+        if (this->navText_ && size >= 0.0f)
+            this->navText_->setCharHeight(size);
+    }
+
+    float HUDNavigation::getTextSize() const
+    {
+        if (this->navText_)
+            return this->navText_->getCharHeight();
+        else
+            return 0.0f;
+    }
+
+    void HUDNavigation::tick(float dt)
+    {
+        SUPER(HUDNavigation, tick, dt);
+
+        if (!Radar::getInstance().getFocus())
+        {
+            this->overlay_->hide();
+            return;
+        }
+        else
+        {
+            this->overlay_->show();
+        }
+
+        // set text
+        int dist = static_cast<int>(getDist2Focus());
+        navText_->setCaption(multi_cast<std::string>(dist));
+        float textLength = multi_cast<std::string>(dist).size() * navText_->getCharHeight() * 0.3;
+
+/*
+        Ogre::Camera* navCam = SpaceShip::getLocalShip()->getCamera()->cam_;
+        Matrix4 transformationMatrix = navCam->getProjectionMatrix() * navCam->getViewMatrix();
+*/
+        // transform to screen coordinates
+        Vector3 pos = /*transformationMatrix * */Radar::getInstance().getFocus()->getRVWorldPosition();
+
+        bool outOfView;
+        if (pos.z > 1.0)
+        {
+            // z > 1.0 means that the object is behind the camera
+            outOfView = true;
+            // we have to switch all coordinates (if you don't know why,
+            // try linear algebra lectures, because I can't explain..)
+            pos.x = -pos.x;
+            pos.y = -pos.y;
+        }
+        else
+            outOfView = pos.x < -1.0 || pos.x > 1.0 || pos.y < -1.0 || pos.y > 1.0;
+
+        if (outOfView)
+        {
+            // object is not in view
+            aimMarker_->hide();
+
+            if (!wasOutOfView_)
+            {
+                navMarker_->setMaterialName("Orxonox/NavArrows");
+                wasOutOfView_ = true;
+            }
+
+            if (pos.x < pos.y)
+            {
+                if (pos.y > -pos.x)
+                {
+                    // up
+                    float position = pos.x / pos.y + 1.0;
+                    navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5, 0.0);
+                    navMarker_->setUV(0.5, 0.0, 1.0, 0.5);
+                    navText_->setLeft((position - textLength) * 0.5);
+                    navText_->setTop(navMarker_->getHeight());
+                }
+                else
+                {
+                    // left
+                    float position = pos.y / pos.x + 1.0;
+                    navMarker_->setPosition(0.0, (position - navMarker_->getWidth()) * 0.5);
+                    navMarker_->setUV(0.0, 0.0, 0.5, 0.5);
+                    navText_->setLeft(navMarker_->getWidth() + 0.01);
+                    navText_->setTop((position - navText_->getCharHeight()) * 0.5);
+                }
+            }
+            else
+            {
+                if (pos.y < -pos.x)
+                {
+                    // down
+                    float position = -pos.x / pos.y + 1.0;
+                    navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5, 1.0 - navMarker_->getHeight());
+                    navMarker_->setUV(0.0, 0.5, 0.5, 1.0);
+                    navText_->setLeft((position - textLength) * 0.5);
+                    navText_->setTop(1.0 - navMarker_->getHeight() - navText_->getCharHeight());
+                }
+                else
+                {
+                    // right
+                    float position = -pos.y / pos.x + 1.0;
+                    navMarker_->setPosition(1.0 - navMarker_->getWidth(), (position - navMarker_->getHeight()) * 0.5);
+                    navMarker_->setUV(0.5, 0.5, 1.0, 1.0);
+                    navText_->setLeft(1.0 - navMarker_->getWidth() - textLength - 0.01);
+                    navText_->setTop((position - navText_->getCharHeight()) * 0.5);
+                }
+            }
+        }
+        else
+        {
+            // object is in view
+/*
+            Vector3 aimpos = transformationMatrix * getPredictedPosition(SpaceShip::getLocalShip()->getPosition(),
+                    Projectile::getSpeed(), Radar::getInstance().getFocus()->getRVWorldPosition(), Radar::getInstance().getFocus()->getRVOrientedVelocity());
+*/
+            if (wasOutOfView_)
+            {
+                navMarker_->setMaterialName("Orxonox/NavTDC");
+                wasOutOfView_ = false;
+            }
+
+            // object is in view
+            navMarker_->setUV(0.0, 0.0, 1.0, 1.0);
+            navMarker_->setLeft((pos.x + 1.0 - navMarker_->getWidth()) * 0.5);
+            navMarker_->setTop((-pos.y + 1.0 - navMarker_->getHeight()) * 0.5);
+
+            aimMarker_->show();
+/*
+            aimMarker_->setLeft((aimpos.x + 1.0 - aimMarker_->getWidth()) * 0.5);
+            aimMarker_->setTop((-aimpos.y + 1.0 - aimMarker_->getHeight()) * 0.5);
+*/
+            navText_->setLeft((pos.x + 1.0 + navMarker_->getWidth()) * 0.5);
+            navText_->setTop((-pos.y + 1.0 + navMarker_->getHeight()) * 0.5);
+        }
+    }
+
+    float HUDNavigation::getDist2Focus() const
+    {
+/*
+        if (Radar::getInstance().getFocus())
+            return (Radar::getInstance().getFocus()->getRVWorldPosition() - SpaceShip::getLocalShip()->getPosition()).length();
+        else
+*/
+            return 0;
+    }
+
+    /**
+    @brief Overridden method of OrxonoxOverlay. Usually the entire overlay
+           scales with scale(). Here we obviously have to adjust this.
+    */
+    void HUDNavigation::sizeChanged()
+    {
+        // use size to compensate for apspect ratio if enabled.
+        float xScale = this->getActualSize().x;
+        float yScale = this->getActualSize().y;
+        if (this->navMarker_)
+            navMarker_->setDimensions(navMarkerSize_ * xScale, navMarkerSize_ * yScale);
+        if (this->aimMarker_)
+            aimMarker_->setDimensions(aimMarkerSize_ * xScale, aimMarkerSize_ * yScale);
+        if (this->navText_)
+            navText_->setCharHeight(navText_->getCharHeight() * yScale);
+    }
+}
Index: code/trunk/src/modules/overlays/hud/HUDNavigation.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDNavigation.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDNavigation.h	(revision 5781)
@@ -0,0 +1,80 @@
+/*
+ *   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:
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Reto Grieder
+ *
+ */
+
+#ifndef _HUDNavigation_H__
+#define _HUDNavigation_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDNavigation : public OrxonoxOverlay, public Tickable
+    {
+    public:
+        HUDNavigation(BaseObject* creator);
+        virtual ~HUDNavigation();
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+        virtual void tick(float dt);
+
+    private:
+        void sizeChanged();
+        void angleChanged() { }
+        void positionChanged() { }
+
+        // XMLPort accessors
+        void setNavMarkerSize(float size) { this->navMarkerSize_ = size; this->sizeChanged(); }
+        float getNavMarkerSize() const    { return this->navMarkerSize_; }
+
+        void setAimMarkerSize(float size) { this->aimMarkerSize_ = size; this->sizeChanged(); }
+        float getAimMarkerSize() const    { return this->aimMarkerSize_; }
+
+        void setTextSize(float size);
+        float getTextSize() const;
+
+        void setFont(const std::string& font);
+        const std::string& getFont() const;
+
+        void updateMarker();
+        void updateFocus();
+        float getDist2Focus() const;
+
+        Ogre::PanelOverlayElement* navMarker_;      //!< the panel used to show the arrow and the target marker
+        float navMarkerSize_;                       //!< One paramter size of the navigation marker
+        Ogre::PanelOverlayElement* aimMarker_;      //!< Panel used to show the aim Marker
+        float aimMarkerSize_;                       //!< One paramter size of the aim marker
+        Ogre::TextAreaOverlayElement* navText_;     //!< Text overlay to display the target distance
+        bool wasOutOfView_;                         //!< Performance booster variable: setMaterial is not cheap
+    };
+}
+
+#endif /* _HUDNavigation_H__ */
Index: code/trunk/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDRadar.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDRadar.cc	(revision 5781)
@@ -0,0 +1,168 @@
+/*
+ *   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:
+ *      Yuning Chai
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Reto Grieder
+ *
+ */
+
+#include "HUDRadar.h"
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h>
+
+#include "util/Math.h"
+#include "util/StringUtils.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/TextureGenerator.h"
+#include "worldentities/WorldEntity.h"
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+    CreateFactory(HUDRadar);
+
+    HUDRadar::HUDRadar(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+    {
+        RegisterObject(HUDRadar);
+
+        this->marker_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("Panel", "HUDRadar_marker_" + getUniqueNumberString()));
+        this->marker_->setMaterialName("Orxonox/RadarMarker");
+        this->overlay_->add2D(this->marker_);
+        this->marker_->hide();
+
+        this->setRadarSensitivity(1.0f);
+        this->setHalfDotSizeDistance(3000.0f);
+        this->setMaximumDotSize(0.1f);
+
+        this->shapeMaterials_[RadarViewable::Dot]      = "RadarDot.tga";
+        this->shapeMaterials_[RadarViewable::Triangle] = "RadarTriangle.tga";
+        this->shapeMaterials_[RadarViewable::Square]   = "RadarSquare.tga";
+
+        this->owner_ = 0;
+    }
+
+    HUDRadar::~HUDRadar()
+    {
+        if (this->isInitialized())
+        {
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->marker_);
+            for (std::vector<Ogre::PanelOverlayElement*>::iterator it = this->radarDots_.begin();
+                it != this->radarDots_.end(); ++it)
+            {
+                Ogre::OverlayManager::getSingleton().destroyOverlayElement(*it);
+            }
+        }
+    }
+
+    void HUDRadar::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(HUDRadar, XMLPort, xmlElement, mode);
+
+        XMLPortParam(HUDRadar, "sensitivity", setRadarSensitivity, getRadarSensitivity, xmlElement, mode);
+        XMLPortParam(HUDRadar, "halfDotSizeDistance", setHalfDotSizeDistance, getHalfDotSizeDistance, xmlElement, mode);
+        XMLPortParam(HUDRadar, "maximumDotSize", setMaximumDotSize, getMaximumDotSize, xmlElement, mode);
+    }
+
+    void HUDRadar::displayObject(RadarViewable* object, bool bIsMarked)
+    {
+        if (object == static_cast<RadarViewable*>(this->owner_))
+            return;
+
+        const WorldEntity* wePointer = object->getWorldEntity();
+
+        // Just to be sure that we actually have a WorldEntity.
+        // We could do a dynamic_cast, but that would be a lot slower.
+        if (!wePointer || !this->owner_)
+        {
+            if (!wePointer)
+                CCOUT(2) << "Cannot display a non-WorldEntitiy on the radar" << std::endl;
+            if (!this->owner_)
+                CCOUT(2) << "No owner defined" << std::endl;
+            return;
+        }
+
+        // try to find a panel already created
+        Ogre::PanelOverlayElement* panel;
+        //std::map<RadarViewable*, Ogre::PanelOverlayElement*>::iterator it = this->radarDots_.find(object);
+        if (itRadarDots_ == this->radarDots_.end())
+        {
+            // we have to create a new entry
+            panel = static_cast<Ogre::PanelOverlayElement*>(
+                Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "RadarDot" + getUniqueNumberString()));
+            radarDots_.push_back(panel);
+            // get right material
+            panel->setMaterialName(TextureGenerator::getMaterialName(
+                shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour()));
+            this->overlay_->add2D(panel);
+            this->itRadarDots_ = this->radarDots_.end();
+        }
+        else
+        {
+            panel = *itRadarDots_;
+            ++itRadarDots_;
+            std::string materialName = TextureGenerator::getMaterialName(
+                shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour());
+            if (materialName != panel->getMaterialName())
+                panel->setMaterialName(materialName);
+        }
+        panel->show();
+
+        // set size to fit distance...
+        float distance = (wePointer->getWorldPosition() - this->owner_->getPosition()).length();
+        // calculate the size with 1/distance dependency for simplicity (instead of exp(-distance * lambda)
+        float size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance);
+        panel->setDimensions(size, size);
+
+        // calc position on radar...
+        Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
+        coord *= Ogre::Math::PI / 3.5; // small adjustment to make it fit the texture
+        panel->setPosition((1.0 + coord.x - size) * 0.5, (1.0 - coord.y - size) * 0.5);
+
+        if (bIsMarked)
+        {
+            this->marker_->show();
+            this->marker_->setDimensions(size * 1.5, size * 1.5);
+            this->marker_->setPosition((1.0 + coord.x - size * 1.5) * 0.5, (1.0 - coord.y - size * 1.5) * 0.5);
+        }
+    }
+
+    void HUDRadar::radarTick(float dt)
+    {
+        for (itRadarDots_ = radarDots_.begin(); itRadarDots_ != radarDots_.end(); ++itRadarDots_)
+            (*itRadarDots_)->hide();
+        this->itRadarDots_ = this->radarDots_.begin();
+        this->marker_->hide();
+    }
+
+    void HUDRadar::changedOwner()
+    {
+        SUPER(HUDRadar, changedOwner);
+
+        this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+    }
+}
Index: code/trunk/src/modules/overlays/hud/HUDRadar.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDRadar.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDRadar.h	(revision 5781)
@@ -0,0 +1,85 @@
+/*
+ *   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:
+ *      Yuning Chai
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Reto Grieder
+ *
+ */
+
+#ifndef _HUDRadar_H__
+#define _HUDRadar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+
+#include "util/OgreForwardRefs.h"
+#include "interfaces/RadarListener.h"
+#include "interfaces/RadarViewable.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDRadar : public OrxonoxOverlay, public RadarListener
+    {
+    public:
+        HUDRadar(BaseObject* creator);
+        virtual ~HUDRadar();
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+        virtual void changedOwner();
+
+    private:
+        // XML accessors
+        float getHalfDotSizeDistance() const { return this->halfDotSizeDistance_; }
+        void setHalfDotSizeDistance(float distance) { this->halfDotSizeDistance_ = distance; }
+
+        float getMaximumDotSize() const { return this->maximumDotSize_; }
+        void setMaximumDotSize(float size) { this->maximumDotSize_ = size; }
+
+        float getRadarSensitivity() const { return this->sensitivity_; }
+        // used also by RadarListener interface!
+        void setRadarSensitivity(float sensitivity) { this->sensitivity_ = sensitivity; }
+
+        // RadarListener interface
+        void displayObject(RadarViewable* viewable, bool bIsMarked);
+        void radarTick(float dt);
+
+        std::map<RadarViewable::Shape, std::string> shapeMaterials_;
+
+        std::vector<Ogre::PanelOverlayElement*> radarDots_;
+        std::vector<Ogre::PanelOverlayElement*>::iterator itRadarDots_;
+        Ogre::PanelOverlayElement* marker_;
+
+        float halfDotSizeDistance_;
+        float maximumDotSize_;
+
+        float sensitivity_;
+
+        Pawn* owner_;
+    };
+}
+
+#endif /* _HUDRadar_H__ */
Index: code/trunk/src/modules/overlays/hud/HUDSpeedBar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDSpeedBar.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDSpeedBar.cc	(revision 5781)
@@ -0,0 +1,69 @@
+/*
+ *   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:
+ *      Felix Schulthess
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "HUDSpeedBar.h"
+
+#include "core/CoreIncludes.h"
+#include "worldentities/pawns/SpaceShip.h"
+#include "items/Engine.h"
+
+namespace orxonox
+{
+    CreateFactory(HUDSpeedBar);
+
+    HUDSpeedBar::HUDSpeedBar(BaseObject* creator)
+        : HUDBar(creator)
+    {
+        RegisterObject(HUDSpeedBar);
+
+        this->owner_ = 0;
+    }
+
+    HUDSpeedBar::~HUDSpeedBar()
+    {
+    }
+
+    void HUDSpeedBar::tick(float dt)
+    {
+        SUPER(HUDSpeedBar, tick, dt);
+
+        if (this->owner_ && this->owner_->getEngine())
+        {
+            float value = this->owner_->getVelocity().length() / (this->owner_->getEngine()->getMaxSpeedFront() * this->owner_->getEngine()->getSpeedFactor() * this->owner_->getEngine()->getBoostFactor());
+            this->setValue(value);
+        }
+    }
+
+    void HUDSpeedBar::changedOwner()
+    {
+        SUPER(HUDSpeedBar, changedOwner);
+
+        this->owner_ = orxonox_cast<SpaceShip*>(this->getOwner());
+    }
+}
Index: code/trunk/src/modules/overlays/hud/HUDSpeedBar.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDSpeedBar.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDSpeedBar.h	(revision 5781)
@@ -0,0 +1,53 @@
+/*
+ *   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:
+ *      Felix Schulthess
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HUDSpeedBar_H__
+#define _HUDSpeedBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "HUDBar.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDSpeedBar : public HUDBar, public Tickable
+    {
+    public:
+        HUDSpeedBar(BaseObject* creator);
+        virtual ~HUDSpeedBar();
+
+        virtual void tick(float dt);
+        virtual void changedOwner();
+
+    private:
+        SpaceShip* owner_;
+    };
+}
+#endif /* _HUDSpeedBar_H__ */
Index: code/trunk/src/modules/overlays/hud/HUDTimer.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDTimer.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDTimer.cc	(revision 5781)
@@ -0,0 +1,72 @@
+/*
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "HUDTimer.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "worldentities/ControllableEntity.h"
+#include "gametypes/Gametype.h"
+
+namespace orxonox
+{
+    CreateFactory(HUDTimer);
+
+    HUDTimer::HUDTimer(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(HUDTimer);
+
+        this->owner_ = 0;
+    }
+
+    HUDTimer::~HUDTimer()
+    {
+    }
+
+    void HUDTimer::tick(float dt)
+    {
+        SUPER(HUDTimer, tick, dt);
+
+        Gametype* gametype = this->getGametype();
+
+        if (gametype)
+        {
+            if (gametype->getTimerIsActive())
+            {
+                this->setCaption(multi_cast<std::string>(static_cast<int>(gametype->getTime()) + 1));
+            }
+        }
+    }
+
+    void HUDTimer::changedOwner()
+    {
+        SUPER(HUDTimer, changedOwner);
+
+        this->owner_ = orxonox_cast<ControllableEntity*>(this->getOwner());
+    }
+}
Index: code/trunk/src/modules/overlays/hud/HUDTimer.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDTimer.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/HUDTimer.h	(revision 5781)
@@ -0,0 +1,53 @@
+/*
+ *   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:
+ *      Aurelian Jaggi
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HUDTimer_H__
+#define _HUDTimer_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDTimer : public OverlayText, public Tickable
+    {
+    public:
+        HUDTimer(BaseObject* creator);
+        virtual ~HUDTimer();
+
+        virtual void tick(float dt);
+
+        virtual void changedOwner();
+
+    private:
+        ControllableEntity* owner_;
+    };
+}
+#endif /* _HUDTimer_H__ */
Index: code/trunk/src/modules/overlays/hud/KillMessage.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/KillMessage.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/KillMessage.cc	(revision 5781)
@@ -0,0 +1,60 @@
+/*
+ *   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 "KillMessage.h"
+
+#include "core/CoreIncludes.h"
+#include "infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(KillMessage);
+
+    KillMessage::KillMessage(BaseObject* creator) : FadeoutText(creator)
+    {
+        RegisterObject(KillMessage);
+
+        this->owner_ = 0;
+
+        this->setDelay(2.0f);
+        this->setFadeouttime(0.5f);
+    }
+
+    void KillMessage::killmessage(const GametypeInfo* gtinfo, const std::string& message)
+    {
+        if (this->owner_ && this->owner_->getGametypeInfo() == gtinfo)
+            this->setCaption(message);
+    }
+
+    void KillMessage::changedOwner()
+    {
+        SUPER(KillMessage, changedOwner);
+
+        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
+    }
+}
Index: code/trunk/src/modules/overlays/hud/KillMessage.h
===================================================================
--- code/trunk/src/modules/overlays/hud/KillMessage.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/KillMessage.h	(revision 5781)
@@ -0,0 +1,53 @@
+/*
+ *   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 _KillMessage_H__
+#define _KillMessage_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "interfaces/GametypeMessageListener.h"
+#include "overlays/FadeoutText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport KillMessage : public FadeoutText, public GametypeMessageListener
+    {
+        public:
+            KillMessage(BaseObject* creator);
+            virtual ~KillMessage() {}
+
+            virtual void changedOwner();
+
+            void killmessage(const GametypeInfo* gtinfo, const std::string& message);
+
+        private:
+            PlayerInfo* owner_;
+    };
+}
+#endif /* _KillMessage_H__ */
Index: code/trunk/src/modules/overlays/hud/TeamBaseMatchScore.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/TeamBaseMatchScore.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/TeamBaseMatchScore.cc	(revision 5781)
@@ -0,0 +1,124 @@
+/*
+ *   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 "TeamBaseMatchScore.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "gametypes/TeamBaseMatch.h"
+#include "infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(TeamBaseMatchScore);
+
+    TeamBaseMatchScore::TeamBaseMatchScore(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(TeamBaseMatchScore);
+
+        this->owner_ = 0;
+
+        this->bShowBases_ = false;
+        this->bShowScore_ = false;
+        this->bShowLeftTeam_ = false;
+        this->bShowRightTeam_ = false;
+    }
+
+    TeamBaseMatchScore::~TeamBaseMatchScore()
+    {
+    }
+
+    void TeamBaseMatchScore::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(TeamBaseMatchScore, XMLPort, xmlelement, mode);
+
+        XMLPortParam(TeamBaseMatchScore, "showbases",     setShowBases,     getShowBases,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(TeamBaseMatchScore, "showscore",     setShowScore,     getShowScore,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(TeamBaseMatchScore, "showleftteam",  setShowLeftTeam,  getShowLeftTeam,  xmlelement, mode).defaultValues(false);
+        XMLPortParam(TeamBaseMatchScore, "showrightteam", setShowRightTeam, getShowRightTeam, xmlelement, mode).defaultValues(false);
+    }
+
+    void TeamBaseMatchScore::tick(float dt)
+    {
+        SUPER(TeamBaseMatchScore, tick, dt);
+
+        if (this->owner_)
+        {
+            std::string bases1 = "(" + multi_cast<std::string>(this->owner_->getTeamBases(0)) + ")";
+            std::string bases2 = "(" + multi_cast<std::string>(this->owner_->getTeamBases(1)) + ")";
+
+            std::string score1 = multi_cast<std::string>(this->owner_->getTeamPoints(0));
+            std::string score2 = multi_cast<std::string>(this->owner_->getTeamPoints(1));
+
+            std::string output1;
+            if (this->bShowLeftTeam_)
+            {
+                if (this->bShowBases_ && this->bShowScore_)
+                    output1 = bases1 + " - " + score1;
+                else if (this->bShowScore_)
+                    output1 = score1;
+                else if (this->bShowBases_)
+                    output1 = bases1;
+            }
+
+            std::string output2;
+            if (this->bShowRightTeam_)
+            {
+                if (this->bShowBases_ && this->bShowScore_)
+                    output2 = score2 + " - " + bases2;
+                else if (this->bShowScore_)
+                    output2 = score2;
+                else if (this->bShowBases_)
+                    output2 = bases2;
+            }
+
+            std::string output = "";
+            if (this->bShowBases_ || this->bShowScore_)
+            {
+                if (this->bShowLeftTeam_ && this->bShowRightTeam_)
+                    output = output1 + ":" + output2;
+                else if (this->bShowLeftTeam_ || this->bShowRightTeam_)
+                    output = output1 + output2;
+            }
+
+            this->setCaption(output);
+        }
+    }
+
+
+    void TeamBaseMatchScore::changedOwner()
+    {
+        SUPER(TeamBaseMatchScore, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+            this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype());
+        else
+            this->owner_ = 0;
+    }
+}
Index: code/trunk/src/modules/overlays/hud/TeamBaseMatchScore.h
===================================================================
--- code/trunk/src/modules/overlays/hud/TeamBaseMatchScore.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/TeamBaseMatchScore.h	(revision 5781)
@@ -0,0 +1,77 @@
+/*
+ *   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 _TeamBaseMatchScore_H__
+#define _TeamBaseMatchScore_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OverlaysExport TeamBaseMatchScore : public OverlayText, public Tickable
+    {
+        public:
+            TeamBaseMatchScore(BaseObject* creator);
+            virtual ~TeamBaseMatchScore();
+
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
+
+            inline void setShowBases(bool value)
+                { this->bShowBases_ = value; }
+            inline bool getShowBases() const
+                { return this->bShowBases_; }
+
+            inline void setShowScore(bool value)
+                { this->bShowScore_ = value; }
+            inline bool getShowScore() const
+                { return this->bShowScore_; }
+
+            inline void setShowLeftTeam(bool value)
+                { this->bShowLeftTeam_ = value; }
+            inline bool getShowLeftTeam() const
+                { return this->bShowLeftTeam_; }
+
+            inline void setShowRightTeam(bool value)
+                { this->bShowRightTeam_ = value; }
+            inline bool getShowRightTeam() const
+                { return this->bShowRightTeam_; }
+
+        private:
+            TeamBaseMatch* owner_;
+            bool bShowBases_;
+            bool bShowScore_;
+            bool bShowLeftTeam_;
+            bool bShowRightTeam_;
+    };
+}
+#endif /* _TeamBaseMatchScore_H__ */
Index: code/trunk/src/modules/overlays/hud/UnderAttackHealthBar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/UnderAttackHealthBar.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/UnderAttackHealthBar.cc	(revision 5781)
@@ -0,0 +1,97 @@
+/*
+ *   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 "UnderAttackHealthBar.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "infos/PlayerInfo.h"
+#include "gametypes/UnderAttack.h"
+#include "worldentities/pawns/Destroyer.h"
+
+namespace orxonox
+{
+    CreateFactory(UnderAttackHealthBar);
+
+    UnderAttackHealthBar::UnderAttackHealthBar(BaseObject* creator) : HUDHealthBar(creator)
+    {
+        RegisterObject(UnderAttackHealthBar);
+
+        this->owner_ = 0;
+
+        this->text_ = new OverlayText(this);
+        this->text_->setFont("Monofur");
+        this->text_->setTextSize(0.04f);
+        this->text_->setAlignmentString("center");
+        this->text_->setColour(ColourValue::White);
+        this->text_->setPickPoint(Vector2(0.5, 0));
+
+        this->inittimer_.setTimer(0.0f, false, this, createExecutor(createFunctor(&UnderAttackHealthBar::init)));
+    }
+
+    UnderAttackHealthBar::~UnderAttackHealthBar()
+    {
+        if (this->isInitialized())
+            delete this->text_;
+    }
+
+    void UnderAttackHealthBar::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(UnderAttackHealthBar, XMLPort, xmlelement, mode);
+
+        XMLPortParam(UnderAttackHealthBar, "descriptionpickpoint", setDescriptionPickPoint, getDescriptionPickPoint, xmlelement, mode);
+        XMLPortParam(UnderAttackHealthBar, "descriptionoffset", setDescriptionOffset, getDescriptionOffset, xmlelement, mode);
+    }
+
+    void UnderAttackHealthBar::changedOwner()
+    {
+        SUPER(UnderAttackHealthBar, changedOwner);
+
+        PlayerInfo* player = orxonox_cast<PlayerInfo*>(this->getOwner());
+        if (player)
+        {
+            this->owner_ = player;
+
+            UnderAttack* ua = orxonox_cast<UnderAttack*>(player->getGametype());
+            if (ua)
+            {
+                this->setOwner(ua->getDestroyer());
+
+                if (ua->getTeam(player) == 0)
+                    this->text_->setCaption("Attack the Transporter!");
+                else
+                    this->text_->setCaption("Defend the Transporter!");
+            }
+        }
+    }
+
+    void UnderAttackHealthBar::init()
+    {
+        this->setOwner(this->owner_);
+    }
+}
Index: code/trunk/src/modules/overlays/hud/UnderAttackHealthBar.h
===================================================================
--- code/trunk/src/modules/overlays/hud/UnderAttackHealthBar.h	(revision 5781)
+++ code/trunk/src/modules/overlays/hud/UnderAttackHealthBar.h	(revision 5781)
@@ -0,0 +1,67 @@
+/*
+ *   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 _UnderAttackHealthBar_H__
+#define _UnderAttackHealthBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "util/Math.h"
+#include "tools/Timer.h"
+#include "HUDHealthBar.h"
+
+namespace orxonox
+{
+    class _OverlaysExport UnderAttackHealthBar : public HUDHealthBar
+    {
+        public:
+            UnderAttackHealthBar(BaseObject* creator);
+            ~UnderAttackHealthBar();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
+
+            inline void setDescriptionPickPoint(const Vector2& pickpoint)
+                { this->text_->setPickPoint(pickpoint); }
+            inline Vector2 getDescriptionPickPoint() const
+                { return this->text_->getPickPoint(); }
+
+            inline void setDescriptionOffset(const Vector2& position)
+                { this->text_->setPosition(this->getPosition() + (position - this->getPickPoint()) * this->getSize()); }
+            inline Vector2 getDescriptionOffset() const
+                { return (this->text_->getPosition() - this->getPosition()) / this->getSize() + this->getPickPoint(); }
+
+        private:
+            void init();
+
+            PlayerInfo* owner_;
+            OverlayText* text_;
+            Timer<UnderAttackHealthBar> inittimer_;
+    };
+}
+#endif /* _UnderAttackHealthBar_H__ */
Index: code/trunk/src/modules/overlays/stats/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/overlays/stats/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/overlays/stats/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,5 @@
+ADD_SOURCE_FILES(OVERLAYS_SRC_FILES
+  CreateLines.cc
+  Scoreboard.cc
+  Stats.cc
+)
Index: code/trunk/src/modules/overlays/stats/CreateLines.cc
===================================================================
--- code/trunk/src/modules/overlays/stats/CreateLines.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/stats/CreateLines.cc	(revision 5781)
@@ -0,0 +1,125 @@
+/*
+ *   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 Hildebrandt
+ *
+ */
+
+#include "CreateLines.h"
+
+#include "overlays/OverlayText.h"
+#include "overlays/stats/Stats.h"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Creates a line.
+    */
+    CreateLines::CreateLines(float leftOffset, float topOffset, float width, float height)
+    {
+        playerNameText_ = new OverlayText(0);
+        playerNameText_->setTextSize(0.04);
+        playerNameText_->setColour(ColourValue(0, 0.75, 0.2, 1));
+        playerNameText_->setPosition(Vector2(0.1, topOffset + 0.01));
+
+        scoreText_ = new OverlayText(0);
+        scoreText_->setTextSize(0.04);
+        scoreText_->setColour(ColourValue(0, 0.75, 0.2, 1));
+        scoreText_->setPosition(Vector2(0.6, topOffset + 0.01));
+
+        deathsText_ = new OverlayText(0);
+        deathsText_->setTextSize(0.04);
+        deathsText_->setColour(ColourValue(0, 0.75, 0.2, 1));
+        deathsText_->setPosition(Vector2(0.8, topOffset + 0.01));
+
+        background_ = new Stats(0);
+        background_->setPosition(Vector2(leftOffset, topOffset));
+        background_->setSize(Vector2(width, height));
+    }
+
+    CreateLines::~CreateLines()
+    {
+        delete this->playerNameText_;
+        delete this->scoreText_;
+        delete this->deathsText_;
+        delete this->background_;
+    }
+
+    void CreateLines::setPlayerName(const std::string& str)
+    {
+        this->playerNameText_->setCaption(str);
+    }
+
+    void CreateLines::setScore(const std::string& str)
+    {
+        this->scoreText_->setCaption(str);
+    }
+
+    void CreateLines::setDeaths(const std::string& str)
+    {
+        this->deathsText_->setCaption(str);
+    }
+
+    void CreateLines::setVisibility(bool visible)
+    {
+        this->scoreText_->setVisible(visible);
+        this->deathsText_->setVisible(visible);
+        this->playerNameText_->setVisible(visible);
+        this->background_->setVisible(visible);
+    }
+
+    /**
+        @brief Ensures that the number of OverlayElements is equal to numberOfColumns.
+    */
+    //void CreateLines::setNumberOfColumns(unsigned int numberOfColumns, unsigned int lineIndex) {
+
+    //    Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
+
+    //    unsigned int colIndex = 0;
+
+    //    while (textColumns_.size() < numberOfColumns)
+    //    {
+    //        Ogre::TextAreaOverlayElement* tempTextArea = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "StatsLineTextArea" + getName() + multi_cast<std::string>(lineIndex) + multi_cast<std::string>(colIndex)));
+    //        textColumns_.push_back(tempTextArea);
+    //        this->background_->addChild(tempTextArea);
+
+    //        colIndex++;
+    //    }
+
+    //    while (textColumns_.size() > numberOfColumns)
+    //    {
+    //        this->background_->_removeChild(textColumns_.back());
+    //        ovMan->destroyOverlayElement(textColumns_.back());
+    //        textColumns_.pop_back();
+    //    }
+    //}
+
+    //void CreateLines::alignColumn(int columnIndex, float leftOffset, float topOffset)
+    //{
+    //    this->textColumns_[columnIndex]->setPosition(leftOffset, topOffset);
+    //}
+
+    //void CreateLines::setColumnText(int columnIndex, std::string columnText)
+    //{
+    //    this->textColumns_[columnIndex]->setCaption(columnText);
+    //}
+}
Index: code/trunk/src/modules/overlays/stats/CreateLines.h
===================================================================
--- code/trunk/src/modules/overlays/stats/CreateLines.h	(revision 5781)
+++ code/trunk/src/modules/overlays/stats/CreateLines.h	(revision 5781)
@@ -0,0 +1,64 @@
+/*
+ *   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 Hildebrandt
+ *
+ */
+
+#ifndef _CreateLines_H__
+#define _CreateLines_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+namespace orxonox
+{
+    class _OverlaysExport CreateLines
+    {
+
+    public: // functions
+        CreateLines(float, float, float, float);
+        virtual ~CreateLines();
+
+        void setPlayerName(const std::string&);
+        void setScore(const std::string&);
+        void setDeaths(const std::string&);
+
+        void setVisibility(bool);
+
+        //void setNumberOfColumns(unsigned int numberOfColumns, unsigned int lineIndex);
+        //void alignColumn(int columnIndex, float leftOffset, float topOffset);
+        //void setColumnText(int columnIndex, std::string columnText);
+
+    private: // functions
+
+    private: // variables
+        //std::vector<OverlayText*> textColumns_;
+        OverlayText* playerNameText_;
+        OverlayText* scoreText_;
+        OverlayText* deathsText_;
+
+        Stats* background_;
+
+    };
+}
+
+#endif /* _CreateLines_H__ */
Index: code/trunk/src/modules/overlays/stats/Scoreboard.cc
===================================================================
--- code/trunk/src/modules/overlays/stats/Scoreboard.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/stats/Scoreboard.cc	(revision 5781)
@@ -0,0 +1,129 @@
+/*
+ *   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 Hildebrandt
+ *
+ */
+
+#include "Scoreboard.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "gametypes/Gametype.h"
+#include "infos/PlayerInfo.h"
+#include "CreateLines.h"
+
+namespace orxonox
+{
+    CreateFactory(Scoreboard);
+
+    /**
+        @brief Constructor: Creates the scoreboard.
+    */
+    Scoreboard::Scoreboard(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+    {
+        RegisterObject(Scoreboard);
+    }
+
+    /**
+        @brief Initializes the lines.
+    */
+    void Scoreboard::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(Scoreboard, XMLPort, xmlElement, mode);
+    }
+
+    void Scoreboard::changedVisibility()
+    {
+        SUPER(Scoreboard, changedVisibility);
+
+        for (unsigned int i = 0; i < this->lines_.size(); ++i)
+            this->lines_[i]->setVisibility(this->isVisible());
+    }
+
+    /**
+        @brief Prints the scoreboard on the screen.
+    */
+    void Scoreboard::tick(float dt)
+    {
+        const std::map<PlayerInfo*, Player>& playerList = this->getGametype()->getPlayers();
+
+        const float topOffset  = 0.2;
+        const float leftOffset = 0.075;
+        const float distance   = 0.01;
+        const float width      = 0.85;
+        const float height     = 0.05;
+        while (playerList.size() > this->lines_.size())
+        {
+            // create new lines
+            CreateLines* lines = new CreateLines(leftOffset, topOffset + (distance + height) * lines_.size(), width, height);
+            lines->setVisibility(this->isVisible());
+            this->lines_.push_back(lines);
+        }
+        while (playerList.size() < this->lines_.size())
+        {
+            // destroy lines
+            delete this->lines_.back();
+            this->lines_.pop_back();
+        }
+
+        // update board
+
+        unsigned int index = 0;
+        for (std::map<PlayerInfo*, Player>::const_iterator it = playerList.begin(); it != playerList.end(); ++it)
+        {
+            this->lines_[index]->setPlayerName(multi_cast<std::string>(it->first->getName()));
+            this->lines_[index]->setScore(multi_cast<std::string>(it->second.frags_));
+            this->lines_[index]->setDeaths(multi_cast<std::string>(it->second.killed_));
+            index++;
+        }
+
+        //numberOfColumns = 2;
+        //numberOfLines = 3;
+        //topOffset = 0.1;
+        //lineSpacing = 0.1;
+
+        //for (unsigned int i = 0; i < this->lines_.size(); ++i)
+        //{
+        //    columnIndex = 0;
+        //    leftOffset = 0.1;
+
+        //    this->createlines_->setNumberOfColumns(numberOfColumns, i);
+
+        //    // columnText = this->getGametype()->getPlayersName();
+        //    columnText = "PlayerName";
+        //    this->createlines_->alignColumn(columnIndex, topOffset, leftOffset);
+        //    this->createlines_->setColumnText(columnIndex, columnText);
+
+        //    columnIndex++;
+        //    leftOffset = leftOffset + 0.3;
+
+        //    // columnText = this->getGametype()->getPlayersFrags();
+        //    columnText = "PlayerFrags";
+        //    this->createlines_->alignColumn(columnIndex, topOffset, leftOffset);
+        //    this->createlines_->setColumnText(columnIndex, columnText);
+
+        //    topOffset = topOffset + lineSpacing;
+        //}
+    }
+}
Index: code/trunk/src/modules/overlays/stats/Scoreboard.h
===================================================================
--- code/trunk/src/modules/overlays/stats/Scoreboard.h	(revision 5781)
+++ code/trunk/src/modules/overlays/stats/Scoreboard.h	(revision 5781)
@@ -0,0 +1,73 @@
+/*
+ *   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 Hildebrandt
+ *
+ */
+
+#ifndef _Scoreboard_H__
+#define _Scoreboard_H__
+
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <string>
+#include <vector>
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport Scoreboard : public OrxonoxOverlay, public Tickable
+    {
+    public: // functions
+        Scoreboard(BaseObject* creator);
+        virtual ~Scoreboard() {}
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+        virtual void tick(float dt);
+
+        inline void setCreateLines(CreateLines* cl)
+            { this->createlines_ = cl; }
+        inline CreateLines* getCreateLines() const
+            { return this->createlines_; }
+
+        virtual void changedVisibility();
+
+    private: // functions
+        void printLines();
+
+    private: // variables
+        std::vector<CreateLines*> lines_;
+
+        unsigned int numberOfColumns;
+        unsigned int numberOfLines;
+        unsigned int columnIndex;
+        float topOffset;
+        float leftOffset;
+        float lineSpacing;
+        std::string columnText;
+        CreateLines* createlines_;
+    };
+}
+
+#endif /* _Scoreboard_H__ */
Index: code/trunk/src/modules/overlays/stats/Stats.cc
===================================================================
--- code/trunk/src/modules/overlays/stats/Stats.cc	(revision 5781)
+++ code/trunk/src/modules/overlays/stats/Stats.cc	(revision 5781)
@@ -0,0 +1,118 @@
+/*
+ *   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:
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Fabian 'x3n' Landau, Benjamin Hildebrandt
+ *
+ */
+
+#include "Stats.h"
+
+#include <string>
+#include <OgreOverlayManager.h>
+#include <OgreBorderPanelOverlayElement.h>
+
+#include "util/StringUtils.h"
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(Stats);
+
+    /**
+        @brief Constructor: Creates and initializes the Stats panel.
+    */
+    Stats::Stats(BaseObject* creator)
+        : OrxonoxOverlay(creator)
+        , statsOverlayNoise_(0)
+        , statsOverlayBorder_(0)
+    {
+        RegisterObject(Stats);
+
+        this->setConfigValues();
+
+        // create overlay and elements
+        Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
+
+        // create BorderPanel
+        this->statsOverlayBorder_ = static_cast<Ogre::BorderPanelOverlayElement*>(ovMan->createOverlayElement("BorderPanel", "StatsBorderPanel" + getUniqueNumberString()));
+        //this->statsOverlayBorder_->setMaterialName("StatsCenter");
+        this->statsOverlayBorder_->setBorderSize(0.003, 16 * 0.003);
+        this->statsOverlayBorder_->setBorderMaterialName("StatsBorder");
+        this->statsOverlayBorder_->setTopBorderUV(0.49, 0.0, 0.51, 0.5);
+        this->statsOverlayBorder_->setTopLeftBorderUV(0.0, 0.0, 0.5, 0.5);
+        this->statsOverlayBorder_->setTopRightBorderUV(0.5, 0.0, 1.0, 0.5);
+        this->statsOverlayBorder_->setLeftBorderUV(0.0, 0.49, 0.5, 0.51);
+        this->statsOverlayBorder_->setRightBorderUV(0.5, 0.49, 1.0, 0.5);
+        this->statsOverlayBorder_->setBottomBorderUV(0.49, 0.5, 0.51, 1.0);
+        this->statsOverlayBorder_->setBottomLeftBorderUV(0.0, 0.5, 0.5, 1.0);
+        this->statsOverlayBorder_->setBottomRightBorderUV(0.5, 0.5, 1.0, 1.0);
+
+        background_->addChild(statsOverlayBorder_);
+
+        // create noise
+        //this->statsOverlayNoise_ = static_cast<Ogre::PanelOverlayElement*>(ovMan->createOverlayElement("Panel", "StatsNoise" + getUniqueNumberString()));
+        //this->statsOverlayNoise_->setPosition(0,0);
+        //this->statsOverlayNoise_->setMaterialName("StatsNoiseSmall");
+        // comment following line to disable noise
+        //background_->addChild(this->statsOverlayNoise_);
+    }
+
+    Stats::~Stats()
+    {
+        if (this->isInitialized())
+        {
+            Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
+            ovMan->destroyOverlayElement(this->statsOverlayBorder_);
+            //ovMan->destroyOverlayElement(this->statsOverlayNoise_);
+        }
+    }
+
+    /**
+        @brief Sets the config values, describing the size of the Stats panel.
+    */
+    void Stats::setConfigValues()
+    {
+        SetConfigValue(noiseSize_, 1.0f);
+    }
+
+    /**
+        @brief Initializes the Stats panel.
+    */
+    void Stats::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        OrxonoxOverlay::XMLPort(xmlElement, mode);
+    }
+
+    void Stats::tick(float dt)
+    {
+        // SUPER(Stats, tick, dt);
+
+            // this creates a flickering effect (extracts exactly 80% of the texture at a random location)
+            //float uRand = (rand() & 1023) / 1023.0f * 0.2f;
+            //float vRand = (rand() & 1023) / 1023.0f * 0.2f;
+            //this->statsOverlayNoise_->setUV(uRand, vRand, 7.5f + uRand, 7.5f + vRand);
+    }
+
+}
Index: code/trunk/src/modules/overlays/stats/Stats.h
===================================================================
--- code/trunk/src/modules/overlays/stats/Stats.h	(revision 5781)
+++ code/trunk/src/modules/overlays/stats/Stats.h	(revision 5781)
@@ -0,0 +1,59 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Felix Schulthess
+ *   Co-authors:
+ *      Fabian 'x3n' Landau, Benjamin Hildebrandt
+ *
+ */
+
+#ifndef _Stats_H__
+#define _Stats_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport Stats : public OrxonoxOverlay, public Tickable
+    {
+    public: // functions
+        Stats(BaseObject* creator);
+        virtual ~Stats();
+
+        void setConfigValues();
+
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+
+        virtual void tick(float dt);
+
+    private: // variables
+        Ogre::PanelOverlayElement* statsOverlayNoise_;
+        Ogre::BorderPanelOverlayElement* statsOverlayBorder_;
+        float noiseSize_;
+    };
+}
+
+#endif /* _Stats_H__ */
Index: code/trunk/src/modules/pong/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/pong/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/pong/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,23 @@
+SET_SOURCE_FILES(PONG_SRC_FILES
+  Pong.cc
+  PongAI.cc
+  PongBall.cc
+  PongBat.cc
+  PongBot.cc
+  PongCenterpoint.cc
+  PongScore.cc
+)
+
+ORXONOX_ADD_LIBRARY(pong
+  MODULE
+  FIND_HEADER_FILES
+  PCH_FILE
+    PongPrecompiledHeaders.h
+  PCH_NO_DEFAULT
+  DEFINE_SYMBOL
+    "PONG_SHARED_BUILD"
+  LINK_LIBRARIES
+    orxonox
+    overlays
+  SOURCE_FILES ${PONG_SRC_FILES}
+)
Index: code/trunk/src/modules/pong/Pong.cc
===================================================================
--- code/trunk/src/modules/pong/Pong.cc	(revision 5781)
+++ code/trunk/src/modules/pong/Pong.cc	(revision 5781)
@@ -0,0 +1,200 @@
+/*
+ *   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 "Pong.h"
+
+#include "core/CoreIncludes.h"
+#include "core/Executor.h"
+#include "PongCenterpoint.h"
+#include "PongBall.h"
+#include "PongBat.h"
+#include "PongBot.h"
+#include "PongAI.h"
+
+namespace orxonox
+{
+    CreateUnloadableFactory(Pong);
+
+    Pong::Pong(BaseObject* creator) : Deathmatch(creator)
+    {
+        RegisterObject(Pong);
+
+        this->center_ = 0;
+        this->ball_ = 0;
+        this->bat_[0] = 0;
+        this->bat_[1] = 0;
+
+        this->setHUDTemplate("PongHUD");
+
+        this->starttimer_.setTimer(1.0, false, this, createExecutor(createFunctor(&Pong::startBall)));
+        this->starttimer_.stopTimer();
+
+        this->botclass_ = Class(PongBot);
+    }
+
+    void Pong::start()
+    {
+        if (this->center_)
+        {
+            if (!this->ball_)
+            {
+                this->ball_ = new PongBall(this->center_);
+                this->ball_->addTemplate(this->center_->getBalltemplate());
+            }
+
+            this->center_->attach(this->ball_);
+            this->ball_->setPosition(0, 0, 0);
+            this->ball_->setFieldDimension(this->center_->getFieldDimension());
+            this->ball_->setSpeed(0);
+            this->ball_->setBatLength(this->center_->getBatLength());
+
+            if (!this->bat_[0])
+            {
+                this->bat_[0] = new PongBat(this->center_);
+                this->bat_[0]->addTemplate(this->center_->getBattemplate());
+            }
+            if (!this->bat_[1])
+            {
+                this->bat_[1] = new PongBat(this->center_);
+                this->bat_[1]->addTemplate(this->center_->getBattemplate());
+            }
+
+            this->center_->attach(this->bat_[0]);
+            this->center_->attach(this->bat_[1]);
+            this->bat_[0]->setPosition(-this->center_->getFieldDimension().x / 2, 0, 0);
+            this->bat_[1]->setPosition( this->center_->getFieldDimension().x / 2, 0, 0);
+            this->bat_[0]->yaw(Degree(-90));
+            this->bat_[1]->yaw(Degree(90));
+            this->bat_[0]->setSpeed(this->center_->getBatSpeed());
+            this->bat_[1]->setSpeed(this->center_->getBatSpeed());
+            this->bat_[0]->setFieldHeight(this->center_->getFieldDimension().y);
+            this->bat_[1]->setFieldHeight(this->center_->getFieldDimension().y);
+            this->bat_[0]->setLength(this->center_->getBatLength());
+            this->bat_[1]->setLength(this->center_->getBatLength());
+
+            this->ball_->setBats(this->bat_);
+        }
+        else
+        {
+            COUT(1) << "Error: No Centerpoint specified." << std::endl;
+        }
+
+        this->starttimer_.startTimer();
+
+
+        bool temp = this->bForceSpawn_;
+        this->bForceSpawn_ = true;
+
+        Deathmatch::start();
+
+        this->bForceSpawn_ = temp;
+    }
+
+    void Pong::end()
+    {
+        if (this->ball_)
+        {
+            delete this->ball_;
+            this->ball_ = 0;
+        }
+
+        Deathmatch::end();
+    }
+
+    void Pong::spawnPlayer(PlayerInfo* player)
+    {
+        if (!this->bat_[0]->getPlayer())
+        {
+            player->startControl(this->bat_[0]);
+            this->players_[player].state_ = PlayerState::Alive;
+        }
+        else if (!this->bat_[1]->getPlayer())
+        {
+            player->startControl(this->bat_[1]);
+            this->players_[player].state_ = PlayerState::Alive;
+        }
+        else
+            return;
+
+        if (player && player->getController() && player->getController()->isA(Class(PongAI)))
+        {
+            PongAI* ai = orxonox_cast<PongAI*>(player->getController());
+            ai->setPongBall(this->ball_);
+        }
+    }
+
+    void Pong::playerScored(PlayerInfo* player)
+    {
+        Deathmatch::playerScored(player);
+
+        if (this->center_)
+        {
+            this->center_->fireEvent();
+
+            if (player)
+                this->gtinfo_.sendAnnounceMessage(player->getName() + " scored");
+        }
+
+        if (this->ball_)
+        {
+            this->ball_->setPosition(Vector3::ZERO);
+            this->ball_->setVelocity(Vector3::ZERO);
+            this->ball_->setSpeed(0);
+        }
+
+        if (this->bat_[0] && this->bat_[1])
+        {
+            this->bat_[0]->setPosition(-this->center_->getFieldDimension().x / 2, 0, 0);
+            this->bat_[1]->setPosition( this->center_->getFieldDimension().x / 2, 0, 0);
+        }
+
+        this->starttimer_.startTimer();
+    }
+
+    void Pong::startBall()
+    {
+        if (this->ball_ && this->center_)
+            this->ball_->setSpeed(this->center_->getBallSpeed());
+    }
+
+    PlayerInfo* Pong::getLeftPlayer() const
+    {
+        if (this->bat_ && this->bat_[0])
+            return this->bat_[0]->getPlayer();
+        else
+            return 0;
+    }
+
+    PlayerInfo* Pong::getRightPlayer() const
+    {
+        if (this->bat_ && this->bat_[1])
+            return this->bat_[1]->getPlayer();
+        else
+            return 0;
+    }
+}
Index: code/trunk/src/modules/pong/Pong.h
===================================================================
--- code/trunk/src/modules/pong/Pong.h	(revision 5781)
+++ code/trunk/src/modules/pong/Pong.h	(revision 5781)
@@ -0,0 +1,68 @@
+/*
+ *   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 _Pong_H__
+#define _Pong_H__
+
+#include "pong/PongPrereqs.h"
+
+#include "tools/Timer.h"
+#include "gametypes/Deathmatch.h"
+
+namespace orxonox
+{
+    class _PongExport Pong : public Deathmatch
+    {
+        public:
+            Pong(BaseObject* creator);
+            virtual ~Pong() {}
+
+            virtual void start();
+            virtual void end();
+
+            virtual void spawnPlayer(PlayerInfo* player);
+
+            virtual void playerScored(PlayerInfo* player);
+
+            void setCenterpoint(PongCenterpoint* center)
+                { this->center_ = center; }
+
+            PlayerInfo* getLeftPlayer() const;
+            PlayerInfo* getRightPlayer() const;
+
+        protected:
+            void startBall();
+
+            PongCenterpoint* center_;
+            PongBall* ball_;
+            PongBat* bat_[2];
+            Timer<Pong> starttimer_;
+    };
+}
+
+#endif /* _Pong_H__ */
Index: code/trunk/src/modules/pong/PongAI.cc
===================================================================
--- code/trunk/src/modules/pong/PongAI.cc	(revision 5781)
+++ code/trunk/src/modules/pong/PongAI.cc	(revision 5781)
@@ -0,0 +1,253 @@
+/*
+ *   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 "PongAI.h"
+
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "tools/Timer.h"
+#include "worldentities/ControllableEntity.h"
+#include "PongBall.h"
+
+namespace orxonox
+{
+    CreateUnloadableFactory(PongAI);
+
+    const static float MAX_REACTION_TIME = 0.4f;
+
+    PongAI::PongAI(BaseObject* creator) : Controller(creator)
+    {
+        RegisterObject(PongAI);
+
+        this->ball_ = 0;
+        this->ballDirection_ = Vector2::ZERO;
+        this->ballEndPosition_ = 0;
+        this->randomOffset_ = 0;
+        this->relHysteresisOffset_ = 0.02f;
+        this->strength_ = 0.5f;
+        this->movement_ = 0;
+        this->oldMove_ = 0;
+        this->bOscillationAvoidanceActive_ = false;
+
+        this->setConfigValues();
+    }
+
+    PongAI::~PongAI()
+    {
+        for (std::list<std::pair<Timer<PongAI>*, char> >::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it)
+            delete (*it).first;
+    }
+
+    void PongAI::setConfigValues()
+    {
+        SetConfigValue(strength_, 0.5).description("A value from 0 to 1 where 0 is weak and 1 is strong.");
+    }
+
+    void PongAI::tick(float dt)
+    {
+        if (!this->ball_ || !this->getControllableEntity())
+            return;
+
+        Vector3 mypos = this->getControllableEntity()->getPosition();
+        Vector3 ballpos = this->ball_->getPosition();
+        Vector3 ballvel = this->ball_->getVelocity();
+        float hysteresisOffset = this->relHysteresisOffset_ * this->ball_->getFieldDimension().y;
+
+        char move = 0;
+        bool delay = false;
+
+        // Check in which direction the ball is flying
+        if ((mypos.x > 0 && ballvel.x < 0) || (mypos.x < 0 && ballvel.x > 0))
+        {
+            // The ball is flying away
+            this->ballDirection_.x = -1;
+            this->ballDirection_.y = 0;
+            this->bOscillationAvoidanceActive_ = false;
+
+            // Move to the middle
+            if (mypos.z > hysteresisOffset)
+                move = 1;
+            else if (mypos.z < -hysteresisOffset)
+                move = -1;
+        }
+        else if (ballvel.x == 0)
+        {
+            // The ball is standing still
+            this->ballDirection_.x = 0;
+            this->ballDirection_.y = 0;
+            this->bOscillationAvoidanceActive_ = false;
+        }
+        else
+        {
+            // The ball is approaching
+            if (this->ballDirection_.x != 1)
+            {
+                // The ball just startet to approach, initialize all values
+                this->ballDirection_.x = 1;
+                this->ballDirection_.y = sgn(ballvel.z);
+                this->ballEndPosition_ = 0;
+                this->randomOffset_ = 0;
+
+                this->calculateRandomOffset();
+                this->calculateBallEndPosition();
+                delay = true;
+                this->bOscillationAvoidanceActive_ = false;
+            }
+
+            if (this->ballDirection_.y != sgn(ballvel.z))
+            {
+                // The ball just bounced from a bound, recalculate the predicted end position
+                this->ballDirection_.y = sgn(ballvel.z);
+
+                this->calculateBallEndPosition();
+                delay = true;
+                this->bOscillationAvoidanceActive_ = false;
+            }
+
+            // Move to the predicted end position with an additional offset (to hit the ball with the side of the bat)
+            if (!this->bOscillationAvoidanceActive_)
+            {
+                float desiredZValue = this->ballEndPosition_ + this->randomOffset_;
+
+                if (mypos.z > desiredZValue + hysteresisOffset * (this->randomOffset_ < 0))
+                    move = 1;
+                else if (mypos.z < desiredZValue - hysteresisOffset * (this->randomOffset_ > 0))
+                    move = -1;
+            }
+
+            if (move != 0 && this->oldMove_ != 0 && move != this->oldMove_ && !delay)
+            {
+                // We had to correct our position because we moved too far
+                // (and delay ist false, so we're not in the wrong place because of a new end-position prediction)
+                if (fabs(mypos.z - this->ballEndPosition_) < 0.5 * this->ball_->getBatLength() * this->ball_->getFieldDimension().y)
+                {
+                    // We're not at the right position, but we still hit the ball, so just stay there to avoid oscillation
+                    move = 0;
+                    this->bOscillationAvoidanceActive_ = true;
+                }
+            }
+        }
+
+        this->oldMove_ = move;
+        this->move(move, delay);
+        this->getControllableEntity()->moveFrontBack(this->movement_);
+    }
+
+    void PongAI::calculateRandomOffset()
+    {
+        // Calculate the exponent for the position-formula
+        float exp = pow(10, 1 - 2*this->strength_); // strength: 0   -> exp = 10
+                                                    // strength: 0.5 -> exp = 1
+                                                    // strength: 1   -> exp = 0.1
+
+        // Calculate the relative position where to hit the ball with the bat
+        float position = pow(rnd(), exp); // exp > 1 -> position is more likely a small number
+                                          // exp < 1 -> position is more likely a large number
+
+        // The position shouln't be larger than 0.5 (50% of the bat-length from the middle is the end)
+        position *= 0.48f;
+
+        // Both sides are equally probable
+        position *= rndsgn();
+
+        // Calculate the offset in world units
+        this->randomOffset_ = position * this->ball_->getBatLength() * this->ball_->getFieldDimension().y;
+    }
+
+    void PongAI::calculateBallEndPosition()
+    {
+        Vector3 position = this->ball_->getPosition();
+        Vector3 velocity = this->ball_->getVelocity();
+        Vector2 dimension = this->ball_->getFieldDimension();
+
+        // calculate end-height: current height + slope * distance
+        this->ballEndPosition_ = position.z + velocity.z / velocity.x * (-position.x + dimension.x / 2 * sgn(velocity.x));
+
+        // Calculate bounces
+        for (float limit = 0.35f; limit < this->strength_ || this->strength_ > 0.99f; limit += 0.4f)
+        {
+            // Calculate a random prediction error, based on the vertical speed of the ball and the strength of the AI
+            float randomError = rnd(-1, 1) * dimension.y * (velocity.z / velocity.x / PongBall::MAX_REL_Z_VELOCITY) * (1 - this->strength_);
+
+            // Bounce from the lower bound
+            if (this->ballEndPosition_ > dimension.y / 2)
+            {
+                // Mirror the predicted position at the upper bound and add some random error
+                this->ballEndPosition_ = dimension.y - this->ballEndPosition_ + randomError;
+                continue;
+            }
+            // Bounce from the upper bound
+            if (this->ballEndPosition_ < -dimension.y / 2)
+            {
+                // Mirror the predicted position at the lower bound and add some random error
+                this->ballEndPosition_ = -dimension.y - this->ballEndPosition_ + randomError;
+                continue;
+            }
+            // No bounce - break
+            break;
+        }
+    }
+
+    void PongAI::move(char direction, bool bUseDelay)
+    {
+        // The current direction is either what we're doing right now (movement_) or what is last in the queue
+        char currentDirection = this->movement_;
+        if (this->reactionTimers_.size() > 0)
+            currentDirection = this->reactionTimers_.back().second;
+
+        // Only add changes of direction
+        if (direction == currentDirection)
+            return;
+
+        if (bUseDelay)
+        {
+            // Calculate delay
+            float delay = MAX_REACTION_TIME * (1 - this->strength_);
+
+            // Add a new Timer
+            Timer<PongAI>* timer = new Timer<PongAI>(delay, false, this, createExecutor(createFunctor(&PongAI::delayedMove)));
+            this->reactionTimers_.push_back(std::pair<Timer<PongAI>*, char>(timer, direction));
+        }
+        else
+        {
+            this->movement_ = direction;
+        }
+    }
+
+    void PongAI::delayedMove()
+    {
+        // Get the new movement direction from the timer list
+        this->movement_ = this->reactionTimers_.front().second;
+
+        // Destroy the timer and remove it from the list
+        Timer<PongAI>* timer = this->reactionTimers_.front().first;
+        delete timer;
+
+        this->reactionTimers_.pop_front();
+    }
+}
Index: code/trunk/src/modules/pong/PongAI.h
===================================================================
--- code/trunk/src/modules/pong/PongAI.h	(revision 5781)
+++ code/trunk/src/modules/pong/PongAI.h	(revision 5781)
@@ -0,0 +1,74 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _PongAI_H__
+#define _PongAI_H__
+
+#include "pong/PongPrereqs.h"
+
+#include <list>
+#include "util/Math.h"
+#include "tools/interfaces/Tickable.h"
+#include "controllers/Controller.h"
+
+namespace orxonox
+{
+    class _PongExport PongAI : public Controller, public Tickable
+    {
+        public:
+            PongAI(BaseObject* creator);
+            virtual ~PongAI();
+
+            void setConfigValues();
+
+            virtual void tick(float dt);
+
+            void setPongBall(PongBall* ball)
+                { this->ball_ = ball; }
+
+        protected:
+            void calculateRandomOffset();
+            void calculateBallEndPosition();
+            void move(char direction, bool bUseDelay);
+            void delayedMove();
+
+            PongBall* ball_;
+            Vector2 ballDirection_;
+            float ballEndPosition_;
+            float randomOffset_;
+            float relHysteresisOffset_;
+            float strength_;
+
+            std::list<std::pair<Timer<PongAI>*, char> > reactionTimers_;
+            char movement_;
+            char oldMove_;
+            bool bOscillationAvoidanceActive_;
+    };
+}
+
+#endif /* _PongAI_H__ */
Index: code/trunk/src/modules/pong/PongBall.cc
===================================================================
--- code/trunk/src/modules/pong/PongBall.cc	(revision 5781)
+++ code/trunk/src/modules/pong/PongBall.cc	(revision 5781)
@@ -0,0 +1,237 @@
+/*
+ *   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 "PongBall.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "gametypes/Gametype.h"
+#include "PongBat.h"
+#include "sound/SoundBase.h"
+
+namespace orxonox
+{
+    CreateFactory(PongBall);
+
+    const float PongBall::MAX_REL_Z_VELOCITY = 1.5;
+
+    PongBall::PongBall(BaseObject* creator) : MovableEntity(creator)
+    {
+        RegisterObject(PongBall);
+
+        this->speed_ = 0;
+        this->bat_ = 0;
+        this->batID_ = new unsigned int[2];
+        this->batID_[0] = OBJECTID_UNKNOWN;
+        this->batID_[1] = OBJECTID_UNKNOWN;
+        this->relMercyOffset_ = 0.05f;
+
+        this->registerVariables();
+
+        this->sidesound_ = new SoundBase(this);
+        this->sidesound_->loadFile("sounds/pong_side.wav");
+
+        this->batsound_ = new SoundBase(this);
+        this->batsound_->loadFile("sounds/pong_bat.wav");
+
+        this->scoresound_ = new SoundBase(this);
+        this->scoresound_->loadFile("sounds/pong_score.wav");
+    }
+
+    void PongBall::registerVariables()
+    {
+        registerVariable( this->fieldWidth_ );
+        registerVariable( this->fieldHeight_ );
+        registerVariable( this->batlength_ );
+        registerVariable( this->speed_ );
+        registerVariable( this->relMercyOffset_ );
+        registerVariable( this->batID_[0] );
+        registerVariable( this->batID_[1], VariableDirection::ToClient, new NetworkCallback<PongBall>( this, &PongBall::applyBats) );
+    }
+
+    void PongBall::tick(float dt)
+    {
+        SUPER(PongBall, tick, dt);
+
+        if (GameMode::isMaster())
+        {
+            Vector3 position = this->getPosition();
+            Vector3 velocity = this->getVelocity();
+
+            if (position.z > this->fieldHeight_ / 2 || position.z < -this->fieldHeight_ / 2)
+            {
+                velocity.z = -velocity.z;
+                this->sidesound_->play();
+
+                if (position.z > this->fieldHeight_ / 2)
+                    position.z = this->fieldHeight_ / 2;
+                if (position.z < -this->fieldHeight_ / 2)
+                    position.z = -this->fieldHeight_ / 2;
+            }
+
+            if (position.x > this->fieldWidth_ / 2 || position.x < -this->fieldWidth_ / 2)
+            {
+                float distance = 0;
+
+                if (this->bat_)
+                {
+                    if (position.x > this->fieldWidth_ / 2 && this->bat_[1])
+                    {
+                        distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
+                        if (fabs(distance) <= 1)
+                        {
+                            position.x = this->fieldWidth_ / 2;
+                            velocity.x = -velocity.x;
+                            velocity.z = distance * distance * sgn(distance) * PongBall::MAX_REL_Z_VELOCITY * this->speed_;
+                            this->batsound_->play();
+                        }
+                        else if (position.x > this->fieldWidth_ / 2 * (1 + this->relMercyOffset_))
+                        {
+                            if (this->getGametype() && this->bat_[0])
+                            {
+                                this->getGametype()->playerScored(this->bat_[0]->getPlayer());
+                                this->scoresound_->play();
+                                return;
+                            }
+                        }
+                    }
+                    if (position.x < -this->fieldWidth_ / 2 && this->bat_[0])
+                    {
+                        distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
+                        if (fabs(distance) <= 1)
+                        {
+                            position.x = -this->fieldWidth_ / 2;
+                            velocity.x = -velocity.x;
+                            velocity.z = distance * distance * sgn(distance) * PongBall::MAX_REL_Z_VELOCITY * this->speed_;
+                            this->batsound_->play();
+                        }
+                        else if (position.x < -this->fieldWidth_ / 2 * (1 + this->relMercyOffset_))
+                        {
+                            if (this->getGametype() && this->bat_[1])
+                            {
+                                this->scoresound_->play();
+                                this->getGametype()->playerScored(this->bat_[1]->getPlayer());
+                                return;
+                            }
+                        }
+                    }
+                }
+            }
+
+            if (velocity != this->getVelocity())
+                this->setVelocity(velocity);
+            if (position != this->getPosition())
+                this->setPosition(position);
+        }
+        else
+        {
+          Vector3 position = this->getPosition();
+          Vector3 velocity = this->getVelocity();
+
+          if (position.z > this->fieldHeight_ / 2 || position.z < -this->fieldHeight_ / 2)
+          {
+            velocity.z = -velocity.z;
+            this->sidesound_->play();
+
+            if (position.z > this->fieldHeight_ / 2)
+              position.z = this->fieldHeight_ / 2;
+            if (position.z < -this->fieldHeight_ / 2)
+              position.z = -this->fieldHeight_ / 2;
+          }
+
+          if (position.x > this->fieldWidth_ / 2 || position.x < -this->fieldWidth_ / 2)
+          {
+            float distance = 0;
+
+            if (this->bat_)
+            {
+              if (position.x > this->fieldWidth_ / 2 && this->bat_[1])
+              {
+                distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
+                if (fabs(distance) <= 1)
+                {
+                  position.x = this->fieldWidth_ / 2;
+                  velocity.x = -velocity.x;
+                  this->batsound_->play();
+                  velocity.z = distance * distance * sgn(distance) * PongBall::MAX_REL_Z_VELOCITY * this->speed_;
+                }
+              }
+              if (position.x < -this->fieldWidth_ / 2 && this->bat_[0])
+              {
+                distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
+                if (fabs(distance) <= 1)
+                {
+                  position.x = -this->fieldWidth_ / 2;
+                  velocity.x = -velocity.x;
+                  this->batsound_->play();
+                  velocity.z = distance * distance * sgn(distance) * PongBall::MAX_REL_Z_VELOCITY * this->speed_;
+                }
+              }
+            }
+          }
+
+          if (velocity != this->getVelocity())
+            this->setVelocity(velocity);
+          if (position != this->getPosition())
+            this->setPosition(position);
+        }
+    }
+
+    void PongBall::setSpeed(float speed)
+    {
+        if (speed != this->speed_)
+        {
+            this->speed_ = speed;
+
+            Vector3 velocity = this->getVelocity();
+            if (velocity.x != 0)
+                velocity.x = sgn(velocity.x) * this->speed_;
+            else
+                velocity.x = this->speed_ * sgn(rnd(-1,1));
+
+            this->setVelocity(velocity);
+        }
+    }
+
+    void PongBall::setBats(PongBat** bats)
+    {
+        this->bat_ = bats;
+        this->batID_[0] = this->bat_[0]->getObjectID();
+        this->batID_[1] = this->bat_[1]->getObjectID();
+    }
+
+    void PongBall::applyBats()
+    {
+        if (!this->bat_)
+            this->bat_ = new PongBat*[2];
+        if (this->batID_[0] != OBJECTID_UNKNOWN)
+            this->bat_[0] = orxonox_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0]));
+        if (this->batID_[1] != OBJECTID_UNKNOWN)
+            this->bat_[1] = orxonox_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1]));
+    }
+}
Index: code/trunk/src/modules/pong/PongBall.h
===================================================================
--- code/trunk/src/modules/pong/PongBall.h	(revision 5781)
+++ code/trunk/src/modules/pong/PongBall.h	(revision 5781)
@@ -0,0 +1,85 @@
+/*
+ *   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 _PongBall_H__
+#define _PongBall_H__
+
+#include "pong/PongPrereqs.h"
+
+#include "util/Math.h"
+#include "worldentities/MovableEntity.h"
+
+namespace orxonox
+{
+    class _PongExport PongBall : public MovableEntity
+    {
+        public:
+            PongBall(BaseObject* creator);
+            virtual ~PongBall() {}
+
+            virtual void tick(float dt);
+
+            void registerVariables();
+
+            void setFieldDimension(float width, float height)
+                { this->fieldWidth_ = width; this->fieldHeight_ = height; }
+            void setFieldDimension(const Vector2& dimension)
+                { this->setFieldDimension(dimension.x, dimension.y); }
+            Vector2 getFieldDimension() const
+                { return Vector2(this->fieldWidth_, this->fieldHeight_); }
+
+            void setSpeed(float speed);
+            float getSpeed() const
+                { return this->speed_; }
+
+            void setBatLength(float batlength)
+                { this->batlength_ = batlength; }
+            float getBatLength() const
+                { return this->batlength_; }
+
+            void setBats(PongBat** bats);
+            void applyBats();
+
+            static const float MAX_REL_Z_VELOCITY;
+
+        private:
+            float fieldWidth_;
+            float fieldHeight_;
+            float speed_;
+            float batlength_;
+            PongBat** bat_;
+            unsigned int* batID_;
+            float relMercyOffset_;
+
+            SoundBase* sidesound_;
+            SoundBase* batsound_;
+            SoundBase* scoresound_;
+    };
+}
+
+#endif /* _PongBall_H__ */
Index: code/trunk/src/modules/pong/PongBat.cc
===================================================================
--- code/trunk/src/modules/pong/PongBat.cc	(revision 5781)
+++ code/trunk/src/modules/pong/PongBat.cc	(revision 5781)
@@ -0,0 +1,114 @@
+/*
+ *   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 "PongBat.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(PongBat);
+
+    PongBat::PongBat(BaseObject* creator) : ControllableEntity(creator)
+    {
+        RegisterObject(PongBat);
+
+        this->movement_ = 0;
+        this->bMoveLocal_ = false;
+        this->speed_ = 60;
+        this->length_ = 0.25;
+        this->fieldHeight_ = 100;
+        this->bSteadiedPosition_ = false;
+
+        this->registerVariables();
+    }
+
+    void PongBat::registerVariables()
+    {
+        registerVariable(this->speed_);
+        registerVariable(this->fieldHeight_);
+        registerVariable(this->length_);
+    }
+
+    void PongBat::tick(float dt)
+    {
+        if (this->hasLocalController())
+        {
+            if (this->movement_ != 0)
+            {
+                this->movement_ = clamp(this->movement_, -1.0f, 1.0f) * this->speed_;
+
+                if (this->bMoveLocal_)
+                    this->setVelocity(this->getOrientation() * Vector3(this->movement_, 0, 0));
+                else
+                    this->setVelocity(0, 0, this->movement_);
+
+                this->movement_ = 0;
+                this->bSteadiedPosition_ = false;
+            }
+            else if (!this->bSteadiedPosition_)
+            {
+                // To ensure network synchronicity
+                this->setVelocity(0, 0, 0);
+                this->setPosition(this->getPosition());
+                this->bSteadiedPosition_ = true;
+            }
+        }
+
+        SUPER(PongBat, tick, dt);
+
+        Vector3 position = this->getPosition();
+        if (position.z > this->fieldHeight_ / 2 - this->fieldHeight_ * this->length_ / 2)
+            position.z = this->fieldHeight_ / 2 - this->fieldHeight_ * this->length_ / 2;
+        if (position.z < -this->fieldHeight_ / 2 + this->fieldHeight_ * this->length_ / 2)
+            position.z = -this->fieldHeight_ / 2 + this->fieldHeight_ * this->length_ / 2;
+        if (position != this->getPosition())
+        {
+            this->setPosition(position);
+            this->setVelocity( Vector3::ZERO );
+        }
+    }
+
+    void PongBat::moveFrontBack(const Vector2& value)
+    {
+        this->bMoveLocal_ = false;
+        this->movement_ = -value.x;
+    }
+
+    void PongBat::moveRightLeft(const Vector2& value)
+    {
+        this->bMoveLocal_ = true;
+        this->movement_ = value.x;
+    }
+
+    void PongBat::changedPlayer()
+    {
+        this->setVelocity(0, 0, 0);
+    }
+}
Index: code/trunk/src/modules/pong/PongBat.h
===================================================================
--- code/trunk/src/modules/pong/PongBat.h	(revision 5781)
+++ code/trunk/src/modules/pong/PongBat.h	(revision 5781)
@@ -0,0 +1,76 @@
+/*
+ *   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 _PongBat_H__
+#define _PongBat_H__
+
+#include "pong/PongPrereqs.h"
+#include "worldentities/ControllableEntity.h"
+
+namespace orxonox
+{
+    class _PongExport PongBat : public ControllableEntity
+    {
+        public:
+            PongBat(BaseObject* creator);
+            virtual ~PongBat() {}
+
+            void registerVariables();
+            virtual void tick(float dt);
+
+            virtual void moveFrontBack(const Vector2& value);
+            virtual void moveRightLeft(const Vector2& value);
+
+            virtual void changedPlayer();
+
+            void setSpeed(float speed)
+                { this->speed_ = speed; }
+            float getSpeed() const
+                { return this->speed_; }
+
+            void setFieldHeight(float height)
+                { this->fieldHeight_ = height; }
+            float getFieldHeight() const
+                { return this->fieldHeight_; }
+
+            void setLength(float length)
+                { this->length_ = length; }
+            float getLength() const
+                { return this->length_; }
+
+        private:
+            float movement_;
+            bool bMoveLocal_;
+            float speed_;
+            float length_;
+            float fieldHeight_;
+            bool bSteadiedPosition_;
+    };
+}
+
+#endif /* _PongBat_H__ */
Index: code/trunk/src/modules/pong/PongBot.cc
===================================================================
--- code/trunk/src/modules/pong/PongBot.cc	(revision 5781)
+++ code/trunk/src/modules/pong/PongBot.cc	(revision 5781)
@@ -0,0 +1,45 @@
+/*
+ *   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 "PongBot.h"
+
+#include "core/CoreIncludes.h"
+#include "PongAI.h"
+
+namespace orxonox
+{
+    CreateFactory(PongBot);
+
+    PongBot::PongBot(BaseObject* creator) : Bot(creator)
+    {
+        RegisterObject(PongBot);
+
+        this->defaultController_ = Class(PongAI);
+        this->createController();
+    }
+}
Index: code/trunk/src/modules/pong/PongBot.h
===================================================================
--- code/trunk/src/modules/pong/PongBot.h	(revision 5781)
+++ code/trunk/src/modules/pong/PongBot.h	(revision 5781)
@@ -0,0 +1,45 @@
+/*
+ *   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 _PongBot_H__
+#define _PongBot_H__
+
+#include "pong/PongPrereqs.h"
+#include "infos/Bot.h"
+
+namespace orxonox
+{
+    class _PongExport PongBot : public Bot
+    {
+        public:
+            PongBot(BaseObject* creator);
+            virtual ~PongBot() {}
+    };
+}
+
+#endif /* _PongBot_H__ */
Index: code/trunk/src/modules/pong/PongCenterpoint.cc
===================================================================
--- code/trunk/src/modules/pong/PongCenterpoint.cc	(revision 5781)
+++ code/trunk/src/modules/pong/PongCenterpoint.cc	(revision 5781)
@@ -0,0 +1,79 @@
+/*
+ *   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 "PongCenterpoint.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "Pong.h"
+
+namespace orxonox
+{
+    CreateFactory(PongCenterpoint);
+
+    PongCenterpoint::PongCenterpoint(BaseObject* creator) : StaticEntity(creator)
+    {
+        RegisterObject(PongCenterpoint);
+
+        this->width_ = 200;
+        this->height_ = 120;
+        this->ballspeed_ = 100;
+        this->batspeed_ = 60;
+        this->batlength_ = 0.25;
+
+        this->checkGametype();
+    }
+
+    void PongCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(PongCenterpoint, XMLPort, xmlelement, mode);
+
+        XMLPortParam(PongCenterpoint, "dimension", setFieldDimension, getFieldDimension, xmlelement, mode);
+        XMLPortParam(PongCenterpoint, "balltemplate", setBalltemplate, getBalltemplate, xmlelement, mode);
+        XMLPortParam(PongCenterpoint, "battemplate", setBattemplate, getBattemplate, xmlelement, mode);
+        XMLPortParam(PongCenterpoint, "ballspeed", setBallSpeed, getBallSpeed, xmlelement, mode);
+        XMLPortParam(PongCenterpoint, "batspeed", setBatSpeed, getBatSpeed, xmlelement, mode);
+        XMLPortParam(PongCenterpoint, "batlength", setBatLength, getBatLength, xmlelement, mode);
+    }
+
+    void PongCenterpoint::changedGametype()
+    {
+        SUPER(PongCenterpoint, changedGametype);
+
+        this->checkGametype();
+    }
+
+    void PongCenterpoint::checkGametype()
+    {
+        if (this->getGametype() && this->getGametype()->isA(Class(Pong)))
+        {
+            Pong* pong_gametype = orxonox_cast<Pong*>(this->getGametype());
+            pong_gametype->setCenterpoint(this);
+        }
+    }
+}
Index: code/trunk/src/modules/pong/PongCenterpoint.h
===================================================================
--- code/trunk/src/modules/pong/PongCenterpoint.h	(revision 5781)
+++ code/trunk/src/modules/pong/PongCenterpoint.h	(revision 5781)
@@ -0,0 +1,95 @@
+/*
+ *   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 _PongCenterpoint_H__
+#define _PongCenterpoint_H__
+
+#include "pong/PongPrereqs.h"
+
+#include <string>
+#include <util/Math.h>
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    class _PongExport PongCenterpoint : public StaticEntity
+    {
+        public:
+            PongCenterpoint(BaseObject* creator);
+            virtual ~PongCenterpoint() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void changedGametype();
+
+            void setBalltemplate(const std::string& balltemplate)
+                { this->balltemplate_ = balltemplate; }
+            const std::string& getBalltemplate() const
+                { return this->balltemplate_; }
+
+            void setBattemplate(const std::string& battemplate)
+                { this->battemplate_ = battemplate; }
+            const std::string& getBattemplate() const
+                { return this->battemplate_; }
+
+            void setFieldDimension(const Vector2& dimension)
+                { this->width_ = dimension.x; this->height_ = dimension.y; }
+            Vector2 getFieldDimension() const
+                { return Vector2(this->width_, this->height_); }
+
+            void setBallSpeed(float ballspeed)
+                { this->ballspeed_ = ballspeed; }
+            float getBallSpeed() const
+                { return this->ballspeed_; }
+
+            void setBatSpeed(float batspeed)
+                { this->batspeed_ = batspeed; }
+            float getBatSpeed() const
+                { return this->batspeed_; }
+
+            void setBatLength(float batlength)
+                { this->batlength_ = batlength; }
+            float getBatLength() const
+                { return this->batlength_; }
+
+        private:
+            void checkGametype();
+
+            std::string balltemplate_;
+            std::string battemplate_;
+
+            float ballspeed_;
+            float batspeed_;
+            float batlength_;
+
+            float width_;
+            float height_;
+    };
+}
+
+#endif /* _PongCenterpoint_H__ */
Index: code/trunk/src/modules/pong/PongPrecompiledHeaders.h
===================================================================
--- code/trunk/src/modules/pong/PongPrecompiledHeaders.h	(revision 5781)
+++ code/trunk/src/modules/pong/PongPrecompiledHeaders.h	(revision 5781)
@@ -0,0 +1,58 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Compilation of the most often used header files in the pong module
+@details
+    Updated: 19. September 2009
+    Total Files: 7
+*/
+
+#include "OrxonoxConfig.h"
+
+///////////////////////////////////////////
+/////          Stable Headers         /////
+///////////////////////////////////////////
+
+#include "util/OgreForwardRefs.h" // 6
+
+///////////////////////////////////////////
+/////       All Rebuild Headers       /////
+///////////////////////////////////////////
+
+#include "core/BaseObject.h"   // 7
+#include "core/CoreIncludes.h" // 7
+#include "core/Executor.h"     // 6
+#include "network/synchronisable/Synchronisable.h" // 7
+
+
+// Just in case some header included windows.h
+#undef min
+#undef max
Index: code/trunk/src/modules/pong/PongPrereqs.h
===================================================================
--- code/trunk/src/modules/pong/PongPrereqs.h	(revision 5781)
+++ code/trunk/src/modules/pong/PongPrereqs.h	(revision 5781)
@@ -0,0 +1,75 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+  @file
+  @brief Contains all the necessary forward declarations for all classes and structs.
+*/
+
+#ifndef _PongPrereqs_H__
+#define _PongPrereqs_H__
+
+#include "OrxonoxConfig.h"
+
+#include "pong/PongPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD)
+#  ifdef PONG_SHARED_BUILD
+#    define _PongExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _PongExport
+#    else
+#      define _PongExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _PongExport  __attribute__ ((visibility("default")))
+#else
+#  define _PongExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class Pong;
+    class PongAI;
+    class PongBall;
+    class PongBat;
+    class PongBot;
+    class PongCenterpoint;
+    class PongScore;
+}
+
+#endif /* _PongPrereqs_H__ */
Index: code/trunk/src/modules/pong/PongScore.cc
===================================================================
--- code/trunk/src/modules/pong/PongScore.cc	(revision 5781)
+++ code/trunk/src/modules/pong/PongScore.cc	(revision 5781)
@@ -0,0 +1,139 @@
+/*
+ *   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 "PongScore.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "Pong.h"
+#include "infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateFactory(PongScore);
+
+    PongScore::PongScore(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(PongScore);
+
+        this->owner_ = 0;
+
+        this->bShowName_ = false;
+        this->bShowScore_ = false;
+        this->bShowLeftPlayer_ = false;
+        this->bShowRightPlayer_ = false;
+    }
+
+    PongScore::~PongScore()
+    {
+    }
+
+    void PongScore::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(PongScore, XMLPort, xmlelement, mode);
+
+        XMLPortParam(PongScore, "showname",        setShowName,        getShowName,        xmlelement, mode).defaultValues(false);
+        XMLPortParam(PongScore, "showscore",       setShowScore,       getShowScore,       xmlelement, mode).defaultValues(false);
+        XMLPortParam(PongScore, "showleftplayer",  setShowLeftPlayer,  getShowLeftPlayer,  xmlelement, mode).defaultValues(false);
+        XMLPortParam(PongScore, "showrightplayer", setShowRightPlayer, getShowRightPlayer, xmlelement, mode).defaultValues(false);
+    }
+
+    void PongScore::tick(float dt)
+    {
+        SUPER(PongScore, tick, dt);
+
+        if (this->owner_)
+        {
+            PlayerInfo* player1 = this->owner_->getLeftPlayer();
+            PlayerInfo* player2 = this->owner_->getRightPlayer();
+
+            std::string name1;
+            std::string name2;
+
+            std::string score1 = "0";
+            std::string score2 = "0";
+
+            if (player1)
+            {
+                name1 = player1->getName();
+                score1 = multi_cast<std::string>(this->owner_->getScore(player1));
+            }
+
+            if (player2)
+            {
+                name2 = player2->getName();
+                score2 = multi_cast<std::string>(this->owner_->getScore(player2));
+            }
+
+            std::string output1;
+            if (this->bShowLeftPlayer_)
+            {
+                if (this->bShowName_ && this->bShowScore_ && player1)
+                    output1 = name1 + " - " + score1;
+                else if (this->bShowScore_)
+                    output1 = score1;
+                else if (this->bShowName_)
+                    output1 = name1;
+            }
+
+            std::string output2;
+            if (this->bShowRightPlayer_)
+            {
+                if (this->bShowName_ && this->bShowScore_ && player2)
+                    output2 = score2 + " - " + name2;
+                else if (this->bShowScore_)
+                    output2 = score2;
+                else if (this->bShowName_)
+                    output2 = name2;
+            }
+
+            std::string output = "PONG";
+            if (this->bShowName_ || this->bShowScore_)
+            {
+                if (this->bShowLeftPlayer_ && this->bShowRightPlayer_)
+                    output = output1 + ":" + output2;
+                else if (this->bShowLeftPlayer_ || this->bShowRightPlayer_)
+                    output = output1 + output2;
+            }
+
+            this->setCaption(output);
+        }
+    }
+
+
+    void PongScore::changedOwner()
+    {
+        SUPER(PongScore, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype());
+        else
+            this->owner_ = 0;
+    }
+}
Index: code/trunk/src/modules/pong/PongScore.h
===================================================================
--- code/trunk/src/modules/pong/PongScore.h	(revision 5781)
+++ code/trunk/src/modules/pong/PongScore.h	(revision 5781)
@@ -0,0 +1,77 @@
+/*
+ *   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 _PongScore_H__
+#define _PongScore_H__
+
+#include "pong/PongPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _PongExport PongScore : public OverlayText, public Tickable
+    {
+        public:
+            PongScore(BaseObject* creator);
+            virtual ~PongScore();
+
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
+
+            inline void setShowName(bool value)
+                { this->bShowName_ = value; }
+            inline bool getShowName() const
+                { return this->bShowName_; }
+
+            inline void setShowScore(bool value)
+                { this->bShowScore_ = value; }
+            inline bool getShowScore() const
+                { return this->bShowScore_; }
+
+            inline void setShowLeftPlayer(bool value)
+                { this->bShowLeftPlayer_ = value; }
+            inline bool getShowLeftPlayer() const
+                { return this->bShowLeftPlayer_; }
+
+            inline void setShowRightPlayer(bool value)
+                { this->bShowRightPlayer_ = value; }
+            inline bool getShowRightPlayer() const
+                { return this->bShowRightPlayer_; }
+
+        private:
+            Pong* owner_;
+            bool bShowName_;
+            bool bShowScore_;
+            bool bShowLeftPlayer_;
+            bool bShowRightPlayer_;
+    };
+}
+#endif /* _PongScore_H__ */
Index: code/trunk/src/modules/questsystem/AddQuest.cc
===================================================================
--- code/trunk/src/modules/questsystem/AddQuest.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/AddQuest.cc	(revision 5781)
@@ -0,0 +1,110 @@
+/*
+ *   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
+    @brief Implementation of the AddQuest class.
+*/
+
+#include "AddQuest.h"
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "QuestManager.h"
+#include "Quest.h"
+
+namespace orxonox
+{
+    CreateFactory(AddQuest);
+
+    /**
+    @brief
+        Constructor. Registers the object.
+    */
+    AddQuest::AddQuest(BaseObject* creator) : ChangeQuestStatus(creator)
+    {
+        RegisterObject(AddQuest);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    AddQuest::~AddQuest()
+    {
+    }
+
+    /**
+    @brief
+        Method for creating a AddQuest object through XML.
+    */
+    void AddQuest::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(AddQuest, XMLPort, xmlelement, mode);
+
+        COUT(3) << "New AddQuest, with target Quest {" << this->getQuestId() << "}, created." << std::endl;
+    }
+
+    /**
+    @brief
+        Invokes the QuestEffect.
+    @param player
+        The player the QuestEffect is invoked on.
+    @return
+        Returns true if the QuestEffect was successfully invoked.
+    */
+    bool AddQuest::invoke(PlayerInfo* player)
+    {
+        if(player == NULL) //!< Null-pointers are badass.
+        {
+            COUT(2) << "Input player is NULL." << std::endl;
+            return false;
+        }
+
+        COUT(3) << "AddQuest on player: " << player << " ." << std::endl;
+
+        try
+        {
+            Quest* quest = QuestManager::getInstance().findQuest(this->getQuestId());
+            if(quest == NULL || !quest->start(player))
+            {
+               return false;
+            }
+        }
+        catch(const orxonox::Exception& ex)
+        {
+            COUT(2) << ex.getFullDescription() << std::endl;
+            return false;
+        }
+
+        COUT(3) << "Quest {" << this->getQuestId() << "} successfully added to player: " << player << " ." << std::endl;
+        return true;
+    }
+
+
+}
Index: code/trunk/src/modules/questsystem/AddQuest.h
===================================================================
--- code/trunk/src/modules/questsystem/AddQuest.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/AddQuest.h	(revision 5781)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Definition of the AddQuest class.
+*/
+
+#ifndef _AddQuest_H__
+#define _AddQuest_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+#include "ChangeQuestStatus.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Adds a Quest, resp. changes the quests status to active for the player invoking the Quest.
+
+        Creating a AddQuest through XML goes as follows:
+
+        <AddQuest questId="id" />  //Where id is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information, and identifies the Quest that should be added.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport AddQuest : public ChangeQuestStatus
+    {
+        public:
+        AddQuest(BaseObject* creator);
+        virtual ~AddQuest();
+
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddQuest object through XML.
+
+        virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
+
+    };
+
+}
+
+#endif /* _AddQuest_H__ */
Index: code/trunk/src/modules/questsystem/AddQuestHint.cc
===================================================================
--- code/trunk/src/modules/questsystem/AddQuestHint.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/AddQuestHint.cc	(revision 5781)
@@ -0,0 +1,133 @@
+/*
+ *   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
+    @brief Implementation of the AddQuestHint class.
+*/
+
+#include "AddQuestHint.h"
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "QuestManager.h"
+#include "QuestItem.h"
+#include "QuestHint.h"
+
+namespace orxonox
+{
+    CreateFactory(AddQuestHint);
+
+    /**
+    @brief
+        Constructor. Registers the object.
+    */
+    AddQuestHint::AddQuestHint(BaseObject* creator) : QuestEffect(creator)
+    {
+        RegisterObject(AddQuestHint);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    AddQuestHint::~AddQuestHint()
+    {
+    }
+
+    /**
+    @brief
+        Method for creating a AddQuestHint object through XML.
+    */
+    void AddQuestHint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(AddQuestHint, XMLPort, xmlelement, mode);
+
+        XMLPortParam(AddQuestHint, "hintId", setHintId, getHintId, xmlelement, mode);
+        
+        COUT(3) << "New AddQuestHint, with target QuestHint {" << this->getHintId() << "}, created." << std::endl;
+    }
+
+    /**
+    @brief
+        Sets the id of the QuestHint to be added to the player the QuestEffect is invoked on.
+    @param id
+        The QuestHint id.
+    @param
+        Returns true if successful.
+    */
+    bool AddQuestHint::setHintId(const std::string & id)
+    {
+        if(!QuestItem::isId(id))
+        {
+            COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
+            return false;
+        }
+        
+        this->hintId_ = id;
+        return true;
+    }
+
+    /**
+    @brief
+        Invokes the QuestEffect.
+    @param player
+        The player.
+    @return
+        Returns true if the QuestEffect was successfully invoked.
+    */
+    bool AddQuestHint::invoke(PlayerInfo* player)
+    {
+        if(player == NULL) //!< NULL-pointers are evil!
+        {
+            COUT(2) << "The input player is NULL." << std::endl;
+            return false;
+        }
+
+        COUT(3) << "AddQuestHint on player: " << player << " ." << std::endl;
+
+        try
+        {
+            QuestHint* hint = QuestManager::getInstance().findHint(this->hintId_);
+            if(hint == NULL || !hint->setActive(player))
+            {
+                return false;
+            }
+        }
+        catch(const Exception& e)
+        {
+           COUT(2) << e.getFullDescription() << std::endl;
+           return false;
+        }
+
+        COUT(3) << "QuestHint {" << this->getHintId() << "} successfully added to player: " << player << " ." << std::endl;
+        return true;
+
+    }
+}
Index: code/trunk/src/modules/questsystem/AddQuestHint.h
===================================================================
--- code/trunk/src/modules/questsystem/AddQuestHint.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/AddQuestHint.h	(revision 5781)
@@ -0,0 +1,80 @@
+/*
+ *   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
+    @brief Definition of the AddQuestHint class.
+*/
+
+#ifndef _AddQuestHint_H__
+#define _AddQuestHint_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <string>
+#include "QuestEffect.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Adds a QuestHint, resp. activates the QuestHint of the given id for the player the QuestEffect is invoked on.
+
+    Creating a AddQuestHint through XML goes as follows:
+
+        <AddQuestHint hintId="id" />  //Where id is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information, and identifies the QuestHint that should be added.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport AddQuestHint : public QuestEffect
+    {
+        public:
+            AddQuestHint(BaseObject* creator);
+            virtual ~AddQuestHint();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddQuestHint object through XML.
+
+            virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
+
+        private:
+            std::string hintId_; //!< The id of the QuestHint.
+
+            /**
+            @brief Returns the id of the QuestHint.
+            @return Returns the id of the QuestHint.
+            */
+            inline const std::string & getHintId(void) const
+                { return this->hintId_; }
+
+            bool setHintId(const std::string & id); //!< Sets the id of the QuestHint.
+
+    };
+
+}
+
+#endif /* _AddQuestHint_H__ */
Index: code/trunk/src/modules/questsystem/AddReward.cc
===================================================================
--- code/trunk/src/modules/questsystem/AddReward.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/AddReward.cc	(revision 5781)
@@ -0,0 +1,118 @@
+/*
+ *   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
+    @brief Implementation of the AddReward class.
+*/
+
+#include "AddReward.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "interfaces/Rewardable.h"
+
+namespace orxonox
+{
+    CreateFactory(AddReward);
+
+    /**
+    @brief
+        Constructor. Registers the object.
+    */
+    AddReward::AddReward(BaseObject* creator) : QuestEffect(creator)
+    {
+        RegisterObject(AddReward);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    AddReward::~AddReward()
+    {
+    }
+
+    /**
+        Method for creating a AddReward object through XML.
+    */
+    void AddReward::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(AddReward, XMLPort, xmlelement, mode);
+
+        XMLPortObject(AddReward, Rewardable, "", addRewardable, getRewardables, xmlelement, mode);
+        
+        COUT(3) << "New AddReward, with " << this->rewards_.size() << " Rewardables created." << std::endl;
+    }
+
+    /**
+    @brief
+        Returns the Rewardable object at the given index.
+    @param index
+        The index.
+    @return
+        Returns a pointer to the Rewardable object at the given index.
+    */
+    const Rewardable* AddReward::getRewardables(unsigned int index) const
+    {
+        int i = index;
+        for (std::list<Rewardable*>::const_iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward)
+        {
+            if(i == 0)
+            {
+               return *reward;
+            }
+            i--;
+        }
+        return NULL;
+    }
+
+    /**
+    @brief
+        Invokes the QuestEffect.
+    @param player
+        The player.
+    @return
+        Returns true if the QuestEffect was invoked successfully.
+    */
+    bool AddReward::invoke(PlayerInfo* player)
+    {
+        COUT(3) << "AddReward on player: " << player << " ." << std::endl;
+        
+        bool check = true;
+        for ( std::list<Rewardable*>::iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward )
+        {
+            check = check && (*reward)->reward(player);
+        }
+        
+        COUT(3) << "Rewardable successfully added to player." << player << " ." << std::endl;
+
+        return check;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/AddReward.h
===================================================================
--- code/trunk/src/modules/questsystem/AddReward.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/AddReward.h	(revision 5781)
@@ -0,0 +1,84 @@
+/*
+ *   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
+    @brief Definition of the AddReward class.
+*/
+
+#ifndef _AddReward_H__
+#define _AddReward_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <list>
+#include "QuestEffect.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Adds a list of Rewardables to a player.
+
+        Creating a AddReward through XML goes as follows:
+
+        <AddReward>
+            <Rewardable /> //A list of Rewardable objects to be rewarded the player, see the specific Rewardables for their respective XML representations.
+            ...
+            <Rewardable />
+        </AddReward>
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport AddReward : public QuestEffect
+    {
+        public:
+            AddReward(BaseObject* creator);
+            virtual ~AddReward();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddReward object through XML.
+
+            virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
+
+        private:
+            std::list<Rewardable*> rewards_; //!< A list of Rewardables to be added to the player invoking the QuestEffect.
+
+            /**
+            @brief Add a Rewardable object to the list of objects to be awarded to the player invoking the QuestEffect.
+            @param reward Pointer to the Rewardable to be added.
+            */
+            inline void addRewardable(Rewardable* reward)
+                { this->rewards_.push_back(reward); }
+
+            const Rewardable* getRewardables(unsigned int index) const; //!< Returns the Rewardable object at the given index.
+
+    };
+
+}
+
+#endif /* _AddReward_H__ */
Index: code/trunk/src/modules/questsystem/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/questsystem/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/questsystem/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,38 @@
+SET_SOURCE_FILES(QUESTSYSTEM_SRC_FILES
+  AddQuest.cc
+  AddQuestHint.cc
+  AddReward.cc
+  ChangeQuestStatus.cc
+  CompleteQuest.cc
+  FailQuest.cc
+  GlobalQuest.cc
+  LocalQuest.cc
+  Quest.cc
+  QuestDescription.cc
+  QuestEffect.cc
+  QuestEffectBeacon.cc
+  QuestGUINode.cc
+  QuestGUI.cc
+  QuestHint.cc
+  QuestItem.cc
+  QuestListener.cc
+  QuestManager.cc
+  QuestNotification.cc
+)
+
+ADD_SUBDIRECTORY(notifications)
+
+ORXONOX_ADD_LIBRARY(questsystem
+  MODULE
+  FIND_HEADER_FILES
+  TOLUA_FILES
+    QuestManager.h
+  DEFINE_SYMBOL
+    "QUESTSYSTEM_SHARED_BUILD"
+  PCH_FILE
+    QuestsystemPrecompiledHeaders.h
+  LINK_LIBRARIES
+    orxonox
+    overlays
+  SOURCE_FILES ${QUESTSYSTEM_SRC_FILES}
+)
Index: code/trunk/src/modules/questsystem/ChangeQuestStatus.cc
===================================================================
--- code/trunk/src/modules/questsystem/ChangeQuestStatus.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/ChangeQuestStatus.cc	(revision 5781)
@@ -0,0 +1,90 @@
+/*
+ *   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
+    @brief Implementation of the ChangeQuestStatus class.
+*/
+
+#include "ChangeQuestStatus.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "QuestItem.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Constructor. Registers the object.
+    */
+    ChangeQuestStatus::ChangeQuestStatus(BaseObject* creator) : QuestEffect(creator)
+    {
+        RegisterObject(ChangeQuestStatus);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    ChangeQuestStatus::~ChangeQuestStatus()
+    {
+    }
+
+    /**
+    @brief
+        Method for creating a ChangeQuestStatus object through XML.
+    */
+    void ChangeQuestStatus::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ChangeQuestStatus, XMLPort, xmlelement, mode);
+
+        XMLPortParam(ChangeQuestStatus, "questId", setQuestId, getQuestId, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Sets the id of the Quest the Questffect changes the status of.
+    @param id
+        The id of the Quest.
+    @return
+        Returns true if successful.
+    */
+    bool ChangeQuestStatus::setQuestId(const std::string & id)
+    {
+        if(!QuestItem::isId(id))
+        {
+            COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
+            return false;
+        }
+        
+        this->questId_ = id;
+        return true;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/ChangeQuestStatus.h
===================================================================
--- code/trunk/src/modules/questsystem/ChangeQuestStatus.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/ChangeQuestStatus.h	(revision 5781)
@@ -0,0 +1,77 @@
+/*
+ *   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
+    @brief Definition of the ChangeQuestStatus class.
+*/
+
+#ifndef _ChangeQuestStatus_H__
+#define _ChangeQuestStatus_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <string>
+#include "QuestEffect.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        A QuestEffect which changes the status of a specified Quest for the player invoking the QuestEffect.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport ChangeQuestStatus : public QuestEffect
+    {
+        public:
+            ChangeQuestStatus(BaseObject* creator);
+            virtual ~ChangeQuestStatus();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a ChangeQuestStatus object through XML.
+
+            virtual bool invoke(PlayerInfo* player) = 0; //!< Invokes the QuestEffect.
+
+        protected:
+            /**
+            @brief Returns the id of the Quest.
+            @return Returns the id of the Quest.
+            */
+            inline const std::string & getQuestId(void) const
+                { return this->questId_; }
+
+        private:
+            std::string questId_; //!< The id of the Quest the status should be changed of.
+
+            bool setQuestId(const std::string & id); //!< Sets the id of the Quest.
+
+    };
+
+}
+
+#endif /* _ChangeQuestStatus_H__ */
Index: code/trunk/src/modules/questsystem/CompleteQuest.cc
===================================================================
--- code/trunk/src/modules/questsystem/CompleteQuest.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/CompleteQuest.cc	(revision 5781)
@@ -0,0 +1,112 @@
+/*
+ *   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
+    @brief Implementation of the CompleteQuest class.
+*/
+
+#include "CompleteQuest.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "QuestManager.h"
+#include "Quest.h"
+
+namespace orxonox
+{
+    CreateFactory(CompleteQuest);
+
+    /**
+    @brief
+        Constructor. Registers the object.
+    */
+    CompleteQuest::CompleteQuest(BaseObject* creator) : ChangeQuestStatus(creator)
+    {
+        RegisterObject(CompleteQuest);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    CompleteQuest::~CompleteQuest()
+    {
+    }
+
+    /**
+    @brief
+        Method for creating a CompleteQuest object through XML.
+    */
+    void CompleteQuest::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(CompleteQuest, XMLPort, xmlelement, mode);
+        
+        COUT(3) << "New CompleteQuest, with target Quest {" << this->getQuestId() << "}, created." << std::endl;
+    }
+
+    /**
+    @brief
+        Invokes the QuestEffect.
+    @param player
+        The player the QuestEffect is invoked on.
+    @return
+        Returns true if the QuestEffect was invoked successfully.
+    */
+    bool CompleteQuest::invoke(PlayerInfo* player)
+    {
+        if(player == NULL) //!< You know, what we think of NULL-pointers...
+        {
+            COUT(2) << "Input player is NULL." << std::endl;
+            return false;
+        }
+
+        COUT(3) << "CompleteQuest on player: " << player << " ." << std::endl;
+
+        Quest* quest;
+
+        try
+        {
+            quest = QuestManager::getInstance().findQuest(this->getQuestId());
+            if(quest == NULL || !quest->complete(player))
+            {
+               return false;
+            }
+        }
+        catch(const Exception& e)
+        {
+            COUT(2) << e.getFullDescription() << std::endl;
+            return false;
+        }
+
+        COUT(3) << "Quest {" << quest->getId() << "} successfully completed by player: " << player << " ." << std::endl;
+        return true;
+    }
+
+
+}
Index: code/trunk/src/modules/questsystem/CompleteQuest.h
===================================================================
--- code/trunk/src/modules/questsystem/CompleteQuest.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/CompleteQuest.h	(revision 5781)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Definition of the CompleteQuest class.
+*/
+
+#ifndef _CompleteQuest_H__
+#define _CompleteQuest_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+#include "ChangeQuestStatus.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Completes a Quest (with a specified id) for the player invoking the QuestEffect.
+
+        Creating a CompleteQuest through XML goes as follows:
+
+        <CompleteQuest questId="id" />  //Where id is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information, and identifies the Quest that should be completed.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport CompleteQuest : public ChangeQuestStatus
+    {
+        public:
+            CompleteQuest(BaseObject* creator);
+            virtual ~CompleteQuest();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a CompleteQuest object through XML.
+
+            virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
+
+    };
+
+}
+
+#endif /* _CompleteQuest_H__ */
Index: code/trunk/src/modules/questsystem/FailQuest.cc
===================================================================
--- code/trunk/src/modules/questsystem/FailQuest.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/FailQuest.cc	(revision 5781)
@@ -0,0 +1,111 @@
+/*
+ *   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
+    @brief Implementation of the FailQuest class.
+*/
+
+#include "FailQuest.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "QuestManager.h"
+#include "Quest.h"
+
+namespace orxonox
+{
+    CreateFactory(FailQuest);
+
+    /**
+    @brief
+        Constructor. Registers the object.
+    */
+    FailQuest::FailQuest(BaseObject* creator) : ChangeQuestStatus(creator)
+    {
+        RegisterObject(FailQuest);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    FailQuest::~FailQuest()
+    {
+    }
+
+    /**
+    @brief
+        Method for creating a FailQuest object through XML.
+    */
+    void FailQuest::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(FailQuest, XMLPort, xmlelement, mode);
+        
+        COUT(3) << "New FailQUest, with target Quest {" << this->getQuestId() << "}, created." << std::endl;
+    }
+
+    /**
+    @brief
+        Invokes the QuestEffect.
+    @param player
+        The player the QuestEffect is invoked on.
+    @return
+        Returns true if the QuestEffect was invoked successfully.
+    */
+    bool FailQuest::invoke(PlayerInfo* player)
+    {
+        if(player == NULL) //!< We don't know what to do with no player.
+        {
+            COUT(2) << "Input player is NULL." << std::endl;
+            return false;
+        }
+
+        COUT(3) << "FailQuest on player: " << player << " ." << std::endl;
+
+        Quest* quest;
+        try
+        {
+            quest = QuestManager::getInstance().findQuest(this->getQuestId());
+            if(quest == NULL || !quest->fail(player))
+            {
+               return false;
+            }
+        }
+        catch(const Exception& e)
+        {
+            COUT(2) << e.getFullDescription() << std::endl;
+            return false;
+        }
+        
+        COUT(3) << "Quest {" << quest->getId() << "} failed by player: " << player << " ." << std::endl;
+        return true;
+    }
+
+
+}
Index: code/trunk/src/modules/questsystem/FailQuest.h
===================================================================
--- code/trunk/src/modules/questsystem/FailQuest.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/FailQuest.h	(revision 5781)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Definition of the FailQuest class.
+*/
+
+#ifndef _FailQuest_H__
+#define _FailQuest_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+#include "ChangeQuestStatus.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Fails a quest (with a specified id) for the player invoking the QuestEffect.
+
+        Creating a FailQuest through XML goes as follows:
+
+        <FailQuest questId="id" />  //Where id is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information, and identifies the Quest that should be failed.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport FailQuest : public ChangeQuestStatus
+    {
+        public:
+            FailQuest(BaseObject* creator);
+            virtual ~FailQuest();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a FailQuest object through XML.
+
+            virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
+
+    };
+
+}
+
+#endif /* _FailQuest_H__ */
Index: code/trunk/src/modules/questsystem/GlobalQuest.cc
===================================================================
--- code/trunk/src/modules/questsystem/GlobalQuest.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/GlobalQuest.cc	(revision 5781)
@@ -0,0 +1,282 @@
+/*
+ *   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
+    @brief Implementation of the GlobalQuest class.
+*/
+
+#include "GlobalQuest.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "QuestEffect.h"
+
+namespace orxonox
+{
+    CreateFactory(GlobalQuest);
+
+    /**
+    @brief
+        Constructor. Registers the object.
+    */
+    GlobalQuest::GlobalQuest(BaseObject* creator) : Quest(creator)
+    {
+        RegisterObject(GlobalQuest);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    GlobalQuest::~GlobalQuest()
+    {
+
+    }
+    
+    /**
+    @brief
+        Method for creating a GlobalQuest object through XML.
+    */
+    void GlobalQuest::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(GlobalQuest, XMLPort, xmlelement, mode);
+        
+        XMLPortObject(GlobalQuest, QuestEffect, "reward-effects", addRewardEffect, getRewardEffects, xmlelement, mode);
+
+        COUT(3) << "New GlobalQuest {" << this->getId() << "} created." << std::endl;
+    }
+    
+    /**
+    @brief
+        Fails the Quest for all players.
+        Invokes the fail QuestEffects on all the players possessing this Quest.
+    @param player
+        The player failing it.
+    @return
+        Returns true if the Quest could be failed, false if not.
+    */
+    bool GlobalQuest::fail(PlayerInfo* player)
+    {
+        if(!this->isFailable(player)) //!< Check whether the Quest can be failed.
+        {
+            COUT(4) << "A non-completable quest was trying to be failed." << std::endl;
+            return false;
+        }
+        
+        Quest::fail(player);
+    
+    //! Iterate through all players possessing this Quest.
+    for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
+    {
+        QuestEffect::invokeEffects(*it, this->getFailEffectList());
+    }
+
+    return true;
+    }
+
+    /**
+    @brief
+        Completes the Quest for all players.
+        Invokes the complete QuestEffects on all the players possessing this Quest.
+        Invokes the reward QuestEffects on the player completing the Quest.
+    @param player
+        The player completing it.
+    @return
+        Returns true if the Quest could be completed, false if not.
+    */
+    bool GlobalQuest::complete(PlayerInfo* player)
+    {
+        if(!this->isCompletable(player)) //!< Check whether the Quest can be completed.
+        {
+            COUT(4) << "A non-completable quest was trying to be completed." << std::endl;
+            return false;
+        }
+        
+        //! Iterate through all players possessing the Quest.
+        for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
+        {
+            QuestEffect::invokeEffects(*it, this->getCompleteEffectList());
+        }
+    
+        Quest::complete(player);
+    
+        QuestEffect::invokeEffects(player, this->rewards_); //!< Invoke reward QuestEffects on the player completing the Quest.
+        return true;
+    }
+
+    /**
+    @brief
+        Checks whether the Quest can be started.
+    @param player
+        The player for whom is to be checked.
+    @return
+        Returns true if the quest can be started, false if not.
+    @throws
+        Throws an exception if either isInactive() of isActive() throws one.
+    */
+    bool GlobalQuest::isStartable(const PlayerInfo* player) const
+    {
+        if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player)))
+        {
+            return false;
+        }
+        return (this->isInactive(player) && !(this->status_ == QuestStatus::Completed || this->status_ == QuestStatus::Failed));
+    }
+
+    /**
+    @brief
+        Checks whether the Quest can be failed.
+    @param player
+        The player for whom is to be checked.
+    @return
+        Returns true if the Quest can be failed, false if not.
+    @throws
+        Throws an Exception if isActive() throws one.
+    */
+    bool GlobalQuest::isFailable(const PlayerInfo* player) const
+    {
+        return this->isActive(player);
+
+    }
+
+    /**
+    @brief
+        Checks whether the Quest can be completed.
+    @param player
+        The player for whom is to be checked.
+    @return
+        Returns true if the Quest can be completed, false if not.
+    @throws
+        Throws an Exception if isActive() throws one.
+    */
+    bool GlobalQuest::isCompletable(const PlayerInfo* player) const
+    {
+        return this->isActive(player);
+    }
+
+    /**
+    @brief
+        Returns the status of the Quest for a specific player.
+    @param player
+        The player.
+    @throws
+        Throws an Exception if player is NULL.
+    */
+    QuestStatus::Value GlobalQuest::getStatus(const PlayerInfo* player) const
+    {
+        if(player == NULL) //!< We don't want NULL-Pointers!
+        {
+            ThrowException(Argument, "The input PlayerInfo* is NULL.");
+        }
+
+        //! Find the player.
+        std::set<PlayerInfo*>::const_iterator it = this->players_.find((PlayerInfo*)(void*)player);
+        if (it != this->players_.end()) //!< If the player was found.
+        {
+            return this->status_;
+        }
+
+        return QuestStatus::Inactive;
+    }
+
+    /**
+    @brief
+        Sets the status for a specific player.
+        But be careful wit this one, the status will just be set without checking for its validity. You have to know what you're doing.
+    @param player
+        The player.
+    @param status
+        The status to be set.
+    @return
+        Returns false if player is NULL.
+    */
+    bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
+    {
+        if(player == NULL) //!< We don't want NULL-Pointers!
+        {
+            return false;
+        }
+
+        //! Find the player.
+        std::set<PlayerInfo*>::const_iterator it = this->players_.find(player);
+        if (it == this->players_.end()) //!< Player is not yet in the list.
+        {
+            this->players_.insert(player); //!< Add the player to the set.
+        }
+        
+        this->status_ = status; //!< Set the status, which is global, remember...?
+        return true;
+    }
+    
+    /**
+    @brief
+        Adds a reward QuestEffect to the list of reward QuestEffects.
+    @param effect
+        The QuestEffect to be added.
+    @return
+        Returns true if successful.
+    */
+    bool GlobalQuest::addRewardEffect(QuestEffect* effect)
+    {
+        if(effect == NULL) //!< We don't want NULL-Pointers!
+        {
+            COUT(2) << "The reward effect to be added to quest {" << this->getId() << "} was NULL." << std::endl;
+            return false;
+        }
+
+        this->rewards_.push_back(effect); //!< Add the QuestEffect to the list.
+
+        COUT(3) << "Reward effect was added to Quest {" << this->getId() << "}." << std::endl;
+        return true;
+    }
+    
+    /**
+    @brief
+        Returns the reward QuestEffect at the given index.
+    @param index
+        The index.
+    @return
+        Returns the QuestEffect at the given index.
+    */
+    const QuestEffect* GlobalQuest::getRewardEffects(unsigned int index) const
+    {
+        int i = index;
+        for (std::list<QuestEffect*>::const_iterator effect = this->rewards_.begin(); effect != this->rewards_.end(); ++effect)
+        {
+            if(i == 0)
+            {
+               return *effect;
+            }
+            i--;
+        }
+        return NULL;
+    }
+
+
+}
Index: code/trunk/src/modules/questsystem/GlobalQuest.h
===================================================================
--- code/trunk/src/modules/questsystem/GlobalQuest.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/GlobalQuest.h	(revision 5781)
@@ -0,0 +1,115 @@
+/*
+ *   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
+    @brief Definition of the GlobalQuest class.
+*/
+
+#ifndef _GlobalQuest_H__
+#define _GlobalQuest_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <list>
+#include <set>
+#include "Quest.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        GlobalQuests are Quests, that have the same status for all players.
+        This means, that when a player successfully completes a GlobalQuest, it is completed for all players that have it.
+
+        Creating a GlobalQuest through XML goes as follows:
+
+        <GlobalQuest id="questId"> //Where questId is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information
+            <QuestDescription title="Title" description="Description." /> //The description of the quest.
+            <subquests>
+                <Quest id ="questId1" /> //A list of n subquest, be aware, each of the <Quest /> tags must have a description and so on and so forth as well.
+                ...
+                <Quest id="questIdn" />
+            </subquests>
+            <hints>
+                <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those.
+                ...
+                <QuestHint id="hintIdn" />
+            </hints>
+            <fail-effects>
+                <QuestEffect /> //A list of QuestEffects, invoked on all players possessing this quest, when the Quest is failed, see QuestEffect for the full XML representation.
+                ...
+                <QuestEffect />
+            </fail-effects>
+            <complete-effects>
+                <QuestEffect /> //A list of QuestEffects, invoked on all players possessing this quest, when the Quest is completed, see QuestEffect for the full XML representation.
+                ...
+                <QuestEffect />
+            </complete-effects>
+            <reward-effects>
+                <QuestEffect /> //A list of QuestEffects, invoked on the player completing this quest. See QuestEffect for the full XML representation.
+                ...
+                <QuestEffect />
+            </reward-effects>
+        </GlobalQuest>
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport GlobalQuest : public Quest
+    {
+        public:
+            GlobalQuest(BaseObject* creator);
+            virtual ~GlobalQuest();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a GlobalQuest object through XML.
+
+            virtual bool fail(PlayerInfo* player); //!< Fails the Quest.
+            virtual bool complete(PlayerInfo* player); //!< Completes the Quest.
+
+        protected:
+            virtual bool isStartable(const PlayerInfo* player) const; //!< Checks whether the Quest can be started.
+            virtual bool isFailable(const PlayerInfo* player) const; //!< Checks whether the Quest can be failed.
+            virtual bool isCompletable(const PlayerInfo* player) const; //!< Checks whether the Quest can be completed.
+
+            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
+
+            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status); //!< Sets the status for a specific player.
+
+        private:
+            std::set<PlayerInfo*> players_; //!< The set of players which possess this Quest.
+            QuestStatus::Value status_; //!< The status of this Quest.
+            std::list<QuestEffect*> rewards_; //!< Reward QuestEffects only invoked on the player completing the Quest.
+
+            bool addRewardEffect(QuestEffect* effect); //!< Adds a reward QuestEffect to the list of reward QuestEffects.
+            const QuestEffect* getRewardEffects(unsigned int index) const; //!< Returns the reward QuestEffect at the given index.
+
+    };
+
+}
+
+#endif /* _GlobalQuest_H__ */
Index: code/trunk/src/modules/questsystem/LocalQuest.cc
===================================================================
--- code/trunk/src/modules/questsystem/LocalQuest.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/LocalQuest.cc	(revision 5781)
@@ -0,0 +1,216 @@
+/*
+ *   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
+    @brief Implementation of the LocalQuest class.
+*/
+
+#include "LocalQuest.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "QuestEffect.h"
+
+namespace orxonox
+{
+    CreateFactory(LocalQuest);
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
+    LocalQuest::LocalQuest(BaseObject* creator) : Quest(creator)
+    {
+        RegisterObject(LocalQuest);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    LocalQuest::~LocalQuest()
+    {
+
+    }
+
+    /**
+    @brief
+        Method for creating a LocalQuest object through XML.
+    */
+    void LocalQuest::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(LocalQuest, XMLPort, xmlelement, mode);
+
+        COUT(3) << "New LocalQuest {" << this->getId() << "} created." << std::endl;
+    }
+
+    /**
+    @brief
+        Fails the Quest for a given player.
+        Invokes all the failEffects on the player.
+    @param player
+        The player.
+    @return
+        Returns true if the Quest could be failed, false if not.
+    */
+    bool LocalQuest::fail(PlayerInfo* player)
+    {
+        if(!this->isFailable(player)) //!< Checks whether the quest can be failed.
+        {
+            COUT(4) << "A non-failable quest was trying to be failed." << std::endl;
+            return false;
+        }
+        
+        Quest::fail(player);
+        
+        QuestEffect::invokeEffects(player, this->getFailEffectList()); //!< Invoke the failEffects.
+        return true;
+    }
+
+    /**
+    @brief
+        Completes the Quest for a given player.
+    Invokes all the complete QuestEffects on the player.
+    @param player
+        The player.
+    @return
+        Returns true if the Quest could be completed, false if not.
+    */
+    bool LocalQuest::complete(PlayerInfo* player)
+    {
+        if(!this->isCompletable(player)) //!< Checks whether the Quest can be completed.
+        {
+            COUT(4) << "A non-completable quest was trying to be completed." << std::endl;
+            return false;
+        }
+        
+        Quest::complete(player);
+        
+        QuestEffect::invokeEffects(player, this->getCompleteEffectList()); //!< Invoke the complete QuestEffects.
+        return true;
+    }
+
+    /**
+    @brief
+        Checks whether the Quest can be started.
+    @param player
+        The player for whom is to be checked.
+    @return
+        Returns true if the Quest can be started, false if not.
+    @throws
+        Throws an exception if isInactive(PlayerInfo*) throws one.
+    */
+    bool LocalQuest::isStartable(const PlayerInfo* player) const
+    {
+        if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player)))
+        {
+            return false;
+        }
+        return this->isInactive(player);
+    }
+
+    /**
+    @brief
+        Checks whether the Quest can be failed.
+    @param player
+        The player for whom is to be checked.
+    @return
+        Returns true if the Quest can be failed, false if not.
+    @throws
+        Throws an exception if isActive(PlayerInfo*) throws one.
+    */
+    bool LocalQuest::isFailable(const PlayerInfo* player) const
+    {
+        return this->isActive(player);
+    }
+
+    /**
+    @brief
+        Checks whether the Quest can be completed.
+    @param player
+        The player for whom is to be checked.
+    @return
+        Returns true if the Quest can be completed, false if not.
+    @throws
+        Throws an exception if isInactive(PlayerInfo*) throws one.
+    */
+    bool LocalQuest::isCompletable(const PlayerInfo* player) const
+    {
+        return this->isActive(player);
+    }
+
+    /**
+    @brief
+        Returns the status of the Quest for a specific player.
+    @param player
+        The player.
+    @return
+        Returns the status of the Quest for the input player.
+    @throws
+        Throws an Exception if player is NULL.
+    */
+    QuestStatus::Value LocalQuest::getStatus(const PlayerInfo* player) const
+    {
+        if(player == NULL) //!< No player has no defined status.
+        {
+            ThrowException(Argument, "The input PlayerInfo* is NULL.");
+        }
+
+        std::map<const PlayerInfo*, QuestStatus::Value>::const_iterator it = this->playerStatus_.find(player);
+        if (it != this->playerStatus_.end()) //!< If there is a player in the map.
+        {
+            return it->second;
+        }
+        
+        return QuestStatus::Inactive; //!< If the player is not yet in the map, that means the status of the quest form him is 'inactive'.
+    }
+
+    /**
+    @brief
+        Sets the status for a specific player.
+        But be careful wit this one, the status will just be set without checking for its validity. You have to know what you're doing. Really!
+    @param player
+        The player the status should be set for.
+    @param status
+        The status to be set.
+    @return
+        Returns false if player is NULL.
+    */
+    bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
+    {
+        if(player == NULL) //!< We can't set a status for no player.
+        {
+            return false;
+        }
+        
+        this->playerStatus_[player] = status;
+        return true;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/LocalQuest.h
===================================================================
--- code/trunk/src/modules/questsystem/LocalQuest.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/LocalQuest.h	(revision 5781)
@@ -0,0 +1,103 @@
+/*
+ *   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
+    @brief Definition of the LocalQuest class.
+*/
+
+#ifndef _LocalQuest_H__
+#define _LocalQuest_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <map>
+#include "Quest.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Handles Quests which have different states for different players.
+        LocalQuests have (as opposed to GlobalQuests) a different state for each player, that means if for one player the status of the Quest changes it does not for all the other players which also possess this quest.
+
+        Creating a LocalQuest through XML goes as follows:
+
+        <LocalQuest id="questId"> //Where questId is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information
+            <QuestDescription title="Title" description="Description." /> //The description of the quest.
+            <subquests>
+                <Quest id ="questId1" /> //A list of n subquest, be aware, each of the <Quest /> tags must have a description and so on and so forth as well.
+                ...
+                <Quest id="questIdn" />
+                </subquests>
+                <hints>
+                <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those.
+                ...
+                <QuestHint id="hintIdn" />
+                </hints>
+            <fail-effects>
+                <QuestEffect /> //A list of QuestEffects, invoked when the Quest is failed, see QuestEffect for the full XML representation.
+                ...
+                <QuestEffect />
+            </fail-effects>
+            <complete-effects>
+                <QuestEffect /> //A list of QuestEffects, invoked when the Quest is completed, see QuestEffect for the full XML representation.
+                ...
+                <QuestEffect />
+            </complete-effects>
+        </LocalQuest>
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport LocalQuest : public Quest
+    {
+        public:
+            LocalQuest(BaseObject* creator);
+            virtual ~LocalQuest();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a LocalQuest object through XML.
+
+            virtual bool fail(PlayerInfo* player); //!< Fails the Quest.
+            virtual bool complete(PlayerInfo* player); //!< Completes the Quest.
+
+        protected:
+            virtual bool isStartable(const PlayerInfo* player) const; //!< Checks whether the Quest can be started.
+            virtual bool isFailable(const PlayerInfo* player) const; //!< Checks whether the Quest can be failed.
+            virtual bool isCompletable(const PlayerInfo* player) const; //!< Checks whether the Quest can be completed.
+
+            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
+            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status); //!< Sets the status for a specific player.
+
+        private:
+            std::map<const PlayerInfo*, QuestStatus::Value> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.
+
+    };
+
+}
+
+#endif /* _LocalQuest_H__ */
Index: code/trunk/src/modules/questsystem/Quest.cc
===================================================================
--- code/trunk/src/modules/questsystem/Quest.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/Quest.cc	(revision 5781)
@@ -0,0 +1,437 @@
+/*
+ *   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
+    @brief Implementation of the Quest class.
+*/
+
+#include "Quest.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "QuestManager.h"
+#include "QuestDescription.h"
+#include "QuestHint.h"
+#include "QuestEffect.h"
+#include "QuestListener.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Constructor. Registers and initializes object.
+    */
+    Quest::Quest(BaseObject* creator) : QuestItem(creator)
+    {
+        RegisterObject(Quest);
+
+        this->parentQuest_ = NULL;
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    Quest::~Quest()
+    {
+
+    }
+
+    /**
+    @brief
+        Method for creating a Quest object through XML.
+    */
+    void Quest::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Quest, XMLPort, xmlelement, mode);
+
+        XMLPortObject(Quest, Quest, "subquests", addSubQuest, getSubQuest, xmlelement, mode);
+        XMLPortObject(Quest, QuestHint, "hints", addHint, getHint, xmlelement, mode);
+        XMLPortObject(Quest, QuestEffect, "fail-effects", addFailEffect, getFailEffect, xmlelement, mode);
+        XMLPortObject(Quest, QuestEffect, "complete-effects", addCompleteEffect, getCompleteEffect, xmlelement, mode);
+
+        QuestManager::getInstance().registerQuest(this); //!<Registers the Quest with the QuestManager.
+    }
+
+    /**
+    @brief
+        Sets the parentquest of the Quest.
+    @param quest
+        A pointer to the Quest to be set as parentquest.
+    @return
+        Returns true if the parentquest could be set.
+    */
+    bool Quest::setParentQuest(Quest* quest)
+    {
+        if(quest == NULL) //!< We don't want to set NULL-Pointers.
+        {
+            COUT(2) << "The parentquest to be added to quest {" << this->getId() << "} was NULL." << std::endl;
+            return false;
+        }
+
+        this->parentQuest_ = quest;
+
+        COUT(3) << "Parent Quest {" << quest->getId() << "} was added to Quest {" << this->getId() << "}." << std::endl;
+        return true;
+    }
+
+    /**
+    @brief
+        Adds a subquest to the Quest.
+    @param quest
+        A pointer to the Quest to be set as subquest.
+    @return
+        Returns true if the subquest could be set.
+    */
+    bool Quest::addSubQuest(Quest* quest)
+    {
+        if(quest == NULL) //!< We don't want to set NULL-Pointers.
+        {
+            COUT(2) << "The subquest to be added to quest {" << this->getId() << "} was NULL." << std::endl;
+            return false;
+        }
+
+        quest->setParentQuest(this); //!< Sets the currentQuest (this) as parentquest for the added subquest.
+        this->subQuests_.push_back(quest); //!< Adds the Quest to the end of the list of subquests.
+
+        COUT(3) << "Sub Quest {" << quest->getId() << "} was added to Quest {" << this->getId() << "}." << std::endl;
+        return true;
+    }
+
+
+    /**
+    @brief
+        Adds a QuestHint to the list of QuestHints
+    @param hint
+        The QuestHint that should be added to the list of QuestHints.
+    @return
+        Returns true if the hint was successfully added.
+    */
+    bool Quest::addHint(QuestHint* hint)
+    {
+        if(hint == NULL) //!< We don't want to set NULL-Pointers. Seriously!
+        {
+            COUT(2) << "A NULL-QuestHint was trying to be added." << std::endl;
+            return false;
+        }
+
+        hint->setQuest(this); //!< Sets the current Quest (this) as Quest for the added QuestHint.
+        this->hints_.push_back(hint); //!< Adds the QuestHint to the end of the list of QuestHints.
+
+        COUT(3) << "QuestHint {" << hint->getId() << "} was added to Quest {" << this->getId() << "}." << std::endl;
+        return true;
+    }
+
+    /**
+    @brief
+        Adds an QuestEffect to the list of fail QuestEffects.
+    @param effect
+        The QuestEffect to be added.
+    @return
+        Returns true if successful.
+    */
+    bool Quest::addFailEffect(QuestEffect* effect)
+    {
+        if(effect == NULL) //!< We don't want to set NULL-Pointers.
+        {
+            COUT(2) << "A NULL-QuestEffect was trying to be added" << std::endl;
+            return false;
+        }
+
+        this->failEffects_.push_back(effect); //!< Adds the QuestEffect to the end of the list of fail QuestEffects.
+
+        COUT(3) << "A FailEffect was added to Quest {" << this->getId() << "}." << std::endl;
+        return true;
+    }
+
+    /**
+    @brief
+        Adds an QuestEffect to the list of complete QuestEffects.
+    @param effect
+        The QuestEffect to be added.
+    @return
+        Returns true if successful.
+    */
+    bool Quest::addCompleteEffect(QuestEffect* effect)
+    {
+        if(effect == NULL) //!< We don't want to set NULL-Pointers.
+        {
+            COUT(2) << "A NULL-QuestEffect was trying to be added" << std::endl;
+            return false;
+        }
+
+        this->completeEffects_.push_back(effect); //!< Adds the QuestEffect to the end of the list of complete QuestEffects.
+
+        COUT(3) << "A CompleteEffect was added to Quest {" << this->getId() << "}." << std::endl;
+        return true;
+    }
+
+    /**
+    @brief
+        Returns the subquest at the given index.
+    @param
+        The index.
+    @return
+        Returns a pointer to the subquest at the given index. NULL if there is no element at the given index.
+    */
+    const Quest* Quest::getSubQuest(unsigned int index) const
+    {
+        int i = index;
+        
+        //! Iterate through all subquests.
+        for (std::list<Quest*>::const_iterator subQuest = this->subQuests_.begin(); subQuest != this->subQuests_.end(); ++subQuest)
+        {
+            if(i == 0) //!< We're counting down...
+            {
+               return *subQuest;
+            }
+            i--;
+        }
+        
+        return NULL; //!< If the index is greater than the number of elements in the list.
+    }
+
+    /**
+    @brief
+        Returns the QuestHint at the given index.
+    @param
+        The index.
+    @return
+        Returns a pointer to the QuestHint at the given index. NULL if there is no element at the given index.
+    */
+    const QuestHint* Quest::getHint(unsigned int index) const
+    {
+        int i = index;
+        
+        //! Iterate through all QuestHints.
+        for (std::list<QuestHint*>::const_iterator hint = this->hints_.begin(); hint != this->hints_.end(); ++hint)
+        {
+            if(i == 0) //!< We're counting down...
+            {
+               return *hint;
+            }
+            i--;
+        }
+        return NULL; //!< If the index is greater than the number of elements in the list.
+    }
+
+    /**
+    @brief
+        Returns the fail QuestEffect at the given index.
+    @param
+        The index.
+    @return
+        Returns a pointer to the fail QuestEffect at the given index. NULL if there is no element at the given index.
+    */
+    const QuestEffect* Quest::getFailEffect(unsigned int index) const
+    {
+        int i = index;
+        
+        //! Iterate through all fail QuestEffects.
+        for (std::list<QuestEffect*>::const_iterator effect = this->failEffects_.begin(); effect != this->failEffects_.end(); ++effect)
+        {
+            if(i == 0) //!< We're counting down...
+            {
+               return *effect;
+            }
+            i--;
+        }
+        return NULL; //!< If the index is greater than the number of elements in the list.
+    }
+
+    /**
+    @brief
+        Returns the complete QuestEffect at the given index.
+    @param
+        The index.
+    @return
+        Returns a pointer to the complete QuestEffect at the given index. NULL if there is no element at the given index.
+    */
+    const QuestEffect* Quest::getCompleteEffect(unsigned int index) const
+    {
+        int i = index;
+        
+        //! Iterate through all complete QuestEffects.
+        for (std::list<QuestEffect*>::const_iterator effect = this->completeEffects_.begin(); effect != this->completeEffects_.end(); ++effect)
+        {
+            if(i == 0) //!< We're counting down...
+            {
+               return *effect;
+            }
+            i--;
+        }
+        return NULL; //!< If the index is greater than the number of elements in the list.
+    }
+
+    /**
+    @brief
+        Returns true if the quest status for the specific player is 'inactive'.
+    @param player
+        The player.
+    @return
+        Returns true if the quest status for the specific player is 'inactive'.
+    @throws
+        Throws an exception if getStatus throws one.
+    */
+    bool Quest::isInactive(const PlayerInfo* player) const
+    {
+        return this->getStatus(player) == QuestStatus::Inactive;
+    }
+
+    /**
+    @brief
+        Returns true if the quest status for the specific player is 'active'.
+    @param player
+        The player.
+    @return
+        Returns true if the quest status for the specific player is 'active'.
+    @throws
+        Throws an exception if getStatus throws one.
+    */
+    bool Quest::isActive(const PlayerInfo* player) const
+    {
+
+        return this->getStatus(player) == QuestStatus::Active;
+    }
+
+    /**
+    @brief
+        Returns true if the quest status for the specific player is 'failed'.
+    @param player
+        The player.
+    @return
+        Returns true if the quest status for the specific player is 'failed'.
+    @throws
+        Throws an exception if getStatus throws one.
+    */
+    bool Quest::isFailed(const PlayerInfo* player) const
+    {
+        return this->getStatus(player) == QuestStatus::Failed;
+    }
+
+    /**
+    @brief
+        Returns true if the quest status for the specific player is 'completed'.
+    @param player
+        The player.
+    @return
+        Returns true if the quest status for the specific player is 'completed'.
+    @throws
+        Throws an exception if getStatus throws one.
+    */
+    bool Quest::isCompleted(const PlayerInfo* player) const
+    {
+        return this->getStatus(player) == QuestStatus::Completed;
+    }
+    
+    /**
+    @brief
+        Fails the Quest for an input player.
+    @param player
+        The player.
+    @return
+        Returns true if the Quest could be failed, false if not.
+    */
+    bool Quest::fail(PlayerInfo* player)
+    {
+        QuestListener::advertiseStatusChange(this->listeners_, "fail"); //!< Tells the QuestListeners, that the status has changed to failed.
+        this->setStatus(player, QuestStatus::Failed);
+        
+        COUT(4) << "Quest {" << this->getId() << "} is failed for player: " << player << " ." <<std::endl;
+        
+        this->getDescription()->sendFailQuestNotification();
+        return true;
+    }
+    
+    /**
+    @brief
+        Completes the Quest for an input player.
+    @param player
+        The player.
+    @return
+        Returns true if the Quest could be completed, false if not.
+    */
+    bool Quest::complete(PlayerInfo* player)
+    {
+        QuestListener::advertiseStatusChange(this->listeners_, "complete"); //!< Tells the QuestListeners, that the status has changed to completed.
+        this->setStatus(player, QuestStatus::Completed);
+        
+        COUT(4) << "Quest {" << this->getId() << "} is completed for player: " << player << " ." <<std::endl;
+        
+        this->getDescription()->sendCompleteQuestNotification();
+        return true;
+    }
+
+    /**
+    @brief
+        Starts the Quest for an input player.
+    @param player
+        The player.
+    @return
+        Returns true if the Quest could be started, false if not.
+    */
+    bool Quest::start(PlayerInfo* player)
+    {
+        if(!this->isStartable(player)) //!< Checks whether the quest can be started.
+        {
+            COUT(4) << "A non-startable quest was trying to be started." << std::endl;
+            return false;
+        }
+        
+        COUT(4) << "Quest {" << this->getId() << "} is started for player: " << player << " ." <<std::endl;
+        
+        QuestListener::advertiseStatusChange(this->listeners_, "start"); //!< Tells the QuestListeners, that the status has changed to active.
+        
+        this->setStatus(player, QuestStatus::Active);
+        
+        this->getDescription()->sendAddQuestNotification();
+        return true;
+    }
+    
+    /**
+    @brief
+        Adds a QuestListener to the list of QuestListeners listening to this Quest.
+    @param listener
+        The QuestListener to be added.
+    @return
+        Returns true if successful, false if not.
+    */
+    bool Quest::addListener(QuestListener* listener)
+    {
+        if(listener == NULL)
+        {
+            COUT(2) << "A NULL-QuestListener was trying to be added to a Quests listeners." << std::endl;
+            return false;
+        }
+        
+        this->listeners_.push_back(listener);
+        return true;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/Quest.h
===================================================================
--- code/trunk/src/modules/questsystem/Quest.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/Quest.h	(revision 5781)
@@ -0,0 +1,157 @@
+/*
+ *   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
+    @brief Definition of the Quest class.
+        The Quest is the parent class of LocalQuest and GlobalQuest.
+*/
+
+#ifndef _Quest_H__
+#define _Quest_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <list>
+#include "QuestItem.h"
+
+namespace orxonox
+{
+    namespace QuestStatus
+    {
+        //!Different states of a Quest.
+        enum Value
+        {
+            Inactive,
+            Active,
+            Failed,
+            Completed
+        };
+    }
+
+    /**
+    @brief
+        Represents a Quest in the game.
+        A Quest has a list of subquests and a parentquest (if it is not a rootquest).
+        Each Quest exists only once but it has a different status (inactive, active, failed or completed) for each player.
+        A Quest has several hints (QuestHint) that can be unlocked through QuestEffects and then display aid in solving the Quest.
+        A Quest has a list of QuestEffects that are invoked when the quest is failed and also a list of QuestEffects that are invoked, when the Quest is completed.
+
+        Quest itself should not be instantiated, if you want to create a quest either go for LocalQuest or GlobalQuest, whichever suits you needs better.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport Quest : public QuestItem
+    {
+        public:
+            Quest(BaseObject* creator);
+            virtual ~Quest();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Quest object through XML.
+
+            /**
+            @brief Returns the parentquest of the Quest.
+            @return Returns a pointer to the parentquest of the Quest.
+            */
+            inline Quest* getParentQuest(void) const
+                { return this->parentQuest_; }
+
+            /**
+            @brief Returns the list of subquests.
+            @return Returns a reference to the list of subquests of the quest.
+            */
+            inline const std::list<Quest*> & getSubQuestList(void) const
+                { return this->subQuests_; }
+
+            /**
+            @brief Returns the list of all QuestHints of this Quest.
+            @return Returns a reference to the list of QuestHints of the Quest.
+            */
+            inline const std::list<QuestHint*> & getHintsList(void) const
+                { return this->hints_; }
+
+            bool isInactive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'inactive'.
+            bool isActive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'active'.
+            bool isFailed(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'failed'.
+            bool isCompleted(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'completed'.
+
+            bool start(PlayerInfo* player); //!< Sets a Quest to active.
+            virtual bool fail(PlayerInfo* player); //!< Fails the Quest.
+            virtual bool complete(PlayerInfo* player); //!< Completes the Quest.
+
+            bool addListener(QuestListener* listener); //!< Adds a QuestListener to the list of QuestListeners listening to this Quest.
+
+        protected:
+            virtual bool isStartable(const PlayerInfo* player) const = 0; //!< Checks whether the Quest can be started.
+            virtual bool isFailable(const PlayerInfo* player) const = 0; //!< Checks whether the Quest can be failed.
+            virtual bool isCompletable(const PlayerInfo* player) const = 0; //!< Checks whether the Quest can be completed.
+
+            const Quest* getSubQuest(unsigned int index) const; //!<Returns the subquest at the given index.
+            const QuestHint* getHint(unsigned int index) const; //!< Returns the QuestHint at the given index.
+            const QuestEffect* getFailEffect(unsigned int index) const; //!< Returns the fail QuestEffect at the given index.
+            const QuestEffect* getCompleteEffect(unsigned int index) const; //!< Returns the complete QuestEffect at the given index.
+
+            /**
+            @brief Returns the list of fail QuestEffects.
+            @return Returns a reference to the list of fail QuestEffects.
+            */
+            inline std::list<QuestEffect*> & getFailEffectList(void)
+                { return this->failEffects_; }
+
+            /**
+            @brief Returns the list of complete QuestEffects.
+            @return Returns a reference to the list of complete QuestEffects.
+            */
+            inline std::list<QuestEffect*> & getCompleteEffectList(void)
+                { return this->completeEffects_; }
+
+            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const = 0; //!< Returns the status of the Quest for a specific player.
+            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status) = 0; //!< Changes the status for a specific player.
+
+        private:
+            Quest* parentQuest_; //!< Pointer to the parentquest.
+            std::list<Quest*> subQuests_; //!< List of all the subquests.
+
+            std::list<QuestHint*> hints_; //!< A list of all the QuestHints tied to this Quest.
+
+            std::list<QuestEffect*> failEffects_; //!< A list of all QuestEffects to be invoked, when the Quest has been failed.
+            std::list<QuestEffect*> completeEffects_; //!< A list of QuestEffects to be invoked, when the Quest has been completed.
+
+            std::list<QuestListener*> listeners_; //!< A list of QuestListeners, that listen to what exactly happens with this Quest.
+
+            bool setParentQuest(Quest* quest); //!< Sets the parentquest of the Quest.
+            bool addSubQuest(Quest* quest); //!< Adds a subquest to the Quest.
+            bool addHint(QuestHint* hint); //!< Add a QuestHint to the list of QuestHints.
+            bool addFailEffect(QuestEffect* effect); //!< Adds an QuestEffect to the list of fail QuestEffects.
+            bool addCompleteEffect(QuestEffect* effect); //!< Adds an QuestEffect to the list of complete QuestEffects.
+
+    };
+
+}
+
+#endif /* _Quest_H__ */
Index: code/trunk/src/modules/questsystem/QuestDescription.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestDescription.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestDescription.cc	(revision 5781)
@@ -0,0 +1,133 @@
+/*
+ *   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
+    @brief Implementation of the QuestDescription class.
+*/
+
+
+#include "QuestDescription.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "QuestNotification.h"
+
+namespace orxonox
+{
+    CreateFactory(QuestDescription);
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
+    QuestDescription::QuestDescription(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(QuestDescription);
+        
+        this->title_ = "";
+        this->description_ = "";
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    QuestDescription::~QuestDescription()
+    {
+
+    }
+
+    /**
+    @brief
+        Method for creating a QuestDescription object through XML.
+    */
+    void QuestDescription::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(QuestDescription, XMLPort, xmlelement, mode);
+
+        XMLPortParam(QuestDescription, "title", setTitle, getTitle, xmlelement, mode);
+        XMLPortParam(QuestDescription, "description", setDescription, getDescription, xmlelement, mode);
+        XMLPortParam(QuestDescription, "failMessage", setFailMessage, getFailMessage, xmlelement, mode);
+        XMLPortParam(QuestDescription, "completeMessage", setCompleteMessage, getCompleteMessage, xmlelement, mode);
+
+        COUT(3) << "New QuestDescription with title '" << this->getTitle() << "' created." << std::endl;
+    }
+    
+    /**
+    @brief
+        This method is a helper for sending QuestDescriptions as Notifications.
+    @param item
+        The item the QuestDescription is for.
+    @param status
+        The status the QuestDescription us for.
+    @return
+        Returns true if successful.
+    @todo
+        Make sure the messages meet the conditions.
+    */
+    bool QuestDescription::notificationHelper(const std::string & item, const std::string & status) const
+    {
+        std::string message = "";
+        if(item == "hint")
+        {
+            message = "You received a hint: '" + this->title_ + "'";
+        }
+        else if(item == "quest")
+        {
+            if(status == "start")
+            {
+                message = "You received a new quest: '" + this->title_ + "'";
+            }
+            else if(status == "fail")
+            {
+                message = "You failed the quest: '" + this->title_ + "'";
+            }
+            else if(status == "complete")
+            {
+                message = "You successfully completed the quest: '" + this->title_ + "'";
+            }
+            else
+            {
+                COUT(2) << "Bad input in notificationHelper, this should not be happening!" << std::endl;
+                return false;
+            }
+        }
+        else
+        {
+            COUT(2) << "Bad input in notificationHelper, this should not be happening!" << std::endl;
+            return false;
+        }
+        
+        QuestNotification* notification = new QuestNotification(message);
+        notification->send();
+        return true;
+    }
+
+
+}
Index: code/trunk/src/modules/questsystem/QuestDescription.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestDescription.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestDescription.h	(revision 5781)
@@ -0,0 +1,163 @@
+/*
+ *   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
+    @brief Definition of the QuestDescription class.
+*/
+
+#ifndef _QuestDescription_H__
+#define _QuestDescription_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <string>
+#include "core/BaseObject.h"
+
+// tolua_begin
+namespace orxonox
+{
+    /**
+    @brief
+        This class is a description of a QuestItem.
+        It holds a title and a description.
+
+        Creating a QuestDescription through XML goes as follows:
+
+        <QuestDescription title="Title" description="Description Text" failMessage="You fail." completeMessage="You win!" />
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport QuestDescription : public BaseObject
+    {
+// tolua_end
+        public:
+            QuestDescription(BaseObject* creator);
+            virtual ~QuestDescription();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestDescription object through XML.
+
+// tolua_begin
+            /**
+            @brief Returns the title.
+            @return Returns a string containing the title of the QuestDescription.
+            */
+            inline const std::string & getTitle(void) const
+                { return this->title_; }
+
+            /**
+            @brief Returns the description text.
+            @return Returns a string containing the description text of the QuestDescription.
+            */
+            inline const std::string & getDescription(void) const
+                { return this->description_; }
+// tolua_end
+
+            /**
+            @brief Returns the fail message.
+            @return Returns a string containing the fail message of the QuestDescription.
+            */
+            inline const std::string & getFailMessage(void) const
+                { return this->failMessage_; }
+
+            /**
+            @brief Returns the complete message.
+            @return Returns a string containing the complete message of the QuestDescription.
+            */
+            inline const std::string & getCompleteMessage(void) const
+                { return this->completeMessage_; }
+
+            /**
+            @brief Sends a Notification displaying that a QuestHint was added.
+            @return Returns true if successful.
+            */
+            inline bool sendAddHintNotification(void) const
+                { return notificationHelper("hint", ""); }
+
+            /**
+            @brief Sends a Notification displaying that a Quest was added.
+            @return Returns true if successful.
+            */
+            inline bool sendAddQuestNotification(void) const
+                { return notificationHelper("quest", "start"); }
+
+            /**
+            @brief Sends a Notification displaying that a Quest was failed.
+            @return Returns true if successful.
+            */
+            inline bool sendFailQuestNotification(void) const
+                { return notificationHelper("quest", "fail"); }
+
+            /**
+            @brief Sends a Notification displaying that a Quest was completed.
+            @return Returns true if successful.
+            */
+            inline bool sendCompleteQuestNotification(void) const
+                { return notificationHelper("quest", "complete"); }
+
+        private:
+            std::string title_; //!< The title.
+            std::string description_; //!< The description.
+            std::string failMessage_; //!< The message displayed when the Quest is failed.
+            std::string completeMessage_; //!< The message displayed when the Quest is completed.
+
+            bool notificationHelper(const std::string & item, const std::string & status) const; //!< Helper for sending QuestDescriptions as Notifications.
+
+            /**
+            @brief Sets the title.
+            @param title The title to be set.
+            */
+            inline void setTitle(const std::string & title)
+                { this->title_ = title; }
+
+            /**
+            @brief Sets the description text.
+            @param description The description text to be set.
+            */
+            inline void setDescription(const std::string & description)
+                { this->description_ = description; }
+
+            /**
+            @brief Sets the fail message.
+            @param message The fail message to be set.
+            */
+            inline void setFailMessage(const std::string & message)
+                { this->failMessage_ = message; }
+
+            /**
+            @brief Sets the complete message.
+            @param message The complete message to be set.
+            */
+            inline void setCompleteMessage(const std::string & message)
+                { this->completeMessage_ = message; }
+
+    }; // tolua_export
+
+} // tolua_export
+
+#endif /* _QuestDescription_H__ */
Index: code/trunk/src/modules/questsystem/QuestEffect.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestEffect.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestEffect.cc	(revision 5781)
@@ -0,0 +1,81 @@
+/*
+ *   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
+    @brief Implementation of the QuestEffect class.
+*/
+
+#include "QuestEffect.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Constructor. Creates a new QuestEffect.
+        Is not meant to be invoked directly, since this is only an interface.
+    */
+    QuestEffect::QuestEffect(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(QuestEffect);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    QuestEffect::~QuestEffect()
+    {
+
+    }
+
+    /**
+    @brief
+        Static method. Invoke all QuestEffects in an QuestEffect-list on a given player.
+    @param player
+        The player the QuestEffects are invoked on.
+    @param effects
+        A list of all the QuestEffects to be invoked.
+    @return
+        Returns false if there was an error, view console of log for further detail.
+    */
+    /*static*/ bool QuestEffect::invokeEffects(PlayerInfo* player, std::list<QuestEffect*> & effects)
+    {
+        bool check = true;
+        
+        COUT(4) << "Invoking QuestEffects on player: " << player << " ."  << std::endl;
+
+        for (std::list<QuestEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
+        {
+            check = check && (*effect)->invoke(player);
+        }
+        return check;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/QuestEffect.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestEffect.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestEffect.h	(revision 5781)
@@ -0,0 +1,65 @@
+/*
+ *   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
+    @brief Definition of the QuestEffect class.
+*/
+
+#ifndef _QuestEffect_H__
+#define _QuestEffect_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <list>
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Handles QuestEffects for Quests.
+        QuestEffects are the only way for Quests to have any sideeffects in the game world. They are also the only way for a player to gain, complete or fail Quests.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport QuestEffect : public BaseObject
+    {
+        public:
+            QuestEffect(BaseObject* creator);
+            virtual ~QuestEffect();
+
+            virtual bool invoke(PlayerInfo* player) = 0; //!< Invokes the QuestEffect.
+            static bool invokeEffects(PlayerInfo* player, std::list<QuestEffect*> & effects); //!< Invokes all QuestEffects in the list.
+
+
+    };
+
+}
+
+#endif /* _QuestEffect_H__ */
Index: code/trunk/src/modules/questsystem/QuestEffectBeacon.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestEffectBeacon.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestEffectBeacon.cc	(revision 5781)
@@ -0,0 +1,263 @@
+/*
+ *   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
+    @brief Implementation of the QuestEffectBeacon class.
+*/
+
+#include "QuestEffectBeacon.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "core/EventIncludes.h"
+#include "worldentities/pawns/Pawn.h"
+#include "interfaces/PlayerTrigger.h"
+#include "QuestEffect.h"
+
+namespace orxonox
+{
+    CreateFactory(QuestEffectBeacon);
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes defaults.
+    */
+    QuestEffectBeacon::QuestEffectBeacon(BaseObject* creator) : StaticEntity(creator)
+    {
+        RegisterObject(QuestEffectBeacon);
+
+        this->status_ = QuestEffectBeaconStatus::Active;
+        this->times_ = INFINITE_TIME;
+    }
+
+    /**
+        Destructor.
+    */
+    QuestEffectBeacon::~QuestEffectBeacon()
+    {
+    }
+
+    /**
+    @brief
+        Method for creating a QuestEffectBeacon object through XML.
+    */
+    void QuestEffectBeacon::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(QuestEffectBeacon, XMLPort, xmlelement, mode);
+
+        XMLPortParam(QuestEffectBeacon, "times", setTimes, getTimes, xmlelement, mode);
+        XMLPortObject(QuestEffectBeacon, QuestEffect, "effects", addEffect, getEffect, xmlelement, mode);
+
+        COUT(3) << "New QuestEffectBeacon created." << std::endl;
+    }
+
+    /**
+    @brief
+        Processes an event for this QuestEffectBeacon.
+    */
+    void QuestEffectBeacon::processEvent(Event& event)
+    {
+        SUPER(QuestEffectBeacon, processEvent, event);
+
+        ORXONOX_SET_SUBCLASS_EVENT(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);
+    }
+
+    /**
+    @brief
+        Executes the QuestEffectBeacon.
+        This means extracting the ControllableEntity from the PlayerTrigger, provided by the Event causing the execution, and the extracting the PlayerInfo from the received ControllableEntity and invoking the QuestEffectbeacon's QuestEffects on the received PlayerInfo.
+    @param trigger
+        Apointer to the PlayerTrigger that threw the Event.
+    @return
+        Returns true if successfully executed, false if not.
+    */
+    bool QuestEffectBeacon::execute(bool b, PlayerTrigger* trigger)
+    {
+        if(!b)
+        {
+            return false;
+        }
+        if(!(this->isActive())) //!< If the QuestEffectBeacon is inactive it cannot be executed.
+        {
+            COUT(3) << "The QuestEffectBeacon is inactive." << std::endl;
+            return false;
+        }
+
+        if(!trigger->isForPlayer()) //!< The PlayerTrigger is not exclusively for ControllableEntities which means we cannot extract one.
+        {
+            return false;
+        }
+
+        //! Extracting the ControllableEntity form the PlayerTrigger.
+        Pawn* pawn = trigger->getTriggeringPlayer();
+
+        if(pawn == NULL)
+        {
+            COUT(2) << "The QuestEffectBeacon was triggered by an entity other than a Pawn." << std::endl;
+            return false;
+        }
+
+        //! Extract the PlayerInfo from the ControllableEntity.
+        PlayerInfo* player = pawn->getPlayer();
+
+        if(player == NULL)
+        {
+            COUT(3) << "The PlayerInfo* is NULL." << std::endl;
+            return false;
+        }
+
+        COUT(3) << "QuestEffectBeacon executed on player: " << player << " ." << std::endl;
+
+        bool check = QuestEffect::invokeEffects(player, this->effects_); //!< Invoke the QuestEffects on the PlayerInfo.
+        if(check)
+        {
+            this->decrementTimes(); //!< Decrement the number of times the beacon can be used.
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+    @brief
+        Set the status of the QuestEffectBeacon.
+    @param activate
+        If true the QuestEffectBeacon is activated, if false it is deactivated.
+    @return
+        Returns whether the activation/deactivation was successful.
+    */
+    bool QuestEffectBeacon::setActive(bool activate)
+    {
+        if(this->getTimes() == 0 && activate) //!< A QuestEffectBeacon that can be executed only 0 times is always inactive.
+        {
+            return false;
+        }
+
+        if(activate)
+        {
+        this->status_ = QuestEffectBeaconStatus::Active;
+        return true;
+        }
+
+        this->status_ = QuestEffectBeaconStatus::Inactive;
+        return true;
+    }
+
+    /**
+    @brief
+        Decrement the number of times the QuestEffectBeacon can be executed.
+    @return
+        Returns true if successful.
+    */
+    bool QuestEffectBeacon::decrementTimes(void)
+    {
+        if(!(this->isActive())) //!< The QuestEffectBeacon mus be active to decrement the number of times it can be executed.
+        {
+            return false;
+        }
+        if(this->getTimes() == INFINITE_TIME) //!< If times is infinity the QuestEffectBeacon can be executed an infinite number fo times.
+        {
+            return true;
+        }
+
+        this->times_ = this->times_ - 1; //!< Decrement number of times the QuestEffectBeacon can be executed.
+        if(this->getTimes() == 0) //!< Set the QuestEffectBeacon to inactive when the number of times it can be executed is reduced to 0.
+        {
+            this->status_ = QuestEffectBeaconStatus::Inactive;
+        }
+
+        return true;
+    }
+
+    /**
+    @brief
+        Set the number of times the QuestEffectBeacon can be executed.
+        The number must be eighter <= 0, or INFINITY which is '-1'.
+    @param n
+        The number of times the QuestEffectBeacon can be executed.
+        The number must be eighter <= 0, or INFINITY which is '-1'.
+    @return
+        Returns true if successful.
+    */
+    bool QuestEffectBeacon::setTimes(const int & n)
+    {
+        if(n < 0 && n != INFINITE_TIME)
+        {
+            return false;
+        }
+
+        this->times_ = n;
+        return true;
+    }
+
+    /**
+    @brief
+        Adds a QuestEffect to the QuestEffectBeacon.
+    @param effect
+        A pointer to the QuestEffect to be added.
+    @return
+        Returns true if successful.
+    */
+    bool QuestEffectBeacon::addEffect(QuestEffect* effect)
+    {
+        if(effect == NULL) //!< NULL-pointers are not well liked here...
+        {
+            COUT(2) << "A NULL-QuestEffect was trying to be added" << std::endl;
+            return false;
+        }
+
+        this->effects_.push_back(effect);
+
+        COUT(3) << "A QuestEffect was added to a QuestEffectBeacon." << std::endl;
+        return true;
+    }
+
+    /**
+    @brief
+        Returns the QuestEffect at the given index.
+    @param index
+        The index.
+    @return
+        Returns a pointer to the QuestEffect at the given index.
+    */
+    const QuestEffect* QuestEffectBeacon::getEffect(unsigned int index) const
+    {
+        int i = index;
+        for (std::list<QuestEffect*>::const_iterator effect = this->effects_.begin(); effect != this->effects_.end(); ++effect)
+        {
+            if(i == 0)
+            {
+               return *effect;
+            }
+            i--;
+        }
+        return NULL;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/QuestEffectBeacon.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestEffectBeacon.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestEffectBeacon.h	(revision 5781)
@@ -0,0 +1,128 @@
+/*
+ *   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
+    @brief Definition of the QuestEffectBeacon class.
+*/
+
+#ifndef _QuestEffectBeacon_H__
+#define _QuestEffectBeacon_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <list>
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    namespace QuestEffectBeaconStatus
+    {
+        //! The status of the beacon, can be either active or inactive.
+        enum Value
+        {
+            Inactive,
+            Active
+        };
+    }
+
+    /**
+    @brief
+        A QuestEffectBeacon is a physical entity in the game which can (under some condition(s)) invoke a number QuestEffects on players meeting the condition(s).
+        The conditions under which the QuestEffects are invoked on the player are defined by Triggers.
+        A QuestEffectBeacon can be executed a defined number of times.
+        A QuestEffectBeacon can be inactive or active.
+
+        Creating a QuestEffectBeacon through XML goes as follows:
+
+        <QuestEffectBeacon times=n> //Where 'n' is eighter a number >= 0, which means the QuestEffectBeacon can be executed n times. Or n = -1, which means the QuestEffectBeacon can be executed an infinite number of times.
+            <effects>
+                <QuestEffect /> //A list of QuestEffects, invoked when the QuestEffectBeacon is executed, see QuestEffect for the full XML representation.
+                ...
+                <QuestEffect />
+            </effects>
+            <events>
+                <execute>
+                    <EventListener event=eventIdString />
+                </execute>
+            </events>
+            <attached>
+                <PlayerTrigger name=eventIdString /> //A PlayerTrigger triggering the execution of the QuestEffectBeacon.
+            </attached>
+        </QuestEffectBeacon>
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport QuestEffectBeacon : public StaticEntity
+    {
+        public:
+            QuestEffectBeacon(BaseObject* creator);
+            virtual ~QuestEffectBeacon();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestEffectBeacon object through XML.
+
+            virtual void processEvent(Event& event); //!< Processes an event for this QuestEffectBeacon.
+
+            bool execute(bool b, PlayerTrigger* trigger); //!< Executes the QuestEffects of the QuestEffectBeacon.
+
+            /**
+            @brief Tests whether the QuestEffectBeacon is active.
+            @return Returns true if the QuestEffectBeacon is active, fals if not.
+            */
+            inline bool isActive(void)
+            { return this->status_ == QuestEffectBeaconStatus::Active; }
+
+            bool setActive(bool activate); //!< Set the status of the QuestEffectBeacon.
+
+        protected:
+            bool decrementTimes(void); //!< Decrement the number of times the QuestEffectBeacon can still be executed.
+
+            /**
+            @brief Returns the number of times the QUestEffectBeacon can still be executed.
+            @return Returns the number of times the QUestEffectBeacon can still be executed.
+            */
+            inline const int & getTimes(void) const
+                { return this->times_; }
+
+        private:
+            static const int INFINITE_TIME = -1; //!< Constant to avoid using magic numbers.
+
+            std::list<QuestEffect*> effects_; //!< The list of QuestEffects to be invoked on the executing player.
+            int times_; //!< Number of times the beacon can be exectued.
+            QuestEffectBeaconStatus::Value status_; //!< The status of the QUestEffectBeacon, Can be eighter active or inactive.
+
+            bool setTimes(const int & n); //!< Set the number of times the QuestEffectBeacon can be executed.
+            bool addEffect(QuestEffect* effect); //!< Add a QuestEffect to the QuestEffectBeacon.
+
+            const QuestEffect* getEffect(unsigned int index) const; //!< Get the QuestEffect at a given index.
+
+    };
+
+}
+
+#endif /* _QuestEffectBeacon_H__ */
Index: code/trunk/src/modules/questsystem/QuestGUI.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestGUI.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestGUI.cc	(revision 5781)
@@ -0,0 +1,274 @@
+/*
+ *   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 "QuestGUI.h"
+
+#include <sstream>
+#include <CEGUIWindow.h>
+#include <CEGUIWindowManager.h>
+
+#include "core/CoreIncludes.h"
+#include "Quest.h"
+#include "QuestHint.h"
+#include "QuestItem.h"
+#include "QuestGUINode.h"
+#include "QuestManager.h"
+
+namespace orxonox {
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    @param
+        The player the GUI is for.
+    */
+    QuestGUI::QuestGUI(PlayerInfo* player)
+    {
+        RegisterRootObject(QuestGUI);
+
+        this->player_ = player;
+        this->windowManager_ = CEGUI::WindowManager::getSingletonPtr(); //!< Get CEGUI WindowManager.
+        this->rootWindow_ = NULL;
+        this->root_ = new QuestGUINode(); //!< Create empty root node.
+
+        COUT(3) << "New QuestGUI created." << std::endl;
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    QuestGUI::~QuestGUI()
+    {
+        COUT(3) << "Destroying QuestGUI..." << std::endl;
+
+        this->clear(); //!< Clearing the GUI and in the process destroying all QuestGUINodes.
+
+        //! Destroying the windows in the this->windows_ list.
+        for(std::list<CEGUI::Window*>::iterator it = this->windows_.begin(); it != this->windows_.end(); it++)
+        {
+            if(*it != NULL)
+                (*it)->destroy();
+        }
+        this->windows_.clear();
+        
+        if(this->root_ != NULL)
+            delete this->root_;
+    }
+
+    /**
+    @brief
+        Get the root CEGUI Window of the GUI.
+    @return
+        Returns the root CEGUI Window of the GUI.
+    */
+    CEGUI::Window* QuestGUI::getGUI(void)
+    {
+        this->update(); //!< Update the GUI.
+
+        return this->rootWindow_;
+    }
+
+    /**
+    @brief
+        Update the GUI.
+    */
+    void QuestGUI::update(void)
+    {
+        COUT(3) << "Updating QuestGUI..." << std::endl;
+
+        this->clear(); //!< Clear the GUI.
+        
+        int depth = 0;
+        int index = 0;
+
+        //! Create root window.
+        this->rootWindow_ = this->windowManager_->createWindow("TaharezLook/ScrollablePane", "QuestGUI/Quests");
+        this->rootWindow_->setSize(CEGUI::UVector2(CEGUI::UDim(1, 0),CEGUI::UDim(1, 0)));
+
+        //! Iterate through all Quests.
+        std::map<std::string, Quest*> quests = QuestManager::getInstance().getQuests();
+        for(std::map<std::string, Quest*>::iterator it = quests.begin(); it != quests.end(); it++)
+        {
+            Quest* quest = (*it).second;
+            if(quest->getParentQuest() == NULL && !quest->isInactive(this->player_)) //!< If the Quest isn't inactive and a root Quest (meaning it has no parent.), create a Node.
+            {
+                index = createNode(this->root_, quest, depth, index);
+            }
+        }
+        COUT(3) << "Updating QuestGUI done." << std::endl;
+    }
+
+    /**
+    @brief
+        Clear the QuestGUI.
+    */
+    void QuestGUI::clear(void)
+    {
+        COUT(3) << "Clearing QuestGUI..." << std::endl;
+
+        //! Clear all nodes.
+        for(std::map<CEGUI::Window*, QuestGUINode*>::iterator it = this->nodes_.begin(); it != this->nodes_.end(); it++)
+        {
+            QuestGUINode* node = (*it).second;
+            if(node == NULL)
+            {
+                COUT(1) << "Node is NULL!";
+                continue;
+            }
+            std::string* str = new std::string();
+            node->getName(*str);
+            COUT(3) << "Clearing Node '" << *str << "' ..." << std::endl;
+            delete str;
+            delete node;
+        }
+        this->nodes_.clear();
+
+        //! Clear root window.
+        if(this->rootWindow_ != NULL)
+            this->rootWindow_->destroy();
+
+        COUT(3) << "Clearing QuestGUI done." << std::endl;
+    }
+
+    /**
+    @brief
+        Get a CEGUI Window to use.
+        Windows that are no longer used are collected with giveWindow, and are given out again with getWindow, so save some time recreating new windows everytime.
+        The retreived window is of type "TaharezLook/TabButton".
+    @return
+        Returns a CEGUI Window of type "TaharezLook/TabButton".
+    */
+    CEGUI::Window* QuestGUI::getWindow(void)
+    {
+        if(!this->windows_.empty()) //!< If there are windows in the list.
+        {
+            CEGUI::Window* window = this->windows_.back();
+            this->windows_.pop_back();
+            return window;
+        }
+
+        //!< Else create a new one.
+        std::ostringstream stream;
+        stream << "QuestGUI/Quests/EmptyWindows/" << this->windows_.size()+1;
+        return this->windowManager_->createWindow("TaharezLook/TabButton", stream.str());
+    }
+
+    /**
+    @brief
+        Return a no longer needed CEGUI Window for reuse.
+    @param window
+        The CEGUI window ot be returned.
+    */
+    void QuestGUI::giveWindow(CEGUI::Window* window)
+    {
+        if(window == NULL)
+            return;
+        this->windows_.push_back(window);
+        this->rootWindow_->removeChildWindow(window); //!< Remove the window as child of the rootWindow.
+        std::ostringstream stream;
+        stream << "QuestGUI/Quests/EmptyWindows/" << this->windows_.size();
+        window->rename(stream.str());
+    }
+
+    /**
+    @brief
+        Finde the QuestGUINode belonging to the input CEGUI Window.
+    @param window
+        A pointer to a CEGUI Window.
+    @return
+        A pointer to the QuestGUI Node belonging to the input CEGUI Window.
+    */
+    /*static*/ QuestGUINode* QuestGUI::findNode(CEGUI::Window* window)
+    {
+        for(std::map<PlayerInfo*, QuestGUI*>::iterator it = QuestManager::getInstance().questGUIs_.begin(); it != QuestManager::getInstance().questGUIs_.end(); it++)
+        {
+            QuestGUI* gui = (*it).second;
+            std::map<CEGUI::Window*, QuestGUINode*>::iterator node = gui->nodes_.find(window);
+            if(node != gui->nodes_.end()) return node->second;
+        }
+        return NULL;
+    }
+
+    /**
+    @brief
+        Recursive method to create Nodes for all Quests an Hints the given Quest is a parent to.
+    @param parent
+        Pointer to the parent QuestGUINode.
+    @param item
+        The QuestItem the QuestGUINode is created for.
+    @param depth
+        Parameter to define how much the list item has to be indented.
+    @param index
+        "Counter" for Quests and Hints.
+    @return
+        Returns the index.
+    */
+    int QuestGUI::createNode(QuestGUINode* parent, QuestItem* item, int depth, int index)
+    {
+        QuestGUINode* node = new QuestGUINode(this, parent, item, depth, index); //!< Create a new QuestGUINode.
+
+        this->nodes_.insert(std::pair<CEGUI::Window*, QuestGUINode*>(node->getWindow(),node)); //!< Insert the node and its window in the nodes_ map.
+        
+        index++;
+
+        //! Check if the QuestItem is a Quest, if not (it's a QuestHint) it just returns.
+        Quest* quest = dynamic_cast<Quest*>(item);
+        if(quest == NULL)
+          return index;
+
+        //! Iterate through all subQuests.
+        std::list<Quest*> quests = quest->getSubQuestList();
+        for(std::list<Quest*>::iterator it = quests.begin(); it != quests.end(); it++)
+        {
+            Quest* quest = *it;
+            if(!quest->isInactive(this->player_)) //!< Add node if the subQuest is not inactive.
+            {
+                index = createNode(node, quest, depth+1, index);
+            }
+        }
+
+        //! Iterate through all hints.
+        std::list<QuestHint*> hints = quest->getHintsList();
+        int tempIndex = index; //!< Preserve the index, since for the hints we start anew with index 0.
+        index = 0;
+        for(std::list<QuestHint*>::iterator it = hints.begin(); it != hints.end(); it++)
+        {
+            QuestHint* hint = *it;
+            if(hint->isActive(this->player_)) //!< Add node if the hint is active.
+            {
+                index = createNode(node, hint, depth+1, index);
+            }
+        }
+        index = tempIndex; //!< Reset the index to the original level.
+
+        return index;        
+    }
+
+}
+
Index: code/trunk/src/modules/questsystem/QuestGUI.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestGUI.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestGUI.h	(revision 5781)
@@ -0,0 +1,109 @@
+/*
+ *   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
+    @brief Definition of the QuestGIU class.
+*/
+
+#ifndef _QuestGUI_H__
+#define _QuestGUI_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <list>
+#include <map>
+#include <string>
+#include <CEGUIForwardRefs.h>
+
+#include "core/OrxonoxClass.h"
+
+namespace orxonox {
+
+    /**
+    @brief
+        Handles the GUI for the Questsystem.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport QuestGUI : public OrxonoxClass
+    {
+
+        public:
+        
+            QuestGUI(PlayerInfo* player);
+            virtual ~QuestGUI();
+
+            void update(void); //!< Update the GUI.
+            CEGUI::Window* getGUI(void); //!< Get the root CEGUI Window of the GUI.
+
+            CEGUI::Window* getWindow(void); //!< Get a CEGUI Window to use.
+            void giveWindow(CEGUI::Window* window); //!< Return a no longer needed CEGUI Window for reuse.
+
+            static QuestGUINode* findNode(CEGUI::Window* window); //!< Finde the QuestGUINode belonging to the input CEGUI Window.
+
+            /**
+            @brief Retreive the CEGUI WindowManager.
+            @return Returns the CEGUI WindoWManager.
+            */
+            inline CEGUI::WindowManager* getWindowManager(void)
+                { return this->windowManager_; }
+            /**
+            @brief Retrieve the root window.
+            @return Returns the root window.
+            */
+            inline CEGUI::Window* getRootWindow(void)
+                { return this->rootWindow_; }
+            /**
+            @brief Retreive the player.
+            @return Returns the player.
+            */
+            inline PlayerInfo* getPlayer(void)
+                { return this->player_; }
+    
+        private:
+            
+            int createNode(QuestGUINode* parent, QuestItem* item, int depth, int index); //!< Recursive method to create Nodes for all Quests an Hints the given Quest is a parent to.
+
+            void clear(void); //!< Clear the QuestGUI.
+
+            QuestGUINode* root_; //!< An empty QuestGUINode being the parent of all otherwise parent-less nodes.
+
+            CEGUI::WindowManager* windowManager_; //!< The CEGUI WindowManager.
+            CEGUI::Window* rootWindow_; //!< The root CEGUI Window of the GUI.
+            PlayerInfo* player_; //!< The player that owns the GUI.
+
+            std::map<CEGUI::Window*, QuestGUINode*> nodes_; //!< A list of all QuestGUINodes, ordered by their respective CEGUI Windows.
+            std::list<CEGUI::Window*> windows_; //!< A list of windows to be used.
+
+    };
+
+}
+
+#endif /* _QuestGUI_H__ */
+
Index: code/trunk/src/modules/questsystem/QuestGUINode.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestGUINode.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestGUINode.cc	(revision 5781)
@@ -0,0 +1,399 @@
+/*
+ *   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 "QuestGUINode.h"
+
+#include <sstream>
+
+#include <CEGUIWindowManager.h>
+#include <elements/CEGUIFrameWindow.h>
+#include <elements/CEGUIPushButton.h>
+#include <falagard/CEGUIFalWidgetLookFeel.h>
+#include <falagard/CEGUIFalWidgetLookManager.h>
+
+#include "core/CoreIncludes.h"
+#include "Quest.h"
+#include "QuestHint.h"
+#include "QuestItem.h"
+#include "QuestDescription.h"
+#include "QuestGUI.h"
+
+namespace orxonox {
+
+    /**
+    @brief
+        Default Constructor. Registers and initializes the object.
+    */
+    QuestGUINode::QuestGUINode(void)
+    {
+        this->initialize();
+    }
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    @param gui
+        The QuestGUi the node beongs to.
+    @param parent
+        The parent node of the newly created node.
+    @param item
+        The QuestItem the  newly created node is for.
+    @param depth
+        Parameter to define how much the list item has to be indented.
+    @param index
+        "Counter" for Quests and Hints.
+    */
+    QuestGUINode::QuestGUINode(QuestGUI* gui, QuestGUINode* parent, QuestItem* item, int depth, int index)
+    {
+        this->initialize();    
+
+        this->gui_ = gui;
+        this->parent_ = parent;
+        this->item_ = item;
+        this->depth_ = depth;
+        this->index_ = index;
+
+        this->createWindow();
+
+        COUT(3) << "New QuestGUINode '" << this->window_->getName() << "' created." << std::endl;
+    }
+
+    /**
+    @brief
+        Destructor.
+    @todo
+        Destroying everything?
+    */
+    QuestGUINode::~QuestGUINode(void)
+    {
+        if(this->window_ != NULL)
+            this->window_->destroy();
+        if(this->details_ != NULL)
+        {
+            this->details_->destroy();
+        }
+    }
+
+    /**
+    @brief
+        Initialize the object.
+    */
+    void QuestGUINode::initialize(void)
+    {
+        RegisterRootObject(QuestGUINode);
+
+        this->parent_ = NULL;
+        this->item_ = NULL;
+        this->window_ = NULL;
+        this->details_ = NULL;
+        this->depth_ = 0;
+        this->index_ = 0;
+        this->visible_ = true;
+    }
+
+    void QuestGUINode::toggleVisibility(void)
+    {
+        
+    }
+
+    /**
+    @brief
+        Sets the input buffer to the name of the node.
+    @param buffer
+        The buffer that is set to the name of the node.
+    @todo
+        Needed?
+    */
+    void QuestGUINode::getName(std::string & buffer)
+    {
+        if(this->window_ != NULL)
+        {
+            buffer = (std::string)(this->window_->getName().c_str());
+        }
+        else
+        {
+            buffer = "";
+        }
+    }
+
+    /**
+    @brief
+        Creates the details window.
+    @return
+        Returns the details window.
+    @todo
+        Return necessary?
+    */
+    CEGUI::Window* QuestGUINode::getDetails(void)
+    {
+
+        if(this->details_ == NULL) //!< If the details window was not already created.
+        {  
+            std::ostringstream stream;
+
+            //! Create the main window for the details.
+            stream << this->window_->getName() << "/Details";
+            const QuestDescription* description = this->item_->getDescription();
+            this->details_ = this->gui_->getWindowManager()->createWindow("TaharezLook/FrameWindow", stream.str());
+            this->details_->setSize(CEGUI::UVector2(CEGUI::UDim(0.7, 0),CEGUI::UDim(0.7, 0)));
+            this->details_->setPosition(CEGUI::UVector2(CEGUI::UDim(0.1, 0),CEGUI::UDim(0.1, 0)));
+            this->details_->setText(description->getTitle());
+            this->details_->setAlpha(1.0);
+            this->details_->setInheritsAlpha(false);
+            this->details_->setProperty("CloseButtonEnabled", "True");
+            this->details_->subscribeEvent(CEGUI::FrameWindow::EventCloseClicked, CEGUI::Event::Subscriber(&QuestGUINode::closeDetails, this));
+
+            //! Create a ScrollablePane.
+            stream << "/Scrollable";
+            CEGUI::Window* window = this->gui_->getWindowManager()->createWindow("TaharezLook/ScrollablePane", stream.str());
+            window->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -2*QuestGUINode::BORDER_WIDTH),CEGUI::UDim(1.0, -QuestGUINode::TITLE_HEIGHT)));
+            window->setPosition(CEGUI::UVector2(CEGUI::UDim(0, QuestGUINode::BORDER_WIDTH),CEGUI::UDim(0, QuestGUINode::TITLE_HEIGHT)));
+            this->details_->addChildWindow(window);
+
+            int height;
+            int offset = 0;
+
+            //! Display the status of the QuestItem if it is a Quest.
+            Quest* quest = dynamic_cast<Quest*>(this->item_);
+            if(quest != NULL) //!< If the QuestItem is a Quest
+            {
+                stream.str("");
+                stream << this->details_->getName() << "/Status";
+                CEGUI::Window* statusWindow = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
+                window->addChildWindow(statusWindow);
+                std::string status = "";
+                if(quest->isActive(this->gui_->getPlayer()))
+                {
+                    status = "This quest is active.";
+                }
+                else if(quest->isCompleted(this->gui_->getPlayer()))
+                {
+                    status = "This quest was completed.";
+                }
+                else if(quest->isFailed(this->gui_->getPlayer()))
+                {
+                    status = "This quest was failed.";
+                }
+                statusWindow->setProperty("HorzFormatting", "WordWrapLeftAligned");
+                statusWindow->setProperty("VertFormatting", "TopAligned");
+                statusWindow->setText(status);
+                statusWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
+                statusWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
+                height = setHeight(statusWindow);
+
+                offset += height;
+            }
+            
+            //! Create title pane for the description.
+            stream.str("");
+            stream << this->details_->getName() << "/Description";
+            stream << "/Title";
+            CEGUI::Window* descriptionWindowTitle = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
+            window->addChildWindow(descriptionWindowTitle);
+            descriptionWindowTitle->setProperty("HorzFormatting", "HorzCentred");
+            descriptionWindowTitle->setProperty("VertFormatting", "TopAligned");
+            descriptionWindowTitle->setText("Description:");
+            descriptionWindowTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
+            descriptionWindowTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
+
+            offset += setHeight(descriptionWindowTitle);
+
+            //! Display the Description of the QuestItem.
+            stream.str("");
+            stream << this->details_->getName() << "/Description";
+            CEGUI::Window* descriptionWindow = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
+            window->addChildWindow(descriptionWindow);
+            descriptionWindow->setProperty("HorzFormatting", "WordWrapLeftAligned");
+            descriptionWindow->setProperty("VertFormatting", "TopAligned");
+            descriptionWindow->setText(description->getDescription());
+            descriptionWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
+            descriptionWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
+            height = setHeight(descriptionWindow);
+
+            offset += height;
+
+            //! Display a list of hints if the QuestItem is a Quest.
+            bool title = true;
+            if(quest != NULL)
+            {
+                for(std::list<QuestGUINode*>::iterator it = this->subNodes_.begin(); it != this->subNodes_.end(); it++)
+                {
+                    if(dynamic_cast<QuestHint*>((*it)->item_) != NULL) //!< If the subNode belongs to a QuestHint.
+                    {
+                        if(title) //!< If no title pane for the QuestHints has been created, create one.
+                        {
+                            stream.str("");
+                            stream << this->details_->getName() << "/Hints/Title";
+                            CEGUI::Window* hintsTitle = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
+                            window->addChildWindow(hintsTitle);
+                            hintsTitle->setProperty("HorzFormatting", "HorzCentred");
+                            hintsTitle->setProperty("VertFormatting", "TopAligned");
+                            hintsTitle->setText("Hints:");
+                            hintsTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
+                            hintsTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
+                            offset += setHeight(hintsTitle);;
+                            title = false;
+                        }
+                        QuestGUINode* node = *it;
+                        node->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT)));
+                        node->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
+                        window->addChildWindow(node->window_);
+                        offset += QuestGUINode::BUTTON_HEIGHT;
+                    }
+                }
+            }
+
+            COUT(3) << "Show Details: " << this->details_->getName() << std::endl;
+        }
+
+        return this->details_;
+    }
+
+    /**
+    @brief
+        Opens the details window for the Quest/QuestHint clicked on.
+    */
+    bool QuestGUINode::openDetails(const CEGUI::EventArgs& e)
+    {
+        COUT(3) << "Open QuestItem..." << std::endl;
+        
+        //CEGUI::Window* window = this->gui_->getRootWindow();
+        CEGUI::Window* window = this->gui_->getWindowManager()->getWindow("orxonox/QuestGUI/Background");
+
+        if(window != NULL)
+            window->addChildWindow(this->getDetails());
+
+        return true;
+    }
+
+    /**
+    @brief
+        Close the details window.
+    */
+    bool QuestGUINode::closeDetails(const CEGUI::EventArgs& e)
+    {        
+        //CEGUI::Window* window = this->gui_->getRootWindow();
+        CEGUI::Window* window = this->gui_->getWindowManager()->getWindow("orxonox/QuestGUI/Background");
+        window->removeChildWindow(this->details_);
+
+        return true;
+    }
+
+    /**
+    @brief
+        Helper method for setHeight(). Gets the StaticTextArea for an input CEGUI Window.
+    @param window
+        The CEGUI window.
+    @return
+        Returns a CEGUI Rect.
+    */
+    /*static*/ CEGUI::Rect QuestGUINode::getStaticTextArea(const CEGUI::Window* window)
+    {
+        const CEGUI::WidgetLookFeel& lookAndFeel = CEGUI::WidgetLookManager::getSingleton().getWidgetLook(window->getLookNFeel());
+
+        return lookAndFeel.getNamedArea("WithFrameTextRenderArea").getArea().getPixelRect(*window);
+    }
+
+    /**
+    @brief
+        Helper method to adjust the height of an input Window (of type StaticText) to the text it holds.
+    @param window
+        The  CEGUI Window (of type StaticText) for which the height is to be adjusted to the text.
+    @return
+        Returns the set height.
+    */
+    /*static*/ int QuestGUINode::setHeight(CEGUI::Window* window)
+    {
+        //! Get the area the text is formatted and drawn into.
+        const CEGUI::Rect formattedArea = getStaticTextArea(window);
+
+        //! Calculate the pixel height of the frame by subtracting the height of the area above from the total height of the window.
+        const float frameHeight = window->getUnclippedPixelRect().getHeight() - formattedArea.getHeight();
+
+        //! Get the formatted line count - using the formatting area obtained above.
+        const float lines = window->getFont()->getFormattedLineCount(window->getText(), formattedArea, CEGUI::WordWrapLeftAligned);
+
+        //! Calculate pixel height of window, which is the number of formatted lines multiplied by the spacing of the font, plus the pixel height of the frame.
+        const float height = lines * window->getFont()->getLineSpacing() + frameHeight;
+
+        //! Set the height to the window.
+        window->setHeight(CEGUI::UDim(0, height));
+        
+        //Debug
+        const CEGUI::Rect newArea = getStaticTextArea(window);
+
+        return static_cast<int>(height);
+    }
+
+    /**
+    @brief
+        Update the position list item.
+    */
+    void QuestGUINode::updatePosition(void)
+    {
+        this->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, QuestGUINode::INDENT_WIDTH*this->depth_),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT*this->index_)));
+        this->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1, -QuestGUINode::INDENT_WIDTH*this->depth_-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT)));
+    }
+
+    /**
+    @brief
+        Helper method to create the CEGUI Window the node.
+    */
+    void QuestGUINode::createWindow(void)
+    {
+        Quest* quest = dynamic_cast<Quest*>(this->item_);
+        
+        this->window_ = this->gui_->getWindow();
+        std::ostringstream stream;
+        stream << "QuestGUI/Quests/";
+        if(quest == NULL)
+        {
+            stream << this->parent_->index_ << "/Hints/";
+        }
+        stream << this->index_;
+        
+        this->window_->rename(stream.str());
+        this->window_->setText(this->item_->getDescription()->getTitle());
+
+        this->parent_->subNodes_.push_back(this);
+
+        if(dynamic_cast<Quest*>(this->item_) != NULL)
+        {
+            this->gui_->getRootWindow()->addChildWindow(this->window_);
+            this->updatePosition();
+        }
+        else
+        {
+            this->window_->setDestroyedByParent(false);
+        }
+
+        this->window_->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&QuestGUINode::openDetails, this));
+    }
+
+}
+
Index: code/trunk/src/modules/questsystem/QuestGUINode.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestGUINode.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestGUINode.h	(revision 5781)
@@ -0,0 +1,98 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _QuestGUINode_H__
+#define _QuestGUINode_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <list>
+#include <string>
+#include <CEGUIForwardRefs.h>
+#include "core/OrxonoxClass.h"
+
+
+namespace orxonox {
+
+    class _QuestsystemExport QuestGUINode : public OrxonoxClass
+    {
+
+        public:
+    
+            QuestGUINode(void);
+            QuestGUINode(QuestGUI* gui, QuestGUINode* parent, QuestItem* item, int depth, int index);
+            virtual ~QuestGUINode(void);
+    
+            void toggleVisibility(void);
+
+            void getName(std::string & buffer); //!< Sets the input buffer to the name of the node.
+            /**
+            @brief Retreive the window of this node.
+            @return The CEGUI Window of this node. 
+            */
+            inline CEGUI::Window* getWindow(void)
+                { return this->window_; }
+
+            bool openDetails(const CEGUI::EventArgs& e); //!< Opens the details window for the Quest/QuestHint clicked on.
+            bool closeDetails(const CEGUI::EventArgs& e); //!< Close the details window.
+
+        private:
+            CEGUI::Window* getDetails(void); //!< Creates the details window.
+
+            void initialize(void); //!< Initialize the object.
+            void updatePosition(void); //!< Update the position list item.
+            void createWindow(void); //!< Helper method to create the CEGUI Window the node.
+            static CEGUI::Rect getStaticTextArea(const CEGUI::Window* window); //Helper method for setHeight(). Gets the StaticTextArea for an input CEGUI Window.
+            static int setHeight(CEGUI::Window* window); //Helper method to adjust the height of an input Window (of type StaticText) to the text it holds.
+
+            bool visible_; //!< Boolean determining the visibility of the node.
+
+            QuestGUI* gui_; //!< The QuestGUI this node belongs to.
+            QuestGUINode* parent_; //!< The parent node.
+            std::list<QuestGUINode*> subNodes_; //!< A list of all subnodes.
+            QuestItem* item_; //!< QuestItem belonging to this node.
+
+            int depth_; //!< The depth (resp. indentation) of this node in the list of Quests. (Irrelevant for QuestHints)
+            int index_; //!< The index of this node in the list of Quests, resp. in the list of QuestHints, if the node belongs to a QuestHint, rather than a Quest.
+
+            CEGUI::Window* window_; //!< The list window of this node.
+            CEGUI::Window* details_; //!< The details window of this node.
+
+            //! Some magic numbers
+            static const int TITLE_HEIGHT = 26;
+            static const int BORDER_WIDTH = 5;
+            static const int SCROLLBAR_WIDTH = 13;
+            static const int BUTTON_HEIGHT = 30;
+            static const int INDENT_WIDTH = 20;
+
+    };
+
+}
+
+#endif /* _QuestGUINode_H__ */
+
Index: code/trunk/src/modules/questsystem/QuestHint.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestHint.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestHint.cc	(revision 5781)
@@ -0,0 +1,156 @@
+/*
+ *   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
+    @brief Implementation of the QuestHint class.
+*/
+
+#include "QuestHint.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "QuestManager.h"
+#include "QuestDescription.h"
+#include "Quest.h"
+
+namespace orxonox
+{
+    CreateFactory(QuestHint);
+
+    /**
+    @brief
+        Constructor. Registers the object.
+    */
+    QuestHint::QuestHint(BaseObject* creator) : QuestItem(creator)
+    {
+        RegisterObject(QuestHint);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    QuestHint::~QuestHint()
+    {
+
+    }
+
+    /**
+    @brief
+        Method for creating a QuestHint object through XML.
+    */
+    void QuestHint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(QuestHint, XMLPort, xmlelement, mode);
+
+        QuestManager::getInstance().registerHint(this); //!< Registers the QuestHint with the QuestManager.
+        
+        COUT(3) << "New QuestHint {" << this->getId() << "} created." << std::endl;
+    }
+
+
+    /**
+    @brief
+        Checks whether the QuestHint is active for a specific player.
+    @param player
+        The player.
+    @throws
+        Throws an Argument Exception if the input Player-pointer is NULL.
+    @return
+        Returns true if the QuestHint is active for the specified player.
+    */
+    bool QuestHint::isActive(const PlayerInfo* player) const
+    {
+        if(player == NULL) //!< NULL-Pointers are ugly!
+        {
+            ThrowException(Argument, "The input PlayerInfo* is NULL.");
+            return false;
+        }
+
+        //! Find the player.
+        std::map<const PlayerInfo*, QuestHintStatus::Value>::const_iterator it = this->playerStatus_.find(player);
+        if (it != this->playerStatus_.end()) //!< If the player is in the map.
+        {
+            return it->second;
+        }
+        
+        return QuestStatus::Inactive;
+    }
+
+    /**
+    @brief
+        Activates a QuestHint for a given player.
+    @param player
+        The player.
+    @return
+        Returns true if the activation was successful, false if there were problems.
+    */
+    bool QuestHint::setActive(PlayerInfo* player)
+    {
+        if(this->quest_->isActive(player)) //!< For a hint to get activated the quest must be active.
+        {
+            if(!(this->isActive(player)))  //!< If the hint is already active, activation is pointless.
+            {
+                this->playerStatus_[player] = QuestHintStatus::Active;
+                
+                this->getDescription()->sendAddHintNotification();
+                return true;
+            }
+            else
+            {
+                COUT(2) << "An already active questHint was trying to get activated." << std::endl;
+                return false;
+            }
+        }
+        
+        COUT(2) << "A hint of a non-active quest was trying to get activated." << std::endl;
+        return false;
+    }
+
+    /**
+    @brief
+        Sets the Quest the QuestHint belongs to.
+    @param quest
+        The Quest to be set as Quest the QuestHint is attached to.
+    @return
+        Returns true if successful.
+    */
+    bool QuestHint::setQuest(Quest* quest)
+    {
+        if(quest == NULL) //!< NULL-Pointer. Again..?
+        {
+            COUT(2) << "The input Quest* is NULL." << std::endl;
+            return false;
+        }
+
+        this->quest_ = quest;
+        return true;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/QuestHint.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestHint.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestHint.h	(revision 5781)
@@ -0,0 +1,97 @@
+/*
+ *   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
+    @brief Definition of the QuestHint class.
+*/
+
+#ifndef _QuestHint_H__
+#define _QuestHint_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <map>
+#include "QuestItem.h"
+
+namespace orxonox
+{
+    namespace QuestHintStatus
+    {
+        //! The state of the hint.
+        enum Value
+        {
+            Inactive,
+            Active
+        };
+    }
+
+    /**
+    @brief
+        Represents a hint in the game towards completing a Quest.
+        Consists of title and description (which is stored in a QuestDescription object) in textual form and must belong to a quest.
+        A QuestHint has a defined status (inactive or active, where inactive is default) for each player, which means each a QuestHint exists only once for all players, it doesn't belong to a player, it just has different states for each of them.
+
+        Creating a QuestHint through XML goes as follows:
+
+        <QuestHint id="hintId">  //Where hintId is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information
+            <QuestDesctription title="" description="" />
+        </QuestHint>
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport QuestHint : public QuestItem
+    {
+
+        public:
+            QuestHint(BaseObject* creator);
+            virtual ~QuestHint();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestHint object through XML.
+
+            bool isActive(const PlayerInfo* player) const; //!< Returns true if the QuestHint is active for the input player.
+
+            bool setActive(PlayerInfo* player); //!< Activates the QuestHint for the input player.
+            bool setQuest(Quest* quest); //!< Sets the Quest the QuestHint belongs to.
+
+            /**
+            @brief Returns the Quest the QuestHint is attached to.
+            @return  Returns a pointer to the Quest the QuestHint is attached to.
+            */
+            inline Quest* getQuest(void)
+               { return this->quest_; }
+
+        private:
+            Quest* quest_; //!< The Quest the QuestHint belongs to.
+            std::map<const PlayerInfo*, QuestHintStatus::Value> playerStatus_; //!< List of the states for each player, with the Player-pointer as key.
+
+    };
+
+}
+
+#endif /* _QuestHint_H__ */
Index: code/trunk/src/modules/questsystem/QuestItem.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestItem.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestItem.cc	(revision 5781)
@@ -0,0 +1,105 @@
+/*
+ *   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
+    @brief Implementation of the QuestItem class.
+*/
+
+#include "QuestItem.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "QuestDescription.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
+    QuestItem::QuestItem(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(QuestItem);
+
+        this->id_ = "";
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    QuestItem::~QuestItem()
+    {
+
+    }
+
+    /**
+    @brief
+        Method for creating a QuestItem object through XML.
+    */
+    void QuestItem::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(QuestItem, XMLPort, xmlelement, mode);
+
+        XMLPortParam(QuestItem, "id", setId, getId, xmlelement, mode);
+        XMLPortObject(QuestItem, QuestDescription, "", setDescription, getDescription, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Sets the id of the QuestItem.
+    The id must be of GUID form. See 'http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure' for more information.
+    @param id
+        The id to be set.
+    */
+    void QuestItem::setId(const std::string & id)
+    {
+        if(!isId(id)) //!< Checks whether the id is a valid id.
+        {
+            COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
+            return;
+        }
+        
+        this->id_ = id;
+    }
+
+    /**
+    @brief
+        Checks whether an input id is of the required form.
+    @param id
+        The id to be checked.
+    @return
+        Returns true if the string is likely to be of the required form.
+    */
+    /*static*/ bool QuestItem::isId(const std::string & id)
+    {
+        return id.size() >= 32;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/QuestItem.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestItem.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestItem.h	(revision 5781)
@@ -0,0 +1,96 @@
+/*
+ *   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
+    @brief Definition of the QuestItem class.
+        The QuestItem is the parent class of Quest and QuestHint.
+*/
+
+
+#ifndef _QuestItem_H__
+#define _QuestItem_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <string>
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Functions as a base class for quest classes such as Quest or QuestHint.
+        Has a unique identifier and a description.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport QuestItem : public BaseObject
+    {
+
+        public:
+            QuestItem(BaseObject* creator);
+            virtual ~QuestItem();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestItem object through XML.
+
+            /**
+            @brief Returns the id of this QuestItem.
+            @return Returns the id of the QuestItem.
+            */
+            inline const std::string & getId(void) const
+                { return this->id_; }
+
+            /**
+            @brief Returns the QuestDescription of the QuestItem.
+            @return Returns a pointer to the QuestDescription object of the QuestItem.
+            */
+            inline const QuestDescription* getDescription(void) const
+                { return this->description_; }
+
+            static bool isId(const std::string & id); //!< Checks whether a given id is valid.
+
+        protected:
+            void setId(const std::string & id); //!< Sets the id of the QuestItem.
+
+            /**
+            @brief Sets the description of the QuestItem.
+            @param description The QuestDescription to be set.
+            */
+            inline void setDescription(QuestDescription* description)
+                { this->description_ = description; }
+
+        private:
+            std::string id_; //!< Identifier. Should be of GUID form: http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure
+            QuestDescription* description_; //!< The QuestDescription of the QuestItem.
+
+    };
+
+}
+
+#endif /* _QuestItem_H__ */
Index: code/trunk/src/modules/questsystem/QuestListener.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestListener.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestListener.cc	(revision 5781)
@@ -0,0 +1,212 @@
+/*
+ *   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
+    @brief Implementation of the QuestListener class.
+*/
+
+#include "QuestListener.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "Quest.h"
+#include "QuestManager.h"
+
+namespace orxonox
+{
+    CreateFactory(QuestListener);
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes variables.
+    */
+    QuestListener::QuestListener(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(QuestListener);
+        
+        this->mode_ = QuestListenerMode::All;
+        this->quest_ = NULL;
+    }
+    
+    /**
+    @brief
+        Destructor.
+    */
+    QuestListener::~QuestListener()
+    {
+    }
+    
+    /**
+    @brief
+        Method for creating a Quest object through XML.
+    */
+    void QuestListener::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(QuestListener, XMLPort, xmlelement, mode);
+
+        XMLPortParam(QuestListener, "questId", setQuestId, getQuestId, xmlelement, mode);
+        XMLPortParam(QuestListener, "mode", setMode, getMode, xmlelement, mode);
+
+        this->quest_->addListener(this); //!< Adds the QuestListener to the Quests list of listeners.
+        
+        COUT(3) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getMode() << "'." << std::endl;
+    }
+    
+    /**
+    @brief
+        Makes all QuestListener in the list aware that a certain status change has occurred and executes them if the status change affects them.
+    @param listeners
+        The list of QuestListeners that have to be made aware of the status change.
+    @param status
+        The status that has changed. Can be 'start' (if the Quest was started), 'complete' (if the Quest was completed) or 'fail' (if the Quest was failed).
+    */
+    /* static */ void QuestListener::advertiseStatusChange(std::list<QuestListener*> & listeners, const std::string & status)
+    {
+        for (std::list<QuestListener*>::iterator it = listeners.begin(); it != listeners.end(); ++it) //!< Iterate through all QuestListeners
+        {
+            QuestListener* listener = *it;
+            if(listener->getMode() == status || listener->getMode() == "all") //!< Check whether the status change affects the give QuestListener.
+            {
+                listener->execute();
+            }
+        }
+    }
+    
+    /**
+    @brief
+        Sets the questId of the Quest the QuestListener reacts to.
+    @param id
+        The questId of the Quest the QUestListener reacts to.
+    @return
+        Returns true if successful.
+    */
+    bool QuestListener::setQuestId(const std::string & id)
+    {
+        this->quest_ = QuestManager::getInstance().findQuest(id); //!< Find the Quest corresponding to the given questId.
+        
+        if(this->quest_ == NULL) //!< If there is no such Quest.
+        {
+            ThrowException(Argument, "This is bad! The QuestListener has not found a Quest with a corresponding id..");
+            return false;
+        }
+        
+        return true;
+    }
+    
+    /**
+    @brief
+        Sets the mode of the QuestListener.
+    @param mode
+        The mode to be set. Can be eighter 'all', 'start', 'fail' or 'complete'.
+    @return
+        Returns true if successful.
+    */
+    bool QuestListener::setMode(const std::string & mode)
+    {
+        if(mode == "all")
+        {
+            this->mode_ = QuestListenerMode::All;
+        }
+        else if(mode == "start")
+        {
+            this->mode_ = QuestListenerMode::Start;
+        }
+        else if(mode == "fail")
+        {
+            this->mode_ = QuestListenerMode::Fail;
+        }
+        else if(mode == "complete")
+        {
+            this->mode_ = QuestListenerMode::Complete;
+        }
+        else
+        {
+            COUT(2) << "QuestListener with invalid mode '" << mode << "' created. Mode set to 'all'." << std::endl;
+        this->mode_ = QuestListenerMode::All;
+        return false;
+        }
+        
+        return true;
+    }
+    
+    /**
+    @brief
+        Get the mode of the QuestListener.
+    @return
+        Return the mode of the QuestListener. Can be eighter 'all', 'start', 'fail' or 'complete'.
+    */
+    std::string QuestListener::getMode(void)
+    {
+        if(this->mode_ == QuestListenerMode::All)
+        {
+            return "all";
+        }
+        else if(this->mode_ == QuestListenerMode::Start)
+        {
+            return "start";
+        }
+        else if(this->mode_ == QuestListenerMode::Fail)
+        {
+            return "fail";
+        }
+        else if(this->mode_ == QuestListenerMode::Complete)
+        {
+            return "complete";
+        }
+        else
+        {
+            COUT(1) << "An unforseen, never to happen, Error has occurred. This is impossible!" << std::endl;
+        return "";
+        }
+    }
+
+    /**
+    @brief
+        Get the questId of the Quest the QuestListener reacts to.
+    @return
+        Returns the questId of the Quest the QuestListener reacts to.
+    */
+    const std::string & QuestListener::getQuestId(void)    
+    {
+        return this->quest_->getId();
+    }
+
+    /**
+    @brief
+        Executes the QuestListener, resp. fires an Event.
+    @return
+        Returns true if successful.
+    */
+    bool QuestListener::execute()
+    {
+        this->fireEvent(true);
+        return true;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/QuestListener.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestListener.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestListener.h	(revision 5781)
@@ -0,0 +1,100 @@
+/*
+ *   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
+    @brief Definition of the QuestListener class.
+*/
+
+#ifndef _QuestListener_H__
+#define _QuestListener_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <string>
+#include <list>
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    namespace QuestListenerMode
+    {
+        //! The mode of the QuestListener.
+        enum Value
+        {
+            All,
+            Start,
+            Fail,
+            Complete
+        };
+    }
+
+    /**
+    @brief
+        Provides a way to react to the starting, completing and failing of Quests.
+
+        The XML representation goes as follows:
+        You can use the QuestListener as if it were a Trigger or EventListener, that fires an Event when the status (depending on the set mode) of the given Quest changes.
+
+        <BaseObject> // The object that should react to the status change of a Quest.
+            <events>
+                <function> // Where function is the method of the object that should be executed. Normally this would be visibility or activity.
+                    <QuestListener questId="someQuestId" mode="someMode" /> // Where someQuestId is the identifier for the Quest the QuestListener is reacting to, and someMode is the kind of status change the QUestListener reacts to (all, start, complete or fail).
+                </function>
+            </events>
+        </BaseObject>
+    @author
+    Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport QuestListener : public BaseObject
+    {
+    public:
+        QuestListener(BaseObject* creator);
+        virtual ~QuestListener();
+
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestListener object through XML.
+
+        static void advertiseStatusChange(std::list<QuestListener*> & listeners, const std::string & status); //!< Makes all QuestListener in the list aware that a certain status change has occured.
+
+        bool setQuestId(const std::string & id); //!< Sets the questId of the Quest the QuestListener reacts to.
+        bool setMode(const std::string & mode); //!< Sets the mode of the QuestListener.
+
+        std::string getMode(void); //!< Get the mode of the QuestListener.
+
+        const std::string & getQuestId(void);
+        bool execute(void); //!< Executes the QuestListener, resp. fires an Event.
+
+    private:
+        QuestListenerMode::Value mode_; //!< The mode of the QuestListener.
+        Quest* quest_; //!< A pointer to the Quest the QuestListener is reacting to.
+
+    };
+
+}
+
+#endif /* _QuestListener_H__ */
Index: code/trunk/src/modules/questsystem/QuestManager.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestManager.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestManager.cc	(revision 5781)
@@ -0,0 +1,267 @@
+/*
+ *   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
+    @brief Implementation of the QuestManager class.
+*/
+
+#include "QuestManager.h"
+
+#include <CEGUIWindow.h>
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "core/GUIManager.h"
+#include "core/ConsoleCommand.h"
+#include "core/LuaState.h"
+#include "infos/PlayerInfo.h"
+#include "overlays/GUIOverlay.h"
+
+#include "ToluaBindQuestsystem.h"
+#include "Quest.h"
+#include "QuestHint.h"
+#include "QuestItem.h"
+
+namespace orxonox
+{
+    // Register tolua_open function when loading the library
+    DeclareToluaInterface(Questsystem);
+
+    //! Pointer to the current (and single) instance of this class.
+    /*static*/ QuestManager* QuestManager::singletonPtr_s = NULL;
+
+    /**
+    @brief
+        Constructor. Registers the object.
+    @todo
+        Is inheriting from BaseObject proper?
+    */
+    QuestManager::QuestManager()
+    {
+        RegisterRootObject(QuestManager);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    QuestManager::~QuestManager()
+    {
+        for(std::map<PlayerInfo*, QuestGUI*>::iterator it = this->questGUIs_.begin(); it != this->questGUIs_.end(); it++)
+        {
+            delete (*it).second;
+        }
+        this->questGUIs_.clear();
+    }
+
+    /**
+    @brief
+        Retreive all Quests.
+    @return
+        Returns a map with all Quests indexed by their id's.
+    */
+    std::map<std::string, Quest*> & QuestManager::getQuests(void)
+    {
+        return this->questMap_;
+    }
+
+    /**
+    @brief
+        Registers a Quest with the QuestManager to make it globally accessable.
+        Uses it's id to make sure to be able to be identify and retrieve it later.
+    @param quest
+        The Quest that is to be registered.
+    @return
+        Returns true if successful, false if not.
+    */
+    bool QuestManager::registerQuest(Quest* quest)
+    {
+        if(quest == NULL) //!< Doh! Just as if there were actual quests behind NULL-pointers.
+        {
+            COUT(2) << "Registration of Quest in QuestManager failed, because inserted Quest-pointer was NULL." << std::endl;
+            return false;
+        }
+
+        std::pair<std::map<std::string, Quest*>::iterator,bool> result;
+        result = this->questMap_.insert( std::pair<std::string,Quest*>(quest->getId(),quest) ); //!< Inserting the Quest.
+
+        if(result.second) //!< If inserting was a success.
+        {
+            COUT(3) << "Quest with questId {" << quest->getId() << "} successfully inserted." << std::endl;
+            return true;
+        }
+        else
+        {
+           COUT(2) << "Quest with the same id was already present." << std::endl;
+           return false;
+        }
+    }
+
+    /**
+    @brief
+        Registers a QuestHint with the QuestManager to make it globally accessable.
+        Uses it's id to make sure to be able to be identify and retrieve it later.
+    @param hint
+        The QuestHint to be registered.
+    @return
+        Returns true if successful, false if not.
+    */
+    bool QuestManager::registerHint(QuestHint* hint)
+    {
+        if(hint == NULL) //!< Still not liking NULL-pointers.
+        {
+            COUT(2) << "Registration of QuestHint in QuestManager failed, because inserted QuestHint-pointer was NULL." << std::endl;
+            return false;
+        }
+
+        std::pair<std::map<std::string, QuestHint*>::iterator,bool> result;
+        result = this->hintMap_.insert ( std::pair<std::string,QuestHint*>(hint->getId(),hint) ); //!< Inserting the QuestHSint.
+
+        if(result.second) //!< If inserting was a success.
+        {
+            COUT(3) << "QuestHint with hintId {" << hint->getId() << "} successfully inserted." << std::endl;
+            return true;
+        }
+        else
+        {
+           COUT(2) << "QuestHint with the same id was already present." << std::endl;
+           return false;
+        }
+    }
+
+    /**
+    @brief
+        Finds a Quest with the given id.
+    @param questId
+        The id of the Quest sought for.
+    @return
+        Returns a pointer to the Quest with the input id.
+        Returns NULL if there is no Quest with the given questId.
+    @throws
+        Throws an exception if the given questId is invalid.
+    */
+    Quest* QuestManager::findQuest(const std::string & questId)
+    {
+        if(!QuestItem::isId(questId)) //!< Check vor validity of the given id.
+        {
+            ThrowException(Argument, "Invalid questId.");
+        }
+
+        Quest* quest;
+        std::map<std::string, Quest*>::iterator it = this->questMap_.find(questId);
+        if (it != this->questMap_.end()) //!< If the Quest is registered.
+        {
+            quest = it->second;
+        }
+        else
+        {
+           quest = NULL;
+           COUT(2) << "The quest with id {" << questId << "} is nowhere to be found." << std::endl;
+        }
+
+        return quest;
+
+    }
+
+    /**
+    @brief
+        Finds a QuestHint with the given id.
+    @param hintId
+        The id of the QuestHint sought for.
+    @return
+        Returns a pointer to the QuestHint with the input id.
+        Returns NULL if there is no QuestHint with the given hintId.
+    @throws
+        Throws an exception if the given hintId is invalid.
+    */
+    QuestHint* QuestManager::findHint(const std::string & hintId)
+    {
+        if(!QuestItem::isId(hintId)) //!< Check vor validity of the given id.
+        {
+            ThrowException(Argument, "Invalid hintId.");
+        }
+
+        QuestHint* hint;
+        std::map<std::string, QuestHint*>::iterator it = this->hintMap_.find(hintId);
+        if (it != this->hintMap_.end()) //!< If the QuestHint is registered.
+        {
+            hint = it->second;
+        }
+        else
+        {
+           hint = NULL;
+           COUT(2) << "The hint with id {" << hintId << "} is nowhere to be found." << std::endl;
+        }
+
+        return hint;
+
+    }
+
+    /**
+    @brief
+        Retreive the main window for the GUI.
+        This is for the use in the lua script tu start the QuestGUI.
+    @param guiName
+        The name of the GUI.
+    @return
+        Returns a CEGUI Window.
+    */
+    CEGUI::Window* QuestManager::getQuestGUI(const std::string & guiName)
+    {
+        PlayerInfo* player = this->retreivePlayer(guiName);
+
+        if(this->questGUIs_.find(player) == this->questGUIs_.end()) //!< Create a new GUI, if there is none, yet.
+            this->questGUIs_[player] = new QuestGUI(player);
+
+        return this->questGUIs_[player]->getGUI();
+    }
+
+    /**
+    @brief
+        Retrieve the player for a certain GUI.
+    @param guiName
+        The name of the GUI the player is retrieved for.
+    @return
+        Returns the player.
+    @todo
+        This very well might be outdated. So: Check if still needed, and update if necessary.
+    */
+    PlayerInfo* QuestManager::retreivePlayer(const std::string & guiName)
+    {
+        PlayerInfo* player = GUIManager::getInstance().getPlayer(guiName);
+        if(player == NULL)
+        {
+            COUT(1) << "Error: GUIOverlay with name '" << guiName << "' has no player." << std::endl;
+            return NULL;
+        }
+
+        return player;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/QuestManager.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestManager.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestManager.h	(revision 5781)
@@ -0,0 +1,101 @@
+/*
+ *   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
+    @brief Definition of the QuestManager class.
+*/
+
+#ifndef _QuestManager_H__
+#define _QuestManager_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+#include <CEGUIForwardRefs.h>
+
+#include <list>
+#include <map>
+#include <string>
+
+#include "util/ScopedSingleton.h"
+#include "core/OrxonoxClass.h"
+
+#include "QuestGUI.h"
+
+// tolua_begin
+namespace orxonox
+{
+
+    typedef ScopedSingleton<QuestManager, ScopeID::GSLevel> ScopedSingletonQuestManagerGSLevel; // workaround for tolua
+
+    /**
+    @brief
+        Is a Singleton and manages Quests, by registering every Quest/QuestHint (through registerX()) and making them globally accessable (through findX()).
+        Quests (and QuestHints) are registered in the QuestManager with their id, and can be accessed in the same way.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport QuestManager : public ScopedSingletonQuestManagerGSLevel, public orxonox::OrxonoxClass
+    {
+// tolua_end
+
+            friend class ScopedSingleton<QuestManager, ScopeID::GSLevel>;
+            friend class QuestGUI;
+
+        public:
+            QuestManager();
+            virtual ~QuestManager();
+
+            //! Returns a reference to the single instance of the Quest Manager.
+            static QuestManager& getInstance() { return ScopedSingleton<QuestManager, ScopeID::GSLevel>::getInstance(); } // tolua_export
+
+            //! Retreive the main window for the GUI. 
+            CEGUI::Window* getQuestGUI(const std::string & guiName); // tolua_export
+
+            bool registerQuest(Quest* quest); //!< Registers a Quest in the QuestManager.
+            bool registerHint(QuestHint* quest); //!< Registers a QuestHint in the QuestManager.
+
+            Quest* findQuest(const std::string & questId); //!< Returns the Quest with the input id.
+            QuestHint* findHint(const std::string & hintId); //!< Returns the QuestHint with the input id.
+
+        protected:
+            std::map<std::string, Quest*> & getQuests(void); //!< Retreive all Quests.
+
+        private:
+            static QuestManager* singletonPtr_s;
+            PlayerInfo* retreivePlayer(const std::string & guiName); //!< Retrieve the player for a certain GUI.
+
+            std::map<std::string, Quest*> questMap_; //!< All Quests registered by their id's.
+            std::map<std::string, QuestHint*> hintMap_; //!< All QuestHints registered by their id's.
+
+            std::map<PlayerInfo*, QuestGUI*> questGUIs_; //!< All GUI's registered by the players.
+
+    }; // tolua_export
+
+} // tolua_export
+
+#endif /* _QuestManager_H__ */
Index: code/trunk/src/modules/questsystem/QuestNotification.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestNotification.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestNotification.cc	(revision 5781)
@@ -0,0 +1,62 @@
+/*
+ *   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 thes
+ *   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 "QuestNotification.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox {
+
+    const std::string QuestNotification::SENDER = "questsystem";
+
+    QuestNotification::QuestNotification(BaseObject* creator) : Notification(creator)
+    {
+        this->initialize();
+    }
+    
+    QuestNotification::QuestNotification(const std::string & message) : Notification(message)
+    {
+        this->initialize();
+    }
+    
+    QuestNotification::~QuestNotification()
+    {
+        
+    }
+
+    bool QuestNotification::send(void)
+    {
+        return this->Notification::send(QuestNotification::SENDER);
+    }
+
+    void QuestNotification::initialize(void)
+    {
+        RegisterObject(QuestNotification);
+    }
+
+
+}
Index: code/trunk/src/modules/questsystem/QuestNotification.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestNotification.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestNotification.h	(revision 5781)
@@ -0,0 +1,63 @@
+/*
+ *   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 thes
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _QuestNotification_H__
+#define _QuestNotification_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <string>
+#include "notifications/Notification.h"
+
+namespace orxonox {
+
+    /**
+    @brief
+
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport QuestNotification : public Notification
+    {
+        public:
+            QuestNotification(BaseObject* creator);
+            QuestNotification(const std::string & message);
+            virtual ~QuestNotification();
+
+            bool send(void);
+
+        private:
+            static const std::string SENDER;
+
+            void initialize(void);
+
+    };
+
+}
+
+#endif /* _QuestNotification_H__ */
Index: code/trunk/src/modules/questsystem/QuestsystemPrecompiledHeaders.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestsystemPrecompiledHeaders.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestsystemPrecompiledHeaders.h	(revision 5781)
@@ -0,0 +1,73 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Compilation of the most often used header files in the quest system module
+@details
+    Updated: 19. September 2009
+    Total Files: 24
+*/
+
+#include "OrxonoxConfig.h"
+
+///////////////////////////////////////////
+/////          Stable Headers         /////
+///////////////////////////////////////////
+
+#include <ctime> // 18
+
+#include <OgreMath.h>        // 16
+#include <OgreVector2.h>     // 16
+#include <OgreVector3.h>     // 16
+#include <OgreVector4.h>     // 16
+#include <OgreQuaternion.h>  // 16
+#include <OgreColourValue.h> // 16
+
+#include <tinyxml/ticpp.h>        // 14
+#include "util/ScopedSingleton.h" // 13
+
+///////////////////////////////////////////
+/////       All Rebuild Headers       /////
+///////////////////////////////////////////
+
+#include "core/BaseObject.h"   // 24
+#include "core/CoreIncludes.h" // 23
+
+///////////////////////////////////////////
+/////      Not so Stable Headers      /////
+///////////////////////////////////////////
+
+#include "core/Executor.h"     // 15
+//#include "core/XMLPort.h"    // 14
+
+
+// Just in case some header included windows.h
+#undef min
+#undef max
Index: code/trunk/src/modules/questsystem/QuestsystemPrereqs.h
===================================================================
--- code/trunk/src/modules/questsystem/QuestsystemPrereqs.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/QuestsystemPrereqs.h	(revision 5781)
@@ -0,0 +1,94 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+  @file
+  @brief Contains all the necessary forward declarations for all classes and structs.
+*/
+
+#ifndef _QuestsystemPrereqs_H__
+#define _QuestsystemPrereqs_H__
+
+#include "OrxonoxConfig.h"
+
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD)
+#  ifdef QUESTSYSTEM_SHARED_BUILD
+#    define _QuestsystemExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _QuestsystemExport
+#    else
+#      define _QuestsystemExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _QuestsystemExport  __attribute__ ((visibility("default")))
+#else
+#  define _QuestsystemExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class AddQuest;
+    class AddQuestHint;
+    class AddReward;
+    class ChangeQuestStatus;
+    class CompleteQuest;
+    class FailQuest;
+    class GlobalQuest;
+    class LocalQuest;
+    class Quest;
+    class QuestDescription;
+    class QuestEffect;
+    class QuestEffectBeacon;
+    class QuestGUINode;
+    class QuestGUI;
+    class QuestHint;
+    class QuestItem;
+    class QuestListener;
+    class QuestManager;
+    class QuestNotification;
+    class Rewardable;
+
+    class Notification;
+    class NotificationListener;
+    class NotificationManager;
+    class NotificationOverlay;
+    class NotificationQueue;
+}
+
+#endif /* _QuestsystemPrereqs_H__ */
Index: code/trunk/src/modules/questsystem/notifications/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/questsystem/notifications/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/questsystem/notifications/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,6 @@
+ADD_SOURCE_FILES(QUESTSYSTEM_SRC_FILES
+  Notification.cc
+  NotificationManager.cc
+  NotificationOverlay.cc
+  NotificationQueue.cc
+)
Index: code/trunk/src/modules/questsystem/notifications/Notification.cc
===================================================================
--- code/trunk/src/modules/questsystem/notifications/Notification.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/notifications/Notification.cc	(revision 5781)
@@ -0,0 +1,130 @@
+/*
+ *   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 thes
+ *   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
+    @brief Implementation of the Notification class.
+*/
+
+#include "Notification.h"
+
+#include "core/CoreIncludes.h"
+#include "NotificationManager.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Default constructor. Initializes the object.
+    */
+    Notification::Notification(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(Notification);
+        this->initialize();
+    }
+    
+    /**
+    @brief
+        Constructor. Creates a Notification with the input message.
+    @param message
+        The message of the Notification.
+    */
+    Notification::Notification(const std::string & message) : BaseObject(NULL)
+    {
+        this->message_ = message;
+    }
+    
+    /**
+    @brief
+        Destructor.
+    */
+    Notification::~Notification()
+    {
+    }
+    
+    /**
+    @brief
+        Registers the object and sets some default values.
+    */
+    void Notification::initialize(void)
+    {
+        this->message_ = "";
+        this->sender_ = NotificationManager::NONE;
+        this->sent_ = false;
+    }
+    
+    /**
+    @brief
+        Sends the Notification to the Notificationmanager, with sender NetificationManager::NONE.
+    @return
+        Returns true if successful.
+    */
+    bool Notification::send(void)
+    {
+        return this->send(NotificationManager::NONE);
+    }
+    
+    /**
+    @brief
+        Sends the Notification to the Notificationmanager, which then in turn distributes it to the different NotificationQueues.
+    @param sender
+        The sender the Notification was sent by. Used by the NotificationManager to distributes the notification to the correct NotificationQueues.
+    @return
+        Returns true if successful.
+    */
+    bool Notification::send(const std::string & sender)
+    {
+        this->sender_ = sender;
+        bool successful = NotificationManager::getInstance().registerNotification(this);
+        if(!successful)
+            return false;
+        this->sent_ = true;
+        
+        COUT(3) << "Notification \"" << this->getMessage() << "\" sent." << std::endl;
+        
+        return true;
+    }
+    
+    /**
+    @brief
+        Sets the message of the notification.
+    @param message
+        The message to be set.
+    @return
+        Returns true if successful.
+    */
+    bool Notification::setMessage(const std::string & message)
+    {
+        if(this->isSent()) //!< The message cannot be changed if the message has already been sent.
+            return false;
+        this->message_ = message;
+        return true;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/notifications/Notification.h
===================================================================
--- code/trunk/src/modules/questsystem/notifications/Notification.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/notifications/Notification.h	(revision 5781)
@@ -0,0 +1,90 @@
+/*
+ *   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
+    @brief Definition of the Notification class.
+*/
+
+#ifndef _Notification_H__
+#define _Notification_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <string>
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        A Notification is a short message used to inform the player about something that just happened. A Notification can be sent from any part of orxonox and is then displayed in the proper NotificationQueue (depending on which senders the specific NotificationQueue accepts).
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport Notification : public BaseObject
+    {
+        public:
+            Notification(BaseObject* creator);
+            Notification(const std::string & message);
+            virtual ~Notification();
+
+            bool send(void); //!< Sends the Notification to the Notificationmanager, with sender NotificationManager::NONE;
+            bool send(const std::string & sender); //!< Sends the Notification to the Notificationmanager.
+
+            /**
+            @brief Checks whether the Notification was sent.
+            @return Returns true if the Notification was sent already.
+            */
+            inline bool isSent(void) const
+                { return this->sent_; }
+            /**
+            @brief Returns the message of the Notification.
+            @return Returns the message of the Notification.
+            */
+            inline const std::string & getMessage(void) const
+                { return this->message_; }
+
+            inline const std::string & getSender(void) const
+                { return this->sender_; }
+
+            bool setMessage(const std::string & message); //!< Sets the message of the notification.
+
+        private:
+            std::string message_; //!< The Notification message.
+            std::string sender_; //!< The sender of the notification.
+            bool sent_; //!< Whether Notification has been sent, if so it cannot be changed.
+
+            void initialize(void);
+
+    };
+
+}
+
+#endif /* _Notification_H__ */
Index: code/trunk/src/modules/questsystem/notifications/NotificationManager.cc
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationManager.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/notifications/NotificationManager.cc	(revision 5781)
@@ -0,0 +1,190 @@
+/*
+ *   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
+    @brief Implementation of the NotificationManager class.
+*/
+
+#include "NotificationManager.h"
+
+#include <set>
+
+#include "core/CoreIncludes.h"
+#include "Notification.h"
+#include "interfaces/NotificationListener.h"
+
+namespace orxonox
+{
+
+    const std::string NotificationManager::ALL = "all";
+    const std::string NotificationManager::NONE = "none";
+
+    NotificationManager* NotificationManager::singletonPtr_s = NULL;
+
+    /**
+    @brief
+        Constructor. Registers the Object.
+    */
+    NotificationManager::NotificationManager()
+    {
+        RegisterRootObject(NotificationManager);
+
+        this->highestIndex_ = 0;
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    NotificationManager::~NotificationManager()
+    {
+    }
+
+    /**
+    @brief
+        Registers a Notification within the NotificationManager and makes sure that the Notification is sent to all the NotificationListeners associated with its sender.
+    @param notification
+        The Notification to be registered.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationManager::registerNotification(Notification* notification)
+    {
+
+        if(notification == NULL) //!< A NULL-Notification cannot be registered.
+            return false;
+
+        std::time_t time = std::time(0); //TODO: Doesn't this expire? //!< Get current time.
+
+        this->allNotificationsList_.insert(std::pair<std::time_t,Notification*>(time,notification));
+
+        if(notification->getSender() == NONE) //!< If the sender has no specific name, then the Notification is only added to the list of all Notifications.
+            return true;
+
+        bool all = false;
+        if(notification->getSender() == ALL) //!< If all are the sender, then the Notifications is added to every NotificationListener.
+            all = true;
+
+        //!< Insert the notification in all listeners that have its sender as target.
+        for(std::map<NotificationListener*,int>::iterator it = this->listenerList_.begin(); it != this->listenerList_.end(); it++) //!< Iterate through all listeners.
+        {
+            std::set<std::string> set = it->first->getTargetsSet();
+            if(all || set.find(notification->getSender()) != set.end() || set.find(ALL) != set.end()) //TODO: Make sure this works.
+            {
+                this->notificationLists_[it->second]->insert(std::pair<std::time_t,Notification*>(time,notification)); //!< Insert the Notification in the Notifications list of the current NotificationListener.
+                it->first->update(notification, time); //!< Update the listener.
+            }
+        }
+
+        COUT(3) << "Notification registered with the NotificationManager." << std::endl;
+
+        return true;
+    }
+
+    /**
+    @brief
+        Registers a NotificationListener within the NotificationManager.
+    @param listener
+        The NotificationListener to be registered.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationManager::registerListener(NotificationListener* listener)
+    {
+        this->highestIndex_ += 1;
+        int index = this->highestIndex_;
+
+        this->listenerList_[listener] = index; //!< Add the NotificationListener to the list of listeners.
+
+        std::set<std::string> set = listener->getTargetsSet(); //TODO: Does this work?
+
+        //! If all senders are the target of the listener, then the list of notification for that specific listener is te same as the list of all Notifications.
+        if(set.find(ALL) != set.end())
+        {
+            this->notificationLists_[index] = &this->allNotificationsList_;
+            COUT(3) << "NotificationListener registered with the NotificationManager." << std::endl;
+            return true;
+        }
+
+        this->notificationLists_[index] = new std::multimap<std::time_t,Notification*>;
+        std::multimap<std::time_t,Notification*> map = *this->notificationLists_[index];
+
+        //! Iterate through all Notifications to determine whether any of them should belong to the newly registered NotificationListener.
+        for(std::multimap<std::time_t,Notification*>::iterator it = this->allNotificationsList_.begin(); it != this->allNotificationsList_.end(); it++)
+        {
+            if(set.find(it->second->getSender()) != set.end()) //!< Checks whether the overlay has the sender of the current notification as target.
+            {
+                map.insert(std::pair<std::time_t,Notification*>(it->first, it->second));
+            }
+        }
+
+        listener->update(); //!< Update the listener.
+
+        COUT(3) << "NotificationListener registered with the NotificationManager." << std::endl;
+
+        return true;
+    }
+
+    /**
+    @brief
+        Fetches the Notifications for a specific NotificationListener in a specified timeframe.
+    @param listener
+        The NotificationListener the Notifications are fetched for.
+    @param map
+        A multimap, in which the notifications are stored.
+    @param timeFrameStart
+        The start time of the timeframe.
+    @param timeFrameEnd
+        The end time of the timeframe.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationManager::getNotifications(NotificationListener* listener, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd)
+    {
+        if(listener == NULL || map == NULL)
+            return false;
+
+        std::multimap<std::time_t,Notification*>* notifications = this->notificationLists_[this->listenerList_[listener]]; //!< The Notifications for the input NotificationListener.
+
+        if(notifications == NULL) //!< Returns NULL, if there are no Notifications.
+            return true;
+
+        std::multimap<std::time_t,Notification*>::iterator it, itLowest, itHighest;
+        itLowest = notifications->lower_bound(timeFrameStart);
+        itHighest = notifications->upper_bound(timeFrameStart);
+
+        for(it = itLowest; it != itHighest; it++) //!< Iterate through the Notifications from the start of the time Frame to the end of it.
+        {
+            map->insert(std::pair<std::time_t,Notification*>(it->first,it->second)); //!< Add the found Notifications to the map.
+        }
+
+        return true;
+    }
+
+}
Index: code/trunk/src/modules/questsystem/notifications/NotificationManager.h
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationManager.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/notifications/NotificationManager.h	(revision 5781)
@@ -0,0 +1,104 @@
+/*
+ *   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
+    @brief Definition of the NotificationManager class.
+*/
+
+#ifndef _NotificationManager_H__
+#define _NotificationManager_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <ctime>
+#include <map>
+#include <string>
+
+#include "util/ScopedSingleton.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        The Singleton NotificationManager functions as a gateway between Notifications and NotificationListeners.
+        It receives, organizes Notifications and the redistributes them to the specific NotificationListeners.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport NotificationManager : public ScopedSingleton<NotificationManager, ScopeID::GSLevel>, public OrxonoxClass
+    {
+            friend class ScopedSingleton<NotificationManager, ScopeID::GSLevel>;
+        public:
+            NotificationManager();
+            virtual ~NotificationManager();
+
+            static const std::string ALL;
+            static const std::string NONE;
+
+            bool registerNotification(Notification* notification); //!< Registers a Notification within the NotificationManager.
+            bool registerListener(NotificationListener* listener); //!< Registers a NotificationListener within the NotificationManager.
+
+            bool getNotifications(NotificationListener* listener, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart, const std::time_t & timeFrameEnd); //!< Returns the Notifications for a specific NotificationListener in a specified timeframe.
+
+            /**
+            @brief Fetches the Notifications for a specific NotificationListener starting at a specified time.
+            @param listener The NotificationListener the Notifications are fetched for.
+            @param map A multimap, in which the notifications are stored.
+            @param timeFrameStart The start time the Notifications are fetched from.
+            @return Returns true if successful.
+            */
+            bool getNotifications(NotificationListener* listener, std::multimap<std::time_t,Notification*>* map, const std::time_t & timeFrameStart)
+                { return this->getNotifications(listener, map, timeFrameStart, std::time(0)); }
+            /**
+            @brief Fetches the Notifications for a specific NotificationListener starting at a specified timespan before now.
+            @param listener The NotificationListener the Notifications are fetched for.
+            @param map A multimap, in which the notifications are stored.
+            @param timeDelay The timespan.
+            @return Returns true if successful.
+            */
+            bool getNotifications(NotificationListener* listener, std::multimap<std::time_t,Notification*>* map, int timeDelay)
+                { return this->getNotifications(listener, map, std::time(0)-timeDelay, std::time(0)); }
+
+        private:
+            static NotificationManager* singletonPtr_s;
+
+            int highestIndex_; //!< This variable holds the highest index (resp. key) in notificationLists_s, to secure that  no key appears twice.
+
+            std::multimap<std::time_t,Notification*> allNotificationsList_; //!< Container where all notifications are stored (together with their respecive timestamps).
+            std::map<NotificationListener*,int> listenerList_; //!< Container where all NotificationListeners are stored with a number as identifier.
+            std::map<int,std::multimap<std::time_t,Notification*>*> notificationLists_; //!< Container where all Notifications, for each identifier (associated with a NotificationListener), are stored.
+
+
+    };
+
+}
+
+#endif /* _NotificationManager_H__ */
Index: code/trunk/src/modules/questsystem/notifications/NotificationOverlay.cc
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationOverlay.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/notifications/NotificationOverlay.cc	(revision 5781)
@@ -0,0 +1,136 @@
+/*
+ *   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
+    @brief Implementation of the NotificationOverlay class.
+*/
+
+#include "NotificationOverlay.h"
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "Notification.h"
+#include "NotificationQueue.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Constructor. Intializes the class.
+    */
+    NotificationOverlay::NotificationOverlay(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(NotificationOverlay);
+        this->initialize();
+    }
+
+    /**
+    @brief
+        Constructor. Initializes the class creates a graphical representation of the input Notification for the input Queue.
+    @param queue
+        A pointer to the queue the NotificatonOverlay belongs to.
+    @param notification
+        A pointer to the Notification represented by this overlay.
+    @throws Argument
+        Throws an Argument-Exception if either no Notification or no NotificationQueue were input.
+    */
+    NotificationOverlay::NotificationOverlay(NotificationQueue* queue, Notification* notification) : OverlayText(NULL)
+    {
+        this->initialize();
+
+        if(notification == NULL || queue == NULL) //!> If either notification or queue are not given an Exception is thrown.
+        {
+            ThrowException(Argument, "There were NULL-Pointer arguments in NotificationOverlay creation.");
+        }
+
+        this->queue_ = queue;
+        this->defineOverlay();
+
+        this->processNotification(notification);
+    }
+
+    /**
+    @brief
+        Initializes and Registers the object.
+    */
+    void NotificationOverlay::initialize(void)
+    {
+        this->queue_ = NULL;
+    }
+
+    /**
+    @brief
+        Set some Overlay-specific values.
+    */
+    void NotificationOverlay::defineOverlay(void)
+    {
+        this->setFont(this->queue_->getFont());
+        this->setTextSize(this->queue_->getFontSize());
+
+        this->setPosition(this->queue_->getPosition());
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    NotificationOverlay::~NotificationOverlay()
+    {
+    }
+
+    /**
+    @brief
+        Processes the input notification, resp. sees to it. that the NotificationOverlay displays the Notification message.
+    @param notification
+        A pointer to the notification that should be processed.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationOverlay::processNotification(Notification* notification)
+    {
+        if(notification == NULL)
+            return false;
+        this->setCaption(clipMessage(notification->getMessage()));
+        this->notification_ = notification;
+        return true;
+    }
+
+    /**
+    @brief
+        Clips the input message so that it meets the requirements for the maximal length of Notifications given by the NotificationQueue.
+    */
+    std::string NotificationOverlay::clipMessage(const std::string & message)
+    {
+        if(message.length() <= static_cast<unsigned int>(this->queue_->getNotificationLength())) //!< If the message is not too long.
+            return message;
+        return message.substr(0, this->queue_->getNotificationLength());
+    }
+
+}
Index: code/trunk/src/modules/questsystem/notifications/NotificationOverlay.h
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationOverlay.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/notifications/NotificationOverlay.h	(revision 5781)
@@ -0,0 +1,83 @@
+/*
+ *   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
+    @brief Definition of the NotificationOverlay class.
+*/
+
+
+#ifndef _NotificationOverlay_H__
+#define _NotificationOverlay_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <string>
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        The NotificationOverlay is used to display single Notifications, then bundled in a NotificationQUeue.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _QuestsystemExport NotificationOverlay : public OverlayText
+    {
+
+        public:
+            NotificationOverlay(BaseObject* creator);
+            NotificationOverlay(NotificationQueue* queue, Notification* notification);
+            virtual ~NotificationOverlay();
+
+            bool processNotification(Notification* notification); //!< Processes the input Notification.
+
+            /**
+            @brief Sets the font size of this overlay's text.
+            @param size The font size.
+            */
+            inline void setFontSize(float size)
+                { this->setTextSize(size); }
+
+        protected:
+            std::string clipMessage(const std::string & message); //!< Clips the input message if too long.
+
+        private:
+            NotificationQueue* queue_; //!< The NotificationQeue this overlay belongs to.
+            Notification* notification_; //!< The Notification this overlay displays.
+
+            void initialize(void); //!< Initializes the object.
+            void defineOverlay(void); //!< Sets some overlay-specific values.
+
+    };
+
+}
+
+#endif /* _NotificationOverlay_H__ */
Index: code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc	(revision 5781)
+++ code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc	(revision 5781)
@@ -0,0 +1,449 @@
+/*
+ *   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
+    @brief Implementation of the NotificationQueue class.
+*/
+
+#include "NotificationQueue.h"
+
+#include <sstream>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "NotificationOverlay.h"
+#include "NotificationManager.h"
+
+namespace orxonox
+{
+
+    CreateFactory(NotificationQueue);
+
+    const std::string NotificationQueue::DEFAULT_FONT = "VeraMono";
+    const Vector2 NotificationQueue::DEFAULT_POSITION = Vector2(0.0,0.0);
+    const float NotificationQueue::DEFAULT_FONT_SIZE  = 0.025f;
+
+    /**
+    @brief
+        Constructor. Creates and initializes the object.
+    */
+    NotificationQueue::NotificationQueue(BaseObject* creator) : OverlayGroup(creator)
+    {
+        RegisterObject(NotificationQueue);
+        this->initialize();
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    NotificationQueue::~NotificationQueue()
+    {
+        this->targets_.clear();
+        this->clear();
+    }
+
+    /**
+    @brief
+        Initializes the object.
+        Registers the object, initializes variables, sets default values and registers the queue with the NotificationManager.
+    */
+    void NotificationQueue::initialize(void)
+    {
+        this->size_ = 0;
+        this->tickTime_ = 0.0;
+
+        NotificationManager::getInstance().registerListener(this);
+    }
+
+    /**
+    @brief
+        Sets the defaults.
+    */
+    void NotificationQueue::setDefaults(void)
+    {
+        this->setMaxSize(DEFAULT_SIZE);
+        this->setNotificationLength(DEFAULT_LENGTH);
+        this->setDisplayTime(DEFAULT_DISPLAY_TIME);
+        this->setPosition(DEFAULT_POSITION);
+
+        this->setTargets(NotificationManager::ALL);
+
+        this->setFontSize(DEFAULT_FONT_SIZE);
+        this->setFont(DEFAULT_FONT);
+    }
+
+    /**
+    @brief
+        Method for creating a NotificationQueue object through XML.
+    */
+    void NotificationQueue::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(NotificationQueue, XMLPort, xmlElement, mode);
+
+        this->setDefaults();
+
+        XMLPortParam(NotificationQueue, "maxSize", setMaxSize, getMaxSize, xmlElement, mode);
+        XMLPortParam(NotificationQueue, "notificationLength", setNotificationLength, getNotificationLength, xmlElement, mode);
+        XMLPortParam(NotificationQueue, "displayTime", setDisplayTime, getDisplayTime, xmlElement, mode);
+        XMLPortParam(NotificationQueue, "targets", setTargets, getTargets, xmlElement, mode);
+        XMLPortParam(NotificationQueue, "font", setFont, getFont, xmlElement, mode);
+        XMLPortParam(NotificationQueue, "fontSize", setFontSize, getFontSize, xmlElement, mode);
+        XMLPortParam(NotificationQueue, "position", setPosition, getPosition, xmlElement, mode);
+
+        COUT(3) << "NotificationQueue created." << std::endl;
+    }
+
+    /**
+    @brief
+        Updates the queue from time to time.
+    @param dt
+        The time interval that has passed since the last tick.
+    */
+    void NotificationQueue::tick(float dt)
+    {
+        this->tickTime_ += dt; //!< Add the time interval that has passed to the time counter.
+        if(this->tickTime_ >= 1.0) //!< If the time counter is greater than 1s all Notifications that have expired are removed, if it is smaller we wait to the next tick.
+        {
+            this->timeLimit_.time = std::time(0)-this->displayTime_; //!< Container containig the current time.
+
+            std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare>::iterator it;
+            it = this->containers_.begin();
+            while(it != this->containers_.upper_bound(&this->timeLimit_)) //!< Iterate through all elements whose creation time is smaller than the current time minus the display time.
+            {
+                this->removeContainer(*it);
+                this->scroll(Vector2(0.0,-(1.1*this->getFontSize())));
+                it = this->containers_.begin(); //TODO: Needed?
+            }
+
+            this->tickTime_ = 0.0; //!< Reset time counter.
+        }
+    }
+
+    /**
+    @brief
+        Updates the NotificationQueue.
+        Updates by clearing the queue and requesting all relevant Notifications from the NotificationManager and inserting the in the queue.
+    */
+    void NotificationQueue::update(void)
+    {
+        this->clear();
+
+        std::multimap<std::time_t,Notification*>* notifications = new std::multimap<std::time_t,Notification*>;
+        if(!NotificationManager::getInstance().getNotifications(this, notifications, this->displayTime_)) //!< Get the Notifications sent in the interval form now to minus the display time.
+        {
+            COUT(1) << "NotificationQueue update failed due to undetermined cause." << std::endl;
+            return;
+        }
+
+        if(notifications->empty())
+            return;
+
+        for(std::multimap<std::time_t,Notification*>::iterator it = notifications->begin(); it != notifications->end(); it++) //!> Add all Notifications.
+        {
+            this->addNotification(it->second, it->first);
+        }
+
+        delete notifications;
+
+        COUT(3) << "NotificationQueue updated." << std::endl;
+    }
+
+    /**
+    @brief
+        Updates the NotificationQueue by adding an new Notification.
+    @param notification
+        Pointer to the Notification.
+    @param time
+        The time the Notification was sent.
+    */
+    void NotificationQueue::update(Notification* notification, const std::time_t & time)
+    {
+        this->addNotification(notification, time);
+
+        std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare>::iterator it;
+        while(this->getSize() > this->getMaxSize())
+        {
+            it = this->containers_.begin();
+            this->removeContainer(*it);
+            this->scroll(Vector2(0.0,-(1.1*this->getFontSize())));
+        }
+
+        COUT(3) << "NotificationQueue updated. A new Notifications has been added." << std::endl;
+    }
+
+    /**
+    @brief
+        Sets the maximum number of displayed Notifications.
+    @param size
+        The size to be set.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationQueue::setMaxSize(int size)
+    {
+        if(size < 0)
+            return false;
+        this->maxSize_ = size;
+        this->update();
+        return true;
+    }
+
+    /**
+    @brief
+        Sets the maximum number of characters a Notification message displayed by this queue is allowed to have.
+    @param length
+        The length to be set.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationQueue::setNotificationLength(int length)
+    {
+        if(length < 0)
+            return false;
+        this->notificationLength_ = length;
+        this->update();
+        return true;
+    }
+
+    /**
+    @brief
+        Sets the maximum number of seconds a Notification is displayed.
+    @param time
+        The number of seconds the Notifications is displayed.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationQueue::setDisplayTime(int time)
+    {
+        if(time < 0)
+            return false;
+        this->displayTime_ = time;
+        this->update();
+        return true;
+    }
+
+    /**
+    @brief
+        Produces all targets concatinated as string, with kommas (',') as seperators.
+    @param string
+        Pointer to a string which will be used by the method to fill with the concatination of the targets.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationQueue::getTargets(std::string* string) const
+    {
+        if(string == NULL)
+        {
+            COUT(4) << "Input string must have memory allocated." << std::endl;
+            return false;
+        }
+        string->clear();
+        bool first = true;
+        for(std::set<std::string>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++) //!< Iterate through the set of targets.
+        {
+            if(!first)
+            {
+                *string += ",";
+            }
+            else
+            {
+                first = false;
+            }
+            *string += *it;
+        }
+
+        return true;
+    }
+
+    /**
+    @brief
+        Sets the targets of the queue.
+        The targets are the senders whose Notifications are displayed in this queue.
+    @param targets
+        Accepts a string of targets, each seperated by commas (','), spaces are ignored.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationQueue::setTargets(const std::string & targets)
+    {
+        this->targets_.clear();
+
+        std::string* pTemp;
+        unsigned int index = 0;
+        while( index < targets.size() ) //!< Go through the string, character by character until the end is reached.
+        {
+            pTemp = new std::string("");
+            while(index < targets.size() && targets[index] != ',' && targets[index] != ' ')
+            {
+                *pTemp += targets[index];
+                index++;
+            }
+            index++;
+            this->targets_.insert(*pTemp);
+        }
+
+        return true;
+    }
+
+    /**
+    @brief
+        Sets the font size.
+    @param size
+        The font size.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationQueue::setFontSize(float size)
+    {
+        if(size <= 0)
+            return false;
+        this->fontSize_ = size;
+        for (std::map<Notification*, NotificationOverlayContainer*>::iterator it = this->overlays_.begin(); it != this->overlays_.end(); it++) //!< Set the font size for each overlay.
+        {
+            it->second->overlay->setFontSize(size);
+        }
+        return true;
+    }
+
+    /**
+    @brief
+        Sets the font.
+    @param font
+        The font.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationQueue::setFont(const std::string & font)
+    {
+        this->font_ = font;
+        for (std::map<Notification*, NotificationOverlayContainer*>::iterator it = this->overlays_.begin(); it != this->overlays_.end(); it++) //!< Set the font for each overlay.
+        {
+            it->second->overlay->setFont(font);
+        }
+        return true;
+    }
+
+    /**
+    @brief
+        Scrolls the NotificationQueue, meaning all NotificationOverlays are moved the input vector.
+    @param pos
+        The vector the NotificationQueue is scrolled.
+    */
+    void NotificationQueue::scroll(const Vector2 pos)
+    {
+        for (std::map<Notification*, NotificationOverlayContainer*>::iterator it = this->overlays_.begin(); it != this->overlays_.end(); ++it) //!< Scroll each overlay.
+        {
+            it->second->overlay->scroll(pos);
+        }
+    }
+
+    /**
+    @brief
+        Aligns all the Notifications to the position of the NotificationQueue.
+    */
+    void NotificationQueue::positionChanged(void)
+    {
+        int counter = 0;
+        for (std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare>::iterator it = this->containers_.begin(); it != this->containers_.end(); it++) //!< Set the position for each overlay.
+        {
+            (*it)->overlay->setPosition(this->getPosition());
+            (*it)->overlay->scroll(Vector2(0.0,(1.1*this->getFontSize())*counter));
+            counter++;
+        }
+    }
+
+    /**
+    @brief
+        Adds a Notification, to the queue.
+        It inserts it into the storage containers, creates an corresponding overlay and a container.
+    @param notification
+        The Notification.
+    @param time
+        The time.
+    */
+    void NotificationQueue::addNotification(Notification* notification, const std::time_t & time)
+    {
+        NotificationOverlayContainer* container = new NotificationOverlayContainer;
+        container->overlay = new NotificationOverlay(this, notification);
+        container->notification = notification;
+        container->time = time;
+        std::string timeString = std::ctime(&time);
+        timeString.erase(timeString.length()-1);
+        std::ostringstream stream;
+        stream << reinterpret_cast<unsigned long>(notification);
+        std::string addressString = stream.str() ;
+        container->name = "NotificationOverlay(" + timeString + ")&" + addressString;
+
+        this->containers_.insert(container);
+        this->overlays_[notification] = container;
+        this->addElement(container->overlay);
+        this->size_= this->size_+1;
+
+        container->overlay->scroll(Vector2(0.0,(1.1*this->getFontSize())*(this->getSize()-1)));
+    }
+
+    /**
+    @brief
+        Removes a container from the queue.
+    @param container
+        A pointer to the container.
+    @return
+        Returns true if successful.
+    */
+    bool NotificationQueue::removeContainer(NotificationOverlayContainer* container)
+    {
+        if(this->size_ == 0) //!< You cannot remove anything if the queue is empty.
+            return false;
+
+        this->removeElement(container->overlay);
+        this->containers_.erase(container);
+        this->overlays_.erase(container->notification);
+        delete container->overlay;
+        delete container;
+        this->size_= this->size_-1;
+
+        return true;
+    }
+
+    /**
+    @brief
+        Clears the queue by removing all containers.
+    */
+    void NotificationQueue::clear(void)
+    {
+        std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare>::iterator it = this->containers_.begin();
+        while(it != this->containers_.end())
+        {
+            this->removeContainer(*it);
+            it = this->containers_.begin(); //TODO: Needed?
+        }
+    }
+
+}
Index: code/trunk/src/modules/questsystem/notifications/NotificationQueue.h
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationQueue.h	(revision 5781)
+++ code/trunk/src/modules/questsystem/notifications/NotificationQueue.h	(revision 5781)
@@ -0,0 +1,210 @@
+/*
+ *   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
+    @brief Definition of the NotificationQueue class.
+*/
+
+#ifndef _NotificationOueue_H__
+#define _NotificationOueue_H__
+
+#include "questsystem/QuestsystemPrereqs.h"
+
+#include <ctime>
+#include <map>
+#include <set>
+#include <string>
+
+#include "util/Math.h"
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayGroup.h"
+#include "interfaces/NotificationListener.h"
+
+namespace orxonox
+{
+
+    //! Container to allow easy handling.
+    struct NotificationOverlayContainer
+    {
+        NotificationOverlay* overlay; //!< Pointer to the NotificationOverlay, everything is about.
+        Notification* notification; //!< The Notification displayed by the overlay.
+        time_t time; //!< The time the Notification was sent and thus first displayed.
+        std::string name; //!< The name of the overlay.
+    };
+
+    //! Struct to allow ordering of NotificationOverlayContainers.
+    struct NotificationOverlayContainerCompare {
+        bool operator() (const NotificationOverlayContainer* const & a, const NotificationOverlayContainer* const & b) const
+            { return a->time < b->time; } //!< Ordered by time.
+    };
+
+    /**
+    @brief
+        Displays Notifications from specific senders.
+        Beware! The NotificationQueue is an OverlayGruop and thus cannot be be a sub-element of an OverlayGroup (at least no for now.)
+
+        Creating a NotificationQueue through XML goes as follows:
+        <NotificationQueue
+            name = "SuperQueue" //Name of your OverlayQueue.
+            maxSize = "5" //The maximum size of Notifications displayed.
+            notificationLength = "64" //The maximum number of characters of a Notification, that are displayed. (Default is 5)
+            displayTime = "30" //The time a Notification is displayed in seconds. (Default is 30)
+            targets = "target1, target2" //The senders this NotificationQueue displays Notifications from. (all, if all Notifications should be displayed.)
+            font = "VeraMono" //The font (Default is VeraMono)
+            fontSize = '0.4' //The font size. (Default is 0.025)
+            position = "0.0, .0.0" //The position of the NotificationQueue. (Default is 0.0,0.0)
+        />
+    @author
+        Damian 'Mozork' Frick
+    */
+
+    class _QuestsystemExport NotificationQueue : public OverlayGroup, public Tickable, public NotificationListener
+    {
+
+        public:
+            NotificationQueue(BaseObject* creator);
+            virtual ~NotificationQueue();
+
+            virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode); //!< Method for creating a NotificationQueue object through XML.
+
+            virtual void tick(float dt); //!< To update from time to time.
+
+            void update(void); //!< Updates the queue.
+            void update(Notification* notification, const std::time_t & time); //!< Adds a Notification to the queue.
+
+            /**
+            @brief Returns the maximum number of Notifications displayed.
+            @return Returns maximum size.
+            */
+            inline int getMaxSize() const
+                { return this->maxSize_; }
+            /**
+            @brief Returns the current number of Notifications displayed.
+            @return Returns the size of the queue.
+            */
+            inline int getSize() const
+                { return this->size_; }
+            /**
+            @brief Returns the maximum length in characters a Notification message is allowed to have.
+            @return Returns the maximum Notification length.
+            */
+            inline int getNotificationLength() const
+                { return this->notificationLength_; }
+            /**
+            @brief Returns the time interval the Notification is displayed.
+            @return Returns the display time.
+            */
+            inline int getDisplayTime() const
+                { return this->displayTime_; }
+            /**
+            @brief Returns the position of the NotificationQueue.
+            @return Returns the position.
+            */
+            inline const Vector2 & getPosition() const
+                { return this->position_; }
+            /**
+            @brief Returns the font size used to display the Notifications.
+            @return  Returns the font size.
+            */
+            inline float getFontSize() const
+                { return this->fontSize_; }
+            /**
+            @brief Returns the font used to display the Notifications.
+            @return Returns the font.
+            */
+            inline const std::string & getFont() const
+                { return this->font_; }
+
+            /**
+            @brief Returns the targets of this queue, reps. the senders which Notifications are displayed in this queue.
+            @return Retuns a set of string holding the different targets.
+            */
+            inline const std::set<std::string> & getTargetsSet()
+                { return this->targets_; }
+            bool getTargets(std::string* string) const; //!< Returns a string consisting of the concatination of the targets.
+
+            /**
+            @brief Sets the position of the NotificationQueue.
+            @param pos The position.
+            */
+            inline void setPosition(Vector2 pos)
+                { this->position_ = pos; this->positionChanged(); }
+
+            void scroll(const Vector2 pos); //!< Scrolls the NotificationQueue, meaning all NotificationOverlays are moved the input vector.
+
+        private:
+            static const int DEFAULT_SIZE = 5; //!< The default maximum number of Notifications displayed.
+            static const int DEFAULT_LENGTH = 64; //!< The default maximum number of Notifications displayed.
+            static const int DEFAULT_DISPLAY_TIME = 30; //!< The default display time.
+            static const float DEFAULT_FONT_SIZE; //!< The default font size.
+
+            static const std::string DEFAULT_FONT; //!< The default font.
+            static const Vector2 DEFAULT_POSITION; //!< the default position.
+
+            int maxSize_; //!< The maximal number of Notifications displayed.
+            int size_; //!< The number of Notifications displayed.
+            int notificationLength_; //!< The maximal number of characters a Notification-message is allowed to have.
+            int displayTime_; //!< The time a Notification is displayed.
+            Vector2 position_; //!< The position of the NotificationQueue.
+
+            std::set<std::string> targets_; //!< The targets the Queue displays Notifications of.
+
+            float fontSize_; //!< The font size.
+            std::string font_; //!< The font.
+
+            std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare> containers_; //!< Multiset, because the ordering is based on, not necessarily unique, timestamps.
+            std::map<Notification*, NotificationOverlayContainer*> overlays_; //!< Mapping notifications to their corresponding overlay containers, for easier association and finding.
+
+            float tickTime_; //!< Helper variable, to not have to check for overlays that have been displayed too long, every tick.
+            NotificationOverlayContainer timeLimit_; //!< Helper object to check against to determine whether Notifications have expired.
+
+            void initialize(void); //!< Initializes the object.
+            void setDefaults(void); //!< Helper method to set the default values.
+
+            bool setMaxSize(int size); //!< Sets the maximum number of displayed Notifications.
+            bool setNotificationLength(int length); //!< Sets the maximum number of characters a Notification message displayed by this queue is allowed to have.
+            bool setDisplayTime(int time); //!< Sets the maximum number of seconds a Notification is displayed.
+
+            bool setTargets(const std::string & targets); //!< Set the targets of this queue.
+
+            bool setFontSize(float size); //!< Set the font size.
+            bool setFont(const std::string & font); //!< Set the font.
+
+            void positionChanged(void); //!< Aligns all the Notifications to the position of the NotificationQueue.
+
+            void addNotification(Notification* notification, const std::time_t & time); //!< Add a notification to the queue.
+            bool removeContainer(NotificationOverlayContainer* container); //!< Remove a container from the queue.
+
+            void clear(void); //!< Clear the queue.
+
+    };
+
+}
+
+#endif /* _NotificationOverlay_H__ */
Index: code/trunk/src/modules/weapons/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/weapons/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/weapons/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,21 @@
+SET_SOURCE_FILES(WEAPONS_SRC_FILES
+  MuzzleFlash.cc
+)
+
+ADD_SUBDIRECTORY(munitions)
+ADD_SUBDIRECTORY(projectiles)
+ADD_SUBDIRECTORY(weaponmodes)
+
+ORXONOX_ADD_LIBRARY(weapons
+  MODULE
+  FIND_HEADER_FILES
+  PCH_FILE
+    WeaponsPrecompiledHeaders.h
+  DEFINE_SYMBOL
+    "WEAPONS_SHARED_BUILD"
+  LINK_LIBRARIES
+    orxonox
+    # TODO: Remove this as soon as projectiles aren't hardcoded anymore buth rather defined in XML
+    objects
+  SOURCE_FILES ${WEAPONS_SRC_FILES}
+)
Index: code/trunk/src/modules/weapons/MuzzleFlash.cc
===================================================================
--- code/trunk/src/modules/weapons/MuzzleFlash.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/MuzzleFlash.cc	(revision 5781)
@@ -0,0 +1,53 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      Ich
+ *      Dini Mueter
+ *
+ */
+
+#include "MuzzleFlash.h"
+
+#include "core/CoreIncludes.h"
+#include "core/Executor.h"
+
+namespace orxonox
+{
+    CreateFactory(MuzzleFlash);
+
+    MuzzleFlash::MuzzleFlash(BaseObject* creator) : Billboard(creator)
+    {
+        RegisterObject(MuzzleFlash);
+        this->setScale(0.1f);
+        
+        this->delayTimer_.setTimer(0.1f, false, this, createExecutor(createFunctor(&MuzzleFlash::destroy)));
+
+    }
+
+    void MuzzleFlash::destroy()
+    {
+        delete this;
+    }
+ 
+}
Index: code/trunk/src/modules/weapons/MuzzleFlash.h
===================================================================
--- code/trunk/src/modules/weapons/MuzzleFlash.h	(revision 5781)
+++ code/trunk/src/modules/weapons/MuzzleFlash.h	(revision 5781)
@@ -0,0 +1,54 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _MuzzleFlash_H__
+#define _MuzzleFlash_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "tools/Timer.h"
+#include "graphics/Billboard.h"
+
+namespace orxonox
+{
+    class _WeaponsExport MuzzleFlash : public Billboard
+    {
+        public:
+            MuzzleFlash(BaseObject* creator);
+            virtual ~MuzzleFlash() {}
+
+
+
+        private:
+            void destroy();
+            Timer<MuzzleFlash> delayTimer_;
+
+    };
+}
+
+#endif /* _MuzzleFlash_H__ */
Index: code/trunk/src/modules/weapons/WeaponsPrecompiledHeaders.h
===================================================================
--- code/trunk/src/modules/weapons/WeaponsPrecompiledHeaders.h	(revision 5781)
+++ code/trunk/src/modules/weapons/WeaponsPrecompiledHeaders.h	(revision 5781)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Compilation of the most often used header files in the weapons module
+@details
+    Updated: 13. September 2009
+    Total Files: 13
+*/
+
+#include "OrxonoxConfig.h"
+
+///////////////////////////////////////////
+/////          Stable Headers         /////
+///////////////////////////////////////////
+
+#include <LinearMath/btMotionState.h> // 10
+#include "util/OgreForwardRefs.h"     // 10
+
+///////////////////////////////////////////
+/////       All Rebuild Headers       /////
+///////////////////////////////////////////
+
+#include "core/CoreIncludes.h" // 13
+#include "core/BaseObject.h" // 13
+#include "tools/Timer.h" // 13
+
+///////////////////////////////////////////
+/////      Not so Stable Headers      /////
+///////////////////////////////////////////
+
+#include "network/synchronisable/Synchronisable.h" // 10
+//#include "worldentities/WorldEntity.h"      // 10
+//#include "weapons/projectiles/Projectile.h" // 9
+
+
+// Just in case some header included windows.h
+#undef min
+#undef max
Index: code/trunk/src/modules/weapons/WeaponsPrereqs.h
===================================================================
--- code/trunk/src/modules/weapons/WeaponsPrereqs.h	(revision 5781)
+++ code/trunk/src/modules/weapons/WeaponsPrereqs.h	(revision 5781)
@@ -0,0 +1,84 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+  @file
+  @brief Contains all the necessary forward declarations for all classes and structs.
+*/
+
+#ifndef _WeaponsPrereqs_H__
+#define _WeaponsPrereqs_H__
+
+#include "OrxonoxConfig.h"
+
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_STATIC_BUILD)
+#  ifdef WEAPONS_SHARED_BUILD
+#    define _WeaponsExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _WeaponsExport
+#    else
+#      define _WeaponsExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _WeaponsExport  __attribute__ ((visibility("default")))
+#else
+#  define _WeaponsExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class LaserFire;
+    class FusionFire;
+    class HsW01;
+    class LightningGun;
+    class EnergyDrink;
+
+    class Projectile;
+    class BillboardProjectile;
+    class ParticleProjectile;
+    class LightningGunProjectile;
+
+    class ReplenishingMunition;
+    class LaserMunition;
+    class FusionMunition;
+
+    class MuzzleFlash;
+}
+
+#endif /* _WeaponsPrereqs_H__ */
Index: code/trunk/src/modules/weapons/munitions/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/weapons/munitions/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/weapons/munitions/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,5 @@
+ADD_SOURCE_FILES(WEAPONS_SRC_FILES
+  ReplenishingMunition.cc
+  LaserMunition.cc
+  FusionMunition.cc
+)
Index: code/trunk/src/modules/weapons/munitions/FusionMunition.cc
===================================================================
--- code/trunk/src/modules/weapons/munitions/FusionMunition.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/munitions/FusionMunition.cc	(revision 5781)
@@ -0,0 +1,51 @@
+/*
+ *   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:
+ *      Martin Polak
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "FusionMunition.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(FusionMunition);
+
+    FusionMunition::FusionMunition(BaseObject* creator) : Munition(creator)
+    {
+        RegisterObject(FusionMunition);
+
+        this->maxMunitionPerMagazine_ = 10;
+        this->maxMagazines_ = 10;
+        this->magazines_ = 10;
+
+        this->bUseSeparateMagazines_ = true;
+        this->bStackMunition_ = false;
+        this->reloadTime_ = 1.0f;
+
+        this->bAllowMunitionRefilling_ = true;
+        this->bAllowMultiMunitionRemovementUnderflow_ = true;
+    }
+}
Index: code/trunk/src/modules/weapons/munitions/FusionMunition.h
===================================================================
--- code/trunk/src/modules/weapons/munitions/FusionMunition.h	(revision 5781)
+++ code/trunk/src/modules/weapons/munitions/FusionMunition.h	(revision 5781)
@@ -0,0 +1,45 @@
+/*
+ *   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:
+ *      Martin Polak
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _FusionMunition_H__
+#define _FusionMunition_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+    class _WeaponsExport FusionMunition : public Munition
+    {
+        public:
+            FusionMunition(BaseObject* creator);
+            virtual ~FusionMunition() {}
+    };
+}
+
+#endif /* _FusionMunition_H__ */
Index: code/trunk/src/modules/weapons/munitions/LaserMunition.cc
===================================================================
--- code/trunk/src/modules/weapons/munitions/LaserMunition.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/munitions/LaserMunition.cc	(revision 5781)
@@ -0,0 +1,53 @@
+/*
+ *   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:
+ *      Martin Polak
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "LaserMunition.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(LaserMunition);
+
+    LaserMunition::LaserMunition(BaseObject* creator) : ReplenishingMunition(creator)
+    {
+        RegisterObject(LaserMunition);
+
+        this->maxMunitionPerMagazine_ = 20;
+        this->maxMagazines_ = 1;
+        this->magazines_ = 1;
+
+        this->bUseSeparateMagazines_ = false;
+        this->bStackMunition_ = true;
+
+        this->bAllowMunitionRefilling_ = true;
+        this->bAllowMultiMunitionRemovementUnderflow_ = true;
+
+        this->replenishIntervall_ = 0.5f;
+        this->replenishMunitionAmount_ = 1;
+    }
+}
Index: code/trunk/src/modules/weapons/munitions/LaserMunition.h
===================================================================
--- code/trunk/src/modules/weapons/munitions/LaserMunition.h	(revision 5781)
+++ code/trunk/src/modules/weapons/munitions/LaserMunition.h	(revision 5781)
@@ -0,0 +1,45 @@
+/*
+ *   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:
+ *      Martin Polak
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _LaserMunition_H__
+#define _LaserMunition_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "ReplenishingMunition.h"
+
+namespace orxonox
+{
+    class _WeaponsExport LaserMunition : public ReplenishingMunition
+    {
+        public:
+            LaserMunition(BaseObject* creator);
+            virtual ~LaserMunition() {}
+    };
+}
+
+#endif /* _LaserMunition_H__ */
Index: code/trunk/src/modules/weapons/munitions/ReplenishingMunition.cc
===================================================================
--- code/trunk/src/modules/weapons/munitions/ReplenishingMunition.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/munitions/ReplenishingMunition.cc	(revision 5781)
@@ -0,0 +1,68 @@
+/*
+ *   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 "ReplenishingMunition.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(ReplenishingMunition);
+
+    ReplenishingMunition::ReplenishingMunition(BaseObject* creator) : Munition(creator)
+    {
+        RegisterObject(ReplenishingMunition);
+
+        this->replenishIntervall_ = 1.0f;
+        this->replenishMunitionAmount_ = 1;
+
+        // Use the timer to initialize itself after the first tick (because the real values for
+        // replenishIntervall_ and replenishMunitionAmount_ will be set in the constructor of the
+        // inheriting class, which comes after this constructor)
+        this->replenishingTimer_.setTimer(0.0f, false, this, createExecutor(createFunctor(&ReplenishingMunition::initializeTimer)));
+    }
+
+    void ReplenishingMunition::initializeTimer()
+    {
+        // Initialize the timer
+        this->replenishingTimer_.setTimer(this->replenishIntervall_, true, this, createExecutor(createFunctor(&ReplenishingMunition::replenish)));
+    }
+
+    void ReplenishingMunition::replenish()
+    {
+        // Make a temporary copy of bAllowMunitionRefilling_, because this might be disallowed in every
+        // case except the internal munition replenishing
+        bool temp = this->bAllowMunitionRefilling_;
+        this->bAllowMunitionRefilling_ = true;
+
+        // Replenish munition
+        this->addMunition(this->replenishMunitionAmount_);
+
+        // Write back the temporary value
+        this->bAllowMunitionRefilling_ = temp;
+    }
+}
Index: code/trunk/src/modules/weapons/munitions/ReplenishingMunition.h
===================================================================
--- code/trunk/src/modules/weapons/munitions/ReplenishingMunition.h	(revision 5781)
+++ code/trunk/src/modules/weapons/munitions/ReplenishingMunition.h	(revision 5781)
@@ -0,0 +1,57 @@
+/*
+ *   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 _ReplenishingMunition_H__
+#define _ReplenishingMunition_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "tools/Timer.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+    class _WeaponsExport ReplenishingMunition : public Munition
+    {
+        public:
+            ReplenishingMunition(BaseObject* creator);
+            virtual ~ReplenishingMunition() {}
+
+        protected:
+            float replenishIntervall_;
+            unsigned int replenishMunitionAmount_;
+
+        private:
+            void replenish();
+            void initializeTimer();
+
+            Timer<ReplenishingMunition> replenishingTimer_;
+    };
+}
+
+#endif /* _ReplenishingMunition_H__ */
Index: code/trunk/src/modules/weapons/projectiles/BillboardProjectile.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/BillboardProjectile.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/projectiles/BillboardProjectile.cc	(revision 5781)
@@ -0,0 +1,75 @@
+/*
+ *   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 "BillboardProjectile.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "Scene.h"
+
+namespace orxonox
+{
+    CreateFactory(BillboardProjectile);
+
+    BillboardProjectile::BillboardProjectile(BaseObject* creator) : Projectile(creator)
+    {
+        RegisterObject(BillboardProjectile);
+
+        if (GameMode::showsGraphics())
+        {
+            assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity
+            this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5f, 0.5f, 0.7f, 0.8f), 1);
+            this->attachOgreObject(this->billboard_.getBillboardSet());
+        }
+
+        this->setScale(0.2);
+    }
+
+    BillboardProjectile::~BillboardProjectile()
+    {
+        if (this->isInitialized() && GameMode::showsGraphics() && this->billboard_.getBillboardSet())
+            this->detachOgreObject(this->billboard_.getBillboardSet());
+    }
+
+    void BillboardProjectile::setColour(const ColourValue& colour)
+    {
+        this->billboard_.setColour(colour);
+    }
+
+    void BillboardProjectile::setMaterial(const std::string& material)
+    {
+        this->billboard_.setMaterial(material);
+    }
+
+    void BillboardProjectile::changedVisibility()
+    {
+        SUPER(BillboardProjectile, changedVisibility);
+
+        this->billboard_.setVisible(this->isVisible());
+    }
+}
Index: code/trunk/src/modules/weapons/projectiles/BillboardProjectile.h
===================================================================
--- code/trunk/src/modules/weapons/projectiles/BillboardProjectile.h	(revision 5781)
+++ code/trunk/src/modules/weapons/projectiles/BillboardProjectile.h	(revision 5781)
@@ -0,0 +1,55 @@
+/*
+ *   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 _BillboardProjectile_H__
+#define _BillboardProjectile_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "util/Math.h"
+#include "tools/BillboardSet.h"
+#include "Projectile.h"
+
+namespace orxonox
+{
+    class _WeaponsExport BillboardProjectile : public Projectile
+    {
+        public:
+            BillboardProjectile(BaseObject* creator);
+            virtual ~BillboardProjectile();
+
+            virtual void setColour(const ColourValue& colour);
+            virtual void setMaterial(const std::string& material);
+            virtual void changedVisibility();
+
+        private:
+            BillboardSet billboard_;
+    };
+}
+
+#endif /* _BillboardProjectile_H__ */
Index: code/trunk/src/modules/weapons/projectiles/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/weapons/projectiles/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/weapons/projectiles/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,6 @@
+ADD_SOURCE_FILES(WEAPONS_SRC_FILES
+  BillboardProjectile.cc
+  ParticleProjectile.cc
+  Projectile.cc
+  LightningGunProjectile.cc
+)
Index: code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.cc	(revision 5781)
@@ -0,0 +1,69 @@
+/*
+ *   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:
+ *      Joel Smely
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "LightningGunProjectile.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(LightningGunProjectile);
+
+    LightningGunProjectile::LightningGunProjectile(BaseObject* creator) : BillboardProjectile(creator)
+    {
+        RegisterObject(LightningGunProjectile);
+
+        this->textureIndex_ = 1;
+        this->maxTextureIndex_ = 8;
+        this->textureTimer_.setTimer(0.01f, true, this, createExecutor(createFunctor(&LightningGunProjectile::changeTexture)));
+        
+        registerVariables();
+    }
+    
+    void LightningGunProjectile::registerVariables()
+    {
+        registerVariable(this->materialBase_);
+    }
+    
+    void LightningGunProjectile::setMaterial(const std::string& material)
+    {
+        this->materialBase_ = material;    
+    
+        BillboardProjectile::setMaterial(material + multi_cast<std::string>(this->textureIndex_));
+    }
+
+    void LightningGunProjectile::changeTexture()
+    {
+        this->textureIndex_++;
+        if (this->textureIndex_ > this->maxTextureIndex_)
+            this->textureIndex_ = 1;
+        
+        this->setMaterial(this->materialBase_);
+    }
+}
Index: code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.h
===================================================================
--- code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.h	(revision 5781)
+++ code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.h	(revision 5781)
@@ -0,0 +1,59 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Joel Smely
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _LightningGunProjectile_H__
+#define _LightningGunProjectile_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include <string>
+#include "tools/Timer.h"
+#include "BillboardProjectile.h"
+
+namespace orxonox
+{
+    class _WeaponsExport LightningGunProjectile : public BillboardProjectile
+    {
+        public:
+            LightningGunProjectile(BaseObject* creator);
+            virtual ~LightningGunProjectile() {}
+
+            virtual void setMaterial(const std::string& material);
+
+        protected:
+            void changeTexture();
+            unsigned int textureIndex_;
+            unsigned int maxTextureIndex_;
+            Timer<LightningGunProjectile> textureTimer_;
+            std::string materialBase_;
+      private:
+            void registerVariables();
+    };
+}
+
+#endif /* _LightningGunProjectile_H__ */
Index: code/trunk/src/modules/weapons/projectiles/ParticleProjectile.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/ParticleProjectile.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/projectiles/ParticleProjectile.cc	(revision 5781)
@@ -0,0 +1,72 @@
+/*
+ *   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 "ParticleProjectile.h"
+
+#include <OgreParticleEmitter.h>
+#include "tools/ParticleInterface.h"
+#include "core/CoreIncludes.h"
+#include "Scene.h"
+
+namespace orxonox
+{
+    CreateFactory(ParticleProjectile);
+
+    ParticleProjectile::ParticleProjectile(BaseObject* creator) : BillboardProjectile(creator)
+    {
+        RegisterObject(ParticleProjectile);
+
+        if (GameMode::showsGraphics())
+        {
+            this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot3_small", LODParticle::Normal);
+            this->attachOgreObject(this->particles_->getParticleSystem());
+            this->particles_->setKeepParticlesInLocalSpace(0);
+
+            this->particles_->getAllEmitters()->setDirection(-WorldEntity::FRONT);
+        }
+        else
+            this->particles_ = 0;
+    }
+
+    ParticleProjectile::~ParticleProjectile()
+    {
+        if (this->isInitialized() && this->particles_)
+        {
+            this->detachOgreObject(this->particles_->getParticleSystem());
+            delete this->particles_;
+        }
+    }
+
+    void ParticleProjectile::changedVisibility()
+    {
+        SUPER(ParticleProjectile, changedVisibility);
+
+        if (this->particles_)
+            this->particles_->setEnabled(this->isVisible());
+    }
+}
Index: code/trunk/src/modules/weapons/projectiles/ParticleProjectile.h
===================================================================
--- code/trunk/src/modules/weapons/projectiles/ParticleProjectile.h	(revision 5781)
+++ code/trunk/src/modules/weapons/projectiles/ParticleProjectile.h	(revision 5781)
@@ -0,0 +1,49 @@
+/*
+ *   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 _ParticleProjectile_H__
+#define _ParticleProjectile_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "BillboardProjectile.h"
+
+namespace orxonox
+{
+    class _WeaponsExport ParticleProjectile : public BillboardProjectile
+    {
+        public:
+            ParticleProjectile(BaseObject* creator);
+            virtual ~ParticleProjectile();
+            virtual void changedVisibility();
+
+        private:
+            ParticleInterface* particles_;
+    };
+}
+
+#endif /* _ParticleProjectile_H__ */
Index: code/trunk/src/modules/weapons/projectiles/Projectile.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/Projectile.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/projectiles/Projectile.cc	(revision 5781)
@@ -0,0 +1,140 @@
+/*
+ *   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 "Projectile.h"
+
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "core/Executor.h"
+#include "core/GameMode.h"
+#include "objects/collisionshapes/SphereCollisionShape.h"
+#include "worldentities/pawns/Pawn.h"
+#include "graphics/ParticleSpawner.h"
+
+namespace orxonox
+{
+    CreateFactory(Projectile);
+
+    Projectile::Projectile(BaseObject* creator) : MovableEntity(creator)
+    {
+        RegisterObject(Projectile);
+
+        this->setConfigValues();
+        this->bDestroy_ = false;
+        this->owner_ = 0;
+
+        // Get notification about collisions
+
+        if (GameMode::isMaster())
+        {
+            this->enableCollisionCallback();
+            this->setCollisionResponse(false);
+            this->setCollisionType(Kinematic);
+
+            SphereCollisionShape* shape = new SphereCollisionShape(this);
+            shape->setRadius(20);
+            this->attachCollisionShape(shape);
+
+            this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject)));
+        }
+    }
+
+    Projectile::~Projectile()
+    {
+    }
+
+    void Projectile::setConfigValues()
+    {
+        SetConfigValue(damage_, 15.0).description("The damage caused by the projectile");
+        SetConfigValue(lifetime_, 4.0).description("The time in seconds a projectile stays alive");
+    }
+
+
+    void Projectile::tick(float dt)
+    {
+        SUPER(Projectile, tick, dt);
+
+        if (!this->isActive())
+            return;
+
+        if (this->bDestroy_)
+            delete this;
+    }
+
+    void Projectile::destroyObject()
+    {
+        if (GameMode::isMaster())
+            delete this;
+    }
+
+    bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+    {
+        if (!this->bDestroy_ && GameMode::isMaster())
+        {
+            if (otherObject == this->owner_)
+                return false;
+
+            this->bDestroy_ = true;
+
+            if (this->owner_)
+            {
+                {
+                    ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
+                    effect->setPosition(this->getPosition());
+                    effect->setOrientation(this->getOrientation());
+                    effect->setDestroyAfterLife(true);
+                    effect->setSource("Orxonox/explosion3");
+                    effect->setLifetime(2.0f);
+                }
+                {
+                    ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator());
+                    effect->setPosition(this->getPosition());
+                    effect->setOrientation(this->getOrientation());
+                    effect->setDestroyAfterLife(true);
+                    effect->setSource("Orxonox/smoke4");
+                    effect->setLifetime(3.0f);
+                }
+            }
+
+            float dmg = this->damage_;
+            if (this->owner_)
+                dmg = this->owner_->getPickups().processModifiers(ModifierType::Damage, dmg, false);
+
+            Pawn* victim = orxonox_cast<Pawn*>(otherObject);
+            if (victim)
+                victim->damage(dmg, this->owner_);
+        }
+        return false;
+    }
+
+    void Projectile::destroyedPawn(Pawn* pawn)
+    {
+        if (this->owner_ == pawn)
+            this->owner_ = 0;
+    }
+}
Index: code/trunk/src/modules/weapons/projectiles/Projectile.h
===================================================================
--- code/trunk/src/modules/weapons/projectiles/Projectile.h	(revision 5781)
+++ code/trunk/src/modules/weapons/projectiles/Projectile.h	(revision 5781)
@@ -0,0 +1,72 @@
+/*
+ *   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 _Projectile_H__
+#define _Projectile_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "tools/Timer.h"
+#include "interfaces/PawnListener.h"
+#include "worldentities/MovableEntity.h"
+
+namespace orxonox
+{
+    class _WeaponsExport Projectile : public MovableEntity, public PawnListener
+    {
+        public:
+            Projectile(BaseObject* creator);
+            virtual ~Projectile();
+
+            void setConfigValues();
+            void destroyObject();
+
+            virtual void tick(float dt);
+            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
+            virtual void destroyedPawn(Pawn* pawn);
+
+            inline void setDamage(float damage)
+                { this->damage_ = damage; }
+            inline float getDamage() const
+                { return this->damage_; }
+
+            inline void setOwner(Pawn* owner)
+                { this->owner_ = owner; }
+            inline Pawn* getOwner() const
+                { return this->owner_; }
+
+        private:
+            Pawn* owner_;
+            float lifetime_;
+            float damage_;
+            bool bDestroy_;
+            Timer<Projectile> destroyTimer_;
+    };
+}
+
+#endif /* _Projectile_H__ */
Index: code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 5781)
@@ -0,0 +1,7 @@
+ADD_SOURCE_FILES(WEAPONS_SRC_FILES
+  EnergyDrink.cc
+  FusionFire.cc
+  LaserFire.cc
+  HsW01.cc
+  LightningGun.cc
+)
Index: code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc	(revision 5781)
@@ -0,0 +1,116 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "EnergyDrink.h"
+
+#include "core/CoreIncludes.h"
+#include "core/Executor.h"
+#include "core/XMLPort.h"
+#include "graphics/Model.h"
+
+#include "weapons/projectiles/Projectile.h"
+#include "weapons/MuzzleFlash.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(EnergyDrink);
+
+    EnergyDrink::EnergyDrink(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(EnergyDrink);
+
+        this->reloadTime_ = 0.25;
+        this->damage_ = 15;
+        this->speed_ = 2500;
+        this->delay_ = 0;
+        this->setMunitionName("FusionMunition");
+
+        this->delayTimer_.setTimer(1.0f, false, this, createExecutor(createFunctor(&EnergyDrink::shot)));
+        this->delayTimer_.stopTimer();
+    }
+
+    void EnergyDrink::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(EnergyDrink, XMLPort, xmlelement, mode);
+
+        XMLPortParam(EnergyDrink, "delay", setDelay, getDelay, xmlelement, mode);
+        XMLPortParam(EnergyDrink, "material", setMaterial, getMaterial, xmlelement, mode);
+
+    }
+
+    void EnergyDrink::setMaterial(const std::string& material)
+    {
+        this->material_ = material;
+    }
+
+    void EnergyDrink::setDelay(float d)
+    {
+        this->delay_ = d;
+        this->delayTimer_.setInterval(this->delay_);
+    }
+
+    float EnergyDrink::getDelay() const
+    {
+        return this->delay_;
+    }
+
+    void EnergyDrink::fire()
+    {
+        this->delayTimer_.startTimer();
+    }
+
+    void EnergyDrink::muendungsfeuer()
+    {
+        MuzzleFlash *muzzleFlash = new MuzzleFlash(this);
+        this->getWeapon()->attach(muzzleFlash);
+        muzzleFlash->setPosition(this->getMuzzleOffset());
+        muzzleFlash->setMaterial(this->material_);
+    }
+
+    void EnergyDrink::shot()
+    {
+        Projectile* projectile = new Projectile(this);
+        Model* model = new Model(projectile);
+        model->setMeshSource("can.mesh");
+        model->setCastShadows(false);
+        projectile->attach(model);
+        model->setScale(5);
+
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+
+        EnergyDrink::muendungsfeuer();
+    }
+}
Index: code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.h
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.h	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.h	(revision 5781)
@@ -0,0 +1,65 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _EnergyDrink_H__
+#define _EnergyDrink_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include <string>
+#include "tools/Timer.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsExport EnergyDrink : public WeaponMode
+    {
+        public:
+            EnergyDrink(BaseObject* creator);
+            virtual ~EnergyDrink() {}
+
+            virtual void fire();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+        private:
+            void setMaterial(const std::string& material);
+            inline const std::string& getMaterial()
+                { return this->material_; }
+            void setDelay(float d);
+            float getDelay() const;
+            void shot();
+            void muendungsfeuer();
+
+            std::string material_;
+            float speed_;
+            float delay_;
+            Timer<EnergyDrink> delayTimer_;
+    };
+}
+
+#endif /* _EnergyDrink_H__ */
Index: code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc	(revision 5781)
@@ -0,0 +1,68 @@
+/*
+ *   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:
+ *      Martin Polak
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "FusionFire.h"
+
+#include "util/Math.h"
+#include "core/CoreIncludes.h"
+#include "weapons/projectiles/BillboardProjectile.h"
+
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(FusionFire);
+
+    FusionFire::FusionFire(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(FusionFire);
+
+        this->reloadTime_ = 1.0;
+        this->bParallelReload_ = false;
+        this->damage_ = 40;
+        this->speed_ = 1250;
+
+        this->setMunitionName("FusionMunition");
+    }
+
+    void FusionFire::fire()
+    {
+        BillboardProjectile* projectile = new BillboardProjectile(this);
+
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+        projectile->scale(5);
+
+        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+        projectile->setColour(ColourValue(1.0f, 0.7f, 0.3f, 1.0f));
+    }
+}
Index: code/trunk/src/modules/weapons/weaponmodes/FusionFire.h
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/FusionFire.h	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/FusionFire.h	(revision 5781)
@@ -0,0 +1,50 @@
+/*
+ *   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:
+ *      Martin Polak
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _FusionFire_H__
+#define _FusionFire_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsExport FusionFire : public WeaponMode
+    {
+        public:
+            FusionFire(BaseObject* creator);
+            virtual ~FusionFire() {}
+
+            virtual void fire();
+
+        private:
+            float speed_;
+    };
+}
+
+#endif /* _FusionFire_H__ */
Index: code/trunk/src/modules/weapons/weaponmodes/HsW01.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/HsW01.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/HsW01.cc	(revision 5781)
@@ -0,0 +1,121 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "HsW01.h"
+
+#include "core/CoreIncludes.h"
+#include "core/Executor.h"
+#include "core/XMLPort.h"
+#include "graphics/Model.h"
+
+#include "weapons/projectiles/Projectile.h"
+#include "weapons/MuzzleFlash.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(HsW01);
+
+    HsW01::HsW01(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(HsW01);
+
+        this->reloadTime_ = 0.25;
+        this->damage_ = 15;
+        this->speed_ = 2500;
+        this->delay_ = 0;
+        this->setMunitionName("LaserMunition");
+
+        this->delayTimer_.setTimer(1.0f, false, this, createExecutor(createFunctor(&HsW01::shot)));
+        this->delayTimer_.stopTimer();
+    }
+
+    void HsW01::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(HsW01, XMLPort, xmlelement, mode);
+
+        XMLPortParam(HsW01, "delay", setDelay, getDelay, xmlelement, mode);
+        XMLPortParam(HsW01, "material", setMaterial, getMaterial, xmlelement, mode);
+
+    }
+
+    void HsW01::setMaterial(const std::string& material)
+    {
+        this->material_ = material;
+    }
+
+    std::string& HsW01::getMaterial()
+    {
+        return this->material_;
+    }
+
+    void HsW01::setDelay(float d)
+    {
+        this->delay_ = d;
+        this->delayTimer_.setInterval(this->delay_);
+    }
+
+    float HsW01::getDelay() const
+    {
+        return this->delay_;
+    }
+
+    void HsW01::fire()
+    {
+        this->delayTimer_.startTimer();
+    }
+
+    void HsW01::muendungsfeuer()
+    {
+        MuzzleFlash *muzzleFlash = new MuzzleFlash(this);
+        this->getWeapon()->attach(muzzleFlash);
+        muzzleFlash->setPosition(this->getMuzzleOffset());
+        muzzleFlash->setMaterial(this->material_);
+    }
+
+    void HsW01::shot()
+    {
+        Projectile* projectile = new Projectile(this);
+        Model* model = new Model(projectile);
+        model->setMeshSource("laserbeam.mesh");
+        model->setCastShadows(false);
+        projectile->attach(model);
+        model->setScale(5);
+
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+
+        HsW01::muendungsfeuer();
+    }
+}
Index: code/trunk/src/modules/weapons/weaponmodes/HsW01.h
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/HsW01.h	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/HsW01.h	(revision 5781)
@@ -0,0 +1,63 @@
+/*
+ *   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:
+ *      Hagen Seifert
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HsW01_H__
+#define _HsW01_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "tools/Timer.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsExport HsW01 : public WeaponMode
+    {
+        public:
+            HsW01(BaseObject* creator);
+            virtual ~HsW01() {}
+
+            virtual void fire();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+        private:
+            void setMaterial(const std::string& material);
+            std::string& getMaterial();
+            void setDelay(float d);
+            float getDelay() const;
+            void shot();
+            void muendungsfeuer();
+
+            std::string material_;
+            float speed_;
+            float delay_;
+            Timer<HsW01> delayTimer_;
+    };
+}
+
+#endif /* _HsW01_H__ */
Index: code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc	(revision 5781)
@@ -0,0 +1,63 @@
+/*
+ *   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:
+ *      Martin Polak
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "LaserFire.h"
+
+#include "core/CoreIncludes.h"
+#include "weapons/projectiles/ParticleProjectile.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(LaserFire);
+
+    LaserFire::LaserFire(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(LaserFire);
+
+        this->reloadTime_ = 0.25;
+        this->damage_ = 15;
+        this->speed_ = 1250;
+
+        this->setMunitionName("LaserMunition");
+    }
+
+    void LaserFire::fire()
+    {
+        ParticleProjectile* projectile = new ParticleProjectile(this);
+
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+    }
+}
Index: code/trunk/src/modules/weapons/weaponmodes/LaserFire.h
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/LaserFire.h	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/LaserFire.h	(revision 5781)
@@ -0,0 +1,50 @@
+/*
+ *   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:
+ *      Martin Polak
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _LaserFire_H__
+#define _LaserFire_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsExport LaserFire : public WeaponMode
+    {
+        public:
+            LaserFire(BaseObject* creator);
+            virtual ~LaserFire() {}
+
+            virtual void fire();
+
+        private:
+            float speed_;
+    };
+}
+
+#endif /* _LaserFire_H__ */
Index: code/trunk/src/modules/weapons/weaponmodes/LightningGun.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/LightningGun.cc	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/LightningGun.cc	(revision 5781)
@@ -0,0 +1,69 @@
+/*
+ *   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:
+ *      Joel Smely
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "LightningGun.h"
+
+#include "core/CoreIncludes.h"
+#include "weapons/projectiles/LightningGunProjectile.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+
+namespace orxonox
+{
+    CreateFactory(LightningGun);
+
+    LightningGun::LightningGun(BaseObject* creator) : WeaponMode(creator)
+    {
+        RegisterObject(LightningGun);
+
+        this->reloadTime_ = 1;
+        this->damage_ = 100;
+        this->speed_ = 150;
+
+        this->setMunitionName("LaserMunition");
+    }
+
+    LightningGun::~LightningGun()
+    {
+    }
+
+    void LightningGun::fire()
+    {
+        LightningGunProjectile* projectile = new LightningGunProjectile(this);
+        projectile->setMaterial("Flares/LightningBall_");
+
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+        projectile->setAcceleration(this->getMuzzleDirection() * 1000);
+
+        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+    }
+}
Index: code/trunk/src/modules/weapons/weaponmodes/LightningGun.h
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/LightningGun.h	(revision 5781)
+++ code/trunk/src/modules/weapons/weaponmodes/LightningGun.h	(revision 5781)
@@ -0,0 +1,49 @@
+/*
+ *   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:
+ *      Joel Smely
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _LightningGun_H__
+#define _LightningGun_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+    class _WeaponsExport LightningGun : public WeaponMode
+    {
+        public:
+            LightningGun(BaseObject* creator);
+            virtual ~LightningGun();
+
+            virtual void fire();
+       private:
+            float speed_;
+    };
+}
+
+#endif /* _LightningGun_H__ */
