Index: code/trunk/src/orxonox/AIClass.h
===================================================================
--- code/trunk/src/orxonox/AIClass.h	(revision 790)
+++ code/trunk/src/orxonox/AIClass.h	(revision 790)
@@ -0,0 +1,95 @@
+#ifndef _AIClass_H__
+#define _AIClass_H__
+
+#include "util/Vector3.h"
+
+namespace orxonox
+{
+  class AIPilot
+  {
+
+
+    /*
+    TASKS:                                                                         Requirements:
+
+    - Change actual Speed to required Speed                                          - Speed as Vector3 , spaceship(?) -> pilot attached to it or vice versa (?)
+    - Open fire, if allowed                                                          - Status of the fleet commander -> allowed to fire , fly etc.
+    - differ friend, ally and enemy                                                  - Lists of ships + who controls them
+    - report ship status to fleet commander                                          - Call own ship status -> ammo, damage etc.
+
+
+
+    */
+
+  public:
+    Vector3 speed;
+
+
+
+    //default constructor
+    AIPilot() {
+      speed = (1,0,0);
+    }
+
+    Vector3 steer(Vector3 reqSpeed) {
+      Quaternion sRotation = speed.getRotationTo(reqSpeed);
+      Radian rollarc = sRotation.getRoll();
+      Radian pitcharc = sRotation.getPitch();
+      Radian yawarc = sRotation.getYaw();
+      return Vector3((float)rollarc.valueRadians(), (float)pitcharc.valueRadians(), (float)yawarc.valueRadians());
+    }
+
+
+  };
+
+  class AIFleetCommander : public  AIPilot {
+
+
+    /*
+    TASKS:                                                                       Requirements:
+
+    - Same tasks as AI_Pilot (only if shipcontrol)                                   - Same as AI_Pilot
+    - Calculate required Speed for any ship in Fleet                                 - Knows all calculation functions
+    - Request fleet status and report to commander                                   - Better list of all ships -> more data for fleet ships
+
+
+
+    */
+
+  public:
+
+
+    //default constructor
+    AIFleetCommander() {
+
+    }
+
+
+
+  };
+
+  class AICommander : public  AIFleetCommander
+  {
+
+
+    /*
+    TASKS:                                                                     Requirements:
+
+    - Decide on general tactics                                                      - List of general fleet status + all possible information on enemies
+    - Save and load tactical data (?)                                                - files with tactical data, e.g. success of strategy etc.
+
+
+
+    */
+
+    //default constructor
+    AICommander() {
+
+    }
+
+
+  };
+
+}
+
+#endif /* _AIClass_H__ */
Index: code/trunk/src/orxonox/Arrival.h
===================================================================
--- code/trunk/src/orxonox/Arrival.h	(revision 790)
+++ code/trunk/src/orxonox/Arrival.h	(revision 790)
@@ -0,0 +1,82 @@
+
+// Arrival Class
+
+
+#ifndef _Arrival_H__
+#define _Arrival_H__
+
+#include "util/Math.h"
+
+namespace orxonox
+{
+  class Arrival
+  {
+  public:
+    Vector3 location;           //!< locationvector of the element
+    Vector3 speed;              //!< speedvector of the element
+    Vector3 acceleration;       //!< accelerationvector of the element
+    Vector3 target;             //!< target to arrive
+    int accelerationForwards;   //!< from steering-interface
+    int MaxSpeed;               //!< from steering-interface
+
+
+    Arrival() {
+      acceleration = (0,0,0);
+      speed = (0,0,0);
+      location = (0,0,0);
+      target = (0,0,0);
+    }
+
+    Arrival(Vector3 location_, Vector3 speed_, Vector3 acceleration_, Vector3 target_) {
+      acceleration = acceleration_;
+      speed = speed_;
+      location = location_;
+      target = target_;
+    }
+
+    void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_, Vector3 target_) {
+      acceleration = acceleration_;
+      speed = speed_;
+      location = location_;
+      target = target_;
+    }
+
+    void setTarget(Vector3 target_) {
+      setValues(this->location, this->speed, this->acceleration, target_);
+    }
+
+    Vector3 getDirection() {
+      Vector3 direction = target-location;
+    }
+
+    double relativeDirectApproach() {
+      // Maxspeed / accelerationForwards = time needed to break with max acceleration
+      // 2*getDistance()length/(MaxSpeed/accelerationForwards)^2 = required acceleration to arrive at the target with speed = 0
+      return (accelerationForwards / (2*getDirection().length() / ((MaxSpeed/accelerationForwards)*(MaxSpeed/accelerationForwards))) );
+    }
+
+    void Approach() {
+      Quaternion rotation = Quaternion(0,0,0,0);
+      if (relativeDirectApproach() > 1)
+      {
+        float length = speed.length();
+        speed = (speed+getDirection());
+        speed.normalise();
+        speed = speed*length;
+        if (relativeDirectApproach() > 4)
+        {
+          //accelerate
+        }
+        else
+        {
+          // speed will stay constant
+        }
+      }
+      else {
+      }
+    }
+
+  };
+}
+
+#endif /* _Arrival_H__ */
Index: code/trunk/src/orxonox/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/CMakeLists.txt	(revision 790)
+++ code/trunk/src/orxonox/CMakeLists.txt	(revision 790)
@@ -0,0 +1,46 @@
+SET( ORXONOX_SRC_FILES
+  GraphicsEngine.cc
+  Main.cc
+  Orxonox.cc
+  SpaceshipSteering.cc
+  hud/HUD.cc
+  particle/ParticleInterface.cc
+  tools/BillboardSet.cc
+  tools/Light.cc
+  tools/Mesh.cc
+  objects/Ambient.cc
+  objects/Camera.cc
+  objects/Explosion.cc
+  objects/Fighter.cc
+  objects/Model.cc
+  objects/NPC.cc
+  objects/Projectile.cc
+  objects/Skybox.cc
+  objects/SpaceShip.cc
+# objects/SpaceshipSteeringObject.cc
+# objects/test1.cc
+# objects/test2.cc
+# objects/test3.cc
+  objects/WorldEntity.cc
+  objects/weapon/AmmunitionDump.cc
+  objects/weapon/BarrelGun.cc
+  objects/weapon/BaseWeapon.cc
+  objects/weapon/Bullet.cc
+  objects/weapon/BulletManager.cc
+  objects/weapon/WeaponStation.cc
+)
+
+ADD_EXECUTABLE( orxonox ${ORXONOX_SRC_FILES} )
+
+SET_TARGET_PROPERTIES( orxonox PROPERTIES LINK_FLAGS "--no-undefined" )
+
+TARGET_LINK_LIBRARIES( orxonox
+  ${OGRE_LIBRARIES}
+  ${OIS_LIBRARIES}
+  util
+  core
+  audio
+  network
+  loader
+)
+
Index: code/trunk/src/orxonox/Flocking.h
===================================================================
--- code/trunk/src/orxonox/Flocking.h	(revision 790)
+++ code/trunk/src/orxonox/Flocking.h	(revision 790)
@@ -0,0 +1,140 @@
+
+//Headerfile: Flocking.h
+
+#ifndef _Flocking_H__
+#define _Flocking_H__
+
+#include "util/Math.h"
+
+namespace orxonox
+{
+  class Element // An element that flocks
+  {
+
+  public:
+    Vector3 location;                       //!< locationvector of the element
+    Vector3 speed;                          //!< speedvector of the element
+    Vector3 acceleration;                   //!< accelerationvector of the element
+    bool movable;                                 //!< movability of the element, (false) gives the possiblity that an object can`t be moved by flocking but still gets into the calculation
+    static int const SEPERATIONDISTANCE = 300;    //!< detectionradius of seperation
+    static int const ALIGNMENTDISTANCE = 300;     //!< detectionradius of alignment
+    static int const COHESIONDISTANCE = 5000;     //!< detectionradius of cohesion
+    static int const ANZELEMENTS = 9;             //!< number of elements
+
+    //! default constructor
+    Element() {
+      acceleration = Vector3(0,0,0);
+      speed = Vector3(0,0,0);
+      location = Vector3(0,0,0);
+      movable = true;
+    }
+
+    /** constructor
+    *  @param location_ sets locationvector of the element
+    *  @param speed_ sets speedvector of the element
+    *  @param acceleration_ sets accelerationvector of the element
+    *  @param movable_ sets movability of the element
+    */
+    Element(Vector3 location_, Vector3 speed_, Vector3 acceleration_, bool movable_) {
+      acceleration = acceleration_;
+      speed = speed_;
+      location = location_;
+      movable = movable_;
+    }
+
+    //! function to chance values of an element
+    void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_, bool movable_) {
+      acceleration = acceleration_;
+      speed = speed_;
+      location = location_;
+      movable = movable_;
+    }
+
+    /** calculates the distance between the element and an other point given by temp
+    * @param e remote object to calculate distance to
+    */
+    float getDistance(Element e) {
+      Vector3 distance = e.location - location;
+      return distance.length();
+    }
+
+    //! updates the data of an element
+    void update(Element arrayOfElements[]) {
+      if (this->movable == true) {calculateAcceleration(arrayOfElements);} //if element is movable, calculate acceleration
+    }
+
+    //! calculates the new acceleration of an element
+    void calculateAcceleration(Element arrayOfElements[]) {
+      acceleration = separation(arrayOfElements) + alignment(arrayOfElements) + cohesion(arrayOfElements);  //acceleration consisting of flocking-functions
+    }
+
+    //! separation-function (keep elements separated, avoid crashs)
+    Vector3 separation(Element arrayOfElements[]) {
+      using namespace Ogre;
+      Vector3 steering = Vector3(0,0,0); //steeringvector
+      Vector3 inverseDistance = Vector3(0,0,0);  //vector pointing away from possible collisions
+      int numberOfNeighbour = 0;  //number of observed neighbours
+      float distance = 0;  // distance to the actual element
+      for(int i=0; i<ANZELEMENTS; i++) {  //go through all elements
+        Element actual = arrayOfElements[i];  //get the actual element
+        distance = getDistance(actual);  //get distance between this and actual
+        if ((distance > 0) && (distance < SEPERATIONDISTANCE)) {  //do only if actual is inside detectionradius
+          inverseDistance = (0,0,0);
+          inverseDistance = location-actual.location;  //calculate the distancevector heading towards this
+          //adaptation of the inverseDistance to the distance
+          if ((distance < 200) && (distance >= 120)) {inverseDistance = 2*inverseDistance;}
+          if ((distance < 120) && (distance >= 80)) {inverseDistance = 5*inverseDistance;}
+          if ((distance < 80) && (distance >= 40)) {inverseDistance = 10*inverseDistance;}
+          if ((distance < 40) && (distance > 0)) {inverseDistance = 10*inverseDistance;}
+          steering = steering + inverseDistance;  //add up all significant steeringvectors
+          numberOfNeighbour++;  //counts the elements inside the detectionradius
+        }
+      }
+      if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> separation steeringvector
+      return steering;
+    }
+
+    //! alignment-function (lead elements to the same heading)
+    Vector3 alignment(Element arrayOfElements[]) {
+      using namespace Ogre;
+      Vector3 steering = Vector3(0,0,0); //steeringvector
+      int numberOfNeighbour = 0;  //number of observed neighbours
+      float distance = 0;
+      //go through all elements
+      for(int i=0; i<ANZELEMENTS; i++) {  //just working with 3 elements at the moment
+        Element actual = arrayOfElements[i];  //get the actual element
+        float distance = getDistance(actual);  //get distance between this and actual
+        if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) {  //check if actual element is inside detectionradius
+          steering = steering + actual.speed;  //add up all speedvectors inside the detectionradius
+          numberOfNeighbour++;  //counts the elements inside the detectionradius
+        }
+      }
+      if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> alignment steeringvector
+      return steering;
+    }
+
+    //! cohseion-function (keep elements close to each other)
+    Vector3 cohesion(Element arrayOfElements[]) {
+      using namespace Ogre;
+      Vector3 steering = Vector3(0,0,0); //steeringvector
+      int numberOfNeighbour = 0;  //number of observed neighbours
+      float distance = 0;
+      //go through all elements
+      for(int i=0; i<ANZELEMENTS; i++) {  //just working with 3 elements at the moment
+        Element actual = arrayOfElements[i];  //get the actual element
+        float distance = getDistance(actual);  //get distance between this and actual
+        if ((distance > 0) && (distance < COHESIONDISTANCE)) {  //check if actual element is inside detectionradius
+          steering = steering + actual.location;  //add up all locations of elements inside the detectionradius
+          numberOfNeighbour++;  //counts the elements inside the detectionradius
+        }
+      }
+      if(numberOfNeighbour > 0) {
+        steering = steering  / (float)numberOfNeighbour;  //devide the sum steeringvector by the number of elements -> cohesion steeringvector
+        steering = steering - this->location;  //transform the vector for the ship
+      }
+      return steering;
+    }
+  };     //End of class Element
+}
+
+#endif /* _Flocking_H__*/
Index: code/trunk/src/orxonox/GraphicsEngine.cc
===================================================================
--- code/trunk/src/orxonox/GraphicsEngine.cc	(revision 790)
+++ code/trunk/src/orxonox/GraphicsEngine.cc	(revision 790)
@@ -0,0 +1,134 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 <beni_at_orxonox.net>, (C) 2007
+ *   Co-authors:
+ *      ...
+ *
+ */
+ /**
+    @file orxonox.cc
+    @brief Orxonox class
+  */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreRoot.h>
+#include <OgreConfigFile.h>
+#include <OgreTextureManager.h>
+
+#include "core/Debug.h"
+#include "GraphicsEngine.h"
+
+
+namespace orxonox {
+
+  using namespace Ogre;
+
+  GraphicsEngine::GraphicsEngine()
+  {
+    // set to standard values
+    this->configPath_ = "";
+    this->dataPath_ = "";
+    scene_ = NULL;
+  }
+
+
+  GraphicsEngine::~GraphicsEngine()
+  {
+  }
+
+  void GraphicsEngine::setup()
+  {
+    //TODO: Check if file exists (maybe not here)
+/*#ifndef OGRE_STATIC_LIB
+    root_ = new Root(configPath_ + "plugins.cfg", configPath_ + "ogre.cfg",
+                     configPath_ + "Ogre.log");
+#else
+    root_ = new Root(NULL, configPath_ + "ogre.cfg", configPath_ + "Ogre.log");
+#endif*/
+#if defined(_DEBUG) && defined(WIN32)
+    std::string plugin_filename = "plugins_d.cfg";
+#else
+    std::string plugin_filename = "plugins.cfg";
+#endif
+    root_ = new Root(plugin_filename);
+  }
+
+  /**
+   * @return scene manager
+   */
+  SceneManager* GraphicsEngine::getSceneManager()
+  {
+    if(!scene_)
+    {
+      scene_ = root_->createSceneManager(ST_GENERIC, "Default SceneManager");
+      COUT(3) << "Info: Created SceneMan: " << scene_ << std::endl;
+    }
+    return scene_;
+  }
+
+  bool GraphicsEngine::load()
+  {
+    loadRessourceLocations(this->dataPath_);
+    if (!root_->restoreConfig() && !root_->showConfigDialog())
+      return false;
+    return true;
+  }
+
+  void GraphicsEngine::startRender()
+  {
+    root_->initialise(true, "OrxonoxV2");
+    TextureManager::getSingleton().setDefaultNumMipmaps(5);
+    ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
+  }
+
+  void GraphicsEngine::loadRessourceLocations(std::string dataPath)
+  {
+    //TODO: Specify layout of data file and maybe use xml-loader
+    //TODO: Work with ressource groups (should be generated by a special loader)
+    // Load resource paths from data file using configfile ressource type
+    ConfigFile cf;
+    cf.load(dataPath + "resources.cfg");
+
+    // Go through all sections & settings in the file
+    ConfigFile::SectionIterator seci = cf.getSectionIterator();
+
+    std::string secName, typeName, archName;
+    while (seci.hasMoreElements())
+    {
+      secName = seci.peekNextKey();
+      ConfigFile::SettingsMultiMap *settings = seci.getNext();
+      ConfigFile::SettingsMultiMap::iterator i;
+      for (i = settings->begin(); i != settings->end(); ++i)
+      {
+        typeName = i->first; // for instance "FileSystem" or "Zip"
+        archName = i->second; // name (and location) of archive
+
+        ResourceGroupManager::getSingleton().addResourceLocation(
+                                           std::string(dataPath + archName),
+                                           typeName, secName);
+      }
+    }
+  }
+
+
+}
Index: code/trunk/src/orxonox/GraphicsEngine.h
===================================================================
--- code/trunk/src/orxonox/GraphicsEngine.h	(revision 790)
+++ code/trunk/src/orxonox/GraphicsEngine.h	(revision 790)
@@ -0,0 +1,46 @@
+/**
+  @file GraphicsEngine.h
+  @brief Graphics Engine
+  @author Benjamin Knecht <beni_at_orxonox.net>
+ */
+
+#ifndef _GraphicsEngine_H__
+#define _GraphicsEngine_H__
+
+#include <string>
+
+#include <OgreRoot.h>
+#include <OgreSceneManager.h>
+
+#include "OrxonoxPrereqs.h"
+
+
+namespace orxonox {
+
+/**
+   * graphics engine manager class
+ */
+  class _OrxonoxExport GraphicsEngine {
+    public:
+      GraphicsEngine();
+      inline void setConfigPath(std::string path) { this->configPath_ = path; };
+      // find a better way for this
+      inline Ogre::Root* getRoot() { return root_; };
+      void setup();
+      bool load();
+      void loadRessourceLocations(std::string path);
+      Ogre::SceneManager* getSceneManager();
+      void startRender();
+
+      virtual ~GraphicsEngine();
+    private:
+      Ogre::Root*         root_;        //!< Ogre's root
+      std::string         configPath_;  //!< path to config file
+      std::string         dataPath_;    //!< path to data file
+      Ogre::SceneManager* scene_;       //!< scene manager of the game
+
+  };
+
+}
+
+#endif /* _GraphicsEngine_H__ */
Index: code/trunk/src/orxonox/InputManager.cc
===================================================================
--- code/trunk/src/orxonox/InputManager.cc	(revision 790)
+++ code/trunk/src/orxonox/InputManager.cc	(revision 790)
@@ -0,0 +1,390 @@
+#include "OrxonoxStableHeaders.h"
+
+#include "InputManager.h"
+
+InputManager *InputManager::mInputManager;
+
+InputManager::InputManager( void ) :
+    mMouse( 0 ), mKeyboard( 0 ), mInputSystem( 0 ) {}
+
+InputManager::~InputManager( void ) {
+  if( mInputSystem ) {
+    if( mMouse ) {
+      mInputSystem->destroyInputObject( mMouse );
+      mMouse = 0;
+    }
+
+    if( mKeyboard ) {
+      mInputSystem->destroyInputObject( mKeyboard );
+      mKeyboard = 0;
+    }
+
+    if( mJoysticks.size() > 0 ) {
+      itJoystick    = mJoysticks.begin();
+      itJoystickEnd = mJoysticks.end();
+      for(; itJoystick != itJoystickEnd; ++itJoystick ) {
+        mInputSystem->destroyInputObject( *itJoystick );
+      }
+
+      mJoysticks.clear();
+    }
+
+        // If you use OIS1.0RC1 or above, uncomment this line
+        // and comment the line below it
+    mInputSystem->destroyInputSystem( mInputSystem );
+        //mInputSystem->destroyInputSystem();
+    mInputSystem = 0;
+
+        // Clear Listeners
+    mKeyListeners.clear();
+    mMouseListeners.clear();
+    mJoystickListeners.clear();
+  }
+}
+
+void InputManager::initialise( Ogre::RenderWindow *renderWindow ) {
+  if( !mInputSystem ) {
+        // Setup basic variables
+    OIS::ParamList paramList;
+    size_t windowHnd = 0;
+    std::ostringstream windowHndStr;
+
+        // Get window handle
+    renderWindow->getCustomAttribute( "WINDOW", &windowHnd );
+
+        // Fill parameter list
+    windowHndStr << (unsigned int) windowHnd;
+    paramList.insert( std::make_pair( std::string( "WINDOW" ), windowHndStr.str() ) );
+
+        // Create inputsystem
+    mInputSystem = OIS::InputManager::createInputSystem( paramList );
+
+        // If possible create a buffered keyboard
+        // (note: if below line doesn't compile, try:  if (mInputSystem->getNumberOfDevices(OIS::OISKeyboard) > 0) {
+      if( mInputSystem->numKeyboards() > 0 ) {
+//     if (mInputSystem->getNumberOfDevices(OIS::OISKeyboard) > 0) {
+      mKeyboard = static_cast<OIS::Keyboard*>( mInputSystem->createInputObject( OIS::OISKeyboard, true ) );
+      mKeyboard->setEventCallback( this );
+    }
+
+        // If possible create a buffered mouse
+        // (note: if below line doesn't compile, try:  if (mInputSystem->getNumberOfDevices(OIS::OISMouse) > 0) {
+      if( mInputSystem->numMice() > 0 ) {
+//     if (mInputSystem->getNumberOfDevices(OIS::OISMouse) > 0) {
+      mMouse = static_cast<OIS::Mouse*>( mInputSystem->createInputObject( OIS::OISMouse, true ) );
+      mMouse->setEventCallback( this );
+
+            // Get window size
+      unsigned int width, height, depth;
+      int left, top;
+      renderWindow->getMetrics( width, height, depth, left, top );
+
+            // Set mouse region
+      this->setWindowExtents( width, height );
+    }
+
+        // If possible create all joysticks in buffered mode
+        // (note: if below line doesn't compile, try:  if (mInputSystem->getNumberOfDevices(OIS::OISJoyStick) > 0) {
+    if( mInputSystem->numJoySticks() > 0 ) {
+//     if (mInputSystem->getNumberOfDevices(OIS::OISJoyStick) > 0) {
+       mJoysticks.resize( mInputSystem->numJoySticks() );
+//       mJoysticks.resize( mInputSystem->getNumberOfDevices(OIS::OISJoyStick) );
+
+      itJoystick    = mJoysticks.begin();
+      itJoystickEnd = mJoysticks.end();
+      for(; itJoystick != itJoystickEnd; ++itJoystick ) {
+        (*itJoystick) = static_cast<OIS::JoyStick*>( mInputSystem->createInputObject( OIS::OISJoyStick, true ) );
+        (*itJoystick)->setEventCallback( this );
+      }
+    }
+  }
+}
+
+void InputManager::capture( void ) {
+    // Need to capture / update each device every frame
+  if( mMouse ) {
+    mMouse->capture();
+  }
+
+  if( mKeyboard ) {
+    mKeyboard->capture();
+  }
+
+  if( mJoysticks.size() > 0 ) {
+    itJoystick    = mJoysticks.begin();
+    itJoystickEnd = mJoysticks.end();
+    for(; itJoystick != itJoystickEnd; ++itJoystick ) {
+      (*itJoystick)->capture();
+    }
+  }
+}
+
+void InputManager::addKeyListener( OIS::KeyListener *keyListener, const std::string& instanceName ) {
+  if( mKeyboard ) {
+        // Check for duplicate items
+    itKeyListener = mKeyListeners.find( instanceName );
+    if( itKeyListener == mKeyListeners.end() ) {
+      mKeyListeners[ instanceName ] = keyListener;
+    }
+    else {
+            // Duplicate Item
+    }
+  }
+}
+
+void InputManager::addMouseListener( OIS::MouseListener *mouseListener, const std::string& instanceName ) {
+  if( mMouse ) {
+        // Check for duplicate items
+    itMouseListener = mMouseListeners.find( instanceName );
+    if( itMouseListener == mMouseListeners.end() ) {
+      mMouseListeners[ instanceName ] = mouseListener;
+    }
+    else {
+            // Duplicate Item
+    }
+  }
+}
+
+void InputManager::addJoystickListener( OIS::JoyStickListener *joystickListener, const std::string& instanceName ) {
+  if( mJoysticks.size() > 0 ) {
+        // Check for duplicate items
+    itJoystickListener = mJoystickListeners.find( instanceName );
+    if( itJoystickListener == mJoystickListeners.end() ) {
+      mJoystickListeners[ instanceName ] = joystickListener;
+    }
+    else {
+            // Duplicate Item
+    }
+  }
+}
+
+void InputManager::removeKeyListener( const std::string& instanceName ) {
+    // Check if item exists
+  itKeyListener = mKeyListeners.find( instanceName );
+  if( itKeyListener != mKeyListeners.end() ) {
+    mKeyListeners.erase( itKeyListener );
+  }
+  else {
+        // Doesn't Exist
+  }
+}
+
+void InputManager::removeMouseListener( const std::string& instanceName ) {
+    // Check if item exists
+  itMouseListener = mMouseListeners.find( instanceName );
+  if( itMouseListener != mMouseListeners.end() ) {
+    mMouseListeners.erase( itMouseListener );
+  }
+  else {
+        // Doesn't Exist
+  }
+}
+
+void InputManager::removeJoystickListener( const std::string& instanceName ) {
+    // Check if item exists
+  itJoystickListener = mJoystickListeners.find( instanceName );
+  if( itJoystickListener != mJoystickListeners.end() ) {
+    mJoystickListeners.erase( itJoystickListener );
+  }
+  else {
+        // Doesn't Exist
+  }
+}
+
+void InputManager::removeKeyListener( OIS::KeyListener *keyListener ) {
+  itKeyListener    = mKeyListeners.begin();
+  itKeyListenerEnd = mKeyListeners.end();
+  for(; itKeyListener != itKeyListenerEnd; ++itKeyListener ) {
+    if( itKeyListener->second == keyListener ) {
+      mKeyListeners.erase( itKeyListener );
+      break;
+    }
+  }
+}
+
+void InputManager::removeMouseListener( OIS::MouseListener *mouseListener ) {
+  itMouseListener    = mMouseListeners.begin();
+  itMouseListenerEnd = mMouseListeners.end();
+  for(; itMouseListener != itMouseListenerEnd; ++itMouseListener ) {
+    if( itMouseListener->second == mouseListener ) {
+      mMouseListeners.erase( itMouseListener );
+      break;
+    }
+  }
+}
+
+void InputManager::removeJoystickListener( OIS::JoyStickListener *joystickListener ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if( itJoystickListener->second == joystickListener ) {
+      mJoystickListeners.erase( itJoystickListener );
+      break;
+    }
+  }
+}
+
+void InputManager::removeAllListeners( void ) {
+  mKeyListeners.clear();
+  mMouseListeners.clear();
+  mJoystickListeners.clear();
+}
+
+void InputManager::removeAllKeyListeners( void ) {
+  mKeyListeners.clear();
+}
+
+void InputManager::removeAllMouseListeners( void ) {
+  mMouseListeners.clear();
+}
+
+void InputManager::removeAllJoystickListeners( void ) {
+  mJoystickListeners.clear();
+}
+
+void InputManager::setWindowExtents( int width, int height ) {
+    // Set mouse region (if window resizes, we should alter this to reflect as well)
+  const OIS::MouseState &mouseState = mMouse->getMouseState();
+  mouseState.width  = width;
+  mouseState.height = height;
+}
+
+OIS::Mouse* InputManager::getMouse( void ) {
+  return mMouse;
+}
+
+OIS::Keyboard* InputManager::getKeyboard( void ) {
+  return mKeyboard;
+}
+
+OIS::JoyStick* InputManager::getJoystick( unsigned int index ) {
+    // Make sure it's a valid index
+  if( index < mJoysticks.size() ) {
+    return mJoysticks[ index ];
+  }
+
+  return 0;
+}
+
+int InputManager::getNumOfJoysticks( void ) {
+    // Cast to keep compiler happy ^^
+  return (int) mJoysticks.size();
+}
+
+bool InputManager::keyPressed( const OIS::KeyEvent &e ) {
+  itKeyListener    = mKeyListeners.begin();
+  itKeyListenerEnd = mKeyListeners.end();
+  for(; itKeyListener != itKeyListenerEnd; ++itKeyListener ) {
+    if(!itKeyListener->second->keyPressed( e ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::keyReleased( const OIS::KeyEvent &e ) {
+  itKeyListener    = mKeyListeners.begin();
+  itKeyListenerEnd = mKeyListeners.end();
+  for(; itKeyListener != itKeyListenerEnd; ++itKeyListener ) {
+    if(!itKeyListener->second->keyReleased( e ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::mouseMoved( const OIS::MouseEvent &e ) {
+  itMouseListener    = mMouseListeners.begin();
+  itMouseListenerEnd = mMouseListeners.end();
+  for(; itMouseListener != itMouseListenerEnd; ++itMouseListener ) {
+    if(!itMouseListener->second->mouseMoved( e ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::mousePressed( const OIS::MouseEvent &e, OIS::MouseButtonID id ) {
+  itMouseListener    = mMouseListeners.begin();
+  itMouseListenerEnd = mMouseListeners.end();
+  for(; itMouseListener != itMouseListenerEnd; ++itMouseListener ) {
+    if(!itMouseListener->second->mousePressed( e, id ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::mouseReleased( const OIS::MouseEvent &e, OIS::MouseButtonID id ) {
+  itMouseListener    = mMouseListeners.begin();
+  itMouseListenerEnd = mMouseListeners.end();
+  for(; itMouseListener != itMouseListenerEnd; ++itMouseListener ) {
+    if(!itMouseListener->second->mouseReleased( e, id ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::povMoved( const OIS::JoyStickEvent &e, int pov ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if(!itJoystickListener->second->povMoved( e, pov ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::axisMoved( const OIS::JoyStickEvent &e, int axis ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if(!itJoystickListener->second->axisMoved( e, axis ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::sliderMoved( const OIS::JoyStickEvent &e, int sliderID ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if(!itJoystickListener->second->sliderMoved( e, sliderID ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::buttonPressed( const OIS::JoyStickEvent &e, int button ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if(!itJoystickListener->second->buttonPressed( e, button ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::buttonReleased( const OIS::JoyStickEvent &e, int button ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if(!itJoystickListener->second->buttonReleased( e, button ))
+      break;
+  }
+
+  return true;
+}
+
+InputManager* InputManager::getSingletonPtr( void ) {
+  if( !mInputManager ) {
+    mInputManager = new InputManager();
+  }
+
+  return mInputManager;
+}
Index: code/trunk/src/orxonox/InputManager.h
===================================================================
--- code/trunk/src/orxonox/InputManager.h	(revision 790)
+++ code/trunk/src/orxonox/InputManager.h	(revision 790)
@@ -0,0 +1,93 @@
+#ifndef _InputManager_H__
+#define _InputManager_H__
+
+#ifdef WIN32
+#include <OIS/OISMouse.h>
+#include <OIS/OISKeyboard.h>
+#include <OIS/OISJoyStick.h>
+#include <OIS/OISInputManager.h>
+#else
+#include <OISMouse.h>
+#include <OISKeyboard.h>
+#include <OISJoyStick.h>
+#include <OISInputManager.h>
+#endif
+
+#include <OgreRenderWindow.h>
+
+#include "OrxonoxPrereqs.h"
+
+class _OrxonoxExport InputManager : public OIS::KeyListener, public OIS::MouseListener, public OIS::JoyStickListener {
+  public:
+    virtual ~InputManager( void );
+
+    void initialise( Ogre::RenderWindow *renderWindow );
+    void capture( void );
+
+    void addKeyListener( OIS::KeyListener *keyListener, const std::string& instanceName );
+    void addMouseListener( OIS::MouseListener *mouseListener, const std::string& instanceName );
+    void addJoystickListener( OIS::JoyStickListener *joystickListener, const std::string& instanceName );
+
+    void removeKeyListener( const std::string& instanceName );
+    void removeMouseListener( const std::string& instanceName );
+    void removeJoystickListener( const std::string& instanceName );
+
+    void removeKeyListener( OIS::KeyListener *keyListener );
+    void removeMouseListener( OIS::MouseListener *mouseListener );
+    void removeJoystickListener( OIS::JoyStickListener *joystickListener );
+
+    void removeAllListeners( void );
+    void removeAllKeyListeners( void );
+    void removeAllMouseListeners( void );
+    void removeAllJoystickListeners( void );
+
+    void setWindowExtents( int width, int height );
+
+    OIS::Mouse*    getMouse( void );
+    OIS::Keyboard* getKeyboard( void );
+    OIS::JoyStick* getJoystick( unsigned int index );
+
+    int getNumOfJoysticks( void );
+
+    static InputManager* getSingletonPtr( void );
+  private:
+    InputManager( void );
+    InputManager( const InputManager& ) { }
+    InputManager & operator = ( const InputManager& );
+
+    bool keyPressed( const OIS::KeyEvent &e );
+    bool keyReleased( const OIS::KeyEvent &e );
+
+    bool mouseMoved( const OIS::MouseEvent &e );
+    bool mousePressed( const OIS::MouseEvent &e, OIS::MouseButtonID id );
+    bool mouseReleased( const OIS::MouseEvent &e, OIS::MouseButtonID id );
+
+    bool povMoved( const OIS::JoyStickEvent &e, int pov );
+    bool axisMoved( const OIS::JoyStickEvent &e, int axis );
+    bool sliderMoved( const OIS::JoyStickEvent &e, int sliderID );
+    bool buttonPressed( const OIS::JoyStickEvent &e, int button );
+    bool buttonReleased( const OIS::JoyStickEvent &e, int button );
+
+    OIS::Mouse        *mMouse;
+    OIS::Keyboard     *mKeyboard;
+    OIS::InputManager *mInputSystem;
+
+    std::vector<OIS::JoyStick*> mJoysticks;
+    std::vector<OIS::JoyStick*>::iterator itJoystick;
+    std::vector<OIS::JoyStick*>::iterator itJoystickEnd;
+
+    std::map<std::string, OIS::KeyListener*> mKeyListeners;
+    std::map<std::string, OIS::MouseListener*> mMouseListeners;
+    std::map<std::string, OIS::JoyStickListener*> mJoystickListeners;
+
+    std::map<std::string, OIS::KeyListener*>::iterator itKeyListener;
+    std::map<std::string, OIS::MouseListener*>::iterator itMouseListener;
+    std::map<std::string, OIS::JoyStickListener*>::iterator itJoystickListener;
+
+    std::map<std::string, OIS::KeyListener*>::iterator itKeyListenerEnd;
+    std::map<std::string, OIS::MouseListener*>::iterator itMouseListenerEnd;
+    std::map<std::string, OIS::JoyStickListener*>::iterator itJoystickListenerEnd;
+
+    static InputManager *mInputManager;
+};
+#endif /* _InputManager_H__ */
Index: code/trunk/src/orxonox/Main.cc
===================================================================
--- code/trunk/src/orxonox/Main.cc	(revision 790)
+++ code/trunk/src/orxonox/Main.cc	(revision 790)
@@ -0,0 +1,209 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 <beni_at_orxonox.net>, (C) 2007
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+ /**
+ @file  Main.cc
+ @brief main file handling most of the machine specific code
+  */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgrePlatform.h>
+#include <OgreException.h>
+
+
+#include "core/SignalHandler.h"
+#include "Orxonox.h"
+
+using namespace orxonox;
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+#include <CoreFoundation/CoreFoundation.h>
+
+// This function will locate the path to our application on OS X,
+// unlike windows you can not rely on the curent working directory
+// for locating your configuration files and resources.
+             std::string macBundlePath()
+{
+  char path[1024];
+  CFBundleRef mainBundle = CFBundleGetMainBundle();
+  assert(mainBundle);
+
+  CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
+  assert(mainBundleURL);
+
+  CFStringRef cfStringRef = CFURLCopyFileSystemPath( mainBundleURL, kCFURLPOSIXPathStyle);
+  assert(cfStringRef);
+
+  CFStringGetCString(cfStringRef, path, 1024, kCFStringEncodingASCII);
+
+  CFRelease(mainBundleURL);
+  CFRelease(cfStringRef);
+
+  return std::string(path);
+}
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined( __MINGW32__ )
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include "windows.h"
+  INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
+  {
+    // something like this would be less hacky
+    // maybe one can work with trailing '\0'
+    // or maybe use string based functions
+    // I was unable to test it without working windows version
+    char* cmd = strCmdLine;
+    int argc = 2;
+    int i;
+    int j;
+    for(i = 0; cmd[i] != NULL; i++)
+    {
+      if(cmd[i] == ' ') argc++;
+    }
+    char **argv = new char*[argc];
+    for (j = 0; j < argc; j++)
+    {
+      argv[j] = new char[i];
+    }
+    j = 1;
+    int k = 0;
+    for(int i = 0; cmd[i] != NULL; i++)
+    {
+      if(cmd[i] != ' ') {
+        argv[j][k] = cmd[i];
+        k++;
+      }
+      else {
+        argv[j][k] = '\0';
+        k = 0;
+        j++;
+      }
+    }
+    argv[j][k] = '\0';
+    argv[0] = "BeniXonox.exe";
+    //char *argv[2];
+    //argv[0] = "asdfProgram";
+    //argv[1] =  strCmdLine;
+    //int argc = 2;
+#else
+  int main(int argc, char **argv)
+  {
+#endif
+    try {
+      srand(time(0));  //initaialize RNG; TODO check if it works on win
+      SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log");
+      Orxonox* orx = Orxonox::getSingleton();
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+      orx->init(argc, argv, macBundlePath());
+      orx->start();
+#else
+/*
+for (int i = 0; i < 500; i++)
+{
+int x = rand() % 40000 - 20000;
+int y = rand() % 40000 - 20000;
+int z = rand() % 40000 - 20000;
+
+int scale = rand() % 100 + 20;
+
+int version = rand() % 6 + 1;
+
+float rotx = float(rand()) / RAND_MAX;
+float roty = float(rand()) / RAND_MAX;
+float rotz = float(rand()) / RAND_MAX;
+
+int axis = rand() % 3 + 1;
+
+if (axis == 1)
+  rotx = 0;
+if (axis == 2)
+  roty = 0;
+if (axis == 3)
+  rotz = 0;
+
+int rotation = rand() % 40 + 10;
+
+//    <Model position="1000,1500,0" scale="50" mesh="ast1.mesh" rotationAxis="0,1.25,0" rotationRate="70" />
+std::cout << "    <Model position=\"" << x << "," << y << "," << z << "\" scale=\"" << scale << "\" mesh=\"ast" << version << ".mesh\" rotationAxis=\"" << rotx << "," << roty << "," << rotz << "\" rotationRate=\"" << rotation << "\" />" << std::endl;
+
+
+}
+*/
+      orx->init(argc, argv, "");
+      orx->start();
+#endif
+    }
+    catch (Ogre::Exception& e) {
+#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined( __MINGW32__ )
+      MessageBoxA(NULL, e.getFullDescription().c_str(),
+            "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
+#else
+      std::cerr << "Exception:\n";
+      std::cerr << e.getFullDescription().c_str() << "\n";
+#endif
+      return 1;
+    }
+    return 0;
+  }
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/*int main(int argc, char **argv)
+{
+  try
+  {
+    SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log");
+    Orxonox* orx = Orxonox::getSingleton();
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+    orx->init(argc, argv, macBundlePath());
+    orx->start();
+#else
+    orx->init(argc, argv, "");
+    orx->start();
+#endif
+
+  }
+  catch(Ogre::Exception& e)
+  {
+    fprintf(stderr, "An exception has occurred: %s\n",
+            e.getFullDescription().c_str());
+    return 1;
+  }
+
+  return 0;
+}
+
+*/
Index: code/trunk/src/orxonox/Orxonox.cc
===================================================================
--- code/trunk/src/orxonox/Orxonox.cc	(revision 790)
+++ code/trunk/src/orxonox/Orxonox.cc	(revision 790)
@@ -0,0 +1,481 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 <beni_at_orxonox.net>, (C) 2007
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  Orxonox.cc
+ @brief Orxonox Main Class
+ */
+
+// Precompiled Headers
+#include "OrxonoxStableHeaders.h"
+
+//****** OGRE ******
+#include <OgreException.h>
+#include <OgreRoot.h>
+#include <OgreFrameListener.h>
+#include <OgreRenderWindow.h>
+#include <OgreTextureManager.h>
+#include <OgreResourceGroupManager.h>
+#include <OgreConfigFile.h>
+#include <OgreOverlay.h>
+#include <OgreOverlayManager.h>
+
+//****** OIS *******
+#include <OIS/OIS.h>
+
+//****** STD *******
+#include <iostream>
+#include <exception>
+
+//***** ORXONOX ****
+//misc
+#include "util/Sleep.h"
+
+// loader and audio
+#include "loader/LevelLoader.h"
+#include "audio/AudioManager.h"
+
+// network
+#include "network/Server.h"
+#include "network/Client.h"
+#include "network/NetworkFrameListener.h"
+
+// objects
+#include "objects/Tickable.h"
+#include "tools/Timer.h"
+#include "objects/NPC.h"
+#include "core/ArgReader.h"
+#include "core/Factory.h"
+#include "core/Debug.h"
+#include "hud/HUD.h"
+#include "objects/weapon/BulletManager.h"
+#include "GraphicsEngine.h"
+
+#include "Orxonox.h"
+
+namespace orxonox
+{
+   // put this in a seperate Class or solve the problem in another fashion
+  class OrxListener : public Ogre::FrameListener
+  {
+    public:
+      OrxListener(OIS::Keyboard *keyboard, audio::AudioManager*  auMan, gameMode mode)
+      {
+        mKeyboard = keyboard;
+        mode_=mode;
+        auMan_ = auMan;
+      }
+
+      bool frameStarted(const Ogre::FrameEvent& evt)
+      {
+        auMan_->update();
+        updateAI();
+
+        if(mode_ == PRESENTATION)
+          server_g->tick(evt.timeSinceLastFrame);
+        else if(mode_ == CLIENT)
+          client_g->tick(evt.timeSinceLastFrame);
+
+        usleep(10);
+
+        mKeyboard->capture();
+        return !mKeyboard->isKeyDown(OIS::KC_ESCAPE);
+      }
+
+      void updateAI()
+      {
+        for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it)
+        {
+          it->update();
+        }
+      }
+
+    private:
+      gameMode mode_;
+      OIS::Keyboard *mKeyboard;
+      audio::AudioManager*  auMan_;
+  };
+
+  // init static singleton reference of Orxonox
+  Orxonox* Orxonox::singletonRef_ = NULL;
+
+  /**
+   * create a new instance of Orxonox
+   */
+  Orxonox::Orxonox()
+  {
+    this->ogre_ = new GraphicsEngine();
+    this->dataPath_ = "";
+    this->loader_ = 0;
+    this->auMan_ = 0;
+    this->singletonRef_ = 0;
+    this->keyboard_ = 0;
+    this->mouse_ = 0;
+    this->inputManager_ = 0;
+    this->frameListener_ = 0;
+    this->root_ = 0;
+  }
+
+  /**
+   * destruct Orxonox
+   */
+  Orxonox::~Orxonox()
+  {
+    // nothing to delete as for now
+  }
+
+  /**
+   * initialization of Orxonox object
+   * @param argc argument counter
+   * @param argv list of arguments
+   * @param path path to config (in home dir or something)
+   */
+  void Orxonox::init(int argc, char **argv, std::string path)
+  {
+    //TODO: find config file (assuming executable directory)
+    //TODO: read config file
+    //TODO: give config file to Ogre
+    std::string mode;
+//     if(argc>=2)
+//       mode = std::string(argv[1]);
+//     else
+//       mode = "";
+    ArgReader ar = ArgReader(argc, argv);
+    ar.checkArgument("mode", mode, false);
+    ar.checkArgument("data", this->dataPath_, false);
+    ar.checkArgument("ip", serverIp_, false);
+    //mode = "presentation";
+    if(ar.errorHandling()) die();
+    if(mode == std::string("server"))
+    {
+      serverInit(path);
+      mode_ = SERVER;
+    }
+    else if(mode == std::string("client"))
+    {
+      clientInit(path);
+      mode_ = CLIENT;
+    }
+    else if(mode == std::string("presentation"))
+    {
+      serverInit(path);
+      mode_ = PRESENTATION;
+    }
+    else{
+      standaloneInit(path);
+      mode_ = STANDALONE;
+    }
+  }
+
+  /**
+   * start modules
+   */
+  void Orxonox::start()
+  {
+    //TODO: start modules
+    ogre_->startRender();
+    //TODO: run engine
+    Factory::createClassHierarchy();
+    createScene();
+    setupScene();
+    setupInputSystem();
+    if(mode_!=CLIENT){ // remove this in future ---- presentation hack
+    }
+    else
+      std::cout << "client here" << std::endl;
+    createFrameListener();
+    switch(mode_){
+    case PRESENTATION:
+      //ogre_->getRoot()->addFrameListener(new network::ServerFrameListener());
+      //std::cout << "could not add framelistener" << std::endl;
+      server_g->open();
+      break;
+    case CLIENT:
+      client_g->establishConnection();
+      break;
+    case SERVER:
+    case STANDALONE:
+    default:
+      break;
+    }
+    startRenderLoop();
+  }
+
+  /**
+   * @return singleton object
+   */
+  Orxonox* Orxonox::getSingleton()
+  {
+    if (!singletonRef_)
+      singletonRef_ = new Orxonox();
+    return singletonRef_;
+  }
+
+  /**
+   * error kills orxonox
+   */
+  void Orxonox::die(/* some error code */)
+  {
+    //TODO: destroy and destruct everything and print nice error msg
+    delete this;
+  }
+
+  void Orxonox::standaloneInit(std::string path)
+  {
+    ogre_->setConfigPath(path);
+    ogre_->setup();
+    root_ = ogre_->getRoot();
+    if(!ogre_->load()) die(/* unable to load */);
+
+    //defineResources();
+    //setupRenderSystem();
+    //createRenderWindow();
+    //initializeResourceGroups();
+    /*createScene();
+    setupScene();
+    setupInputSystem();
+    createFrameListener();
+    Factory::createClassHierarchy();
+    startRenderLoop();*/
+  }
+
+  void Orxonox::playableServer(std::string path)
+  {
+    ogre_->setConfigPath(path);
+    ogre_->setup();
+    root_ = ogre_->getRoot();
+    defineResources();
+    setupRenderSystem();
+    createRenderWindow();
+    initializeResourceGroups();
+    setupInputSystem();
+    Factory::createClassHierarchy();
+    createScene();
+    setupScene();
+    createFrameListener();
+    try{
+      server_g = new network::Server(); //!< add port and bindadress
+      server_g->open(); //!< open server and create listener thread
+      if(ogre_ && ogre_->getRoot())
+        ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server
+      COUT(3) << "Info: network framelistener added" << std::endl;
+    }
+    catch(...)
+    {
+      COUT(1) << "Error: There was a problem initialising the server :(" << std::endl;
+    }
+    startRenderLoop();
+  }
+
+  void Orxonox::standalone(){
+
+
+
+  }
+
+  void Orxonox::serverInit(std::string path)
+  {
+    COUT(2) << "initialising server" << std::endl;
+    ogre_->setConfigPath(path);
+    ogre_->setup();
+    server_g = new network::Server(); // FIXME add some settings if wanted
+    if(!ogre_->load()) die(/* unable to load */);
+    // FIXME add network framelistener
+  }
+
+  void Orxonox::clientInit(std::string path)
+  {
+    COUT(2) << "initialising client" << std::endl;
+    ogre_->setConfigPath(path);
+    ogre_->setup();
+    if(serverIp_.compare("")==0)
+      client_g = new network::Client();
+    else
+      client_g = new network::Client(serverIp_, 55556);
+    if(!ogre_->load()) die(/* unable to load */);
+    ogre_->getRoot()->addFrameListener(new network::ClientFrameListener());
+  }
+
+  void Orxonox::defineResources()
+  {
+    std::string secName, typeName, archName;
+    Ogre::ConfigFile cf;
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+    cf.load(macBundlePath() + "/Contents/Resources/resources.cfg");
+#else
+    cf.load(dataPath_ + "resources.cfg");
+#endif
+
+    Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
+    while (seci.hasMoreElements())
+    {
+      secName = seci.peekNextKey();
+      Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
+      Ogre::ConfigFile::SettingsMultiMap::iterator i;
+      for (i = settings->begin(); i != settings->end(); ++i)
+      {
+        typeName = i->first;
+        archName = i->second;
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+        Ogre::ResourceGroupManager::getSingleton().addResourceLocation( std::string(macBundlePath() + "/" + archName), typeName, secName);
+#else
+        Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName);
+#endif
+      }
+    }
+  }
+
+  void Orxonox::setupRenderSystem()
+  {
+    if (!root_->restoreConfig() && !root_->showConfigDialog())
+      throw Ogre::Exception(52, "User canceled the config dialog!", "OrxApplication::setupRenderSystem()");
+  }
+
+  void Orxonox::createRenderWindow()
+  {
+    root_->initialise(true, "OrxonoxV2");
+  }
+
+  void Orxonox::initializeResourceGroups()
+  {
+    Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
+    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
+  }
+
+  /**
+   *
+   * @param
+   */
+  void Orxonox::createScene(void)
+  {
+	// Init audio
+    auMan_ = new audio::AudioManager();
+
+    bulletMgr_ = new BulletManager();
+
+    // load this file from config
+    loader_ = new loader::LevelLoader("sample.oxw");
+    loader_->loadLevel();
+
+    Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
+    HUD* orxonoxHud;
+    orxonoxHud = new HUD();
+    orxonoxHud->setEnergyValue(20);
+    orxonoxHud->setEnergyDistr(20,20,60);
+    hudOverlay->show();
+
+	/*
+    auMan_->ambientAdd("a1");
+    auMan_->ambientAdd("a2");
+    auMan_->ambientAdd("a3");
+                                //auMan->ambientAdd("ambient1");
+    auMan_->ambientStart();*/
+  }
+
+
+  /**
+   *
+   */
+  void Orxonox::setupScene()
+  {
+//    SceneManager *mgr = ogre_->getSceneManager();
+
+
+//    SceneNode* node = (SceneNode*)mgr->getRootSceneNode()->getChild("OgreHeadNode");
+//     SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("OgreHeadNode", Vector3(0,0,0));
+
+
+/*
+    particle::ParticleInterface *e = new particle::ParticleInterface(mgr,"engine","Orxonox/strahl");
+    e->particleSystem_->setParameter("local_space","true");
+    e->setPositionOfEmitter(0, Vector3(0,-10,0));
+    e->setDirection(Vector3(0,0,-1));
+    e->addToSceneNode(node);
+*/
+  }
+
+
+  void Orxonox::setupInputSystem()
+  {
+    size_t windowHnd = 0;
+    std::ostringstream windowHndStr;
+    OIS::ParamList pl;
+
+    // fixes auto repeat problem
+    #if defined OIS_LINUX_PLATFORM
+      pl.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));
+    #endif
+
+      Ogre::RenderWindow *win = ogre_->getRoot()->getAutoCreatedWindow();
+    win->getCustomAttribute("WINDOW", &windowHnd);
+    windowHndStr << windowHnd;
+    pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
+    inputManager_ = OIS::InputManager::createInputSystem(pl);
+
+    try
+    {
+      keyboard_ = static_cast<OIS::Keyboard*>(inputManager_->createInputObject(OIS::OISKeyboard, false));
+      mouse_ = static_cast<OIS::Mouse*>(inputManager_->createInputObject(OIS::OISMouse, true));
+    }
+    catch (const OIS::Exception &e)
+    {
+      throw new Ogre::Exception(42, e.eText, "OrxApplication::setupInputSystem");
+    }
+  }
+
+  // FIXME we actually want to do this differently...
+  void Orxonox::createFrameListener()
+  {
+    TickFrameListener* TickFL = new TickFrameListener();
+    ogre_->getRoot()->addFrameListener(TickFL);
+
+    TimerFrameListener* TimerFL = new TimerFrameListener();
+    ogre_->getRoot()->addFrameListener(TimerFL);
+
+    //if(mode_!=CLIENT) // FIXME just a hack ------- remove this in future
+      frameListener_ = new OrxListener(keyboard_, auMan_, mode_);
+    ogre_->getRoot()->addFrameListener(frameListener_);
+  }
+
+  void Orxonox::startRenderLoop()
+  {
+    // FIXME
+    // this is a hack!!!
+    // the call to reset the mouse clipping size should probably be somewhere
+    // else, however this works for the moment.
+    unsigned int width, height, depth;
+    int left, top;
+    ogre_->getRoot()->getAutoCreatedWindow()->getMetrics(width, height, depth, left, top);
+
+    if(mode_!=CLIENT){
+      const OIS::MouseState &ms = mouse_->getMouseState();
+      ms.width = width;
+      ms.height = height;
+    }
+    ogre_->getRoot()->startRendering();
+  }
+}
Index: code/trunk/src/orxonox/Orxonox.h
===================================================================
--- code/trunk/src/orxonox/Orxonox.h	(revision 790)
+++ code/trunk/src/orxonox/Orxonox.h	(revision 790)
@@ -0,0 +1,86 @@
+/**
+ @file  Orxonox.h
+ @brief Main Orxonox Class File
+ @author Benjamin Knecht <beni_at_orxonox.net>
+ */
+
+#ifndef _Orxonox_H__
+#define _Orxonox_H__
+
+#include <string>
+
+#include <OgrePrerequisites.h>
+#include <OIS/OISPrereqs.h>
+
+#include "OrxonoxPrereqs.h"
+#include "loader/LoaderPrereqs.h"
+#include "audio/AudioPrereqs.h"
+
+#include "GraphicsEngine.h"
+
+
+// TODO: Orxonox should maybe derive from BaseObject
+//! Orxonox singleton class
+namespace orxonox {
+
+  enum gameMode{
+    STANDALONE,
+    SERVER,
+    CLIENT,
+    PRESENTATION
+  };
+
+  class _OrxonoxExport Orxonox
+  {
+    public:
+      void init(int argc, char **argv, std::string path);
+      void start();
+      // not sure if this should be private
+      void die(/* some error code */);
+      static Orxonox* getSingleton();
+      inline Ogre::SceneManager* getSceneManager()         { return ogre_->getSceneManager(); };
+      inline GraphicsEngine* getOgrePointer()              { return ogre_; };
+      inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
+      inline OIS::Keyboard* getKeyboard()                  { return this->keyboard_; }
+      inline OIS::Mouse* getMouse()                        { return this->mouse_; }
+      inline BulletManager* getBulletMgr()                 { return this->bulletMgr_; }
+
+    private:
+      Orxonox();
+      virtual ~Orxonox();
+      // init functions
+      void serverInit(std::string path);
+      void clientInit(std::string path);
+      void standaloneInit(std::string path);
+      // run functions
+      void playableServer(std::string path);
+      void standalone();
+      void defineResources();
+      void setupRenderSystem();
+      void createRenderWindow();
+      void initializeResourceGroups();
+      void createScene(void);
+      void setupScene();
+      void setupInputSystem();
+      void createFrameListener();
+      void startRenderLoop();
+
+    private:
+      GraphicsEngine*       ogre_;          //!< our dearest graphics engine <3
+      std::string           dataPath_;      //!< path to data
+      loader::LevelLoader*  loader_;        //!< level loader builds the scene
+      audio::AudioManager*  auMan_;         //!< audio manager
+      BulletManager*        bulletMgr_;     //!< Keeps track of the thrown bullets
+      static Orxonox*       singletonRef_;
+      OIS::Keyboard*        keyboard_;
+      OIS::Mouse*           mouse_;
+      OIS::InputManager*    inputManager_;
+      OrxListener*          frameListener_;
+      Ogre::Root*           root_;
+
+      // this is used to identify the mode (server/client/...) we're in
+      gameMode              mode_;
+      std::string           serverIp_;
+  };
+}
+#endif /* _Orxonox_H__ */
Index: code/trunk/src/orxonox/OrxonoxPlatform.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxPlatform.h	(revision 790)
+++ code/trunk/src/orxonox/OrxonoxPlatform.h	(revision 790)
@@ -0,0 +1,255 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      An unknown man from the Ogre development crew
+ *   Co-authors:
+ *      Reto Grieder (OGRE --> ORXONOX)
+ *
+ */
+
+/**
+ @file  OrxonoxPlatform.h
+ @brief Various constants for compiler, architecture and platform. It's a mere
+        copy of the file found in the Ogre source code (OgrePlatform.h).
+ */
+
+#ifndef _OrxonoxPlatform_H__
+#define _OrxonoxPlatform_H__
+
+namespace orxonox {
+/* Initial platform/compiler-related stuff to set.
+*/
+#define ORXONOX_PLATFORM_WIN32 1
+#define ORXONOX_PLATFORM_LINUX 2
+#define ORXONOX_PLATFORM_APPLE 3
+
+#define ORXONOX_COMPILER_MSVC 1
+#define ORXONOX_COMPILER_GNUC 2
+#define ORXONOX_COMPILER_BORL 3
+
+#define ORXONOX_ENDIAN_LITTLE 1
+#define ORXONOX_ENDIAN_BIG 2
+
+#define ORXONOX_ARCHITECTURE_32 1
+#define ORXONOX_ARCHITECTURE_64 2
+
+/* Finds the compiler type and version.
+*/
+#if defined( _MSC_VER )
+#  define ORXONOX_COMPILER ORXONOX_COMPILER_MSVC
+#  define ORXONOX_COMP_VER _MSC_VER
+
+#elif defined( __GNUC__ )
+#  define ORXONOX_COMPILER ORXONOX_COMPILER_GNUC
+#  define ORXONOX_COMP_VER (((__GNUC__)*100) + \
+        (__GNUC_MINOR__*10) + \
+        __GNUC_PATCHLEVEL__)
+
+#elif defined( __BORLANDC__ )
+#  define ORXONOX_COMPILER ORXONOX_COMPILER_BORL
+#  define ORXONOX_COMP_VER __BCPLUSPLUS__
+
+#else
+#  pragma error "No known compiler. Abort! Abort!"
+
+#endif
+
+/* See if we can use __forceinline or if we need to use __inline instead */
+#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+#  if ORXONOX_COMP_VER >= 1200
+#    define FORCEINLINE __forceinline
+#  endif
+#elif defined(__MINGW32__)
+#  if !defined(FORCEINLINE)
+#    define FORCEINLINE __inline
+#  endif
+#else
+#  define FORCEINLINE __inline
+#endif
+
+/* Finds the current platform */
+
+#if defined( __WIN32__ ) || defined( _WIN32 )
+#  define ORXONOX_PLATFORM ORXONOX_PLATFORM_WIN32
+
+#elif defined( __APPLE_CC__)
+#  define ORXONOX_PLATFORM ORXONOX_PLATFORM_APPLE
+
+#else
+#  define ORXONOX_PLATFORM ORXONOX_PLATFORM_LINUX
+#endif
+
+    /* Find the arch type */
+#if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__)
+#  define ORXONOX_ARCH_TYPE ORXONOX_ARCHITECTURE_64
+#else
+#  define ORXONOX_ARCH_TYPE ORXONOX_ARCHITECTURE_32
+#endif
+
+// For generating compiler warnings - should work on any compiler
+// As a side note, if you start your message with 'Warning: ', the MSVC
+// IDE actually does catch a warning :)
+#define ORXONOX_QUOTE_INPLACE(x) # x
+#define ORXONOX_QUOTE(x) ORXONOX_QUOTE_INPLACE(x)
+#define ORXONOX_WARN( x )  message( __FILE__ "(" QUOTE( __LINE__ ) ") : " x "\n" )
+
+//----------------------------------------------------------------------------
+// Windows Settings
+#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+
+// Win32 compilers use _DEBUG for specifying debug builds.
+#  ifdef _DEBUG
+#    define ORXONOX_DEBUG_MODE 1
+#  else
+#    define ORXONOX_DEBUG_MODE 0
+#  endif
+
+// Disable unicode support on MingW at the moment, poorly supported in stdlibc++
+// STLPORT fixes this though so allow if found
+// MinGW C++ Toolkit supports unicode and sets the define __MINGW32_TOOLKIT_UNICODE__ in _mingw.h
+#  if defined( __MINGW32__ ) && !defined(_STLPORT_VERSION)
+#    include<_mingw.h>
+#    if defined(__MINGW32_TOOLBOX_UNICODE__)
+#      define ORXONOX_UNICODE_SUPPORT 1
+#    else
+#      define ORXONOX_UNICODE_SUPPORT 0
+#    endif
+#  else
+#    define ORXONOX_UNICODE_SUPPORT 1
+#  endif
+
+#endif
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+// Linux/Apple Settings
+#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX || ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
+
+
+// A quick define to overcome different names for the same function
+#  define stricmp strcasecmp
+
+// Unlike the Win32 compilers, Linux compilers seem to use DEBUG for when
+// specifying a debug build.
+// (??? this is wrong, on Linux debug builds aren't marked in any way unless
+// you mark it yourself any way you like it -- zap ???)
+#  ifdef DEBUG
+#    define ORXONOX_DEBUG_MODE 1
+#  else
+#    define ORXONOX_DEBUG_MODE 0
+#  endif
+
+/* FIXME: Check what this actually is and whether we need it or not
+#  if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
+#    define ORXONOX_PLATFORM_LIB "OrxonoxPlatform.bundle"
+#  else
+// ORXONOX_PLATFORM_LINUX
+#    define ORXONOX_PLATFORM_LIB "libOrxonoxPlatform.so"
+#  endif
+*/
+
+// Always enable unicode support for the moment
+// Perhaps disable in old versions of gcc if necessary
+#  define ORXONOX_UNICODE_SUPPORT 1
+
+#endif
+
+//For apple, we always have a custom config.h file
+#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
+#  include "config.h"
+#endif
+
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+// Endian Settings
+// check for BIG_ENDIAN config flag, set ORXONOX_ENDIAN correctly
+#ifdef ORXONOX_CONFIG_BIG_ENDIAN
+#  define ORXONOX_ENDIAN ORXONOX_ENDIAN_BIG
+#else
+#  define ORXONOX_ENDIAN ORXONOX_ENDIAN_LITTLE
+#endif
+
+// Integer formats of fixed bit width
+typedef unsigned int uint32;
+typedef unsigned short uint16;
+typedef unsigned char uint8;
+
+#ifdef ORXONOX_DOUBLE_PRECISION
+typedef double Real;
+#else
+typedef float Real;
+#endif
+
+
+#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+// Turn off warnings generated by long std templates
+// This warns about truncation to 255 characters in debug/browse info
+//#   pragma warning (disable : 4786)
+
+// Turn off warnings generated by long std templates
+// This warns about truncation to 255 characters in debug/browse info
+//#   pragma warning (disable : 4503)
+
+// disable: "conversion from 'double' to 'float', possible loss of data
+//#   pragma warning (disable : 4244)
+
+// disable: "conversion from 'size_t' to 'unsigned int', possible loss of data
+//#   pragma warning (disable : 4267)
+
+// disable: "truncation from 'double' to 'float'
+//#   pragma warning (disable : 4305)
+
+// disable: "<type> needs to have dll-interface to be used by clients'
+// Happens on STL member variables which are not public therefore is ok
+//#   pragma warning (disable : 4251)
+
+// disable: "non dll-interface class used as base for dll-interface class"
+// Happens when deriving from Singleton because bug in compiler ignores
+// template export
+//#   pragma warning (disable : 4275)
+
+// disable: "C++ Exception Specification ignored"
+// This is because MSVC 6 did not implement all the C++ exception
+// specifications in the ANSI C++ draft.
+//#   pragma warning( disable : 4290 )
+
+// disable: "no suitable definition provided for explicit template
+// instantiation request" Occurs in VC7 for no justifiable reason on all
+// #includes of Singleton
+//#   pragma warning( disable: 4661)
+
+// disable: deprecation warnings when using CRT calls in VC8
+// These show up on all C runtime lib code in VC8, disable since they clutter
+// the warnings with things we may not be able to do anything about (e.g.
+// generated code from nvparse etc). I doubt very much that these calls
+// will ever be actually removed from VC anyway, it would break too much code.
+//#	pragma warning( disable: 4996)
+
+// disable: "conditional expression constant", always occurs on 
+// ORXONOX_MUTEX_CONDITIONAL when no threading enabled
+//#   pragma warning (disable : 201)
+
+#endif
+
+} /* namespace orxonox */
+
+#endif /* _OrxonoxPlatform_H__ */
Index: code/trunk/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 790)
+++ code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 790)
@@ -0,0 +1,97 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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  OrxonoxPrereqs.h
+ @brief Contains all the necessary forward declarations for all classes and structs.
+ */
+
+#ifndef _OrxonoxPrereqs_H__
+#define _OrxonoxPrereqs_H__
+
+#include "OrxonoxPlatform.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !(defined(ORXONOX_STATIC_BUILD) || defined(ORXONOX_NO_EXPORTS))
+#  ifdef ORXONOX_SHARED_BUILD
+#    define _OrxonoxExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _OrxonoxExport
+#    else
+#      define _OrxonoxExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _OrxonoxExport  __attribute__ ((visibility("default")))
+#else
+#  define _OrxonoxExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+// classes that have not yet been put into a namespace
+class InputManager;
+class SpaceShipSteering;
+
+namespace orxonox {
+  class Ambient;
+  class BaseObject;
+  class Camera;
+  class GraphicsEngine;
+  class Mesh;
+  class Model;
+  class NPC;
+  class OrxListener;
+  class Orxonox;
+  class Skybox;
+  class SpaceShip;
+  class Tickable;
+  class TickFrameListener;
+  template <class T>
+  class Timer;
+  class TimerBase;
+  class TimerFrameListener;
+  class WorldEntity;
+
+  class AmmunitionDump;
+  class Bullet;
+  class BulletManager;
+  class BaseWeapon;
+  class BarrelGun;
+  class WeaponStation;
+
+  class ParticleInterface;
+  class HUD;
+}
+
+
+#endif /* _OrxonoxPrereqs_H__ */
Index: code/trunk/src/orxonox/OrxonoxStableHeaders.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxStableHeaders.h	(revision 790)
+++ code/trunk/src/orxonox/OrxonoxStableHeaders.h	(revision 790)
@@ -0,0 +1,122 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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  OrxonoxStableHeaders.h
+ @brief Contains the bigger (or smaller) header files in order to precompile them with MSVC
+ */
+
+#ifndef _OrxonoxStableHeaders_H__
+#define _OrxonoxStableHeaders_H__
+
+#include "OrxonoxPlatform.h"
+
+#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+
+// including std headers here is useless since they're already precompiled
+
+// not including the entire Ogre.h doesn't exceed the default heap size for pch
+//#include <Ogre.h>
+#include <OgreBillboardSet.h>
+#include <OgreCamera.h>
+#include <OgreConfigFile.h>
+#include <OgreEntity.h>
+#include <OgreException.h>
+#include <OgreFrameListener.h>
+#include <OgreLight.h>
+#include <OgreOverlay.h>
+#include <OgreOverlayElement.h>
+#include <OgreOverlayManager.h>
+#include <OgreParticleEmitter.h>
+#include <OgreParticleSystem.h>
+#include <OgrePlatform.h>
+#include <OgrePrerequisites.h>
+#include <OgreRenderWindow.h>
+#include <OgreRoot.h>
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+#include <OgreStringConverter.h>
+#include <OgreTextureManager.h>
+#include <OgreViewport.h>
+
+#include <OIS/OIS.h>
+
+/**
+* Some of the not so stable header files.
+* But it's not very useful to include them anyway..
+**/
+
+//#include "audio/AudioManager.h"
+
+#include "core/CoreIncludes.h"
+#include "core/BaseObject.h"
+//#include "core/ArgReader.h"
+#include "core/Error.h"
+
+#include "network/Synchronisable.h"
+//#include "network/Server.h"
+//#include "network/Client.h"
+
+#include "util/Math.h"
+#include "util/Convert.h"
+#include "util/Sleep.h"
+#include "util/String2Number.h"
+#include "util/Tokenizer.h"
+#include "util/tinyxml/ticpp.h"
+#include "util/tinyxml/tinyxml.h"
+
+//#include "hud/HUD.h"
+//#include "loader/LevelLoader.h"
+//#include "objects/weapon/AmmunitionDump.h"
+//#include "objects/weapon/BarrelGun.h"
+//#include "objects/weapon/Bullet.h"
+//#include "objects/weapon/BulletManager.h"
+//#include "objects/weapon/WeaponStation.h"
+//#include "objects/Ambient.h"
+//#include "objects/Camera.h"
+//#include "objects/Explosion.h"
+//#include "objects/Fighter.h"
+#include "objects/Model.h"
+//#include "objects/NPC.h"
+//#include "objects/Projectile.h"
+//#include "objects/Skybox.h"
+//#include "objects/SpaceShipSteeringObject.h"
+#include "objects/Tickable.h"
+#include "objects/WorldEntity.h"
+//#include "particle/ParticleInterface.h"
+//#include "tools/BillboardSet.h"
+//#include "tools/Light.h"
+//#include "tools/Mesh.h"
+//#include "tools/Timer.h"
+//#include "GraphicsEngine.h"
+//#include "InputManager.h"
+//#include "Orxonox.h"
+//#include "SpaceshipSteering.h"
+
+#endif
+
+#endif /* _OrxonoxStableHeaders_H__ */
Index: code/trunk/src/orxonox/PrecompiledHeaderFiles.cc
===================================================================
--- code/trunk/src/orxonox/PrecompiledHeaderFiles.cc	(revision 790)
+++ code/trunk/src/orxonox/PrecompiledHeaderFiles.cc	(revision 790)
@@ -0,0 +1,33 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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  PrecompiledHeaderFiles.cc
+ @brief This file actually generates the precompiled header file
+ */
+
+#include "OrxonoxStableHeaders.h"
Index: code/trunk/src/orxonox/SpaceshipSteering.cc
===================================================================
--- code/trunk/src/orxonox/SpaceshipSteering.cc	(revision 790)
+++ code/trunk/src/orxonox/SpaceshipSteering.cc	(revision 790)
@@ -0,0 +1,233 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   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:
+*      ...
+*   Co-authors:
+*      ...
+*
+*/
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreNode.h>
+#include <OgreSceneNode.h>
+
+#include "core/Debug.h"
+#include "util/Math.h"
+#include "SpaceshipSteering.h"
+
+namespace orxonox
+{
+
+  SpaceshipSteering::SpaceshipSteering(float maxSpeedForward, float
+    maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float
+    maxSpeedLoopRightLeft)
+  {
+
+      COUT(3) << "Info: Steering was loaded" << std::endl;
+      moveForward_ = 0;
+      rotateUp_ = 0;
+      rotateDown_ = 0;
+      rotateRight_ = 0;
+      rotateLeft_ = 0;
+      loopRight_ = 0;
+      loopLeft_ = 0;
+      brakeForward_ = 0;
+      brakeRotate_ = 0;
+      brakeLoop_ = 0;
+      speedForward_ = 0;
+      speedRotateUpDown_ = 0;
+      speedRotateRightLeft_ = 0;
+      speedLoopRightLeft_ = 0;
+      maxSpeedForward_ = maxSpeedForward;
+      maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+      maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+      maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+      accelerationForward_ = 0;
+      accelerationRotateUpDown_ = 0;
+      accelerationRotateRightLeft_ = 0;
+      accelerationLoopRightLeft_ = 0;
+  }
+
+  void SpaceshipSteering::tick(float time)
+  {
+
+    if(moveForward_ > 0) {
+      accelerationForward_ = moveForward_;
+      if(speedForward_ < maxSpeedForward_)
+        speedForward_ += accelerationForward_*time;
+      if(speedForward_ > maxSpeedForward_)
+        speedForward_ = maxSpeedForward_;
+    }
+    if(moveForward_ <= 0) {
+      accelerationForward_ = brakeForward_;
+      if(speedForward_ > 0)
+        speedForward_ -= accelerationForward_*time;
+      if(speedForward_ < 0)
+        speedForward_ = 0;
+    }
+
+    if(rotateUp_ > 0) {
+      accelerationRotateUpDown_ = rotateUp_;
+      if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
+        speedRotateUpDown_ += accelerationRotateUpDown_*time;
+      if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
+        speedRotateUpDown_ = maxSpeedRotateUpDown_;
+    }
+    if(rotateDown_ > 0) {
+      accelerationRotateUpDown_ = rotateDown_;
+      if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
+        speedRotateUpDown_ -= accelerationRotateUpDown_*time;
+      if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
+        speedRotateUpDown_ = -maxSpeedRotateUpDown_;
+    }
+    if(rotateUp_ == 0 && rotateDown_ == 0) {
+      accelerationRotateUpDown_ = brakeRotate_;
+      if(speedRotateUpDown_ > 0)
+        speedRotateUpDown_ -= accelerationRotateUpDown_*time;
+      if(speedRotateUpDown_ < 0)
+        speedRotateUpDown_ += accelerationRotateUpDown_*time;
+      if(fabsf(speedRotateUpDown_)<accelerationRotateUpDown_*time)
+        speedRotateUpDown_ = 0;
+    }
+
+    if(rotateRight_ > 0) {
+      accelerationRotateRightLeft_ = rotateRight_;
+      if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
+        speedRotateRightLeft_ -= accelerationRotateRightLeft_*time;
+      if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
+        speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
+    }
+    if(rotateLeft_ > 0) {
+      accelerationRotateRightLeft_ = rotateLeft_;
+      if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
+        speedRotateRightLeft_ += accelerationRotateRightLeft_*time;
+      if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
+        speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
+    }
+    if(rotateRight_ == 0 && rotateLeft_ == 0) {
+      accelerationRotateRightLeft_ = brakeRotate_;
+      if(speedRotateRightLeft_ > 0)
+        speedRotateRightLeft_ -= accelerationRotateRightLeft_*time;
+      if(speedRotateRightLeft_ < 0)
+        speedRotateRightLeft_ += accelerationRotateRightLeft_*time;
+      if(fabsf(speedRotateRightLeft_)<accelerationRotateRightLeft_*time)
+        speedRotateRightLeft_ = 0;
+    }
+
+    if(loopRight_ > 0) {
+      accelerationLoopRightLeft_ = loopRight_;
+      if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
+        speedLoopRightLeft_ += accelerationLoopRightLeft_*time;
+      if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
+        speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
+    }
+    if(loopLeft_ > 0) {
+      accelerationLoopRightLeft_ = loopLeft_;
+      if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
+        speedLoopRightLeft_ -= accelerationLoopRightLeft_*time;
+      if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
+        speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
+    }
+    if(loopLeft_ == 0 && loopRight_ == 0) {
+      accelerationLoopRightLeft_ = brakeLoop_;
+      if(speedLoopRightLeft_ > 0)
+        speedLoopRightLeft_ -= accelerationLoopRightLeft_*time;
+      if(speedLoopRightLeft_ < 0)
+        speedLoopRightLeft_ += accelerationLoopRightLeft_*time;
+      if(fabsf(speedLoopRightLeft_)<accelerationLoopRightLeft_*time)
+        speedLoopRightLeft_ = 0;
+    }
+
+    Vector3 transVector = Vector3::ZERO;
+    transVector.z = 1;
+    steeringNode_->translate(transVector*speedForward_*time,
+      Ogre::SceneNode::TS_LOCAL);
+    steeringNode_->pitch(Degree(speedRotateUpDown_*time),
+      Ogre::SceneNode::TS_LOCAL);
+    steeringNode_->yaw(Degree(speedRotateRightLeft_*time),
+      Ogre::SceneNode::TS_LOCAL);
+    steeringNode_->roll(Degree(speedLoopRightLeft_*time),
+      Ogre::SceneNode::TS_LOCAL);
+
+  }
+
+  void SpaceshipSteering::moveForward(float moveForward) {
+    moveForward_ = moveForward;
+  }
+
+  void SpaceshipSteering::rotateUp(float rotateUp) {
+    rotateUp_ = rotateUp;
+  }
+
+  void SpaceshipSteering::rotateDown(float rotateDown) {
+    rotateDown_ = rotateDown;
+  }
+
+  void SpaceshipSteering::rotateLeft(float rotateLeft) {
+    rotateLeft_ = rotateLeft;
+  }
+
+  void SpaceshipSteering::rotateRight(float rotateRight) {
+    rotateRight_ = rotateRight;
+  }
+
+  void SpaceshipSteering::loopLeft(float loopLeft) {
+    loopLeft_ = loopLeft;
+  }
+
+  void SpaceshipSteering::loopRight(float loopRight) {
+    loopRight_ = loopRight;
+  }
+
+  void SpaceshipSteering::brakeForward(float brakeForward) {
+    brakeForward_ = brakeForward;
+  }
+
+  void SpaceshipSteering::brakeRotate(float brakeRotate) {
+    brakeRotate_ = brakeRotate;
+  }
+
+  void SpaceshipSteering::brakeLoop(float brakeLoop) {
+    brakeLoop_ = brakeLoop;
+  }
+
+  void SpaceshipSteering::maxSpeedForward(float maxSpeedForward) {
+    maxSpeedForward_ = maxSpeedForward;
+  }
+
+  void SpaceshipSteering::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
+    maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+  }
+
+  void SpaceshipSteering::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
+    maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+  }
+
+  void SpaceshipSteering::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
+    maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+  }
+
+  void SpaceshipSteering::addNode(Ogre::SceneNode *steeringNode) {
+    steeringNode_ = steeringNode;
+  }
+
+}
Index: code/trunk/src/orxonox/SpaceshipSteering.h
===================================================================
--- code/trunk/src/orxonox/SpaceshipSteering.h	(revision 790)
+++ code/trunk/src/orxonox/SpaceshipSteering.h	(revision 790)
@@ -0,0 +1,66 @@
+#ifndef _SpaceShipSteering_H__
+#define _SpaceShipSteering_H__
+
+#include <OgrePrerequisites.h>
+
+#include "OrxonoxPrereqs.h"
+
+namespace orxonox
+{
+  class _OrxonoxExport SpaceshipSteering
+  {
+  public:
+    SpaceshipSteering(float maxSpeedForward, float maxSpeedRotateUpDown,
+      float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft);
+    void tick(float time);
+    void moveForward(float moveForward);
+    void rotateUp(float rotateUp);
+    void rotateDown(float rotateDown);
+    void rotateRight(float rotateRight);
+    void rotateLeft(float rotateLeft);
+    void loopRight(float loopRight);
+    void loopLeft(float loopLeft);
+    void brakeForward(float brakeForward);
+    void brakeRotate(float brakeRotate);
+    void brakeLoop(float brakeLoop);
+    void maxSpeedForward(float maxSpeedForward);
+    void maxSpeedRotateUpDown(float maxSpeedRotateUpDown);
+    void maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft);
+    void maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft);
+    void addNode(Ogre::SceneNode *steeringNode);
+
+  protected:
+    Ogre::SceneNode *steeringNode_;
+
+  private:
+    float moveForward_;
+    float rotateUp_;
+    float rotateDown_;
+    float rotateRight_;
+    float rotateLeft_;
+    float loopRight_;
+    float loopLeft_;
+    float brakeForward_;
+    float brakeRotate_;
+    float brakeLoop_;
+
+    float speedForward_;
+    float speedRotateUpDown_;
+    float speedRotateRightLeft_;
+    float speedLoopRightLeft_;
+
+    float maxSpeedForward_;
+    float maxSpeedRotateUpDown_;
+    float maxSpeedRotateRightLeft_;
+    float maxSpeedLoopRightLeft_;
+
+    float accelerationForward_;
+    float accelerationRotateUpDown_;
+    float accelerationRotateRightLeft_;
+    float accelerationLoopRightLeft_;
+
+  };
+}
+
+
+#endif /* _SpaceShipSteering_H__ */
Index: code/trunk/src/orxonox/core/ArgReader.cc
===================================================================
--- code/trunk/src/orxonox/core/ArgReader.cc	(revision 790)
+++ code/trunk/src/orxonox/core/ArgReader.cc	(revision 790)
@@ -0,0 +1,113 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 <beni_at_orxonox.net>, (C) 2007
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  ArgReader.cc
+ @brief Argument Reader
+ */
+
+#include <iostream>
+
+#include "ArgReader.h"
+
+namespace orxonox {
+
+  ArgReader::ArgReader(int argc, char** argv)
+  {
+    counter_ = argc;
+    arguments_ = argv;
+    fail_ = false;
+    errorStr_ = "";
+  }
+
+  void ArgReader::checkArgument(std::string option, std::string &string, bool must)
+  {
+    int argpos = checkOption(option) + 1;
+    if(argpos != 0)
+    {
+      string = arguments_[argpos];
+    }
+    else
+    {
+      if(must) {
+        errorStr_ = errorStr_ + "Cannot find mandatory argument \"" + option + "\"\n";
+        fail_ = true;
+      }
+    }
+
+  }
+
+  void ArgReader::checkArgument(std::string option, int &integer, bool must)
+  {
+    int argpos = checkOption(option) + 1;
+    if(argpos != 0)
+    {
+      integer = atoi(arguments_[argpos]);
+    }
+    else
+    {
+      if(must) {
+        errorStr_ = errorStr_ + "Cannot find mandatory argument \"" + option + "\"\n";
+        fail_ = true;
+      }
+    }
+  }
+
+  void ArgReader::checkArgument(std::string option, float &floating, bool must)
+  {
+    int argpos = checkOption(option) + 1;
+    if(argpos != 0)
+    {
+      floating = (float)atof(arguments_[argpos]);
+    }
+    else
+    {
+      if(must) {
+        errorStr_ = errorStr_ + "Cannot find mandatory argument \"" + option + "\"\n";
+        fail_ = true;
+      }
+    }
+  }
+
+  int ArgReader::checkOption(std::string option)
+  {
+    for(int i = 1; i < counter_; i++)
+    {
+      if(arguments_[i] == "--" + option)
+          return i;
+    }
+    return -1;
+  }
+
+  bool ArgReader::errorHandling()
+  {
+    if(fail_)
+      std::cout << errorStr_;
+    return fail_;
+  }
+}
+
Index: code/trunk/src/orxonox/core/ArgReader.h
===================================================================
--- code/trunk/src/orxonox/core/ArgReader.h	(revision 790)
+++ code/trunk/src/orxonox/core/ArgReader.h	(revision 790)
@@ -0,0 +1,62 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 <beni_at_orxonox.net>
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  Argreader.h
+ @brief reads arguments
+ @author Benjamin Knecht <beni_at_orxonox.net>
+ */
+
+#ifndef _ArgReader_H__
+#define _ArgReader_H__
+
+#include <string>
+
+#include "CorePrereqs.h"
+
+namespace orxonox {
+
+  class _CoreExport ArgReader
+  {
+    public:
+      ArgReader(int argc, char **argv);
+      void checkArgument(std::string option, std::string& string, bool must=false);
+      void checkArgument(std::string option, int& integer, bool must=false);
+      void checkArgument(std::string option, float& floating, bool must=false);
+      bool errorHandling();
+    private:
+      int checkOption(std::string option);
+
+    private:
+      int counter_;
+      char **arguments_;
+      bool fail_;
+      std::string errorStr_;
+  };
+
+}
+#endif /* _ArgReader_H__ */
Index: code/trunk/src/orxonox/core/BaseObject.cc
===================================================================
--- code/trunk/src/orxonox/core/BaseObject.cc	(revision 790)
+++ code/trunk/src/orxonox/core/BaseObject.cc	(revision 790)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file BaseObject.cc
+    @brief Implementation of the BaseObject class.
+*/
+
+#include "util/tinyxml/tinyxml.h"
+
+#include "BaseObject.h"
+
+namespace orxonox
+{
+    CreateFactory(BaseObject);
+
+    /**
+        @brief Constructor: Registers the object in the BaseObject-list.
+    */
+    BaseObject::BaseObject()
+    {
+        RegisterRootObject(BaseObject);
+    }
+
+    /**
+        @brief Destructor
+    */
+    BaseObject::~BaseObject()
+    {
+    }
+
+    /**
+        @brief load general xml paramters
+    */
+    void BaseObject::loadParams(TiXmlElement* xmlElem)
+    {
+        if (xmlElem->Attribute("name"))
+        {
+            this->setName(xmlElem->Attribute("name"));
+        }
+    }
+}
Index: code/trunk/src/orxonox/core/BaseObject.h
===================================================================
--- code/trunk/src/orxonox/core/BaseObject.h	(revision 790)
+++ code/trunk/src/orxonox/core/BaseObject.h	(revision 790)
@@ -0,0 +1,29 @@
+/*!
+    @file BaseObject.h
+    @brief Definition of the BaseObject class.
+
+    The BaseObject is the parent of all classes representing an instance in the game.
+*/
+
+#ifndef _BaseObject_H__
+#define _BaseObject_H__
+
+#include "CorePrereqs.h"
+#include "util/tinyxml/TinyXMLPrereqs.h"
+
+#include "CoreIncludes.h"
+
+namespace orxonox
+{
+    //! The BaseObject is the parent of all classes representing an instance in the game.
+    class _CoreExport BaseObject : virtual public OrxonoxClass
+    {
+        public:
+            BaseObject();
+            virtual ~BaseObject();
+            virtual void loadParams(TiXmlElement* xmlElem);
+    };
+    ExportClass(BaseObject, Core);
+}
+
+#endif /* _BaseObject_H__ */
Index: code/trunk/src/orxonox/core/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/core/CMakeLists.txt	(revision 790)
+++ code/trunk/src/orxonox/core/CMakeLists.txt	(revision 790)
@@ -0,0 +1,22 @@
+SET( CORE_SRC_FILES
+  BaseObject.cc
+  Factory.cc
+  IdentifierList.cc
+  Identifier.cc
+  MetaObjectList.cc
+  OrxonoxClass.cc
+  ConfigValueContainer.cc
+  Error.cc
+  SignalHandler.cc
+  ArgReader.cc
+  DebugLevel.cc
+  OutputHandler.cc
+  Language.cc
+)
+
+ADD_LIBRARY( core SHARED ${CORE_SRC_FILES})
+SET_TARGET_PROPERTIES( core PROPERTIES LINK_FLAGS "--no-undefined" )
+
+TARGET_LINK_LIBRARIES( core
+  util
+)
Index: code/trunk/src/orxonox/core/ClassFactory.h
===================================================================
--- code/trunk/src/orxonox/core/ClassFactory.h	(revision 265)
+++ code/trunk/src/orxonox/core/ClassFactory.h	(revision 790)
@@ -1,6 +1,46 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file ClassFactory.h
+    @brief Definition and implementation of the ClassFactory class
+
+    The ClassFactory is able to create new objects of a specific class.
+*/
+
 #ifndef _ClassFactory_H__
 #define _ClassFactory_H__
 
+#include <string>
+
+#include "CorePrereqs.h"
+
+#include "Factory.h"
 #include "Identifier.h"
+#include "Debug.h"
 
 namespace orxonox
@@ -9,35 +49,38 @@
     // ###      ClassFactory       ###
     // ###############################
+    //! The ClassFactory is able to create new objects of a specific class.
     template <class T>
     class ClassFactory : public BaseFactory
     {
         public:
-            static bool create();
+            static bool create(const std::string& name);
             BaseObject* fabricate();
 
         private:
-            ClassFactory() {}
-            ClassFactory(const ClassFactory& factory) {}
-            ~ClassFactory() {}
+            ClassFactory() {}                               // Don't create
+            ClassFactory(const ClassFactory& factory) {}    // Don't copy
+            virtual ~ClassFactory() {}                      // Don't delete
 
             static T* createNewObject();
     };
 
+    /**
+        @brief Adds the ClassFactory to the Identifier of the same type and the Identifier to the Factory.
+        @return Always true (this is needed because the compiler only allows assignments before main())
+    */
     template <class T>
-    bool ClassFactory<T>::create()
+    bool ClassFactory<T>::create(const std::string& name)
     {
+        COUT(4) << "*** Create entry for " << name << " in Factory." << std::endl;
         ClassIdentifier<T>::getIdentifier()->addFactory(new ClassFactory<T>);
-
-        ClassIdentifier<T>::getIdentifier()->startCreatingHierarchy();
-#if HIERARCHY_VERBOSE
-        std::cout << "*** Create Factory -> Create Class\n";
-#endif
-        BaseObject* temp = ClassIdentifier<T>::getIdentifier()->fabricate();
-        delete temp;
-        ClassIdentifier<T>::getIdentifier()->stopCreatingHierarchy();
+        Factory::add(name, ClassIdentifier<T>::getIdentifier());
 
         return true;
     }
 
+    /**
+        @brief Creates and returns a new object of class T.
+        @return The new object
+    */
     template <class T>
     BaseObject* ClassFactory<T>::fabricate()
@@ -46,4 +89,8 @@
     }
 
+    /**
+        @brief Creates and returns a new object of class T; this is a wrapper for the new operator.
+        @return The new object
+    */
     template <class T>
     T* ClassFactory<T>::createNewObject()
@@ -53,3 +100,3 @@
 }
 
-#endif
+#endif /* _ClassFactory_H__ */
Index: code/trunk/src/orxonox/core/ConfigValueContainer.cc
===================================================================
--- code/trunk/src/orxonox/core/ConfigValueContainer.cc	(revision 790)
+++ code/trunk/src/orxonox/core/ConfigValueContainer.cc	(revision 790)
@@ -0,0 +1,954 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 <fstream>
+
+#include "util/Tokenizer.h"
+#include "util/Convert.h"
+#include "ConfigValueContainer.h"
+
+#define CONFIGFILEPATH "orxonox.ini"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Int;
+
+        ConvertValue(&this->defvalueString_, defvalue, std::string("0"));           // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_uInt;
+
+        ConvertValue(&this->defvalueString_, defvalue, std::string("0"));           // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Char;
+
+        ConvertValue(&this->defvalueString_, (int)defvalue, std::string("0"));      // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_uChar;
+
+        ConvertValue(&this->defvalueString_, (unsigned int)defvalue, std::string("0"));     // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Float;
+
+        ConvertValue(&this->defvalueString_, defvalue, std::string("0.000000"));    // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Double;
+
+        ConvertValue(&this->defvalueString_, defvalue, std::string("0.000000"));    // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, long double defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_LongDouble;
+
+        ConvertValue(&this->defvalueString_, defvalue, std::string("0.000000"));    // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Bool;
+
+        // Convert the default-value from bool to string
+        if (defvalue)
+            this->defvalueString_ = "true";
+        else
+            this->defvalueString_ = "false";
+
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_String;
+
+        this->defvalueString_ = "\"" + defvalue + "\"";                             // Convert the string to a "config-file-string" with quotes
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_ConstChar;
+
+        this->defvalueString_ = "\"" + std::string(defvalue) + "\"";                // Convert the string to a "config-file-string" with quotes
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Vector2 defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Vector2;
+
+        // Try to convert the default-value from Vector2 to string
+        std::ostringstream ostream;
+        if (ostream << "(" << defvalue.x << "," << defvalue.y << ")")
+            this->defvalueString_ = ostream.str();
+        else
+            this->defvalueString_ = "(0,0)";
+
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Vector3 defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Vector3;
+
+        // Try to convert the default-value from Vector3 to string
+        std::ostringstream ostream;
+        if (ostream << "(" << defvalue.x << "," << defvalue.y << "," << defvalue.z << ")")
+            this->defvalueString_ = ostream.str();
+        else
+            this->defvalueString_ = "(0,0,0)";
+
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, ColourValue defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_ColourValue;
+
+        // Try to convert the default-value from ColourValue to string
+        std::ostringstream ostream;
+        if (ostream << "(" << defvalue.r << "," << defvalue.g << "," << defvalue.b << "," << defvalue.a << ")")
+            this->defvalueString_ = ostream.str();
+        else
+            this->defvalueString_ = "(0,0,0,0)";
+
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type of the associated variable and assigns it.
+        @param input The string to convert
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input)
+    {
+        if (this->type_ == ConfigValueContainer::VT_Int)
+            return this->parseSting(input, this->value_.value_int_);
+        else if (this->type_ == ConfigValueContainer::VT_uInt)
+            return this->parseSting(input, this->value_.value_uint_);
+        else if (this->type_ == ConfigValueContainer::VT_Char)
+            return this->parseSting(input, this->value_.value_char_);
+        else if (this->type_ == ConfigValueContainer::VT_uChar)
+            return this->parseSting(input, this->value_.value_uchar_);
+        else if (this->type_ == ConfigValueContainer::VT_Float)
+            return this->parseSting(input, this->value_.value_float_);
+        else if (this->type_ == ConfigValueContainer::VT_Double)
+            return this->parseSting(input, this->value_.value_double_);
+        else if (this->type_ == ConfigValueContainer::VT_LongDouble)
+            return this->parseSting(input, this->value_.value_long_double_);
+        else if (this->type_ == ConfigValueContainer::VT_Bool)
+            return this->parseSting(input, this->value_.value_bool_);
+        else if (this->type_ == ConfigValueContainer::VT_String)
+            return this->parseSting(input, this->value_string_);
+        else if (this->type_ == ConfigValueContainer::VT_ConstChar)
+            return this->parseSting(input, this->value_string_);
+        else if (this->type_ == ConfigValueContainer::VT_Vector2)
+            return this->parseSting(input, this->value_vector2_);
+        else if (this->type_ == ConfigValueContainer::VT_Vector3)
+            return this->parseSting(input, this->value_vector3_);
+        else if (this->type_ == ConfigValueContainer::VT_ColourValue)
+            return this->parseSting(input, this->value_colourvalue_);
+
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type int and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, int defvalue)
+    {
+        return ConvertValue(&this->value_.value_int_, input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type unsigned int and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, unsigned int defvalue)
+    {
+        return ConvertValue(&this->value_.value_uint_, input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type char and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, char defvalue)
+    {
+        // I used value_int_ instead of value_char_ to avoid number <-> char confusion in the config-file
+        return ConvertValue(&this->value_.value_int_, input, (int)defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type unsigned char and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, unsigned char defvalue)
+    {
+        // I used value_uint_ instead of value_uchar_ to avoid number <-> char confusion in the config-file
+        return ConvertValue(&this->value_.value_uint_, input, (unsigned int)defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type float and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, float defvalue)
+    {
+        return ConvertValue(&this->value_.value_float_, input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, double defvalue)
+    {
+        return ConvertValue(&this->value_.value_double_, input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type long double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, long double defvalue)
+    {
+        return ConvertValue(&this->value_.value_long_double_, input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type bool and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, bool defvalue)
+    {
+        // Try to parse the value-string - is it a word?
+        if (input.find("true") < input.size()
+         || input.find("True") < input.size()
+         || input.find("yes") < input.size()
+         || input.find("Yes") < input.size())
+            this->value_.value_bool_ = true;
+        else if (input.find("false") < input.size()
+              || input.find("False") < input.size()
+              || input.find("no") < input.size()
+              || input.find("No") < input.size())
+            this->value_.value_bool_ = false;
+        else
+        {
+            // Its not a known word - is it a number?
+            return ConvertValue(&this->value_.value_bool_, input, defvalue);
+        }
+
+        return true;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type std::string and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, const std::string& defvalue)
+    {
+        // Strip the quotes
+        unsigned int pos1 = input.find("\"") + 1;
+        unsigned int pos2 = input.find("\"", pos1);
+
+        // Check if the entry was correctly quoted
+        if (pos1 < input.length() && pos2 < input.length() && !(input.find("\"", pos2 + 1) < input.length()))
+        {
+            // It was - get the string between the quotes
+            this->value_string_ = input.substr(pos1, pos2 - pos1);
+            return true;
+        }
+
+        // It wasn't - use the default-value and restore the entry in the config-file.
+        this->value_string_ = defvalue;
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type const char* and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, const char* defvalue)
+    {
+        // Strip the quotes
+        unsigned int pos1 = input.find("\"") + 1;
+        unsigned int pos2 = input.find("\"", pos1);
+
+        // Check if the entry was correctly quoted
+        if (pos1 < input.length() && pos2 < input.length() && !(input.find("\"", pos2 + 1) < input.length()))
+        {
+            // It was - get the string between the quotes
+            this->value_string_ = input.substr(pos1, pos2 - pos1);
+            return true;
+        }
+
+        // It wasn't - use the default-value and restore the entry in the config-file.
+        this->value_string_ = defvalue;
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type _Vector2 and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, const Vector2& defvalue)
+    {
+        // Strip the value-string
+        unsigned int pos1 = input.find("(") + 1;
+        unsigned int pos2 = input.find(")", pos1);
+
+        // Try to convert the stripped value-string to Vector2
+        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
+        {
+            std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
+            if (!ConvertValue(&this->value_vector2_.x, tokens[0]))
+            {
+                this->value_vector2_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_vector2_.y, tokens[1]))
+            {
+                this->value_vector2_ = defvalue;
+                return false;
+            }
+
+            return true;
+        }
+
+        this->value_vector2_ = defvalue;
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type Vector3 and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, const Vector3& defvalue)
+    {
+        // Strip the value-string
+        unsigned int pos1 = input.find("(") + 1;
+        unsigned int pos2 = input.find(")", pos1);
+
+        // Try to convert the stripped value-string to Vector3
+        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
+        {
+            std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
+            if (!ConvertValue(&this->value_vector3_.x, tokens[0]))
+            {
+                this->value_vector3_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_vector3_.y, tokens[1]))
+            {
+                this->value_vector3_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_vector3_.z, tokens[2]))
+            {
+                this->value_vector3_ = defvalue;
+                return false;
+            }
+
+            return true;
+        }
+
+        this->value_vector3_ = defvalue;
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type ColourValue and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, const ColourValue& defvalue)
+    {
+        // Strip the value-string
+        unsigned int pos1 = input.find("(") + 1;
+        unsigned int pos2 = input.find(")", pos1);
+
+        // Try to convert the stripped value-string to Vector3
+        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
+        {
+            std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
+            if (!ConvertValue(&this->value_colourvalue_.r, tokens[0]))
+            {
+                this->value_colourvalue_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_colourvalue_.g, tokens[1]))
+            {
+                this->value_colourvalue_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_colourvalue_.b, tokens[2]))
+            {
+                this->value_colourvalue_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_colourvalue_.a, tokens[3]))
+            {
+                this->value_colourvalue_ = defvalue;
+                return false;
+            }
+
+            return true;
+        }
+
+        this->value_colourvalue_ = defvalue;
+        return false;
+    }
+
+    /**
+        @brief Sets the corresponding entry in the config-file back to the default value.
+    */
+    void ConfigValueContainer::resetConfigFileEntry()
+    {
+        (*this->configFileLine_) = this->varname_ + "=" + this->defvalueString_;
+        ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
+    }
+
+    /**
+        @brief Sets the value of the variable back to the default value and resets the config-file entry.
+    */
+    void ConfigValueContainer::resetConfigValue()
+    {
+        this->parseSting(this->defvalueString_);
+        this->resetConfigFileEntry();
+    }
+
+    /**
+        @brief Searches the corresponding entry in the config-file and creates it, if there is no entry.
+    */
+    void ConfigValueContainer::searchConfigFileLine()
+    {
+        // Read the file if needed
+        if (!ConfigValueContainer::finishedReadingConfigFile())
+            ConfigValueContainer::readConfigFile(CONFIGFILEPATH);
+
+        // The string of the section we're searching
+        std::string section = "";
+        section.append("[");
+        section.append(this->classname_);
+        section.append("]");
+
+        // Iterate through all config-file-lines
+        bool success = false;
+        std::list<std::string>::iterator it1;
+        for(it1 = ConfigValueContainer::getConfigFileLines().begin(); it1 != ConfigValueContainer::getConfigFileLines().end(); ++it1)
+        {
+            // Don't try to parse comments
+            if (this->isComment(*it1))
+                continue;
+
+            if ((*it1).find(section) < (*it1).length())
+            {
+                // We found the right section
+                bool bLineIsEmpty = false;
+                std::list<std::string>::iterator positionToPutNewLineAt;
+
+                // Iterate through all lines in the section
+                std::list<std::string>::iterator it2;
+                for(it2 = ++it1; it2 != ConfigValueContainer::getConfigFileLines().end(); ++it2)
+                {
+                    // Don't try to parse comments
+                    if (this->isComment(*it2))
+                        continue;
+
+                    // This if-else block is used to write a new line right after the last line of the
+                    // section but in front of the following empty lines before the next section.
+                    // (So this helps to keep a nice formatting with empty-lines between sections in the config-file)
+                    if (this->isEmpty(*it2))
+                    {
+                        if (!bLineIsEmpty)
+                        {
+                            bLineIsEmpty = true;
+                            positionToPutNewLineAt = it2;
+                        }
+                    }
+                    else
+                    {
+                        if (!bLineIsEmpty)
+                            positionToPutNewLineAt = it2;
+
+                        bLineIsEmpty = false;
+                    }
+
+                    // Look out for the beginning of the next section
+                    unsigned int open = (*it2).find("[");
+                    unsigned int close = (*it2).find("]");
+                    if ((open < (*it2).length()) && (close < (*it2).length()) && (open < close))
+                    {
+                        // The next section startet, so our line isn't yet in the file - now we add it and safe the file
+                        this->configFileLine_ = this->getConfigFileLines().insert(positionToPutNewLineAt, this->varname_ + "=" + this->defvalueString_);
+                        ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
+                        success = true;
+                        break;
+                    }
+
+                    // Look out for the variable-name
+                    if ((*it2).find(this->varname_) < (*it2).length())
+                    {
+                        // We found the right line - safe it and return
+                        this->configFileLine_ = it2;
+                        success = true;
+                        break;
+                    }
+                }
+
+                // Check if we succeeded
+                if (!success)
+                {
+                    // Looks like we found the right section, but the file ended without containing our variable - so we add it and safe the file
+                    this->configFileLine_ = this->getConfigFileLines().insert(positionToPutNewLineAt, this->varname_ + "=" + this->defvalueString_);
+                    ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
+                    success = true;
+                }
+                break;
+            }
+        }
+
+        // Check if we succeeded
+        if (!success)
+        {
+            // We obviously didn't found the right section, so we'll create it
+            this->getConfigFileLines().push_back("[" + this->classname_ + "]");                   // Create the section
+            this->getConfigFileLines().push_back(this->varname_ + "=" + this->defvalueString_);   // Create the line
+            this->configFileLine_ = --this->getConfigFileLines().end();                           // Set the pointer to the last element
+            success = true;
+            this->getConfigFileLines().push_back("");                                             // Add an empty line - this is needed for the algorithm in the searchConfigFileLine-function
+            ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);                              // Save the changed config-file
+        }
+    }
+
+    /**
+        @brief Determines if a line in the config-file is a comment.
+        @param line The line to check
+        @return True = it's a comment
+    */
+    bool ConfigValueContainer::isComment(const std::string& line)
+    {
+        // Strip the line, whitespaces are disturbing
+        std::string teststring = getStrippedLine(line);
+
+        // There are four possible comment-symbols:
+        //  1) #comment in script-language style
+        //  2) %comment in matlab style
+        //  3) ;comment in unreal tournament config-file style
+        //  4) //comment in code style
+        if (teststring[0] == '#' || teststring[0] == '%' || teststring[0] == ';' || (teststring[0] == '/' && teststring[0] == '/'))
+            return true;
+
+        return false;
+    }
+
+    /**
+        @brief Determines if a line in the config-file is empty (contains only whitespaces).
+        @param line The line to check
+        @return True = it's empty
+    */
+    bool ConfigValueContainer::isEmpty(const std::string& line)
+    {
+        return getStrippedLine(line) == "";
+    }
+
+    /**
+        @brief Removes all whitespaces from a line.
+        @param line The line to strip
+        @return The stripped line
+    */
+    std::string ConfigValueContainer::getStrippedLine(const std::string& line)
+    {
+        std::string output = line;
+        unsigned int pos;
+        while ((pos = output.find(" ")) < output.length())
+            output.erase(pos, 1);
+        while ((pos = output.find("\t")) < output.length())
+            output.erase(pos, 1);
+
+        return output;
+    }
+
+    /**
+        @brief Returns the part in the corresponding config-file-entry of the container that defines the value.
+        @param bStripped True = strip the value-string
+        @return The value-string
+    */
+    std::string ConfigValueContainer::parseValueString(bool bStripped)
+    {
+        std::string output;
+        if (bStripped)
+            output = this->getStrippedLine(*this->configFileLine_);
+        else
+            output = *this->configFileLine_;
+
+        return output.substr(output.find("=") + 1);
+    }
+
+    /**
+        @returns a list, containing all entrys in the config-file.
+    */
+    std::list<std::string>& ConfigValueContainer::getConfigFileLines()
+    {
+        // This is done to avoid problems while executing this code before main()
+        static std::list<std::string> configFileLinesStaticReference = std::list<std::string>();
+        return configFileLinesStaticReference;
+    }
+
+    /**
+        @brief Returns true if the ConfigFile is read and stored into the ConfigFile-lines-list.
+        @param finished This is used to change the state
+        @return True if the ConfigFile is read and stored into the ConfigFile-lines-list
+    */
+    bool ConfigValueContainer::finishedReadingConfigFile(bool finished)
+    {
+        // This is done to avoid problems while executing this code before main()
+        static bool finishedReadingConfigFileStaticVariable = false;
+
+        if (finished)
+            finishedReadingConfigFileStaticVariable = true;
+
+        return finishedReadingConfigFileStaticVariable;
+    }
+
+    /**
+        @brief Reads the config-file and stores the lines in a list.
+        @param filename The name of the config-file
+    */
+    void ConfigValueContainer::readConfigFile(const std::string& filename)
+    {
+        // This creates the file if it's not existing
+        std::ofstream createFile;
+        createFile.open(filename.c_str(), std::fstream::app);
+        createFile.close();
+
+        // Open the file
+        std::ifstream file;
+        file.open(filename.c_str(), std::fstream::in);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't open config-file " << filename << " to read the config values!" << std::endl;
+            return;
+        }
+
+        char line[1024];
+
+        // Iterate through the file and add the lines into the list
+        while (file.good() && !file.eof())
+        {
+            file.getline(line, 1024);
+            ConfigValueContainer::getConfigFileLines().push_back(line);
+//            std::cout << "### ->" << line << "<- : empty: " << isEmpty(line) << " comment: " << isComment(line) << std::endl;
+        }
+
+        // The last line is useless
+        ConfigValueContainer::getConfigFileLines().pop_back();
+
+        // Add an empty line to the end of the file if needed
+        // this is needed for the algorithm in the searchConfigFileLine-function
+        if ((ConfigValueContainer::getConfigFileLines().size() > 0) && !isEmpty(*ConfigValueContainer::getConfigFileLines().rbegin()))
+        {
+//            std::cout << "### newline added" << std::endl;
+            ConfigValueContainer::getConfigFileLines().push_back("");
+        }
+
+        file.close();
+
+        ConfigValueContainer::finishedReadingConfigFile(true);
+    }
+
+    /**
+        @brief Writes the content of the list, containing all lines of the config-file, into the config-file.
+        @param filename The name of the config-file
+    */
+    void ConfigValueContainer::writeConfigFile(const std::string& filename)
+    {
+        // Make sure we stored the config-file in the list
+        if (!ConfigValueContainer::finishedReadingConfigFile())
+            ConfigValueContainer::readConfigFile(filename);
+
+        // Open the file
+        std::ofstream file;
+        file.open(filename.c_str(), std::fstream::out);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't open config-file " << filename << " to write the config values!" << std::endl;
+            return;
+        }
+
+        // Iterate through the list an write the lines into the file
+        std::list<std::string>::iterator it;
+        for (it = ConfigValueContainer::getConfigFileLines().begin(); it != ConfigValueContainer::getConfigFileLines().end(); ++it)
+        {
+            file << (*it) << std::endl;
+        }
+
+        file.close();
+    }
+
+    /**
+        @brief Adds a description to the config-value.
+        @param description The description
+    */
+    void ConfigValueContainer::description(const std::string& description)
+    {
+        if (!this->bAddedDescription_)
+        {
+            this->description_ = std::string("ConfigValueDescription::" + this->classname_ + "::" + this->varname_);
+            Language::getLanguage().addEntry(this->description_, description);
+            this->bAddedDescription_ = true;
+        }
+    }
+}
Index: code/trunk/src/orxonox/core/ConfigValueContainer.h
===================================================================
--- code/trunk/src/orxonox/core/ConfigValueContainer.h	(revision 790)
+++ code/trunk/src/orxonox/core/ConfigValueContainer.h	(revision 790)
@@ -0,0 +1,194 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file ConfigValueContainer.h
+    @brief Definition of the ConfigValueContainer class.
+
+    The ConfigValueContainer class contains all needed informations about a configurable variable:
+     - the name of the variable
+     - the name of the class the variable belongs to
+     - the default value
+     - the user-specified value
+     - a pointer to the entry in the config-file
+
+    This is needed to assign the configured values to all newly created objects.
+*/
+
+#ifndef _ConfigValueContainer_H__
+#define _ConfigValueContainer_H__
+
+#include <list>
+#include <string>
+
+#include "CorePrereqs.h"
+
+#include "util/Math.h"
+#include "Language.h"
+
+namespace orxonox
+{
+    //! The ConfigValuecontainer contains all needed informations about a configurable variable.
+    /**
+        The ConfigValueContainer class contains all needed informations about a configurable variable:
+         - the name of the variable
+         - the name of the class the variable belongs to
+         - the default value
+         - the user-specified value
+         - a pointer to the entry in the config-file
+
+        This is needed to assign the configured values to all newly created objects.
+
+        The container searches for the entry in the config file.
+        If there is an entry, it parses the specified value and assigns it to the variable of the right type.
+        If there is no entry, it adds the entry with the default-value to the section of the variables class.
+        If there is no section, the section and the entry are added to the end of the config-file.
+    */
+    class _CoreExport ConfigValueContainer
+    {
+        public:
+            enum VariableType
+            {
+                VT_Int,
+                VT_uInt,
+                VT_Char,
+                VT_uChar,
+                VT_Float,
+                VT_Double,
+                VT_LongDouble,
+                VT_Bool,
+                VT_ConstChar,
+                VT_String,
+                VT_Vector2,
+                VT_Vector3,
+                VT_ColourValue
+            };
+
+            ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, long double defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, Vector2 defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, Vector3 defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, ColourValue defvalue);
+
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(int& value)                           { value = this->value_.value_int_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(unsigned int& value)                  { value = this->value_.value_uint_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(char& value)                          { value = this->value_.value_char_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(unsigned char& value)                 { value = this->value_.value_uchar_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(float& value)                         { value = this->value_.value_float_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(double& value)                        { value = this->value_.value_double_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(long double& value)                   { value = this->value_.value_long_double_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(bool& value)                          { value = this->value_.value_bool_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(std::string& value)                   { value = this->value_string_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(const char* value)                    { value = this->value_string_.c_str(); return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(Vector2& value)                       { value = this->value_vector2_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(Vector3& value)                       { value = this->value_vector3_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(ColourValue& value)                   { value = this->value_colourvalue_; return *this; }
+
+            void description(const std::string& description);
+
+            bool parseSting(const std::string& input);
+            void resetConfigFileEntry();
+            void resetConfigValue();
+
+            static std::string getStrippedLine(const std::string& line);
+            static bool isEmpty(const std::string& line);
+            static bool isComment(const std::string& line);
+
+        private:
+            bool parseSting(const std::string& input, int defvalue);
+            bool parseSting(const std::string& input, unsigned int defvalue);
+            bool parseSting(const std::string& input, char defvalue);
+            bool parseSting(const std::string& input, unsigned char defvalue);
+            bool parseSting(const std::string& input, float defvalue);
+            bool parseSting(const std::string& input, double defvalue);
+            bool parseSting(const std::string& input, long double defvalue);
+            bool parseSting(const std::string& input, bool defvalue);
+            bool parseSting(const std::string& input, const std::string& defvalue);
+            bool parseSting(const std::string& input, const char* defvalue);
+            bool parseSting(const std::string& input, const Vector2& defvalue);
+            bool parseSting(const std::string& input, const Vector3& defvalue);
+            bool parseSting(const std::string& input, const ColourValue& defvalue);
+
+            static std::list<std::string>& getConfigFileLines();
+            static bool finishedReadingConfigFile(bool finished = false);
+            void searchConfigFileLine();
+            std::string parseValueString(bool bStripped = true);
+
+            static void readConfigFile(const std::string& filename);
+            static void writeConfigFile(const std::string& filename);
+
+            std::string         classname_;                     //!< The name of the class the variable belongs to
+            std::string         varname_;                       //!< The name of the variable
+            std::string         defvalueString_;                //!< The string of the default-variable
+
+            union MultiType
+            {
+                int                 value_int_;                 //!< The value, if the variable is of the type int
+                unsigned int        value_uint_;                //!< The value, if the variable is of the type unsigned int
+                char                value_char_;                //!< The value, if the variable is of the type char
+                unsigned char       value_uchar_;               //!< The value, if the variable is of the type unsigned char
+                float               value_float_;               //!< The value, if the variable is of the type float
+                double              value_double_;              //!< The value, if the variable is of the type double
+                long double         value_long_double_;         //!< The value, if the variable is of the type long double
+                bool                value_bool_;                //!< The value, if the variable is of the type bool
+            } value_;                                           //!< The value of the variable
+
+            std::string         value_string_;                  //!< The value, if the variable is of the type string
+            Vector2             value_vector2_;                 //!< The value, if the variable is of the type Vector2
+            Vector3             value_vector3_;                 //!< The value, if the variable is of the type Vector3
+            ColourValue         value_colourvalue_;             //!< The value, if the variable is of the type ColourValue
+
+            std::list<std::string>::iterator configFileLine_;   //!< An iterator, pointing to the entry of the variable in the config-file
+
+            VariableType type_;                                 //!< The type of the variable
+            bool bAddedDescription_;                            //!< True if a description was added
+            LanguageEntryName description_;                     //!< The description
+    };
+}
+
+#endif /* _ConfigValueContainer_H__ */
Index: code/trunk/src/orxonox/core/CoreIncludes.h
===================================================================
--- code/trunk/src/orxonox/core/CoreIncludes.h	(revision 790)
+++ code/trunk/src/orxonox/core/CoreIncludes.h	(revision 790)
@@ -0,0 +1,157 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/**
+    @file CoreIncludes.h
+    @brief Definition of macros and typedefs.
+
+    Every class needs the RegisterObject(class) macro in its constructor. If the class is an interface
+    or the BaseObject itself, it needs the macro RegisterRootObject(class) instead.
+
+    To allow the object being created through the factory, use the CreateFactory(class) macro outside
+    the of the class implementation, so it gets executed before main().
+*/
+
+#ifndef _CoreIncludes_H__
+#define _CoreIncludes_H__
+
+#include "CorePrereqs.h"
+
+// All needed header-files
+#include "Identifier.h"
+#include "Factory.h"
+#include "ClassFactory.h"
+#include "Iterator.h"
+#include "OrxonoxClass.h"
+#include "ConfigValueContainer.h"
+#include "Debug.h"
+
+/**
+    @brief Intern macro, containing the common parts of RegisterObject and RegisterRootObject.
+    @param ClassName The name of the class
+    @param bRootClass True if the class is directly derived from OrxonoxClass
+*/
+#define InternRegisterObject(ClassName, bRootClass) \
+    this->setIdentifier(orxonox::ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, bRootClass)); \
+    if (orxonox::Identifier::isCreatingHierarchy() && this->getParents()) \
+        this->getParents()->add(this->getIdentifier()); \
+    orxonox::ClassIdentifier<ClassName>::addObject(this)
+
+/**
+    @brief Intern macro, containing the specific part of RegisterRootObject.
+    @param ClassName The name of the class
+*/
+#define InternRegisterRootObject(ClassName) \
+    if (orxonox::Identifier::isCreatingHierarchy() && !this->getParents()) \
+        this->setParents(new orxonox::IdentifierList()); \
+    InternRegisterObject(ClassName, true)
+
+/**
+    @brief RegisterObject - with and without debug output.
+    @param ClassName The name of the class
+*/
+#define RegisterObject(ClassName) \
+    COUT(4) << "*** Register Object: " << #ClassName << std::endl; \
+    InternRegisterObject(ClassName, false)
+
+/**
+    @brief RegisterRootObject - with and without debug output.
+    @param ClassName The name of the class
+*/
+#define RegisterRootObject(ClassName) \
+    COUT(4) << "*** Register Root-Object: " << #ClassName << std::endl; \
+    InternRegisterRootObject(ClassName)
+
+/**
+    @brief Exports the necessary templates in order to make them available to all libraries.
+    @param ClassName The name of the Class
+    @param LibraryName The name of the Library
+*/
+#define ExportClass(ClassName, LibraryName) \
+    template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \
+    template class _##LibraryName##Export orxonox::ObjectList<ClassName>; \
+    template class _##LibraryName##Export orxonox::ClassFactory<ClassName>
+
+/**
+    @brief Exports the necessary templates in order to make them available to all libraries.
+    @param ClassName The name of the Class
+    @param LibraryName The name of the Library
+*/
+#define ExportAbstractClass(ClassName, LibraryName) \
+    template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \
+    template class _##LibraryName##Export orxonox::ObjectList<ClassName>
+
+/**
+    @brief Returns the Identifier of the given class.
+    @param ClassName The name of the class
+*/
+#define Class(ClassName) \
+    ClassIdentifier<ClassName>::getIdentifier()
+
+/**
+    @brief Creates the entry in the Factory.
+    @param ClassName The name of the class
+*/
+#define CreateFactory(ClassName) \
+    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName)
+
+/**
+    @brief Returns the Identifier with either a given name or a given network ID through the factory.
+    @param StringOrInt The name or the network ID of the class
+*/
+#define ID(StringOrInt) \
+    orxonox::Factory::getIdentifier(StringOrInt)
+
+/**
+    @brief Assigns the value, defined in the config-file, to the variable (or the default-value, if there is no entry in the file).
+    @param varname The name of the variable
+    @param defvalue The default-value of the variable
+*/
+#define SetConfigValue(varname, defvalue) \
+    orxonox::ConfigValueContainer* container##varname = this->getIdentifier()->getConfigValueContainer(#varname); \
+    if (!container##varname) \
+    { \
+        container##varname = new orxonox::ConfigValueContainer(this->getIdentifier()->getName(), #varname, varname = defvalue); \
+        this->getIdentifier()->setConfigValueContainer(#varname, container##varname); \
+    } \
+    container##varname->getValue(varname)
+
+/**
+    @brief Sets the variable and the config-file entry back to the previously defined default-value.
+    @param varname The name of the variable
+*/
+#define ResetConfigValue(varname) \
+    orxonox::ConfigValueContainer* container##varname##reset = this->getIdentifier()->getConfigValueContainer(#varname); \
+    if (container##varname##reset) \
+    { \
+        container##varname##reset->resetConfigValue(); \
+        container##varname##reset->getValue(varname); \
+    } \
+    else \
+        COUT(2) << "Warning: Couldn't reset variable " << #varname << ", corresponding container doesn't exist." << std::endl
+
+#endif /* _CoreIncludes_H__ */
Index: code/trunk/src/orxonox/core/CorePrereqs.h
===================================================================
--- code/trunk/src/orxonox/core/CorePrereqs.h	(revision 790)
+++ code/trunk/src/orxonox/core/CorePrereqs.h	(revision 790)
@@ -0,0 +1,97 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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  OrxonoxPrereq.h
+ @brief Contains all the necessary forward declarations for all classes, structs and enums.
+ */
+
+#ifndef _CorePrereqs_H__
+#define _CorePrereqs_H__
+
+#include "orxonox/OrxonoxPlatform.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( CORE_STATIC_BUILD )
+#  ifdef CORE_SHARED_BUILD
+#    define _CoreExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _CoreExport
+#    else
+#      define _CoreExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _CoreExport  __attribute__ ((visibility("default")))
+#else
+#  define _CoreExport
+#endif
+
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+class SignalHandler;
+
+namespace orxonox
+{
+  class ArgReader;
+  class BaseFactory;
+  class BaseMetaObjectListElement;
+  template <class T>
+  class ClassFactory;
+  template <class T>
+  class ClassIdentifier;
+  class ConfigValueContainer;
+  class DebugLevel;
+  class Error;
+  class Factory;
+  class Identifier;
+  class IdentifierList;
+  class IdentifierListElement;
+  template <class T>
+  class Iterator;
+  class Language;
+  class LanguageEntry;
+  class Loader;
+  class MetaObjectList;
+  template <class T>
+  class MetaObjectListElement;
+  template <class T>
+  class ObjectList;
+  template <class T>
+  class ObjectListElement;
+  class OrxonoxClass;
+  class OutputHandler;
+  template <class T>
+  class SubclassIdentifier;
+}
+
+#endif /* _CorePrereqs_H__ */
Index: code/trunk/src/orxonox/core/Debug.h
===================================================================
--- code/trunk/src/orxonox/core/Debug.h	(revision 790)
+++ code/trunk/src/orxonox/core/Debug.h	(revision 790)
@@ -0,0 +1,261 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 Grauer
+ *   Co-authors:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+/*!
+ * @file Debug.h
+ * @brief Handles the output for different verbose-modes.
+ *
+ * There are two modes: HARD and SOFT. HARD is precessed during compiletime, while SOFT is for runtime.
+ */
+
+#ifndef _Debug_H__
+#define _Debug_H__
+
+#include <stdio.h>
+
+#include "CorePrereqs.h"
+
+#include "OutputHandler.h"
+
+extern "C" _CoreExport int getSoftDebugLevel();
+
+// DEFINE ERROR MODES
+#define ORX_NONE            0
+#define ORX_ERROR           1
+#define ORX_WARNING         2
+#define ORX_INFO            3
+#define ORX_DEBUG           4
+#define ORX_vDEBUG          5
+
+//definitions
+#define ORX_PRINT_DEBUG_OUTPUT 1 // <-- fix that! should be a configurable setting
+
+#define ORX_HARD_DEBUG_LEVEL ORX_DEBUG
+//#define ORX_SOFT_DEBUG_LEVEL ORX_WARNING // <-- fix that! should be a configurable setting
+
+///////////////////////////////////////////////////
+/// PRINTF: prints with filename and linenumber ///
+///////////////////////////////////////////////////
+#define PRINTFORX_NONE    PRINTF0
+#define PRINTFORX_ERROR   PRINTF1
+#define PRINTFORX_WARNING PRINTF2
+#define PRINTFORX_INFO    PRINTF3
+#define PRINTFORX_DEBUG   PRINTF4
+#define PRINTFORX_vDEBUG  PRINTF5
+
+#define PRINT_EXEC  printf
+#define COUT_EXEC(x) \
+  orxonox::OutputHandler::getOutStream().setOutputLevel(x)
+
+#ifndef PRINTF
+ #if ORX_PRINT_DEBUG_OUTPUT
+
+  #define PRINTF(x) \
+   PRINTF ## x
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_ERROR
+   #define PRINTF1 \
+    if (getSoftDebugLevel() >= ORX_ERROR) \
+     printf("Error (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC
+  #else
+   #define PRINTF1 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_WARNING
+   #define PRINTF2 \
+    if (getSoftDebugLevel() >= ORX_WARNING) \
+     printf("Warning (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC
+  #else
+   #define PRINTF2 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_INFO
+   #define PRINTF3 \
+    if (getSoftDebugLevel() >= ORX_INFO) \
+     printf("Info (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC
+  #else
+   #define PRINTF3 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_DEBUG
+   #define PRINTF4 \
+    if (getSoftDebugLevel() >= ORX_DEBUG) \
+     printf("Debug (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC
+  #else
+   #define PRINTF4 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_vDEBUG
+   #define PRINTF5 \
+    if (getSoftDebugLevel() >= ORX_vDEBUG) \
+     printf("vDebug (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC
+  #else
+   #define PRINTF5 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+ #else /* if ORX_PRINT_DEBUG_OUTPUT */
+  #define PRINTF(x) if (ORX_NONE) PRINT_EXEC
+ #endif /* if ORX_PRINT_DEBUG_OUTPUT */
+
+ #define PRINTF0 \
+  PRINT_EXEC
+#endif /* ifndef PRINTF */
+
+///////////////////////////////////////////////////
+///  PRINT: just prints output as is            ///
+///////////////////////////////////////////////////
+#define PRINTORX_NONE    PRINT0
+#define PRINTORX_ERROR   PRINT1
+#define PRINTORX_WARNING PRINT2
+#define PRINTORX_INFO    PRINT3
+#define PRINTORX_DEBUG   PRINT4
+#define PRINTORX_vDEBUG  PRINT5
+
+#ifndef PRINT
+ #if ORX_PRINT_DEBUG_OUTPUT
+  #define PRINT(x) \
+   PRINT ## x
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_ERROR
+   #define PRINT1  \
+    if (getSoftDebugLevel() >= ORX_ERROR)  \
+     PRINT_EXEC
+  #else
+   #define PRINT1 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_WARNING
+   #define PRINT2 \
+    if (getSoftDebugLevel() >= ORX_WARNING) \
+     PRINT_EXEC
+  #else
+   #define PRINT2 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_INFO
+   #define PRINT3 \
+    if (getSoftDebugLevel() >= ORX_INFO) \
+     PRINT_EXEC
+  #else
+   #define PRINT3 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_DEBUG
+   #define PRINT4 \
+    if (getSoftDebugLevel() >= ORX_DEBUG) \
+     PRINT_EXEC
+  #else
+   #define PRINT4 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_vDEBUG
+   #define PRINT5 \
+    if (getSoftDebugLevel() >= ORX_vDEBUG) \
+     PRINT_EXEC
+  #else
+   #define PRINT5 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+ #else /* if ORX_PRINT_DEBUG_OUTPUT */
+  #define PRINT(x) if (ORX_NONE) PRINT_EXEC
+ #endif /* if ORX_PRINT_DEBUG_OUTPUT */
+
+ #define PRINT0 \
+  PRINT_EXEC
+#endif /* ifndef PRINT */
+
+
+////////////////////////////////////////////////////////
+///  COUT: just prints output as is with std::cout   ///
+////////////////////////////////////////////////////////
+#define COUTORX_NONE    COUT0
+#define COUTORX_ERROR   COUT1
+#define COUTORX_WARNING COUT2
+#define COUTORX_INFO    COUT3
+#define COUTORX_DEBUG   COUT4
+#define COUTORX_vDEBUG  COUT5
+
+#ifndef COUT
+ #if ORX_PRINT_DEBUG_OUTPUT
+  #define COUT(x) \
+   COUT ## x
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_ERROR
+   #define COUT1  \
+    if (getSoftDebugLevel() >= ORX_ERROR)  \
+     COUT_EXEC(1)
+  #else
+   #define COUT1 if (ORX_NONE)\
+    COUT_EXEC(1)
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_WARNING
+   #define COUT2 \
+    if (getSoftDebugLevel() >= ORX_WARNING) \
+     COUT_EXEC(2)
+  #else
+   #define COUT2 if (ORX_NONE) \
+    COUT_EXEC(2)
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_INFO
+   #define COUT3 \
+    if (getSoftDebugLevel() >= ORX_INFO) \
+     COUT_EXEC(3)
+  #else
+   #define COUT3 if (ORX_NONE) \
+    COUT_EXEC(3)
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_DEBUG
+   #define COUT4 \
+    if (getSoftDebugLevel() >= ORX_DEBUG) \
+     COUT_EXEC(4)
+  #else
+   #define COUT4 if (ORX_NONE) \
+    COUT_EXEC(4)
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_vDEBUG
+   #define COUT5 \
+    if (getSoftDebugLevel() >= ORX_vDEBUG) \
+     COUT_EXEC(5)
+  #else
+   #define COUT5 if (ORX_NONE) \
+    COUT_EXEC(5)
+  #endif
+
+ #else /* if ORX_PRINT_DEBUG_OUTPUT */
+  #define COUT(x) if (ORX_NONE) \
+   COUT_EXEC(5)
+ #endif /* if ORX_PRINT_DEBUG_OUTPUT */
+
+ #define COUT0 \
+  COUT_EXEC(0)
+#endif /* ifndef COUT */
+
+#endif /* _Debug_H__ */
Index: code/trunk/src/orxonox/core/DebugLevel.cc
===================================================================
--- code/trunk/src/orxonox/core/DebugLevel.cc	(revision 790)
+++ code/trunk/src/orxonox/core/DebugLevel.cc	(revision 790)
@@ -0,0 +1,106 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file DebugLevel.cc
+    @brief Implementation of the DebugLevel class.
+*/
+
+#include "DebugLevel.h"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Registers the object and sets the debug level.
+        @param A reference to a global variable, used to avoid an infinite recursion in getSoftDebugLevel()
+    */
+    DebugLevel::DebugLevel(bool& bReturnSoftDebugLevel)
+    {
+        RegisterRootObject(DebugLevel);
+        this->setConfigValues();
+        bReturnSoftDebugLevel = true;
+    }
+
+    /**
+        @brief Function to collect the SetConfigValue-macro calls.
+    */
+    void DebugLevel::setConfigValues()
+    {
+        SetConfigValue(softDebugLevelConsole_, 3).description("The maximal level of debug output shown in the console");
+        SetConfigValue(softDebugLevelLogfile_, 3).description("The maximal level of debug output shown in the logfile");
+        SetConfigValue(softDebugLevelShell_, 1).description("The maximal level of debug output shown in the ingame shell");
+
+        // softDebugLevel_ is the maximum of the 3 variables
+        this->softDebugLevel_ = this->softDebugLevelConsole_;
+        if (this->softDebugLevelLogfile_ > this->softDebugLevel_)
+            this->softDebugLevel_ = this->softDebugLevelLogfile_;
+        if (this->softDebugLevelShell_ > this->softDebugLevel_)
+            this->softDebugLevel_ = this->softDebugLevelShell_;
+    }
+
+    /**
+        @brief Static function that holds the singleton.
+    */
+    int DebugLevel::getSoftDebugLevel(OutputHandler::OutputDevice device)
+    {
+        static bool bCreatingSoftDebugLevelObject = true;   // Static variable - used to enhance the performance
+        static bool bReturnSoftDebugLevel = false;          // Static variable - used to avoid an infinite recursion
+        static DebugLevel* theOnlyDebugLevelObject = 0;     // Static variable - will contain a pointer to the only instance of the DebugLevel class
+
+        // If bReturnSoftDebugLevel is true, the instance of DebugLevel was created (it's set to true at the end of the constructor, call by reference)
+        if (bReturnSoftDebugLevel)
+        {
+            if (device == OutputHandler::LD_All)
+                return theOnlyDebugLevelObject->softDebugLevel_;
+            else if (device == OutputHandler::LD_Console)
+                return theOnlyDebugLevelObject->softDebugLevelConsole_;
+            else if (device == OutputHandler::LD_Logfile)
+                return theOnlyDebugLevelObject->softDebugLevelLogfile_;
+            else if (device == OutputHandler::LD_Shell)
+                return theOnlyDebugLevelObject->softDebugLevelShell_;
+        }
+
+        // If bCreatingSoftDebugLevelObject is true, we're just about to create an instance of the DebugLevel class
+        if (bCreatingSoftDebugLevelObject)
+        {
+            bCreatingSoftDebugLevelObject = false;
+            theOnlyDebugLevelObject = new DebugLevel(bReturnSoftDebugLevel);
+            return getSoftDebugLevel(device);
+        }
+
+        // Return a constant value while we're creating the object
+        return 4;
+    }
+}
+
+/**
+    @returns the soft debug level, stored in the only existing instance of the DebugLevel class, configured in the config-file.
+*/
+int getSoftDebugLevel()
+{
+    return orxonox::DebugLevel::getSoftDebugLevel();
+}
Index: code/trunk/src/orxonox/core/DebugLevel.h
===================================================================
--- code/trunk/src/orxonox/core/DebugLevel.h	(revision 790)
+++ code/trunk/src/orxonox/core/DebugLevel.h	(revision 790)
@@ -0,0 +1,71 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file DebugLevel.h
+    @brief Definition of the DebugLevel class.
+
+    The DebugLevel class is a singleton, only used to configure the amount of debug
+    output (see Debug.h) into the console and the logfile (see OutputHandler.h).
+*/
+
+#ifndef _DebugLevel_H__
+#define _DebugLevel_H__
+
+#include "CorePrereqs.h"
+
+#include "OrxonoxClass.h"
+#include "OutputHandler.h"
+#include "CoreIncludes.h"
+
+namespace orxonox
+{
+    //! The DebugLevel class is a singleton, only used to configure the amount of debug output.
+    class _CoreExport DebugLevel : public OrxonoxClass
+    {
+        template <class T>
+        friend class ClassIdentifier; // forward declaration because of the private destructor
+
+        public:
+            static int getSoftDebugLevel(OutputHandler::OutputDevice device = OutputHandler::LD_All);
+            void setConfigValues();
+
+        private:
+            explicit DebugLevel(bool& bReturnSoftDebugLevel);
+            DebugLevel(const DebugLevel& dl) {} // don't copy
+            virtual ~DebugLevel() {}            // don't delete
+
+            int softDebugLevel_;                            //!< The debug level
+            int softDebugLevelConsole_;                     //!< The debug level for the console
+            int softDebugLevelLogfile_;                     //!< The debug level for the logfile
+            int softDebugLevelShell_;                       //!< The debug level for the ingame shell
+            ConfigValueContainer* softDebugLevelContainer_; //!< The config value container for the debug level
+    };
+    ExportAbstractClass(DebugLevel, Core);
+}
+
+#endif /* _DebugLevel_H__ */
Index: code/trunk/src/orxonox/core/Error.cc
===================================================================
--- code/trunk/src/orxonox/core/Error.cc	(revision 790)
+++ code/trunk/src/orxonox/core/Error.cc	(revision 790)
@@ -0,0 +1,63 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      Nicolas Perrenoud
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Debug.h"
+#include "Error.h"
+
+namespace orxonox
+{
+	Error::Error()
+	{
+		Error(0,"");
+	}
+
+	Error::Error(std::string errorMsg, int errorCode)
+	{
+		Error(errorCode, errorMsg);
+	}
+
+	Error::Error(int errorCode, std::string errorMsg)
+	{
+		COUT(1) << "############################ "<< std::endl
+							<< "#         Error "<<errorCode<< "          #"<< std::endl
+							<< "############################ "<< std::endl
+							<< "An error occured in Orxonox: "<< std::endl;
+
+		if (errorMsg=="")
+		{
+			switch (errorCode)
+			{
+				case 1:
+					errorMsg = "Some error!";
+					break;
+				default:
+					errorMsg = "Unknown error!";
+			}
+		}
+		COUT(1) << errorMsg << std::endl<< std::endl;
+	}
+}
Index: code/trunk/src/orxonox/core/Error.h
===================================================================
--- code/trunk/src/orxonox/core/Error.h	(revision 790)
+++ code/trunk/src/orxonox/core/Error.h	(revision 790)
@@ -0,0 +1,48 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      Nicolas Perrenoud
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Error_H__
+#define _Error_H__
+
+#include <string>
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+	class _CoreExport Error
+	{
+	public:
+		Error();
+		Error(std::string errorMsg, int errorCode = 0);
+		Error(int errorCode, std::string errorMsg = "");
+	private:
+
+	};
+}
+
+#endif /* _Error_H__ */
Index: code/trunk/src/orxonox/core/Factory.cc
===================================================================
--- code/trunk/src/orxonox/core/Factory.cc	(revision 265)
+++ code/trunk/src/orxonox/core/Factory.cc	(revision 790)
@@ -1,23 +1,109 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file Factory.cc
+    @brief Implementation of the Factory class.
+*/
+
+#include "Identifier.h"
+#include "Debug.h"
+#include "BaseObject.h"
 #include "Factory.h"
-#include "Identifier.h"
 
 namespace orxonox
 {
-    Factory* Factory::pointer_s = NULL;
-
+    /**
+        @returns the Identifier with a given name.
+        @param name The name of the wanted Identifier
+    */
     Identifier* Factory::getIdentifier(const std::string& name)
     {
-        if (!pointer_s)
-            pointer_s = new Factory;
-
-        return pointer_s->identifierMap_[name];
+        return getFactoryPointer()->identifierStringMap_[name];
     }
 
+    /**
+        @returns the Identifier with a given network ID.
+        @param id The network ID of the wanted Identifier
+    */
+    Identifier* Factory::getIdentifier(const unsigned int id)
+    {
+        return getFactoryPointer()->identifierNetworkIDMap_[id];
+    }
+
+    /**
+        @brief Adds a new Identifier to both maps.
+        @param name The name of the identifier
+        @param identifier The identifier to add
+    */
     void Factory::add(const std::string& name, Identifier* identifier)
     {
-        if (!pointer_s)
-            pointer_s = new Factory;
+        getFactoryPointer()->identifierStringMap_[name] = identifier;
+        getFactoryPointer()->identifierNetworkIDMap_[identifier->getNetworkID()] = identifier;
+    }
 
-        pointer_s->identifierMap_[name] = identifier;
+    /**
+        @brief Removes the entry with the old network ID and adds a new one.
+        @param identifier The identifier to change
+        @param oldID The old networkID
+        @param newID The new networkID
+    */
+    void Factory::changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID)
+    {
+        getFactoryPointer()->identifierNetworkIDMap_.erase(oldID);
+        getFactoryPointer()->identifierNetworkIDMap_[newID] = identifier;
+    }
+
+    /**
+        @brief Creates the class-hierarchy by creating and destroying one object of each type.
+    */
+    void Factory::createClassHierarchy()
+    {
+        COUT(3) << "*** Factory -> Create class-hierarchy" << std::endl;
+        std::map<std::string, Identifier*>::iterator it;
+        it = getFactoryPointer()->identifierStringMap_.begin();
+        (*getFactoryPointer()->identifierStringMap_.begin()).second->startCreatingHierarchy();
+        for (it = getFactoryPointer()->identifierStringMap_.begin(); it != getFactoryPointer()->identifierStringMap_.end(); ++it)
+        {
+            // To create the new branch of the class-hierarchy, we create a new object and delete it afterwards.
+            BaseObject* temp = (*it).second->fabricate();
+            delete temp;
+        }
+        (*getFactoryPointer()->identifierStringMap_.begin()).second->stopCreatingHierarchy();
+        COUT(3) << "*** Factory -> Finished class-hierarchy creation" << std::endl;
+    }
+
+    /**
+        @brief Ensures the Factory gets created in the right moment.
+        @return The Factory.
+    */
+    Factory* Factory::getFactoryPointer()
+    {
+      static Factory theOneAndOnlyFactoryInstance = Factory();
+      return &theOneAndOnlyFactoryInstance;
     }
 }
Index: code/trunk/src/orxonox/core/Factory.h
===================================================================
--- code/trunk/src/orxonox/core/Factory.h	(revision 265)
+++ code/trunk/src/orxonox/core/Factory.h	(revision 790)
@@ -1,2 +1,44 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file Factory.h
+    @brief Definition of the Factory and the BaseFactory class.
+
+    The Factory is a singleton, containing two maps to map either the name or the network ID
+    of a class with the corresponding Identifier.
+
+    Usage:
+    ID(classname) or ID(networkID) returns the corresponding Identifier.
+
+
+    BaseObject is the parent of ClassFactory which is defined in ClassFactory.h.
+    It can't be defined in ClassFactory.h, because of circular dependencies.
+*/
+
 #ifndef _Factory_H__
 #define _Factory_H__
@@ -5,25 +47,32 @@
 #include <string>
 
+#include "CorePrereqs.h"
+
 namespace orxonox
 {
-    class BaseObject;
-    class Identifier;
+    class BaseObject; // Forward declaration
 
     // ###############################
     // ###         Factory         ###
     // ###############################
-    class Factory
+    //! The Factory is used to map the name or the network ID of a class with its Identifier.
+    class _CoreExport Factory
     {
         public:
             static Identifier* getIdentifier(const std::string& name);
+            static Identifier* getIdentifier(const unsigned int id);
             static void add(const std::string& name, Identifier* identifier);
+            static void changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID);
+            static void createClassHierarchy();
+
+            static Factory* getFactoryPointer();    // avoid overriding order problem in the static intialisation process
 
         private:
-            Factory() {}
-            Factory(const Factory& factory) {}
-            ~Factory() {}
+            Factory() {}                            // don't create
+            Factory(const Factory& factory) {}      // don't copy
+            ~Factory() {}                           // don't delete
 
-            static Factory* pointer_s;
-            std::map<std::string, Identifier*> identifierMap_;
+            std::map<std::string, Identifier*> identifierStringMap_;            //!< The map, mapping the name with the Identifier
+            std::map<unsigned int, Identifier*> identifierNetworkIDMap_;        //!< The map, mapping the network ID with the Identifier
     };
 
@@ -31,10 +80,12 @@
     // ###       BaseFactory       ###
     // ###############################
-    class BaseFactory
+    //! Base-class of ClassFactory. Has to be defined separate because of circular dependencies.
+    class _CoreExport BaseFactory
     {
         public:
             virtual BaseObject* fabricate() = 0;
+            virtual ~BaseFactory() {};
     };
 }
 
-#endif
+#endif /* _Factory_H__ */
Index: code/trunk/src/orxonox/core/Identifier.cc
===================================================================
--- code/trunk/src/orxonox/core/Identifier.cc	(revision 265)
+++ code/trunk/src/orxonox/core/Identifier.cc	(revision 790)
@@ -1,3 +1,36 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file Identifier.cc
+    @brief Implementation of the Identifier class.
+*/
+
 #include "Identifier.h"
+#include "Factory.h"
 
 namespace orxonox
@@ -6,6 +39,9 @@
     // ###       Identifier        ###
     // ###############################
-    int Identifier::hierarchyCreatingCounter_s = 0;
+    int Identifier::hierarchyCreatingCounter_s = 0; // Set the static member variable hierarchyCreatingCounter_s to zero (this static member variable is ok: it's used in main(), not before)
 
+    /**
+        @brief Constructor: No factory, no object created, new ObjectList and a unique networkID.
+    */
     Identifier::Identifier()
     {
@@ -14,18 +50,25 @@
 
         this->children_ = new IdentifierList;
+
+        // Use a static variable because the classID gets created before main() and that's why we should avoid static member variables
+        static unsigned int classIDcounter_s = 0;
+        this->classID_ = classIDcounter_s++;
     }
 
+    /**
+        @brief Destructor: Deletes the IdentifierList containing the children.
+    */
     Identifier::~Identifier()
     {
-        delete &this->name_;
-
         delete this->children_;
     }
 
+    /**
+        @brief Initializes the Identifier with an IdentifierList containing all parents of the class the Identifier belongs to.
+        @param parents The IdentifierList containing all parents
+    */
     void Identifier::initialize(const IdentifierList* parents)
     {
-#if HIERARCHY_VERBOSE
-        std::cout << "*** Initialize " << this->name_ << "-Singleton.\n";
-#endif
+        COUT(4) << "*** Initialize " << this->name_ << "-Singleton." << std::endl;
         this->bCreatedOneObject_ = true;
 
@@ -36,5 +79,5 @@
             {
                 this->parents_.add(temp1->identifier_);
-                temp1->identifier_->getChildren().add(this);
+                temp1->identifier_->getChildren().add(this); // We're a child of our parents
 
                 temp1 = temp1->next_;
@@ -43,18 +86,47 @@
     }
 
+    /**
+        @brief Creates an object of the type the Identifier belongs to.
+        @return The new object
+    */
     BaseObject* Identifier::fabricate()
     {
         if (this->factory_)
         {
-            return this->factory_->fabricate();
+            return this->factory_->fabricate(); // We have to return a BaseObject, because we don't know the exact type.
         }
         else
         {
-            std::cout << "Error: Cannot create an object of type '" << this->name_ << "'. Class is abstract.\n";
-            std::cout << "Aborting...";
+            // Abstract classes don't have a factory and therefore can't create new objects
+            COUT(1) << "Error: Cannot create an object of type '" << this->name_ << "'. Class is abstract." << std::endl;
+            COUT(1) << "Aborting..." << std::endl;
             abort();
+            return NULL;
         }
     }
 
+    /**
+        @brief Sets the network ID to a new value and changes the entry in the Factory.
+        @param id The new network ID
+    */
+    void Identifier::setNetworkID(unsigned int id)
+    {
+        Factory::changeNetworkID(this, this->classID_, id);
+        this->classID_ = id;
+    }
+
+    /**
+        @returns a reference to the Identifier map, containing all Identifiers.
+    */
+    std::map<std::string, Identifier*>& Identifier::getIdentifierMap()
+    {
+        static std::map<std::string, Identifier*> identifierMapStaticReference = std::map<std::string, Identifier*>();
+        return identifierMapStaticReference;
+    }
+
+    /**
+        @returns true, if the Identifier is at least of the given type.
+        @param identifier The identifier to compare with
+    */
     bool Identifier::isA(const Identifier* identifier) const
     {
@@ -62,4 +134,8 @@
     }
 
+    /**
+        @returns true, if the Identifier is exactly of the given type.
+        @param identifier The identifier to compare with
+    */
     bool Identifier::isDirectlyA(const Identifier* identifier) const
     {
@@ -67,4 +143,8 @@
     }
 
+    /**
+        @returns true, if the assigned identifier is a child of the given identifier.
+        @param identifier The identifier to compare with
+    */
     bool Identifier::isChildOf(const Identifier* identifier) const
     {
@@ -72,4 +152,8 @@
     }
 
+    /**
+        @returns true, if the assigned identifier is a parent of the given identifier.
+        @param identifier The identifier to compare with
+    */
     bool Identifier::isParentOf(const Identifier* identifier) const
     {
Index: code/trunk/src/orxonox/core/Identifier.h
===================================================================
--- code/trunk/src/orxonox/core/Identifier.h	(revision 265)
+++ code/trunk/src/orxonox/core/Identifier.h	(revision 790)
@@ -1,36 +1,104 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file Identifier.h
+    @brief Definition of the Identifier, ClassIdentifier and SubclassIdentifier classes, implementation of the ClassIdentifier and SubclassIdentifier classes.
+
+    The Identifier contains all needed informations about the class it belongs to:
+     - the name
+     - a list with all objects
+     - parents and childs
+     - the factory (if available)
+     - the networkID that can be synchronised with the server
+     - all configurable variables (if available)
+
+    Every object has a pointer to the Identifier of its class. This allows the use isA(...),
+    isDirectlyA(...), isChildOf(...) and isParentOf(...).
+
+    To create the class-hierarchy, the Identifier has some intern functions and variables.
+
+    Every Identifier is in fact a ClassIdentifier, but they are derived from Identifier.
+
+    SubclassIdentifier is a separated class, acting like an Identifier, but has a given class.
+    You can only assign Identifiers of exactly the given class or of a derivative to a SubclassIdentifier.
+*/
+
 #ifndef _Identifier_H__
 #define _Identifier_H__
 
-#include <iostream>
-
+#include <map>
+#include <string>
+#include <utility>
+
+#include "CorePrereqs.h"
+
+#include "ObjectList.h"
 #include "IdentifierList.h"
-#include "ObjectList.h"
-#include "Factory.h"
-
-#define HIERARCHY_VERBOSE false
-
+#include "Debug.h"
+#include "Iterator.h"
 
 namespace orxonox
 {
-    class BaseObject;
+    class BaseFactory; // Forward declaration
+    class BaseObject;  // Forward declaration
 
     // ###############################
     // ###       Identifier        ###
     // ###############################
-    class Identifier
+    //! The Identifier is used to identify the class of an object and to store informations about the class.
+    /**
+        The Identifier contains all needed informations about the class it belongs to:
+         - the name
+         - a list with all objects
+         - parents and childs
+         - the factory (if available)
+         - the networkID that can be synchronised with the server
+         - all configurable variables (if available)
+
+        Every object has a pointer to the Identifier of its class. This allows the use isA(...),
+        isDirectlyA(...), isChildOf(...) and isParentOf(...).
+
+        You can't directly create an Identifier, it's just the base-class for ClassIdentifier.
+    */
+    class _CoreExport Identifier
     {
         template <class T>
-        friend class ClassIdentifier;
+        friend class ClassIdentifier; // Forward declaration
 
         template <class T>
-        friend class SubclassIdentifier;
-
-        template <class T>
-        friend class ClassFactory;
+        friend class SubclassIdentifier; // Forward declaration
+
+        friend class Factory; // Forward declaration
 
         public:
+            /** @brief Sets the Factory. @param factory The factory to assign */
             inline void addFactory(BaseFactory* factory) { this->factory_ = factory; }
+
             BaseObject* fabricate();
-
             bool isA(const Identifier* identifier) const;
             bool isDirectlyA(const Identifier* identifier) const;
@@ -38,40 +106,69 @@
             bool isParentOf(const Identifier* identifier) const;
 
+            static std::map<std::string, Identifier*>& getIdentifierMap();
+
+            /** @brief Removes all objects of the corresponding class. */
+            virtual void removeObjects() const = 0;
+
+            /** @returns the name of the class the Identifier belongs to. */
             inline const std::string& getName() const { return this->name_; }
+
+            /** @returns the parents of the class the Identifier belongs to. */
             inline const IdentifierList& getParents() const { return this->parents_; }
+
+            /** @returns the children of the class the Identifier belongs to. */
             inline IdentifierList& getChildren() const { return *this->children_; }
 
+            /** @returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. */
             inline static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
+
+            /** @returns the network ID to identify a class through the network. */
+            inline const unsigned int getNetworkID() const { return this->classID_; }
+
+            /** @brief Sets the network ID to a new value. @param id The new value */
+            void setNetworkID(unsigned int id);
+
+            /** @returns the ConfigValueContainer of a variable, given by the string of its name. @param varname The name of the variable */
+            inline ConfigValueContainer* getConfigValueContainer(const std::string& varname)
+                { return this->configValues_[varname]; }
+
+            /** @brief Sets the ConfigValueContainer of a variable, given by the string of its name. @param varname The name of the variablee @param container The container */
+            inline void setConfigValueContainer(const std::string& varname, ConfigValueContainer* container)
+                { this->configValues_[varname] = container; }
 
         private:
             Identifier();
-            Identifier(const Identifier& identifier) {}
+            Identifier(const Identifier& identifier) {} // don't copy
             virtual ~Identifier();
             void initialize(const IdentifierList* parents);
 
+            /**
+                @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents.
+            */
             inline static void startCreatingHierarchy()
             {
                 hierarchyCreatingCounter_s++;
-#if HIERARCHY_VERBOSE
-                std::cout << "*** Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << "\n";
-#endif
-            }
-
+                COUT(4) << "*** Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
+            }
+
+            /**
+                @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents.
+            */
             inline static void stopCreatingHierarchy()
             {
                 hierarchyCreatingCounter_s--;
-#if HIERARCHY_VERBOSE
-                std::cout << "*** Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << "\n";
-#endif
-            }
-
-            IdentifierList parents_;
-            IdentifierList* children_;
-
-            std::string name_;
-
-            BaseFactory* factory_;
-            bool bCreatedOneObject_;
-            static int hierarchyCreatingCounter_s;
+                COUT(4) << "*** Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
+            }
+
+            IdentifierList parents_;                                    //!< The Parents of the class the Identifier belongs to
+            IdentifierList* children_;                                  //!< The Children of the class the Identifier belongs to
+
+            std::string name_;                                          //!< The name of the class the Identifier belongs to
+
+            BaseFactory* factory_;                                      //!< The Factory, able to create new objects of the given class (if available)
+            bool bCreatedOneObject_;                                    //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
+            static int hierarchyCreatingCounter_s;                      //!< Bigger than zero if at least one Identifier stores its parents (its an int instead of a bool to avoid conflicts with multithreading)
+            unsigned int classID_;                                      //!< The network ID to identify a class through the network
+            std::map<std::string, ConfigValueContainer*> configValues_; //!< A map to link the string of configurable variables with their ConfigValueContainer
     };
 
@@ -80,4 +177,10 @@
     // ###     ClassIdentifier     ###
     // ###############################
+    //! The ClassIdentifier is derived from Identifier and holds all class-specific functions and variables the Identifier cannot have.
+    /**
+        ClassIdentifier is a Singleton, which means that only one object of a given type T exists.
+        This makes it possible to store informations about a class, sharing them with all
+        objects of that class without defining static variables in every class.
+    */
     template <class T>
     class ClassIdentifier : public Identifier
@@ -85,103 +188,145 @@
         public:
             static ClassIdentifier<T>* registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass);
+            static void addObject(T* object);
             static ClassIdentifier<T>* getIdentifier();
-            static void addObject(T* object);
+            void removeObjects() const;
+            void setName(const std::string& name);
 
         private:
             ClassIdentifier();
-            ClassIdentifier(const ClassIdentifier<T>& identifier) {}
-            ~ClassIdentifier();
-
-            static ClassIdentifier<T>* pointer_s;
-            ObjectList<T>* objects_;
+            ClassIdentifier(const ClassIdentifier<T>& identifier) {}    // don't copy
+            ~ClassIdentifier() {}                                       // don't delete
+
+            ObjectList<T>* objects_;    //!< The ObjectList, containing all objects of type T
+            bool bSetName_;             //!< True if the name is set
     };
 
-    template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::pointer_s = NULL;
-
+    /**
+        @brief Constructor: Creates the ObjectList.
+    */
     template <class T>
     ClassIdentifier<T>::ClassIdentifier()
     {
-        this->objects_ = new ObjectList<T>;
-    }
-
-    template <class T>
-    ClassIdentifier<T>::~ClassIdentifier()
-    {
-        delete this->objects_;
-        this->pointer_s = NULL;
-    }
-
+        this->objects_ = ObjectList<T>::getList();
+        this->bSetName_ = false;
+    }
+
+    /**
+        @brief Registers a class, which means that the name and the parents get stored.
+        @param parents An IdentifierList, containing the Identifiers of all parents of the class
+        @param name A string, containing exactly the name of the class
+        @param bRootClass True if the class is either an Interface or the BaseObject itself
+        @return The ClassIdentifier itself
+    */
     template <class T>
     ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass)
     {
-#if HIERARCHY_VERBOSE
-        std::cout << "*** Register Class in " << name << "-Singleton.\n";
-#endif
-        if (!pointer_s)
+        COUT(4) << "*** Register Class in " << name << "-Singleton." << std::endl;
+
+        // Check if at least one object of the given type was created
+        if (!getIdentifier()->bCreatedOneObject_)
         {
-#if HIERARCHY_VERBOSE
-            std::cout << "*** Register Class in " << name << "-Singleton -> Create Singleton.\n";
-#endif
-            pointer_s = new ClassIdentifier();
+            // If no: We have to store the informations and initialize the Identifier
+            getIdentifier()->setName(name);
+
+            COUT(4) << "*** Register Class in " << name << "-Singleton -> Initialize Singleton." << std::endl;
+            if (bRootClass)
+                getIdentifier()->initialize(NULL); // If a class is derived from two interfaces, the second interface might think it's derived from the first because of the order of constructor-calls. Thats why we set parents to zero in that case.
+            else
+                getIdentifier()->initialize(parents);
         }
 
-        if (!pointer_s->bCreatedOneObject_)
+        return getIdentifier();
+    }
+
+    /**
+        @brief Creates the only instance of this class for the template class T.
+        @return The Identifier itself
+    */
+    template <class T>
+    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
+    {
+        static ClassIdentifier<T> theOneAndOnlyInstance = ClassIdentifier<T>();
+        static bool bIdentifierCreated = false;
+
+        if (!bIdentifierCreated)
         {
-#if HIERARCHY_VERBOSE
-            std::cout << "*** Register Class in " << name << "-Singleton -> Initialize Singleton.\n";
-#endif
-            pointer_s->name_ = name;
-            Factory::add(name, pointer_s);
-
-            if (bRootClass)
-                pointer_s->initialize(NULL);
-            else
-                pointer_s->initialize(parents);
+            COUT(4) << "*** Create Identifier Singleton." << std::endl;
+            bIdentifierCreated = true;
         }
 
-        return pointer_s;
-    }
-
-    template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
-    {
-        if (!pointer_s)
+        return &theOneAndOnlyInstance;
+    }
+
+    /**
+        @brief Sets the name of the class.
+        @param name The name
+    */
+    template <class T>
+    void ClassIdentifier<T>::setName(const std::string& name)
+    {
+        // Make sure we didn't already set the name, to avoid duplicate entries in the Identifier map
+        if (!this->bSetName_)
         {
-#if HIERARCHY_VERBOSE
-            std::cout << "*** Create Singleton.\n";
-#endif
-            pointer_s = new ClassIdentifier();
+            this->name_ = name;
+            this->getIdentifierMap().insert(std::pair<std::string, Identifier*>(name, this));
+            this->bSetName_ = true;
         }
-
-        return pointer_s;
-    }
-
+    }
+
+    /**
+        @brief Adds an object of the given type to the ObjectList.
+        @param object The object to add
+    */
     template <class T>
     void ClassIdentifier<T>::addObject(T* object)
     {
-#if HIERARCHY_VERBOSE
-        std::cout << "*** Added object to " << ClassIdentifier<T>::getIdentifier()->getName() << "-list.\n";
-#endif
-        object->getMetaList()->add(ClassIdentifier<T>::getIdentifier()->objects_, ClassIdentifier<T>::getIdentifier()->objects_->add(object));
-    }
-
+        COUT(4) << "*** Added object to " << ClassIdentifier<T>::getIdentifier()->getName() << "-list." << std::endl;
+        object->getMetaList().add(ClassIdentifier<T>::getIdentifier()->objects_, ClassIdentifier<T>::getIdentifier()->objects_->add(object));
+    }
+
+    /**
+        @brief Removes all objects of the corresponding class.
+    */
+    template <class T>
+    void ClassIdentifier<T>::removeObjects() const
+    {
+        for (Iterator<T> it = ObjectList<T>::start(); it;)
+            delete *(it++);
+    }
 
     // ###############################
     // ###   SubclassIdentifier    ###
     // ###############################
-    template <class B>
+    //! The SubclassIdentifier acts almost like an Identifier, but has some prerequisites.
+    /**
+        You can only assign an Identifier that belongs to a class T (or derived) to a SubclassIdentifier<T>.
+        If you assign something else, the program aborts.
+        Because we know the minimal type, a dynamic_cast is done, which makes it easier to create a new object.
+    */
+    template <class T>
     class SubclassIdentifier
     {
         public:
-            SubclassIdentifier();
-
-            SubclassIdentifier<B>& operator=(Identifier* identifier)
-            {
-                if (!identifier->isA(ClassIdentifier<B>::getIdentifier()))
+            /**
+                @brief Constructor: Automaticaly assigns the Identifier of the given class.
+            */
+            SubclassIdentifier()
+            {
+                this->identifier_ = ClassIdentifier<T>::getIdentifier();
+            }
+
+            /**
+                @brief Overloading of the = operator: assigns the identifier and checks its type.
+                @param identifier The Identifier to assign
+                @return The SubclassIdentifier itself
+            */
+            SubclassIdentifier<T>& operator=(Identifier* identifier)
+            {
+                if (!identifier->isA(ClassIdentifier<T>::getIdentifier()))
                 {
-                    std::cout << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<B>::getIdentifier()->getName() << "!\n";
-                    std::cout << "Error: SubclassIdentifier<" << ClassIdentifier<B>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden.\n";
-                    std::cout << "Aborting...\n";
+                    COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl;
+                    COUT(1) << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl;
+                    COUT(1) << "Aborting..." << std::endl;
                     abort();
                 }
@@ -190,4 +335,8 @@
             }
 
+            /**
+                @brief Overloading of the * operator: returns the assigned identifier.
+                @return The assigned identifier
+            */
             Identifier* operator*()
             {
@@ -195,4 +344,8 @@
             }
 
+            /**
+                @brief Overloading of the -> operator: returns the assigned identifier.
+                @return The assigned identifier
+            */
             Identifier* operator->() const
             {
@@ -200,23 +353,31 @@
             }
 
-            B* fabricate()
+            /**
+                @brief Creates a new object of the type of the assigned Identifier and dynamic_casts it to the minimal type given by T.
+                @return The new object
+            */
+            T* fabricate()
             {
                 BaseObject* newObject = this->identifier_->fabricate();
+
+                // Check if the creation was successful
                 if (newObject)
                 {
-                    return dynamic_cast<B*>(newObject);
+                    // Do a dynamic_cast, because an object of type T is much better than of type BaseObject
+                    return (T*)(newObject);
                 }
                 else
                 {
+                    // Something went terribly wrong
                     if (this->identifier_)
                     {
-                        std::cout << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<B>::getIdentifier()->getName() << "!\n";
-                        std::cout << "Error: Couldn't fabricate a new Object.\n";
-                        std::cout << "Aborting...\n";
+                        COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl;
+                        COUT(1) << "Error: Couldn't fabricate a new Object." << std::endl;
+                        COUT(1) << "Aborting..." << std::endl;
                     }
                     else
                     {
-                        std::cout << "Error: Couldn't fabricate a new Object - Identifier is undefined.\n";
-                        std::cout << "Aborting...\n";
+                        COUT(1) << "Error: Couldn't fabricate a new Object - Identifier is undefined." << std::endl;
+                        COUT(1) << "Aborting..." << std::endl;
                     }
 
@@ -225,25 +386,28 @@
             }
 
+            /** @returns the assigned identifier. */
             inline const Identifier* getIdentifier() const
                 { return this->identifier_; }
+
+            /** @returns true, if the assigned identifier is at least of the given type. @param identifier The identifier to compare with */
             inline bool isA(const Identifier* identifier) const
                 { return this->identifier_->isA(identifier); }
+
+            /** @returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */
             inline bool isDirectlyA(const Identifier* identifier) const
                 { return this->identifier_->isDirectlyA(identifier); }
+
+            /** @returns true, if the assigned identifier is a child of the given identifier. @param identifier The identifier to compare with */
             inline bool isChildOf(const Identifier* identifier) const
                 { return this->identifier_->isChildOf(identifier); }
+
+            /** @returns true, if the assigned identifier is a parent of the given identifier. @param identifier The identifier to compare with */
             inline bool isParentOf(const Identifier* identifier) const
                 { return this->identifier_->isParentOf(identifier); }
 
         private:
-            Identifier* identifier_;
+            Identifier* identifier_;        //!< The assigned identifier
     };
-
-    template <class B>
-    SubclassIdentifier<B>::SubclassIdentifier()
-    {
-        this->identifier_ = ClassIdentifier<B>::getIdentifier();
-    }
 }
 
-#endif
+#endif /* _Identifier_H__ */
Index: code/trunk/src/orxonox/core/IdentifierIncludes.h
===================================================================
--- code/trunk/src/orxonox/core/IdentifierIncludes.h	(revision 265)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#include "Identifier.h"
-#include "Factory.h"
-#include "ClassFactory.h"
-#include "Iterator.h"
-#include "OrxonoxClass.h"
-
-
-#define InternRegisterObject(ClassName, bRootClass) \
-    this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, bRootClass)); \
-    if (Identifier::isCreatingHierarchy() && this->getParents()) \
-        this->getParents()->add(this->getIdentifier()); \
-    ClassIdentifier<ClassName>::addObject(this)
-
-#define InternRegisterRootObject(ClassName) \
-    if (Identifier::isCreatingHierarchy() && !this->getParents()) \
-        this->setParents(new IdentifierList()); \
-    InternRegisterObject(ClassName, true)
-
-#if HIERARCHY_VERBOSE
-#define RegisterObject(ClassName) \
-    std::cout << "*** Register Object: " << #ClassName << "\n"; \
-    InternRegisterObject(ClassName, false)
-#else
-#define RegisterObject(ClassName) \
-    InternRegisterObject(ClassName, false)
-#endif
-
-#if HIERARCHY_VERBOSE
-#define RegisterRootObject(ClassName) \
-    std::cout << "*** Register Root-Object: " << #ClassName << "\n"; \
-    InternRegisterRootObject(ClassName)
-#else
-#define RegisterRootObject(ClassName) \
-    InternRegisterRootObject(ClassName)
-#endif
-
-#define Class(ClassName) \
-    ClassIdentifier<ClassName>::getIdentifier()
-
-#define CreateFactory(ClassName) \
-    bool bCreated##ClassName##Factory = ClassFactory<ClassName>::create()
-
-#define ID(Name) \
-    Factory::getIdentifier(Name)
Index: code/trunk/src/orxonox/core/IdentifierList.cc
===================================================================
--- code/trunk/src/orxonox/core/IdentifierList.cc	(revision 265)
+++ code/trunk/src/orxonox/core/IdentifierList.cc	(revision 790)
@@ -1,4 +1,36 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file IdentifierList.cc
+    @brief Implementation of the IdentifierList class.
+*/
+
+#include "Identifier.h"
 #include "IdentifierList.h"
-#include "Identifier.h"
 
 namespace orxonox
@@ -7,4 +39,7 @@
     // ###     IdentifierList      ###
     // ###############################
+    /**
+        @brief Constructor: Sets first_ to zero.
+    */
     IdentifierList::IdentifierList()
     {
@@ -12,4 +47,7 @@
     }
 
+    /**
+        @brief Destructor: Deletes all elements in the list, but NOT THE IDENTIFIERS.
+    */
     IdentifierList::~IdentifierList()
     {
@@ -23,4 +61,8 @@
     }
 
+    /**
+        @brief Adds an Identifier to the list.
+        @param identifier The Identifier to add
+    */
     void IdentifierList::add(const Identifier* identifier)
     {
@@ -30,4 +72,8 @@
     }
 
+    /**
+        @brief Removes an Identifier from the list.
+        @param identifier The Identifier to remove
+    */
     void IdentifierList::remove(const Identifier* identifier)
     {
@@ -35,4 +81,5 @@
             return;
 
+        // Check if we have to delete the first element
         if (this->first_->identifier_ == identifier)
         {
@@ -44,4 +91,5 @@
         }
 
+        // Iterate through the list
         IdentifierListElement* temp = this->first_;
         while (temp->next_)
@@ -60,4 +108,9 @@
     }
 
+    /**
+        @brief Checks if a given Identifier is in the list and returns true if yes.
+        @param identifier The Identifier to check
+        @return True if the Identifier is in the list
+    */
     bool IdentifierList::isInList(const Identifier* identifier) const
     {
@@ -74,4 +127,7 @@
     }
 
+    /**
+        @returns a string, containing a list of the names of all Identifiers in the list.
+    */
     std::string IdentifierList::toString() const
     {
@@ -94,4 +150,8 @@
     // ###  IdentifierListElement  ###
     // ###############################
+    /**
+        @brief Constructor: Creates the list-element with a given identifier.
+        @param identifier The Identifier to store
+    */
     IdentifierListElement::IdentifierListElement(const Identifier* identifier)
     {
@@ -99,7 +159,3 @@
         this->next_ = 0;
     }
-
-    IdentifierListElement::~IdentifierListElement()
-    {
-    }
 }
Index: code/trunk/src/orxonox/core/IdentifierList.h
===================================================================
--- code/trunk/src/orxonox/core/IdentifierList.h	(revision 265)
+++ code/trunk/src/orxonox/core/IdentifierList.h	(revision 790)
@@ -1,2 +1,37 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file IdentifierList.h
+    @brief Definition of the IdentifierList class
+
+    The IdentifierList is a single-linked list, containing Identifiers.
+    The IdentifierList is used to store parents and childs of each Identifier.
+*/
+
 #ifndef _IdentifierList_H__
 #define _IdentifierList_H__
@@ -4,19 +39,20 @@
 #include <string>
 
+#include "CorePrereqs.h"
+
 namespace orxonox
 {
-    class Identifier;
-
+    //! The list-element of the IdentifierList
     class IdentifierListElement
     {
         public:
             IdentifierListElement(const Identifier* identifier);
-            ~IdentifierListElement();
 
-            const Identifier* identifier_;
-            IdentifierListElement* next_;
+            const Identifier* identifier_;      //!< The identifier
+            IdentifierListElement* next_;       //!< The next element in the list
     };
 
-    class IdentifierList
+    //! The IdentifierList contains Identifiers
+    class _CoreExport IdentifierList
     {
         public:
@@ -28,7 +64,7 @@
             std::string toString() const;
 
-            IdentifierListElement* first_;
+            IdentifierListElement* first_;      //!< The first element in the list
     };
 }
 
-#endif
+#endif /* _IdentifierList_H__ */
Index: code/trunk/src/orxonox/core/Iterator.h
===================================================================
--- code/trunk/src/orxonox/core/Iterator.h	(revision 265)
+++ code/trunk/src/orxonox/core/Iterator.h	(revision 790)
@@ -1,11 +1,64 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file Iterator.h
+    @brief Definition and implementation of the Iterator class.
+
+    The Iterator of a given class allows to iterate through an ObjectList, containing all objects of that type.
+    This is the only way to access the objects stored in an ObjectList.
+
+    Usage:
+    for (Iterator<class> it = ObjectList<class>::start(); it != 0; ++it)
+    {
+        it->someFunction(...);
+        class* myObject = *it;
+    }
+
+    Warning: Don't delete objects directly through the iterator.
+*/
+
 #ifndef _Iterator_H__
 #define _Iterator_H__
 
+#include "CorePrereqs.h"
+
+#include "ObjectList.h"
+#include "Debug.h"
+
 namespace orxonox
 {
+    //! The iterator allows to iterate through an ObjectList of a given class.
     template <class T>
     class Iterator
     {
         public:
+            /**
+                @brief Constructor: Sets the element, whereon the iterator points, to zero.
+            */
             Iterator()
             {
@@ -13,4 +66,8 @@
             }
 
+            /**
+                @brief Constructor: Sets the element, whereon the iterator points, to a given element.
+                @param element The element to start with
+            */
             Iterator(ObjectListElement<T>* element)
             {
@@ -18,4 +75,8 @@
             }
 
+            /**
+                @brief Overloading of the ++it operator: Iterator points to the next object in the list.
+                @return The Iterator itself
+            */
             Iterator<T> operator++()
             {
@@ -24,4 +85,19 @@
             }
 
+            /**
+                @brief Overloading of the it++ operator: Iterator points to the next object in the list.
+                @return The Iterator itself
+            */
+            Iterator<T> operator++(int i)
+            {
+                Iterator<T> copy = *this;
+                this->element_ = this->element_->next_;
+                return copy;
+            }
+
+            /**
+                @brief Overloading of the --it operator: Iterator points to the previous object in the list.
+                @return The Iterator itself
+            */
             Iterator<T> operator--()
             {
@@ -30,4 +106,19 @@
             }
 
+            /**
+                @brief Overloading of the it-- operator: Iterator points to the previous object in the list.
+                @return The Iterator itself
+            */
+            Iterator<T> operator--(int i)
+            {
+                Iterator<T> copy = *this;
+                this->element_ = this->element_->prev_;
+                return copy;
+            }
+
+            /**
+                @brief Overloading of the *it operator: returns the pointer to the object.
+                @return The object the Iterator points at
+            */
             T* operator*()
             {
@@ -35,4 +126,8 @@
             }
 
+            /**
+                @brief Overloading of the it-> operator: returns the pointer to the object.
+                @return The object the Iterator points at
+            */
             T* operator->() const
             {
@@ -41,4 +136,8 @@
             }
 
+            /**
+                @brief Overloading of the typecast-operator to bool: returns true if the iterator points to an existing object.
+                @return True if the iterator points to an existing object.
+            */
             operator bool()
             {
@@ -46,8 +145,14 @@
             }
 
+            /**
+                @brief Overloading of the (it != int) operator: Used for (it != 0) instead of typecast-operator to bool.
+                @param compare The integer (must be zero, everything else makes no sense).
+                @return True if the iterator points to an existing object.
+            */
             bool operator!=(int compare)
             {
+                // Comparing with anything except zero makes no sense
                 if (compare != 0)
-                    std::cout << "Warning: Comparing the " << ClassIdentifier<T>::getIdentifier()->getName() << "-List-Iterator with " << compare << " has no effect. Only comparison with 0 works.\n";
+                    COUT(2) << "Warning: Comparing the " << ClassIdentifier<T>::getIdentifier()->getName() << "-List-Iterator with " << compare << " has no effect. Only comparison with 0 works." << std::endl;
 
                 return (this->element_ != 0);
@@ -55,7 +160,7 @@
 
         private:
-            ObjectListElement<T>* element_;
+            ObjectListElement<T>* element_;     //!< The element the Iterator points at
     };
 }
 
-#endif
+#endif /* _Iterator_H__ */
Index: code/trunk/src/orxonox/core/Language.cc
===================================================================
--- code/trunk/src/orxonox/core/Language.cc	(revision 790)
+++ code/trunk/src/orxonox/core/Language.cc	(revision 790)
@@ -0,0 +1,336 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file Language.cc
+    @brief Implementation of the Language and the LanguageEntry class.
+*/
+
+#include <fstream>
+
+#include "CoreIncludes.h"
+#include "Language.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###      LanguageEntry      ###
+    // ###############################
+    /**
+        @brief Constructor: Sets the default entry.
+        @param fallbackEntry The default entry
+    */
+    LanguageEntry::LanguageEntry(const std::string& fallbackEntry)
+    {
+        RegisterRootObject(LanguageEntry);
+
+        this->fallbackEntry_ = fallbackEntry;
+        this->translatedEntry_ = fallbackEntry; // Set the translation to the fallback entry, for the case that no translation gets assigned
+        this->bTranslationSet_ = false;
+    }
+
+    /**
+        @brief Sets the translation of the entry.
+        @param translation The translation
+    */
+    void LanguageEntry::setTranslation(const std::string& translation)
+    {
+        // Check if the translation is more than just an empty string
+        if (translation.compare("") != 0)
+        {
+            this->translatedEntry_ = translation;
+            this->bTranslationSet_ = true;
+        }
+        else
+            this->translatedEntry_ = this->fallbackEntry_;
+    }
+
+    /**
+        @brief Sets the default entry.
+        @param fallbackEntry The default entry
+    */
+    void LanguageEntry::setDefault(const std::string& fallbackEntry)
+    {
+        // If the default entry changes and the translation wasn't set yet, use the new default entry as translation
+        if (!this->bTranslationSet_)
+            this->translatedEntry_ = fallbackEntry;
+
+        this->fallbackEntry_ = fallbackEntry;
+    }
+
+    // ###############################
+    // ###        Language         ###
+    // ###############################
+    /**
+        @brief Constructor: Reads the default language file and sets some values.
+    */
+    Language::Language()
+    {
+        RegisterRootObject(Language);
+
+        this->defaultLanguage_ = "default";
+        this->defaultTranslation_ = "ERROR: LANGUAGE ENTRY DOESN'T EXIST!";
+
+        // Read the default language file to create all known LanguageEntry objects
+        this->readDefaultLanguageFile();
+    }
+
+    /**
+        @brief Function to collect the SetConfigValue-macro calls.
+    */
+    void Language::setConfigValues()
+    {
+        SetConfigValue(language_, this->defaultLanguage_).description("The language of the ingame text");
+
+        // Read the translation file after the language was configured
+        this->readTranslatedLanguageFile();
+    }
+
+    /**
+        @brief Returns a reference to the only existing instance of the Language class and calls the setConfigValues() function.
+        @return The reference to the only existing instance
+    */
+    Language& Language::getLanguage()
+    {
+        // Use static variables to avoid conflicts while executing this code before main()
+        static Language theOnlyLanguageObject = Language();
+        static bool bCreatingTheOnlyLanguageObject = true;
+
+        // This workaround is used to set a description of the own config value without creating an infinite recursion
+        if (bCreatingTheOnlyLanguageObject)
+        {
+            bCreatingTheOnlyLanguageObject = false;
+            theOnlyLanguageObject.setConfigValues();
+        }
+
+        return theOnlyLanguageObject;
+    }
+
+    /**
+        @brief Creates a new LanguageEntry with a given name and a given default entry.
+        @param name The name of the entry
+        @param entry The default entry
+        @return The created LanguageEntry object
+    */
+    LanguageEntry* Language::createEntry(const LanguageEntryName& name, const std::string& entry)
+    {
+        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
+
+        // Make sure we don't create a duplicate entry
+        if (it == this->languageEntries_.end())
+        {
+            LanguageEntry* newEntry = new LanguageEntry(entry);
+            newEntry->setName(name);
+            this->languageEntries_[name] = newEntry;
+            return newEntry;
+        }
+
+        COUT(2) << "Warning: Language entry " << name << " is duplicate in " << getFileName(this->defaultLanguage_) << "!" << std::endl;
+        return it->second;
+    }
+
+    /**
+        @brief Adds a new LanguageEntry, if it's not already existing.
+        @param name The name of the entry
+        @param entry The default entry
+    */
+    void Language::addEntry(const LanguageEntryName& name, const std::string& entry)
+    {
+        COUT(5) << "Called addEntry with\n  name: " << name << "\n  entry: " <<  entry << std::endl;
+        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
+        if (it == this->languageEntries_.end())
+        {
+            // The entry isn't available yet, meaning it's new, so create it
+            this->createEntry(name, entry);
+        }
+        else if (it->second->getDefault().compare(entry) == 0)
+        {
+            // The entry is available and the default string is the same, so return because everything is fine
+            return;
+        }
+        else
+        {
+            // The defined default entry is not the same as in the default language file - change it to the new entry
+            it->second->setDefault(entry);
+        }
+
+        // Write the default language file because either a new entry was created or an existing entry has changed
+        this->writeDefaultLanguageFile();
+
+    }
+
+    /**
+        @brief Returns the translation of a given entry.
+        @param name The name of the entry
+        @return The translation
+    */
+    const std::string& Language::getTranslation(const LanguageEntryName& name) const
+    {
+        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
+        if (it != this->languageEntries_.end())
+            return it->second->getTranslation();
+        else
+        {
+            // Uh, oh, an undefined entry was requested: return the default string
+            COUT(2) << "Error: Language entry \"" << name << "\" not found!" << std::endl;
+            return this->defaultTranslation_;
+        }
+    }
+
+    /**
+        @brief Creates the name of the language file out of the languages name.
+        @param language The name of the language
+        @return The filename
+    */
+    const std::string Language::getFileName(const std::string& language)
+    {
+        return std::string("translation_" + language + ".lang");
+    }
+
+    /**
+        @brief Reads the default language file and creates a LanguageEntry objects for every entry.
+    */
+    void Language::readDefaultLanguageFile()
+    {
+        COUT(4) << "Read default language file." << std::endl;
+
+        // This creates the file if it's not existing
+        std::ofstream createFile;
+        createFile.open(getFileName(this->defaultLanguage_).c_str(), std::fstream::app);
+        createFile.close();
+
+        // Open the file
+        std::ifstream file;
+        file.open(getFileName(this->defaultLanguage_).c_str(), std::fstream::in);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't open file " << getFileName(this->defaultLanguage_) << " to read the default language entries!" << std::endl;
+            return;
+        }
+
+        char line[1024];
+
+        // Iterate through the file and create the LanguageEntries
+        while (file.good() && !file.eof())
+        {
+            file.getline(line, 1024);
+            std::string lineString = std::string(line);
+
+            // Check if the line is empty
+            if (lineString.compare("") != 0)
+            {
+                unsigned int pos = lineString.find('=');
+
+                // Check if the length is at least 3 and if there's an entry before and behind the =
+                if (pos > 0 && pos < (lineString.size() - 1) && lineString.size() >= 3)
+                    this->createEntry(lineString.substr(0, pos), lineString.substr(pos + 1));
+                else
+                    COUT(2) << "Warning: Invalid language entry \"" << lineString << "\" in " << getFileName(this->defaultLanguage_) << std::endl;
+            }
+        }
+
+        file.close();
+    }
+
+    /**
+        @brief Reads the language file of the configured language and assigns the translations to the corresponding LanguageEntry object.
+    */
+    void Language::readTranslatedLanguageFile()
+    {
+        COUT(4) << "Read translated language file (" << this->language_ << ")." << std::endl;
+
+        // Open the file
+        std::ifstream file;
+        file.open(getFileName(this->language_).c_str(), std::fstream::in);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't open file " << getFileName(this->language_) << " to read the translated language entries!" << std::endl;
+            ResetConfigValue(language_);
+            COUT(3) << "Info: Reset language to " << this->defaultLanguage_ << "." << std::endl;
+            return;
+        }
+
+        char line[1024];
+
+        // Iterate through the file and create the LanguageEntries
+        while (file.good() && !file.eof())
+        {
+            file.getline(line, 1024);
+            std::string lineString = std::string(line);
+
+            // Check if the line is empty
+            if (lineString.compare("") != 0)
+            {
+                unsigned int pos = lineString.find('=');
+
+                // Check if the length is at least 3 and if there's an entry before and behind the =
+                if (pos > 0 && pos < (lineString.size() - 1) && lineString.size() >= 3)
+                {
+                    std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(lineString.substr(0, pos));
+
+                    // Check if the entry exists
+                    if (it != this->languageEntries_.end())
+                        it->second->setTranslation(lineString.substr(pos + 1));
+                    else
+                        this->createEntry(lineString.substr(0, pos), this->defaultTranslation_)->setTranslation(lineString.substr(pos + 1));
+                }
+                else
+                    COUT(2) << "Warning: Invalid language entry \"" << lineString << "\" in " << getFileName(this->language_) << std::endl;
+            }
+        }
+
+        file.close();
+    }
+
+    /**
+        @brief Writes all default entries to the default language file.
+    */
+    void Language::writeDefaultLanguageFile() const
+    {
+        COUT(4) << "Write default language file." << std::endl;
+
+        // Open the file
+        std::ofstream file;
+        file.open(getFileName(this->defaultLanguage_).c_str(), std::fstream::out);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't open file " << getFileName(this->defaultLanguage_) << " to write the default language entries!" << std::endl;
+            return;
+        }
+
+        // Iterate through the list an write the lines into the file
+        for (Iterator<LanguageEntry> it = ObjectList<LanguageEntry>::start(); it; ++it)
+        {
+            file << it->getName() << "=" << it->getDefault() << std::endl;
+        }
+
+        file.close();
+    }
+}
Index: code/trunk/src/orxonox/core/Language.h
===================================================================
--- code/trunk/src/orxonox/core/Language.h	(revision 790)
+++ code/trunk/src/orxonox/core/Language.h	(revision 790)
@@ -0,0 +1,119 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file Language.h
+    @brief Definition of the Language and the LanguageEntry class.
+
+    The Language class is used, to get a translation of a string in the configured language.
+    The string is identified by another string, the name of the entry.
+    If the translation in the configured language isn't available, the default entry, defined in the code, is used.
+
+    Usage:
+     - Set the entry with the default string:
+       Language::getLanguage()->addEntry("name of the entry", "the string to translate");
+
+     - Get the translation of the entry in the configured language:
+       std::cout << Language::getLanguage()->getTranslation("name of the entry") << std::endl;
+*/
+
+#ifndef _Language_H__
+#define _Language_H__
+
+#include <map>
+#include <string>
+
+#include "CorePrereqs.h"
+#include "OrxonoxClass.h"
+
+namespace orxonox
+{
+    typedef std::string LanguageEntryName;
+
+    //! The LanguageEntry class stores the default- and the translated string of a given entry in the language file.
+    class _CoreExport LanguageEntry : public OrxonoxClass
+    {
+        public:
+            explicit LanguageEntry(const std::string& fallbackEntry);
+            void setTranslation(const std::string& translation);
+            void setDefault(const std::string& fallbackEntry);
+
+            /**
+              @brief Returns the translated entry in the configured language.
+              @return The translated entry
+            */
+            inline const std::string& getTranslation()
+                { return this->translatedEntry_; }
+
+            /**
+              @brief Returns the default entry.
+              @return The default entry
+            */
+            inline const std::string& getDefault()
+                { return this->fallbackEntry_; }
+
+        private:
+            std::string fallbackEntry_;                             //!< The default entry: Used, if no translation is available or no language configured
+            std::string translatedEntry_;                           //!< The translated entry in the configured language
+            bool bTranslationSet_;                                  //!< True if the translation was set
+    };
+    template class _CoreExport orxonox::ClassIdentifier<LanguageEntry>;
+    template class _CoreExport orxonox::ObjectList<LanguageEntry>;
+
+    //! The Language class manges the language files and entries and stores the LanguageEntry objects in a map.
+    class _CoreExport Language : public OrxonoxClass
+    {
+        template <class T>
+        friend class ClassIdentifier; // forward declaration because of the private destructor
+
+        public:
+            static Language& getLanguage();
+            void setConfigValues();
+            void addEntry(const LanguageEntryName& name, const std::string& entry);
+            const std::string& getTranslation(const LanguageEntryName& name) const;
+
+        private:
+            Language();
+            Language(const Language& language) {}   // don't copy
+            virtual ~Language() {};                 // don't delete
+
+            void readDefaultLanguageFile();
+            void readTranslatedLanguageFile();
+            void writeDefaultLanguageFile() const;
+            static const std::string getFileName(const std::string& language);
+            LanguageEntry* createEntry(const LanguageEntryName& name, const std::string& entry);
+
+            std::string language_;                                  //!< The configured language
+            std::string defaultLanguage_;                           //!< The default language
+            std::string defaultTranslation_;                        //!< The returned string, if an entry unavailable entry is requested
+            std::map<std::string, LanguageEntry*> languageEntries_; //!< A map to store all LanguageEntry objects and their name
+    };
+    template class _CoreExport orxonox::ClassIdentifier<Language>;
+    template class _CoreExport orxonox::ObjectList<Language>;
+}
+
+#endif /* _Language_H__ */
Index: code/trunk/src/orxonox/core/MetaObjectList.cc
===================================================================
--- code/trunk/src/orxonox/core/MetaObjectList.cc	(revision 265)
+++ code/trunk/src/orxonox/core/MetaObjectList.cc	(revision 790)
@@ -1,6 +1,41 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file MetaObjectList.cc
+    @brief Implementation of the MetaObjectList class.
+*/
+
 #include "MetaObjectList.h"
 
 namespace orxonox
 {
+    /**
+        @brief Constructor: Sets first_ to zero.
+    */
     MetaObjectList::MetaObjectList()
     {
@@ -8,4 +43,7 @@
     }
 
+    /**
+        @brief Destructor: Removes all elements from the list, causing them to remove the stored ObjectListElement from the ObjectList.
+    */
     MetaObjectList::~MetaObjectList()
     {
Index: code/trunk/src/orxonox/core/MetaObjectList.h
===================================================================
--- code/trunk/src/orxonox/core/MetaObjectList.h	(revision 265)
+++ code/trunk/src/orxonox/core/MetaObjectList.h	(revision 790)
@@ -1,16 +1,57 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file MetaObjectList.h
+    @brief Definition of the MetaObjectList class.
+
+    The MetaObjectList is a single-linked list, containing all list-elements and their
+    lists wherein the object, owning the MetaObjectList, is registered.
+    This allows much faster deletion of objects because no iteration is needed.
+*/
+
 #ifndef _MetaObjectList_H__
 #define _MetaObjectList_H__
 
+#include "CorePrereqs.h"
+
 #include "ObjectList.h"
 #include "Identifier.h"
+#include "Debug.h"
 
 namespace orxonox
 {
+    //! Base-class of MetaObjectListElement, because those is a template
     class BaseMetaObjectListElement
     {
         public:
+            /** @brief Default destructor */
             virtual ~BaseMetaObjectListElement() {};
 
-            BaseMetaObjectListElement* next_;
+            BaseMetaObjectListElement* next_;       //!< The next Element in the list
     };
 
@@ -18,4 +59,5 @@
     // ###  MetaObjectListElement  ###
     // ###############################
+    //! The list-element of the MetaObjectList
     template <class T>
     class MetaObjectListElement : public BaseMetaObjectListElement
@@ -23,10 +65,13 @@
         public:
             MetaObjectListElement(ObjectList<T>* list, ObjectListElement<T>* element);
-            ~MetaObjectListElement();
+            virtual ~MetaObjectListElement();
 
-            ObjectListElement<T>* element_;
-            ObjectList<T>* list_;
+            ObjectListElement<T>* element_;         //!< The list element, containing the object
+            ObjectList<T>* list_;                   //!< The list, containing the element
     };
 
+    /**
+        @brief Constructor: Creates the list-element with given list and element.
+    */
     template <class T>
     MetaObjectListElement<T>::MetaObjectListElement(ObjectList<T>* list, ObjectListElement<T>* element)
@@ -37,4 +82,7 @@
     }
 
+    /**
+        @brief Destructor: Removes the ObjectListElement from the ObjectList by linking next_ and prev_ of the ObjectListElement.
+    */
     template <class T>
     MetaObjectListElement<T>::~MetaObjectListElement()
@@ -43,15 +91,13 @@
             this->element_->next_->prev_ = this->element_->prev_;
         else
-            this->list_->last_ = this->element_->prev_;
+            this->list_->last_ = this->element_->prev_; // If there is no next_, we deleted the last object and have to update the last_ pointer of the list
 
         if (this->element_->prev_)
             this->element_->prev_->next_ = this->element_->next_;
         else
-            this->list_->first_ = this->element_->next_;
+            this->list_->first_ = this->element_->next_; // If there is no prev_, we deleted the first object and have to update the first_ pointer of the list
 
 
-#if HIERARCHY_VERBOSE
-        std::cout << "*** Removing Object from " << ClassIdentifier<T>::getIdentifier()->getName() << "-list.\n";
-#endif
+        COUT(4) << "*** Removing Object from " << ClassIdentifier<T>::getIdentifier()->getName() << "-list." << std::endl;
         delete this->element_;
     }
@@ -61,4 +107,10 @@
     // ###       ObjectList        ###
     // ###############################
+    //!  The MetaObjectList contains ObjectListElements and their ObjectLists.
+    /**
+        The MetaObjectList is a single-linked list, containing all list-elements and their
+        lists wherein the object that owns the MetaObjectList is registered.
+        This allows much faster deletion of objects because no iteration is needed.
+    */
     class MetaObjectList
     {
@@ -69,7 +121,12 @@
             void add(ObjectList<T>* list, ObjectListElement<T>* element);
 
-            BaseMetaObjectListElement* first_;
+            BaseMetaObjectListElement* first_;      //!< The first element in the list
     };
 
+    /**
+        @brief Adds an ObjectList and an element of that list to the MetaObjectList.
+        @param list The ObjectList wherein the element is
+        @param element The element wherein the object is
+    */
     template <class T>
     void MetaObjectList::add(ObjectList<T>* list, ObjectListElement<T>* element)
@@ -81,3 +138,3 @@
 }
 
-#endif
+#endif /* _MetaObjectList_H__ */
Index: code/trunk/src/orxonox/core/ObjectList.h
===================================================================
--- code/trunk/src/orxonox/core/ObjectList.h	(revision 265)
+++ code/trunk/src/orxonox/core/ObjectList.h	(revision 790)
@@ -1,12 +1,50 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file ObjectList.h
+    @brief Definition and implementation of the ObjectList class.
+
+    The ObjectList is a double-linked list, used by Identifiers to store all objects of a given class.
+    Newly created objects are added through the RegisterObject-macro in its constructor.
+    Use Iterator<class> to iterate through all objects of the class.
+*/
+
 #ifndef _ObjectList_H__
 #define _ObjectList_H__
 
+#include "CorePrereqs.h"
+#include "Iterator.h"
+
 namespace orxonox
 {
-    class OrxonoxClass;
-
     // ###############################
     // ###    ObjectListElement    ###
     // ###############################
+    //! The list-element of the ObjectList
     template <class T>
     class ObjectListElement
@@ -14,11 +52,14 @@
         public:
             ObjectListElement(T* object);
-            ~ObjectListElement();
-
-            T* object_;
-            ObjectListElement* next_;
-            ObjectListElement* prev_;
+
+            T* object_;                     //!< The object
+            ObjectListElement* next_;       //!< The next element in the list
+            ObjectListElement* prev_;       //!< The previous element in the list
     };
 
+    /**
+        @brief Constructor: Creates the list-element with an object.
+        @param object The object to store
+    */
     template <class T>
     ObjectListElement<T>::ObjectListElement(T* object)
@@ -29,40 +70,45 @@
     }
 
-    template <class T>
-    ObjectListElement<T>::~ObjectListElement()
-    {
-    }
-
 
     // ###############################
     // ###       ObjectList        ###
     // ###############################
-    template <class T>
-    class Iterator;
-
+    //! The ObjectList contains all objects of a given class.
+    /**
+        The ObjectList is used by Identifiers to store all objects of a given class.
+        Use Iterator<class> to iterate through all objects in the list.
+    */
     template <class T>
     class ObjectList
     {
         public:
+            static ObjectList<T>* getList();
+
+            ObjectListElement<T>* add(T* object);
+//            void remove(OrxonoxClass* object, bool bIterateForwards = true);
+
+            /** @returns the first element in the list */
+            inline static Iterator<T> start()
+                { return Iterator<T>(getList()->first_); }
+
+            /** @returns the first element in the list */
+            inline static Iterator<T> begin()
+                { return Iterator<T>(getList()->first_); }
+
+            /** @returns the last element in the list */
+            inline static Iterator<T> end()
+                { return Iterator<T>(getList()->last_); }
+
+            ObjectListElement<T>* first_;       //!< The first element in the list
+            ObjectListElement<T>* last_;        //!< The last element in the list
+
+        private:
             ObjectList();
             ~ObjectList();
-            ObjectListElement<T>* add(T* object);
-            void remove(OrxonoxClass* object, bool bIterateForwards = true);
-
-            inline static Iterator<T> start()
-                { return Iterator<T>(pointer_s->first_); }
-            inline static Iterator<T> end()
-                { return Iterator<T>(pointer_s->last_); }
-
-            ObjectListElement<T>* first_;
-            ObjectListElement<T>* last_;
-
-        private:
-            static ObjectList<T>* pointer_s;
     };
 
-    template <class T>
-    ObjectList<T>* ObjectList<T>::pointer_s = 0;
-
+    /**
+        @brief Constructor: Sets default values.
+    */
     template <class T>
     ObjectList<T>::ObjectList()
@@ -70,8 +116,9 @@
         this->first_ = 0;
         this->last_ = 0;
-
-        this->pointer_s = this;
-    }
-
+    }
+
+    /**
+        @brief Destructor: Deletes all list-elements, but NOT THE OBJECTS.
+    */
     template <class T>
     ObjectList<T>::~ObjectList()
@@ -86,4 +133,19 @@
     }
 
+    /**
+        @returns a pointer to the only existing instance for the given class T.
+    */
+    template <class T>
+    ObjectList<T>* ObjectList<T>::getList()
+    {
+        static ObjectList<T> theOnlyObjectListObjectForClassT = ObjectList<T>();
+        return &theOnlyObjectListObjectForClassT;
+    }
+
+    /**
+        @brief Adds a new object to the end of the list.
+        @param object The object to add
+        @return The pointer to the new ObjectListElement, needed by the MetaObjectList of the added object
+    */
     template <class T>
     ObjectListElement<T>* ObjectList<T>::add(T* object)
@@ -91,9 +153,11 @@
         if (!this->last_)
         {
+            // If the list is empty
             this->last_ = new ObjectListElement<T>(object);
-            this->first_ = this->last_;
+            this->first_ = this->last_; // There's only one object in the list now
         }
         else
         {
+            // If the list isn't empty
             ObjectListElement<T>* temp = this->last_;
             this->last_ = new ObjectListElement<T>(object);
@@ -105,4 +169,11 @@
     }
 
+
+//    /**
+//        @brief Removes an object from the list.
+//        @param object The object to remove
+//        @param bIterateForwards If true: Start searching the object at the beginning of the list
+//    */
+    /*
     template <class T>
     void ObjectList<T>::remove(OrxonoxClass* object, bool bIterateForwards)
@@ -111,4 +182,5 @@
             return;
 
+        // If there's only one object in the list, we have to set first_ and last_ to zero
         if (this->first_ == this->last_)
         {
@@ -123,6 +195,10 @@
         }
 
+        // Now we are sure we have more than one element in the list
         if (bIterateForwards)
         {
+            // Start at the beginning of the list
+
+            // Check if it's the first object
             if (this->first_->object_ == object)
             {
@@ -135,4 +211,5 @@
             }
 
+            // Iterate through the whole list
             ObjectListElement<T>* temp = this->first_;
             while (temp->next_)
@@ -146,5 +223,5 @@
                         temp2->prev_ = temp;
                     else
-                        this->last_ = temp;
+                        this->last_ = temp; // If there is no next_, we deleted the last element and have to update the last_ pointer.
 
                     return;
@@ -156,4 +233,7 @@
         else
         {
+            // Start at the end of the list
+
+            // Check if it's the last object
             if (this->last_->object_ == object)
             {
@@ -166,4 +246,5 @@
             }
 
+            // Iterate through the whole list
             ObjectListElement<T>* temp = this->last_;
             while (temp->prev_)
@@ -177,5 +258,5 @@
                         temp2->next_ = temp;
                     else
-                        this->first_ = temp;
+                        this->first_ = temp; // If there is no prev_, we deleted the first element and have to update the first_ pointer.
 
                     return;
@@ -186,5 +267,6 @@
         }
     }
+    */
 }
 
-#endif
+#endif /* _ObjectList_H__ */
Index: code/trunk/src/orxonox/core/OrxonoxClass.cc
===================================================================
--- code/trunk/src/orxonox/core/OrxonoxClass.cc	(revision 265)
+++ code/trunk/src/orxonox/core/OrxonoxClass.cc	(revision 790)
@@ -1,20 +1,56 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file OrxonoxClass.cc
+    @brief Implementation of the OrxonoxClass Class.
+*/
+
 #include "OrxonoxClass.h"
 
 namespace orxonox
 {
+    /** @brief Constructor: Sets the default values. */
     OrxonoxClass::OrxonoxClass()
     {
+        this->setConfigValues();
+
         this->identifier_ = 0;
         this->parents_ = 0;
 
-        this->metaList_ = new MetaObjectList;
+        this->bActive_ = true;
+        this->bVisible_ = true;
     }
 
+    /** @brief Destructor: Deletes, if existing, the list of the parents. */
     OrxonoxClass::~OrxonoxClass()
     {
+        // parents_ exists only if isCreatingHierarchy() of the associated Identifier returned true while creating the class
         if (this->parents_)
             delete this->parents_;
-
-        delete this->metaList_;
     }
 }
Index: code/trunk/src/orxonox/core/OrxonoxClass.h
===================================================================
--- code/trunk/src/orxonox/core/OrxonoxClass.h	(revision 265)
+++ code/trunk/src/orxonox/core/OrxonoxClass.h	(revision 790)
@@ -1,29 +1,164 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file OrxonoxClass.h
+    @brief Definition of the OrxonoxClass Class.
+
+    All objects and interfaces of the game-logic (not the engine) are derived from OrxonoxClass.
+    It stores the Identifier and the MetaObjectList and has all needed functions to create and use the class-hierarchy.
+*/
+
 #ifndef _OrxonoxClass_H__
 #define _OrxonoxClass_H__
 
-#include "Identifier.h"
-#include "IdentifierList.h"
-#include "ObjectList.h"
+#include <string>
+
+#include "CorePrereqs.h"
 #include "MetaObjectList.h"
+#include "Iterator.h"
 
 namespace orxonox
 {
-    class OrxonoxClass
+    //! The class all objects and interfaces of the game-logic (not the engine) are derived from.
+    /**
+        The BaseObject and Interaces are derived with 'virtual public OrxonoxClass' from OrxonoxClass.
+        OrxonoxClass is needed to create the class-hierarchy at startup and to store the Identifier and the MetaObjectList.
+    */
+    class _CoreExport OrxonoxClass
     {
         public:
             OrxonoxClass();
             virtual ~OrxonoxClass();
+
+            /** @brief Function to collect the SetConfigValue-macro calls. */
+            void setConfigValues() {};
+
+            /** @returns the Identifier of the object */
             inline Identifier* getIdentifier() const { return this->identifier_; }
+
+            /** @brief Sets the Identifier of the object. Used by the RegisterObject-macro. */
             inline void setIdentifier(Identifier* identifier) { this->identifier_ = identifier; }
+
+            /** @returns the list of all parents of the object */
             inline IdentifierList* getParents() const { return this->parents_; }
+
+            /** @brief Sets the Parents of the object. Used by the RegisterObject-macro. */
             inline void setParents(IdentifierList* parents) { this->parents_ = parents; }
-            inline MetaObjectList* getMetaList() { return this->metaList_; }
+
+            /** @returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. */
+            inline MetaObjectList& getMetaList() { return this->metaList_; }
+
+
+            /** @returns true if the objects class is of the given type or a derivative. */
+            inline bool isA(const Identifier* identifier)
+                { return this->getIdentifier()->isA(identifier); }
+            /** @returns true if the objects class is exactly of the given type. */
+            inline bool isDirectlyA(const Identifier* identifier)
+                { return this->getIdentifier()->isDirectlyA(identifier); }
+            /** @returns true if the objects class is a child of the given type. */
+            inline bool isChildOf(const Identifier* identifier)
+                { return this->getIdentifier()->isChildOf(identifier); }
+            /** @returns true if the objects class is a parent of the given type. */
+            inline bool isParentOf(const Identifier* identifier)
+                { return this->getIdentifier()->isParentOf(identifier); }
+
+
+            /** @returns true if the objects class is of the given type or a derivative. */
+            inline bool isA(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isA(identifier->getIdentifier()); }
+            /** @returns true if the objects class is exactly of the given type. */
+            inline bool isDirectlyA(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isDirectlyA(identifier->getIdentifier()); }
+            /** @returns true if the objects class is a child of the given type. */
+            inline bool isChildOf(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isChildOf(identifier->getIdentifier()); }
+            /** @returns true if the objects class is a parent of the given type. */
+            inline bool isParentOf(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isParentOf(identifier->getIdentifier()); }
+
+
+            /** @returns true if the objects class is of the given type or a derivative. */
+            inline bool isA(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isA(identifier.getIdentifier()); }
+            /** @returns true if the objects class is exactly of the given type. */
+            inline bool isDirectlyA(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isDirectlyA(identifier.getIdentifier()); }
+            /** @returns true if the objects class is a child of the given type. */
+            inline bool isChildOf(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isChildOf(identifier.getIdentifier()); }
+            /** @returns true if the objects class is a parent of the given type. */
+            inline bool isParentOf(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isParentOf(identifier.getIdentifier()); }
+
+
+            /** @returns true if the objects class is of the given type or a derivative. */
+            inline bool isA(const OrxonoxClass* object)
+                { return this->getIdentifier()->isA(object->getIdentifier()); }
+            /** @returns true if the objects class is exactly of the given type. */
+            inline bool isDirectlyA(const OrxonoxClass* object)
+                { return this->getIdentifier()->isDirectlyA(object->getIdentifier()); }
+            /** @returns true if the objects class is a child of the given type. */
+            inline bool isChildOf(const OrxonoxClass* object)
+                { return this->getIdentifier()->isChildOf(object->getIdentifier()); }
+            /** @returns true if the objects class is a parent of the given type. */
+            inline bool isParentOf(const OrxonoxClass* object)
+                { return this->getIdentifier()->isParentOf(object->getIdentifier()); }
+
+
+            /** @brief Sets the name of the object. @param name The name */
+            inline virtual void setName(const std::string& name) { this->name_ = name; }
+
+            /** @returns the name of the object. */
+            inline const std::string& getName() const { return this->name_; }
+
+            /** @brief Sets the state of the objects activity. @param bActive True = active */
+            inline virtual void setActive(bool bActive) { this->bActive_ = bActive; }
+
+            /** @returns the state of the objects activity. */
+            inline const bool isActive() const { return this->bActive_; }
+
+            /** @brief Sets the state of the objects visibility. @param bVisible True = visible */
+            inline virtual void setVisible(bool bVisible) { this->bVisible_ = bVisible; }
+
+            /** @returns the state of the objects visibility. */
+            inline const bool isVisible() const { return this->bVisible_; }
 
         private:
-            Identifier* identifier_;
-            IdentifierList* parents_;
-            MetaObjectList* metaList_;
+            Identifier* identifier_;        //!< The Identifier of the object
+            IdentifierList* parents_;       //!< List of all parents of the object
+            MetaObjectList metaList_;       //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
+
+            std::string name_;              //!< The name of the object
+            bool bActive_;                  //!< True = the object is active
+            bool bVisible_;                 //!< True = the object is visible
     };
+    template class _CoreExport orxonox::ClassIdentifier<OrxonoxClass>;
+    template class _CoreExport orxonox::ObjectList<OrxonoxClass>;
 }
 
-#endif
+#endif /* _OrxonoxClass_H__ */
Index: code/trunk/src/orxonox/core/OutputHandler.cc
===================================================================
--- code/trunk/src/orxonox/core/OutputHandler.cc	(revision 790)
+++ code/trunk/src/orxonox/core/OutputHandler.cc	(revision 790)
@@ -0,0 +1,148 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 "DebugLevel.h"
+#include "OutputHandler.h"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Opens the logfile and writes the first line.
+        @param logfilename The name of the logfile
+    */
+    OutputHandler::OutputHandler(const std::string& logfilename)
+    {
+        this->logfilename_ = logfilename;
+        this->logfile_.open(this->logfilename_.c_str(), std::fstream::out);
+        this->logfile_ << "Started log" << std::endl;
+        this->logfile_.flush();
+    }
+
+    /**
+        @brief Destructor: Writes the last line to the logfile and closes it.
+    */
+    OutputHandler::~OutputHandler()
+    {
+        this->logfile_ << "Closed log" << std::endl;
+        this->logfile_.close();
+    }
+
+    /**
+        @returns a reference to the only existing instance of the OutputHandler class.
+    */
+    OutputHandler& OutputHandler::getOutStream()
+    {
+        static OutputHandler orxout("orxonox.log");
+        return orxout;
+    }
+
+    /**
+        @brief Returns the soft debug level for a given output device.
+        @param device The output device
+        @return The debug level
+    */
+    int OutputHandler::getSoftDebugLevel(OutputHandler::OutputDevice device)
+    {
+        return DebugLevel::getSoftDebugLevel(device);
+    }
+
+    /**
+        @brief Overloaded << operator, redirects the output to the console and the logfile.
+        @param sb The streambuffer that should be shown in the console
+        @return A reference to the OutputHandler itself
+    */
+    OutputHandler& OutputHandler::operator<<(std::streambuf* sb)
+    {
+        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+            std::cout << sb;
+
+        if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
+        {
+            this->logfile_ << sb;
+            this->logfile_.flush();
+        }
+
+        return *this;
+    }
+
+    /**
+        @brief Overloaded << operator, redirects the output to the console and the logfile.
+        @param manipulator A function, manipulating the outstream.
+        @return A reference to the OutputHandler itself
+    */
+    OutputHandler& OutputHandler::operator<<(std::ostream& (*manipulator)(std::ostream&))
+    {
+        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+            manipulator(std::cout);
+
+        if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
+        {
+            manipulator(this->logfile_);
+            this->logfile_.flush();
+        }
+
+        return *this;
+    }
+
+    /**
+        @brief Overloaded << operator, redirects the output to the console and the logfile.
+        @param manipulator A function, manipulating the outstream.
+        @return A reference to the OutputHandler itself
+    */
+    OutputHandler& OutputHandler::operator<<(std::ios& (*manipulator)(std::ios&))
+    {
+        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+            manipulator(std::cout);
+
+        if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
+        {
+            manipulator(this->logfile_);
+            this->logfile_.flush();
+        }
+
+        return *this;
+    }
+
+    /**
+        @brief Overloaded << operator, redirects the output to the console and the logfile.
+        @param manipulator A function, manipulating the outstream.
+        @return A reference to the OutputHandler itself
+    */
+    OutputHandler& OutputHandler::operator<<(std::ios_base& (*manipulator)(std::ios_base&))
+    {
+        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+            manipulator(std::cout);
+
+        if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
+        {
+            manipulator(this->logfile_);
+            this->logfile_.flush();
+        }
+
+        return *this;
+    }
+}
Index: code/trunk/src/orxonox/core/OutputHandler.h
===================================================================
--- code/trunk/src/orxonox/core/OutputHandler.h	(revision 790)
+++ code/trunk/src/orxonox/core/OutputHandler.h	(revision 790)
@@ -0,0 +1,161 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file OutputHandler.h
+    @brief Definition of the OutputHandler class.
+
+    The OutputHandler acts like std::cout, but output isn't only shown in the console,
+    but also written to the logfile.
+*/
+
+#ifndef _OutputHandler_H__
+#define _OutputHandler_H__
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+    //! The OutputHandler acts like std::cout, but redirects output to the console AND the logfile.
+    class _CoreExport OutputHandler
+    {
+        public:
+            enum OutputDevice
+            {
+                LD_All,
+                LD_Console,
+                LD_Logfile,
+                LD_Shell
+            };
+
+            static OutputHandler& getOutStream();
+
+            /** @returns a reference to the logfile. */
+            inline std::ofstream& getLogfile()
+                { return this->logfile_; }
+
+            /** @brief Sets the level of the incoming output. @param level The level of the incoming output @return The OutputHandler itself */
+            inline OutputHandler& setOutputLevel(int level)
+                { this->outputLevel_ = level; return *this; }
+
+            /** @returns the level of the incoming output. */
+            inline int getOutputLevel() const
+                { return this->outputLevel_; }
+
+            static int getSoftDebugLevel(OutputHandler::OutputDevice device);
+
+            template <class T>
+            OutputHandler& output(const T& output);
+
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(unsigned char val)   { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(short val)           { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(unsigned short val)  { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(int val)             { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(unsigned int val)    { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(long val)            { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(unsigned long val)   { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(float val)           { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(double val)          { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(long double val)     { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(const void* val)     { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(bool val)            { return this->output(val); }
+
+            OutputHandler& operator<<(std::streambuf* sb);
+
+            OutputHandler& operator<<(std::ostream& (*manipulator)(std::ostream&));
+            OutputHandler& operator<<(std::ios& (*manipulator)(std::ios&));
+            OutputHandler& operator<<(std::ios_base& (*manipulator)(std::ios_base&));
+
+        private:
+            explicit OutputHandler(const std::string& logfilename);
+            OutputHandler(const OutputHandler& oh) {}; // don't copy
+            virtual ~OutputHandler();
+            std::ofstream logfile_;     //!< The logfile where the output is logged
+            std::string logfilename_;   //!< The name of the logfile
+            int outputLevel_;           //!< The level of the incoming output
+    };
+
+    /**
+        @brief Redirects the output to the console and the logfile.
+        @param output The value that should be shown in the console
+        @return A reference to the OutputHandler itself
+    */
+    template<class T>
+    OutputHandler& OutputHandler::output(const T& output)
+    {
+        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+            std::cout << output;
+
+        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
+        {
+            this->logfile_ << output;
+            this->logfile_.flush();
+        }
+
+        return *this;
+    }
+
+    /**
+        @brief Overloading of the non-member << operator to redirect the output of classes with self defined '<< to std::ostream' operators to the console and the logfile.
+        @param out The OutputHandler itself
+        @param output The class that should be shown in the console
+        @return The OutputHandler itself
+    */
+    template<class T>
+    OutputHandler& operator<<(OutputHandler& out, const T& output)
+    {
+        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Console) >= out.getOutputLevel())
+            std::cout << output;
+
+        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Logfile) >= out.getOutputLevel())
+        {
+            out.getLogfile() << output;
+            out.getLogfile().flush();
+        }
+
+        return out;
+    }
+
+}
+
+#endif /* _OutputHandler_H__ */
Index: code/trunk/src/orxonox/core/SignalHandler.cc
===================================================================
--- code/trunk/src/orxonox/core/SignalHandler.cc	(revision 790)
+++ code/trunk/src/orxonox/core/SignalHandler.cc	(revision 790)
@@ -0,0 +1,310 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      Christoph Renner
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include <assert.h>
+
+#include "Debug.h"
+#include "SignalHandler.h"
+
+SignalHandler * SignalHandler::singletonRef = NULL;
+
+#ifndef __WIN32__
+
+#include <wait.h>
+
+SignalHandler::SignalHandler()
+{
+}
+
+/**
+ * register signal handlers for SIGSEGV and SIGABRT
+ * @param appName path to executable eg argv[0]
+ * @param fileName filename to append backtrace to
+ */
+void SignalHandler::doCatch( const std::string & appName, const std::string & fileName )
+{
+  this->appName = appName;
+  this->fileName = fileName;
+
+  // make sure doCatch is only called once without calling dontCatch
+  assert( sigRecList.size() == 0 );
+
+  catchSignal( SIGSEGV );
+  catchSignal( SIGABRT );
+  catchSignal( SIGILL );
+}
+
+/**
+ * restore previous signal handlers
+ */
+void SignalHandler::dontCatch()
+{
+  for ( SignalRecList::iterator it = sigRecList.begin(); it != sigRecList.end(); it++ )
+  {
+    signal( it->signal, it->handler );
+  }
+
+  sigRecList.clear();
+}
+
+/**
+ * catch signal sig
+ * @param sig signal to catch
+ */
+void SignalHandler::catchSignal( int sig )
+{
+  sig_t handler = signal( sig, SignalHandler::sigHandler );
+
+  assert( handler != SIG_ERR );
+
+  SignalRec rec;
+  rec.signal = sig;
+  rec.handler = handler;
+
+  sigRecList.push_front( rec );
+}
+
+/**
+ * sigHandler is called when receiving signals
+ * @param sig
+ */
+void SignalHandler::sigHandler( int sig )
+{
+  for ( SignalCallbackList::iterator it = SignalHandler::getInstance()->callbackList.begin(); it != SignalHandler::getInstance()->callbackList.end(); it++  )
+  {
+    (*(it->cb))( it->someData );
+  }
+
+  std::string sigName = "UNKNOWN";
+
+  switch ( sig )
+  {
+    case SIGSEGV:
+      sigName = "SIGSEGV";
+      break;
+    case SIGABRT:
+      sigName = "SIGABRT";
+      break;
+    case SIGILL:
+      sigName = "SIGILL";
+      break;
+  }
+
+  PRINTF(0)( "recieved signal %s\ntry to write backtrace to file orxonox.log\n", sigName.c_str() );
+
+  int sigPipe[2];
+  if ( pipe(sigPipe) == -1 )
+  {
+    perror("pipe failed!\n");
+    exit(EXIT_FAILURE);
+  }
+
+  int sigPid = fork();
+
+  if ( sigPid == -1 )
+  {
+    perror("fork failed!\n");
+    exit(EXIT_FAILURE);
+  }
+
+  // gdb will be attached to this process
+  if ( sigPid == 0 )
+  {
+    getInstance()->dontCatch();
+    // wait for message from parent when it has attached gdb
+    int someData;
+
+    read( sigPipe[0], &someData, sizeof(someData) );
+
+    if ( someData != 0x12345678 )
+    {
+      PRINTF(0)("something went wrong :(\n");
+    }
+
+    return;
+  }
+
+  int gdbIn[2];
+  int gdbOut[2];
+  int gdbErr[2];
+
+  if ( pipe(gdbIn) == -1 || pipe(gdbOut) == -1 || pipe(gdbErr) == -1 )
+  {
+    perror("pipe failed!\n");
+    kill( sigPid, SIGTERM );
+    waitpid( sigPid, NULL, 0 );
+    exit(EXIT_FAILURE);
+  }
+
+  int gdbPid = fork();
+  // this process will run gdb
+
+  if ( gdbPid == -1 )
+  {
+    perror("fork failed\n");
+    kill( sigPid, SIGTERM );
+    waitpid( sigPid, NULL, 0 );
+    exit(EXIT_FAILURE);
+  }
+
+  if ( gdbPid == 0 )
+  {
+    // start gdb
+
+    close(gdbIn[1]);
+    close(gdbOut[0]);
+    close(gdbErr[0]);
+
+    dup2( gdbIn[0], STDIN_FILENO );
+    dup2( gdbOut[1], STDOUT_FILENO );
+    dup2( gdbErr[1], STDERR_FILENO );
+
+    execlp( "sh", "sh", "-c", "gdb", (void*)NULL);
+  }
+
+  char cmd[256];
+  snprintf( cmd, 256, "file %s\nattach %d\nc\n", getInstance()->appName.c_str(), sigPid );
+  write( gdbIn[1], cmd, strlen(cmd) );
+
+  int charsFound = 0;
+  int promptFound = 0;
+  char byte;
+  while ( read( gdbOut[0], &byte, 1 ) == 1 )
+  {
+    if (
+      charsFound == 0 && byte == '(' ||
+      charsFound == 1 && byte == 'g' ||
+      charsFound == 2 && byte == 'd' ||
+      charsFound == 3 && byte == 'b' ||
+      charsFound == 4 && byte == ')' ||
+      charsFound == 5 && byte == ' '
+        )
+          charsFound++;
+    else
+      charsFound = 0;
+
+    if ( charsFound == 6 )
+    {
+      promptFound++;
+      charsFound = 0;
+    }
+
+    if ( promptFound == 3 )
+    {
+      break;
+    }
+  }
+
+  int someData = 0x12345678;
+  write( sigPipe[1], &someData, sizeof(someData) );
+
+  write( gdbIn[1], "bt\nk\nq\n", 7 );
+
+
+  charsFound = 0;
+  promptFound = 0;
+  std::string bt;
+  while ( read( gdbOut[0], &byte, 1 ) == 1 )
+  {
+    bt += std::string( &byte, 1 );
+
+    if (
+      charsFound == 0 && byte == '(' ||
+      charsFound == 1 && byte == 'g' ||
+      charsFound == 2 && byte == 'd' ||
+      charsFound == 3 && byte == 'b' ||
+      charsFound == 4 && byte == ')' ||
+      charsFound == 5 && byte == ' '
+        )
+          charsFound++;
+    else
+      charsFound = 0;
+
+    if ( charsFound == 6 )
+    {
+      promptFound++;
+      charsFound = 0;
+      bt += "\n";
+    }
+
+    if ( promptFound == 3 )
+    {
+      break;
+    }
+  }
+
+
+  waitpid( sigPid, NULL, 0 );
+  waitpid( gdbPid, NULL, 0 );
+
+  int wsRemoved = 0;
+
+  while ( wsRemoved < 2 && bt.length() > 0 )
+  {
+    if ( bt[1] == '\n' )
+      wsRemoved++;
+    bt.erase(0, 1);
+  }
+
+  if ( bt.length() > 0 )
+    bt.erase(0, 1);
+
+  time_t now = time(NULL);
+
+  std::string timeString = "\n\n\n\n"
+	                   "=======================================================\n"
+	                   "= time: " + std::string(ctime(&now)) +
+			   "=======================================================\n";
+  bt.insert(0, timeString);
+
+  FILE * f = fopen( getInstance()->fileName.c_str(), "a" );
+
+  if ( !f )
+  {
+    perror( ( std::string( "could not append to " ) + getInstance()->fileName ).c_str() );
+    exit(EXIT_FAILURE);
+  }
+
+  if ( fwrite( bt.c_str(), 1, bt.length(), f ) != bt.length() )
+  {
+    PRINTF(0)( ( std::string("could not write %d byte to ") + getInstance()->fileName ).c_str(), bt.length());
+    exit(EXIT_FAILURE);
+  }
+
+  exit(EXIT_FAILURE);
+}
+
+void SignalHandler::registerCallback( SignalCallback cb, void * someData )
+{
+  SignalCallbackRec rec;
+  rec.cb = cb;
+  rec.someData = someData;
+
+  callbackList.push_back(rec);
+}
+
+#endif /* __WIN32__ */
Index: code/trunk/src/orxonox/core/SignalHandler.h
===================================================================
--- code/trunk/src/orxonox/core/SignalHandler.h	(revision 790)
+++ code/trunk/src/orxonox/core/SignalHandler.h	(revision 790)
@@ -0,0 +1,103 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      Christoph Renner
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+ * @file SignalHandler.h
+ */
+
+#ifndef _SignalHandler_H__
+#define _SignalHandler_H__
+
+#include <list>
+#include <string>
+
+#include "CorePrereqs.h"
+
+typedef int (*SignalCallback)( void * someData );
+
+#ifndef __WIN32__
+#include <signal.h>
+
+struct SignalRec
+{
+  int signal;
+  sig_t handler;
+};
+
+struct SignalCallbackRec
+{
+  SignalCallback cb;
+  void * someData;
+};
+
+
+typedef std::list<SignalRec> SignalRecList;
+typedef std::list<SignalCallbackRec> SignalCallbackList;
+
+class SignalHandler
+{
+  private:
+    SignalHandler();
+  public:
+    inline static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; }
+    ~SignalHandler(){ SignalHandler::singletonRef = NULL; }
+
+    void registerCallback( SignalCallback cb, void * someData );
+
+    void doCatch( const std::string & appName, const std::string & fileName );
+    void dontCatch();
+
+  private:
+    static void sigHandler( int sig );
+
+    void catchSignal( int sig );
+    SignalRecList sigRecList;
+
+    SignalCallbackList callbackList;
+
+    static SignalHandler * singletonRef;
+
+    std::string appName;
+    std::string fileName;
+};
+
+#else /* #ifndef __WIN32__ */
+
+class _CoreExport SignalHandler
+{
+ public:
+   inline static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; };
+   void doCatch( const std::string & appName, const std::string & fileName ) {};
+  void dontCatch() {};
+  void registerCallback( SignalCallback cb, void * someData ) {};
+
+ private:
+    static SignalHandler * singletonRef;
+};
+#endif /* #ifndef __WIN32__ */
+
+#endif /* _SignalHandler_H__ */
Index: code/trunk/src/orxonox/hud/HUD.cc
===================================================================
--- code/trunk/src/orxonox/hud/HUD.cc	(revision 790)
+++ code/trunk/src/orxonox/hud/HUD.cc	(revision 790)
@@ -0,0 +1,218 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   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:
+*      ...
+*
+*/
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreOverlayManager.h>
+#include <OgreOverlayElement.h>
+#include <OgreStringConverter.h>
+
+#include "HUD.h"
+
+
+namespace orxonox
+{
+  using namespace Ogre;
+
+  HUD::HUD(void)
+  {
+    init();
+
+    setTime(99,55);
+
+    setTargetWindowName("HURRA");
+    setTargetWindowDistance(12);
+    setTargetWindowStatus("Dead");
+    setTargetWindowDistance(30);
+
+    setEnergyValue(60.0);
+
+    setShieldLeftTopValue(true);
+    setShieldRightTopValue(false);
+    setShieldLeftBottomValue(false);
+    setShieldRightBottomValue(true);
+
+    setRocket1(11);
+    setRocket2(22);
+    setRocket3(33);
+    setRocket4(44);
+
+    setEnergyDistr(33,33,34);
+
+    setPrimar(3);
+
+    energyDistrPixelX_ = 100;
+    energyDistrPixelY_ = 86;
+
+  }
+
+
+  HUD::~HUD( void ){
+
+  }
+
+  void HUD::setTime(int i, int j){
+    timeMin_=i;
+    timeSec_=j;
+    timeText_->setCaption(StringConverter::toString(timeMin_) + ":" + StringConverter::toString(timeSec_));
+  }
+
+  void HUD::setTargetWindowName(std::string i){
+    targetWindowName_=i;
+    targetWindowNameText_->setCaption( targetWindowName_ );
+  }
+
+  void HUD::setTargetWindowStatus(std::string i){
+    targetWindowStatus_=i;
+    targetWindowStatusText_->setCaption( targetWindowStatus_ );
+  }
+
+  void HUD::setTargetWindowDistance(int i){
+    targetWindowDistance_=i;
+    targetWindowDistanceText_->setCaption(StringConverter::toString(targetWindowDistance_) + "km" );
+  }
+
+  void HUD::setTargetWindowHitRating(int i){
+    targetWindowHitRating_=i;
+    targetWindowHitRatingText_->setCaption(StringConverter::toString(targetWindowHitRating_) + "%" );
+  }
+
+  void HUD::setEnergyValue(int i){
+    energyValue_=i;
+    energyLength_->setWidth((int)((float)energyValue_/(float)100*200));
+  }
+
+  void HUD::setShieldLeftTopValue(bool i){
+    shieldLeftTopValue_=i;
+    if (shieldLeftTopValue_) shieldLeftTop_->show();
+    else shieldLeftTop_->hide();
+  }
+
+  void HUD::setShieldRightTopValue(bool i){
+    shieldRightTopValue_=i;
+    if (shieldRightTopValue_) shieldRightTop_->show();
+    else shieldRightTop_->hide();
+  }
+
+  void HUD::setShieldLeftBottomValue(bool i){
+    shieldLeftBottomValue_=i;
+    if (shieldLeftBottomValue_) shieldLeftBottom_->show();
+    else shieldLeftBottom_->hide();
+  }
+
+  void HUD::setShieldRightBottomValue(bool i){
+    shieldRightBottomValue_=i;
+    if (shieldRightBottomValue_) shieldRightBottom_->show();
+    else shieldRightBottom_->hide();
+  }
+
+  void HUD::setRocket1(int i){
+    rocket1_=i;
+    rocketNum1_->setCaption(StringConverter::toString(rocket1_));
+  }
+
+  void HUD::setRocket2(int i){
+    rocket2_=i;
+    rocketNum2_->setCaption(StringConverter::toString(rocket2_));
+  }
+
+  void HUD::setRocket3(int i){
+    rocket3_=i;
+    rocketNum3_->setCaption(StringConverter::toString(rocket3_));
+  }
+
+  void HUD::setRocket4(int i){
+    rocket4_=i;
+    rocketNum4_->setCaption(StringConverter::toString(rocket4_));
+  }
+
+  void HUD::setEnergyDistr(float s, float e, float l){
+    energyDistrShield_=s;
+    energyDistrEngine_=e;
+    energyDistrLaser_=l;
+
+    float energyDistrShieldInv_ = 100 - energyDistrShield_;
+    float energyDistrEngineInv_ = 100 - energyDistrEngine_;
+    float energyDistrLaserInv_ = 100 - energyDistrLaser_;
+
+    float energyDistrT_ = -energyDistrPixelX_/((energyDistrPixelX_-energyDistrPixelX_/2*energyDistrShieldInv_/(energyDistrShieldInv_+energyDistrEngineInv_))*energyDistrLaserInv_*(energyDistrShieldInv_+energyDistrEngineInv_)/energyDistrShieldInv_/(energyDistrLaserInv_+energyDistrEngineInv_)+energyDistrPixelX_/2+energyDistrPixelX_/2*energyDistrEngineInv_/(energyDistrEngineInv_+energyDistrLaserInv_));
+    float energyDistrX_ = (-energyDistrPixelX_/2-energyDistrPixelX_/2*energyDistrEngineInv_/(energyDistrEngineInv_+energyDistrLaserInv_))*energyDistrT_;
+    float energyDistrY_ = energyDistrPixelY_+energyDistrPixelY_*energyDistrLaserInv_/(energyDistrLaserInv_+energyDistrEngineInv_)*energyDistrT_;
+
+    energyDistrPoint_->setLeft((int)energyDistrX_-3);
+    energyDistrPoint_->setTop((int)energyDistrY_-3);
+
+  }
+
+  void HUD::setPrimar(int i){
+    primarValue_=i;
+    if(i==1){
+      primarChoice_->setLeft(2);
+      primarChoice_->setWidth(48);
+    }
+    if(i==2){
+      primarChoice_->setLeft(51);
+      primarChoice_->setWidth(49);
+    }
+    else{
+      primarChoice_->setLeft(101);
+      primarChoice_->setWidth(48);
+    }
+  }
+
+
+
+  void HUD::init(void)
+  {
+    timeText_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/Time/Text");
+
+    targetWindowNameText_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/Name");
+    targetWindowDistanceText_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/DistanceText");
+    targetWindowStatusText_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/StatusText");
+    targetWindowHitRatingText_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/HitRatingText");
+
+    energyLength_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyBackground");
+
+    shieldLeftTop_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/shieldLeftTop");
+    shieldRightTop_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/shieldRightTop");
+    shieldLeftBottom_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/shieldLeftBottom");
+    shieldRightBottom_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/shieldRightBottom");
+
+    rocketNum1_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum1");
+    rocketNum2_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum2");
+    rocketNum3_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum3");
+    rocketNum4_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum4");
+
+    // FIXME: unused vars!
+    float energyDistrPixelX_ = 100;
+    float energyDistrPixelY_ = 86;
+    energyDistrPoint_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyDistrPoint");
+
+    primarChoice_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/PrimarChoice");
+  }
+
+}
Index: code/trunk/src/orxonox/hud/HUD.h
===================================================================
--- code/trunk/src/orxonox/hud/HUD.h	(revision 790)
+++ code/trunk/src/orxonox/hud/HUD.h	(revision 790)
@@ -0,0 +1,114 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   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:
+*      ...
+*
+*/
+
+#ifndef _HUD_H__
+#define _HUD_H__
+
+#include <string>
+
+#include <OgrePrerequisites.h>
+
+#include "../OrxonoxPrereqs.h"
+
+
+namespace orxonox
+{
+  class _OrxonoxExport HUD
+  {
+  private:
+    Ogre::OverlayElement* timeText_;
+    Ogre::OverlayElement* targetWindowNameText_;
+    Ogre::OverlayElement* targetWindowStatusText_;
+    Ogre::OverlayElement* targetWindowDistanceText_;
+    Ogre::OverlayElement* targetWindowHitRatingText_;
+    Ogre::OverlayElement* energyLength_;
+    Ogre::OverlayElement* shieldLeftTop_;
+    Ogre::OverlayElement* shieldRightTop_;
+    Ogre::OverlayElement* shieldLeftBottom_;
+    Ogre::OverlayElement* shieldRightBottom_;
+    Ogre::OverlayElement* rocketNum1_;
+    Ogre::OverlayElement* rocketNum2_;
+    Ogre::OverlayElement* rocketNum3_;
+    Ogre::OverlayElement* rocketNum4_;
+    Ogre::OverlayElement* energyDistrPoint_;
+    Ogre::OverlayElement* primarChoice_;
+
+    int timeMin_;
+    int timeSec_;
+
+    std::string targetWindowName_;
+    std::string targetWindowStatus_;
+    int targetWindowDistance_;
+    int targetWindowHitRating_;
+
+    int energyValue_;
+
+    bool shieldLeftTopValue_;
+    bool shieldRightTopValue_;
+    bool shieldLeftBottomValue_;
+    bool shieldRightBottomValue_;
+
+    int rocket1_;
+    int rocket2_;
+    int rocket3_;
+    int rocket4_;
+
+    float energyDistrShield_;
+    float energyDistrEngine_;
+    float energyDistrLaser_;
+
+    float energyDistrPixelX_;
+    float energyDistrPixelY_;
+
+    int primarValue_;
+
+  public:
+    HUD( void );
+    ~HUD( void );
+    void init( void );
+
+    void setTime(int i, int j);
+    void setTargetWindowName(std::string i);
+    void setTargetWindowStatus(std::string i);
+    void setTargetWindowDistance(int i);
+    void setTargetWindowHitRating(int i);
+    void setEnergyValue(int i);
+    void setShieldLeftTopValue(bool i);
+    void setShieldRightTopValue(bool i);
+    void setShieldLeftBottomValue(bool i);
+    void setShieldRightBottomValue(bool i);
+    void setRocket1(int i);
+    void setRocket2(int i);
+    void setRocket3(int i);
+    void setRocket4(int i);
+    void setEnergyDistr(float s, float e, float l);
+    void setPrimar(int i);
+
+  };
+}
+
+#endif /* _HUD_H__ */
Index: code/trunk/src/orxonox/objects/Ambient.cc
===================================================================
--- code/trunk/src/orxonox/objects/Ambient.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/Ambient.cc	(revision 790)
@@ -0,0 +1,79 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <vector>
+#include <string>
+
+#include <OgreSceneManager.h>
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/Tokenizer.h"
+#include "util/String2Number.h"
+#include "util/Math.h"
+#include "../core/Debug.h"
+#include "../core/CoreIncludes.h"
+#include "../Orxonox.h"
+
+#include "Ambient.h"
+
+namespace orxonox
+{
+    // create a template instantiations
+    //template class _OrxonoxExport ClassIdentifier<Ambient>;
+
+    CreateFactory(Ambient);
+
+    Ambient::Ambient()
+    {
+        RegisterObject(Ambient);
+    }
+
+    Ambient::~Ambient()
+    {
+    }
+
+    void Ambient::loadParams(TiXmlElement* xmlElem)
+    {
+    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+
+    	if (xmlElem->Attribute("colourvalue"))
+    	{
+
+	    	std::vector<std::string> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),",");
+	    	float r, g, b;
+    	 	String2Number<float>(r, colourvalues[0]);
+	    	String2Number<float>(g, colourvalues[1]);
+	    	String2Number<float>(b, colourvalues[2]);
+
+	    	mgr->setAmbientLight(ColourValue(r,g,b));
+
+	    	COUT(4) << "Loader: Set ambient light: "<<r<<" " << g << " " << b  << std::endl << std::endl;
+    	}
+   }
+}
Index: code/trunk/src/orxonox/objects/Ambient.h
===================================================================
--- code/trunk/src/orxonox/objects/Ambient.h	(revision 790)
+++ code/trunk/src/orxonox/objects/Ambient.h	(revision 790)
@@ -0,0 +1,26 @@
+#ifndef _Ambient_H__
+#define _Ambient_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Ambient : public BaseObject
+    {
+        public:
+            Ambient();
+            virtual ~Ambient();
+
+            
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+            
+
+    };
+    ExportClass(Ambient, Orxonox);
+}
+
+#endif /* _Ambient_H__ */
Index: code/trunk/src/orxonox/objects/BaseObject.cc
===================================================================
--- code/trunk/src/orxonox/objects/BaseObject.cc	(revision 265)
+++ 	(revision )
@@ -1,15 +1,0 @@
-#include "BaseObject.h"
-
-namespace orxonox
-{
-    CreateFactory(BaseObject);
-
-    BaseObject::BaseObject()
-    {
-        RegisterRootObject(BaseObject);
-    }
-
-    BaseObject::~BaseObject()
-    {
-    }
-}
Index: code/trunk/src/orxonox/objects/BaseObject.h
===================================================================
--- code/trunk/src/orxonox/objects/BaseObject.h	(revision 265)
+++ 	(revision )
@@ -1,55 +1,0 @@
-#ifndef _BaseObject_H__
-#define _BaseObject_H__
-
-#include "../core/IdentifierIncludes.h"
-
-namespace orxonox
-{
-    class BaseObject : virtual public OrxonoxClass
-    {
-        public:
-            BaseObject();
-            virtual ~BaseObject();
-
-            inline bool isA(const Identifier* identifier)
-                { this->getIdentifier()->isA(identifier); }
-            inline bool isDirectlyA(const Identifier* identifier)
-                { this->getIdentifier()->isDirectlyA(identifier); }
-            inline bool isChildOf(const Identifier* identifier)
-                { this->getIdentifier()->isChildOf(identifier); }
-            inline bool isParentOf(const Identifier* identifier)
-                { this->getIdentifier()->isParentOf(identifier); }
-
-            inline bool isA(const SubclassIdentifier<class B>* identifier)
-                { this->getIdentifier()->isA(identifier->getIdentifier()); }
-            inline bool isDirectlyA(const SubclassIdentifier<class B>* identifier)
-                { this->getIdentifier()->isDirectlyA(identifier->getIdentifier()); }
-            inline bool isChildOf(const SubclassIdentifier<class B>* identifier)
-                { this->getIdentifier()->isChildOf(identifier->getIdentifier()); }
-            inline bool isParentOf(const SubclassIdentifier<class B>* identifier)
-                { this->getIdentifier()->isParentOf(identifier->getIdentifier()); }
-
-            inline bool isA(const SubclassIdentifier<class B> identifier)
-                { this->getIdentifier()->isA(identifier.getIdentifier()); }
-            inline bool isDirectlyA(const SubclassIdentifier<class B> identifier)
-                { this->getIdentifier()->isDirectlyA(identifier.getIdentifier()); }
-            inline bool isChildOf(const SubclassIdentifier<class B> identifier)
-                { this->getIdentifier()->isChildOf(identifier.getIdentifier()); }
-            inline bool isParentOf(const SubclassIdentifier<class B> identifier)
-                { this->getIdentifier()->isParentOf(identifier.getIdentifier()); }
-
-            inline bool isA(const OrxonoxClass* object)
-                { this->getIdentifier()->isA(object->getIdentifier()); }
-            inline bool isDirectlyA(const OrxonoxClass* object)
-                { this->getIdentifier()->isDirectlyA(object->getIdentifier()); }
-            inline bool isChildOf(const OrxonoxClass* object)
-                { this->getIdentifier()->isChildOf(object->getIdentifier()); }
-            inline bool isParentOf(const OrxonoxClass* object)
-                { this->getIdentifier()->isParentOf(object->getIdentifier()); }
-
-            std::string name_; // test
-
-    };
-}
-
-#endif
Index: code/trunk/src/orxonox/objects/Camera.cc
===================================================================
--- code/trunk/src/orxonox/objects/Camera.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/Camera.cc	(revision 790)
@@ -0,0 +1,77 @@
+
+#include "OrxonoxStableHeaders.h"
+
+#include <string>
+
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+#include <OgreRoot.h>
+#include <OgreRenderWindow.h>
+#include <OgreViewport.h>
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/Tokenizer.h"
+#include "util/String2Number.h"
+#include "util/Math.h"
+#include "../core/Debug.h"
+#include "../core/CoreIncludes.h"
+#include "../Orxonox.h"
+#include "../GraphicsEngine.h"
+
+#include "Camera.h"
+
+namespace orxonox
+{
+    CreateFactory(Camera);
+
+    Camera::Camera()
+    {
+        RegisterObject(Camera);
+    }
+
+    Camera::~Camera()
+    {
+    }
+
+    void Camera::loadParams(TiXmlElement* xmlElem)
+    {
+      Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+
+      if (xmlElem->Attribute("name") && xmlElem->Attribute("pos") && xmlElem->Attribute("lookat") && xmlElem->Attribute("node"))
+      {
+        //    <Camera name="Camera" pos="0,0,-250" lookat="0,0,0" />
+
+        std::string name = xmlElem->Attribute("name");
+        std::string pos = xmlElem->Attribute("pos");
+        std::string lookat = xmlElem->Attribute("lookat");
+
+        Ogre::Camera *cam = mgr->createCamera(name);
+
+        float x, y, z;
+        std::vector<std::string> posVec = tokenize(xmlElem->Attribute("pos"),",");
+        String2Number<float>(x, posVec[0]);
+        String2Number<float>(y, posVec[1]);
+        String2Number<float>(z, posVec[2]);
+
+        cam->setPosition(Vector3(x,y,z));
+
+        posVec = tokenize(xmlElem->Attribute("lookat"),",");
+        String2Number<float>(x, posVec[0]);
+        String2Number<float>(y, posVec[1]);
+        String2Number<float>(z, posVec[2]);
+
+        cam->lookAt(Vector3(x,y,z));
+
+        std::string node = xmlElem->Attribute("node");
+
+        Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->createChildSceneNode(node); //getChild(node);
+        sceneNode->attachObject((Ogre::MovableObject*)cam);
+
+        // FIXME: unused var
+        Ogre::Viewport* vp = orxonox::Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
+
+
+        COUT(4) << "Loader: Created camera "<< name  << std::endl << std::endl;
+      }
+   }
+}
Index: code/trunk/src/orxonox/objects/Camera.h
===================================================================
--- code/trunk/src/orxonox/objects/Camera.h	(revision 790)
+++ code/trunk/src/orxonox/objects/Camera.h	(revision 790)
@@ -0,0 +1,26 @@
+#ifndef _Camera_H__
+#define _Camera_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Camera : public BaseObject
+    {
+        public:
+            Camera();
+            virtual ~Camera();
+
+            
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+            
+
+    };
+    ExportClass(Camera, Orxonox);
+}
+
+#endif /* _Camera_H__ */
Index: code/trunk/src/orxonox/objects/Explosion.cc
===================================================================
--- code/trunk/src/orxonox/objects/Explosion.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/Explosion.cc	(revision 790)
@@ -0,0 +1,85 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreParticleSystem.h>
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+
+#include "../core/CoreIncludes.h"
+#include "util/Math.h"
+#include "../Orxonox.h"
+#include "../particle/ParticleInterface.h"
+
+#include "Explosion.h"
+
+namespace orxonox
+{
+    CreateFactory(Explosion);
+
+    Explosion::Explosion(WorldEntity* owner)
+    {
+        RegisterObject(Explosion);
+
+        this->particle_ = 0;
+        this->lifetime_ = 0.4;
+
+        if (owner)
+        {
+            this->destroyTimer_.setTimer(this->lifetime_, false, this, &Explosion::destroyObject);
+
+            Vector3 position = owner->getNode()->getWorldPosition();
+
+            this->particle_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(), "explosion" + this->getName(), "Orxonox/treibwerk");
+            this->particle_->getParticleSystem()->setParameter("local_space", "true");
+            this->particle_->newEmitter();
+            this->particle_->setPositionOfEmitter(0, Vector3::ZERO);
+            this->particle_->setPositionOfEmitter(1, Vector3::ZERO);
+            this->particle_->setColour(ColourValue(1.0, 0.8, 0.2));
+
+            this->setPosition(position);
+            this->scale(2);
+
+            this->particle_->addToSceneNode(this->getNode());
+        }
+    }
+
+    Explosion::~Explosion()
+    {
+        if (this->particle_)
+        {
+            this->particle_->detachFromSceneNode();
+            delete this->particle_;
+        }
+    };
+
+    void Explosion::destroyObject()
+    {
+        delete this;
+    }
+}
Index: code/trunk/src/orxonox/objects/Explosion.h
===================================================================
--- code/trunk/src/orxonox/objects/Explosion.h	(revision 790)
+++ code/trunk/src/orxonox/objects/Explosion.h	(revision 790)
@@ -0,0 +1,26 @@
+#ifndef _Explosion_H__
+#define _Explosion_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "WorldEntity.h"
+#include "../tools/Timer.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Explosion : public WorldEntity
+    {
+        public:
+            Explosion(WorldEntity* owner = 0);
+            virtual ~Explosion();
+            void destroyObject();
+
+        private:
+            Timer<Explosion> destroyTimer_;
+            float lifetime_;
+            ParticleInterface* particle_;
+    };
+    ExportClass(Explosion, Orxonox);
+}
+
+#endif /* _Explosion_H__ */
Index: code/trunk/src/orxonox/objects/Fighter.cc
===================================================================
--- code/trunk/src/orxonox/objects/Fighter.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/Fighter.cc	(revision 790)
@@ -0,0 +1,510 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <string>
+
+#include <OgreCamera.h>
+#include <OgreRenderWindow.h>
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/String2Number.h"
+#include "../core/CoreIncludes.h"
+#include "../Orxonox.h"
+#include "../particle/ParticleInterface.h"
+#include "weapon/AmmunitionDump.h"
+#include "weapon/BarrelGun.h"
+
+#include "Fighter.h"
+
+namespace orxonox
+{
+    CreateFactory(Fighter);
+
+    Fighter::Fighter()
+    {
+        RegisterObject(Fighter);
+
+        this->setConfigValues();
+
+        this->setMouseEventCallback_ = false;
+
+        this->w = NULL;
+        this->tt = NULL;
+        this->ammoDump_ = NULL;
+        this->mainWeapon_ = NULL;
+        this->rightButtonPressed_ = false;
+        this->leftButtonPressed_ = false;
+
+        this->moveForward_ = 0;
+        this->rotateUp_ = 0;
+        this->rotateDown_ = 0;
+        this->rotateRight_ = 0;
+        this->rotateLeft_ = 0;
+        this->loopRight_ = 0;
+        this->loopLeft_ = 0;
+        this->brakeForward_ = 0;
+        this->brakeRotate_ = 0;
+        this->brakeLoop_ = 0;
+        this->speedForward_ = 0;
+        this->speedRotateUpDown_ = 0;
+        this->speedRotateRightLeft_ = 0;
+        this->speedLoopRightLeft_ = 0;
+        this->maxSpeedForward_ = 0;
+        this->maxSpeedRotateUpDown_ = 0;
+        this->maxSpeedRotateRightLeft_ = 0;
+        this->maxSpeedLoopRightLeft_ = 0;
+        this->accelerationForward_ = 0;
+        this->accelerationRotateUpDown_ = 0;
+        this->accelerationRotateRightLeft_ = 0;
+        this->accelerationLoopRightLeft_ = 0;
+
+        this->speed = 250;
+        this->loop = 100;
+        this->rotate = 10;
+        this->mouseX = 0;
+        this->mouseY = 0;
+        this->maxMouseX = 0;
+        this->minMouseX = 0;
+        this->moved = false;
+
+        this->brakeRotate(rotate*10);
+        this->brakeLoop(loop);
+
+        COUT(3) << "Info: Fighter was loaded" << std::endl;
+    }
+
+    Fighter::~Fighter()
+    {
+        if (w)
+            delete w;
+        if (tt)
+            delete tt;
+    }
+
+    void Fighter::setConfigValues()
+    {
+        SetConfigValue(bInvertMouse_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
+    }
+
+    void Fighter::setMaxSpeedValues(float maxSpeedForward, float maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft)
+    {
+        this->maxSpeedForward_ = maxSpeedForward;
+        this->maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+        this->maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+        this->maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+    }
+
+    void Fighter::loadParams(TiXmlElement* xmlElem)
+    {
+        Model::loadParams(xmlElem);
+
+#if 0
+        w = new particle::ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"schuss" + this->getName(),"Orxonox/schuss");
+        w->getParticleSystem()->setParameter("local_space","true");
+        w->newEmitter();
+/*
+        w->setDirection(Vector3(0,0,1));
+        w->setPositionOfEmitter(0, Vector3(10,10,0));
+        w->setPositionOfEmitter(1, Vector3(-10,10,0));
+*/
+        w->setDirection(Vector3(1,0,0));
+        w->setPositionOfEmitter(0, Vector3(0,10,10));
+        w->setPositionOfEmitter(1, Vector3(0,-10,10));
+
+        emitterRate_ = w->getRate();
+
+        Ogre::SceneNode* node1 = this->getNode()->createChildSceneNode(this->getName() + "particle1");
+        node1->setInheritScale(false);
+        w->addToSceneNode(node1);
+#endif
+
+        tt = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
+        tt->getParticleSystem()->setParameter("local_space","true");
+        tt->newEmitter();
+/*
+        tt->setDirection(Vector3(0,0,1));
+        tt->setPositionOfEmitter(0, Vector3(20,-1,-15));
+        tt->setPositionOfEmitter(1, Vector3(-20,-1,-15));
+*/
+        tt->setDirection(Vector3(-1,0,0));
+        tt->setPositionOfEmitter(0, Vector3(-15,20,-1));
+        tt->setPositionOfEmitter(1, Vector3(-15,-20,-1));
+        tt->setVelocity(50);
+
+        Ogre::SceneNode* node2 = this->getNode()->createChildSceneNode(this->getName() + "particle2");
+        node2->setInheritScale(false);
+        tt->addToSceneNode(node2);
+
+        // add weapon
+
+        ammoDump_ = new AmmunitionDump();
+        ammoDump_->setDumpSize("Barrel", 1000);
+        ammoDump_->store("Barrel", 420);
+
+        mainWeapon_ = new BarrelGun();
+        mainWeapon_->setAmmoDump(ammoDump_);
+        Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->removeChild(mainWeapon_->getNode());
+        getNode()->addChild(mainWeapon_->getNode());
+
+        if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
+        {
+            std::string forwardStr = xmlElem->Attribute("forward");
+            std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
+            std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
+            std::string looprightleftStr = xmlElem->Attribute("looprightleft");
+
+            String2Number<float>(this->maxSpeedForward_, forwardStr);
+            String2Number<float>(this->maxSpeedRotateUpDown_, rotateupdownStr);
+            String2Number<float>(this->maxSpeedRotateRightLeft_, rotaterightleftStr);
+            String2Number<float>(this->maxSpeedLoopRightLeft_, looprightleftStr);
+
+            COUT(4) << "Loader: Initialized spaceship steering with values " << maxSpeedForward_ << " " << maxSpeedRotateUpDown_ << " " << maxSpeedRotateRightLeft_ << " " << maxSpeedLoopRightLeft_ << " " << std::endl;
+    	}
+
+    	if (xmlElem->Attribute("camera"))
+    	{
+            Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
+            Ogre::SceneNode *node = this->getNode()->createChildSceneNode("CamNode");
+/*
+//            node->setInheritOrientation(false);
+            cam->setPosition(Vector3(0,50,-150));
+            cam->lookAt(Vector3(0,20,0));
+            cam->roll(Degree(0));
+*/
+
+            cam->setPosition(Vector3(-150,0,50));
+//            cam->setPosition(Vector3(0,-350,0));
+            cam->lookAt(Vector3(0,0,20));
+            cam->roll(Degree(-90));
+
+            node->attachObject(cam);
+            Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
+    	}
+    }
+
+    bool Fighter::mouseMoved(const OIS::MouseEvent &e)
+    {
+        this->mouseX += e.state.X.rel;
+        //if (this->bInvertMouse_)
+            //this->mouseY += e.state.Y.rel;
+        //else
+            this->mouseY -= e.state.Y.rel;
+
+//        if(mouseX>maxMouseX) maxMouseX = mouseX;
+//        if(mouseX<minMouseX) minMouseX = mouseX;
+//        cout << "mouseX: " << mouseX << "\tmouseY: " << mouseY << endl;
+
+        this->moved = true;
+
+        return true;
+    }
+
+    bool Fighter::mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id )
+    {
+      if (id == OIS::MB_Left)
+      {
+        this->leftButtonPressed_ = true;
+      }
+      else if (id == OIS::MB_Right)
+        this->rightButtonPressed_ = true;
+      return true;
+    }
+
+    bool Fighter::mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id )
+    {
+      if (id == OIS::MB_Left)
+      {
+        this->leftButtonPressed_ = false;
+      }
+      else if (id == OIS::MB_Right)
+        this->rightButtonPressed_ = false;
+      return true;
+    }
+
+    void Fighter::tick(float dt)
+    {
+        if (!this->setMouseEventCallback_)
+        {
+            if (Orxonox::getSingleton()->getMouse())
+            {
+                Orxonox::getSingleton()->getMouse()->setEventCallback(this);
+                this->setMouseEventCallback_ = true;
+            }
+        }
+
+        WorldEntity::tick(dt);
+
+        OIS::Keyboard* mKeyboard = Orxonox::getSingleton()->getKeyboard();
+        OIS::Mouse* mMouse = Orxonox::getSingleton()->getMouse();
+
+        mKeyboard->capture();
+        mMouse->capture();
+
+        if (leftButtonPressed_)
+            mainWeapon_->primaryFireRequest();
+        if (rightButtonPressed_)
+            mainWeapon_->secondaryFireRequest();
+
+        if (mKeyboard->isKeyDown(OIS::KC_UP) || mKeyboard->isKeyDown(OIS::KC_W))
+            this->moveForward(speed);
+        else
+            this->moveForward(0);
+
+        if(mKeyboard->isKeyDown(OIS::KC_DOWN) || mKeyboard->isKeyDown(OIS::KC_S))
+            this->brakeForward(speed);
+        else
+            this->brakeForward(speed/10);
+
+        if (mKeyboard->isKeyDown(OIS::KC_RIGHT) || mKeyboard->isKeyDown(OIS::KC_D))
+            this->loopRight(loop);
+        else
+            this->loopRight(0);
+
+        if (mKeyboard->isKeyDown(OIS::KC_LEFT) || mKeyboard->isKeyDown(OIS::KC_A))
+            this->loopLeft(loop);
+        else
+            this->loopLeft(0);
+
+        if (mKeyboard->isKeyDown(OIS::KC_G))
+            this->mainWeapon_->addAction(BaseWeapon::RELOAD);
+        else
+            this->loopLeft(0);
+
+        if(moved)
+        {
+            if (mouseY<=0)
+                this->rotateUp(-mouseY*rotate);
+            if (mouseY>0)
+                this->rotateDown(mouseY*rotate);
+            if (mouseX>0)
+                this->rotateRight(mouseX*rotate);
+            if (mouseX<=0)
+                this->rotateLeft(-mouseX*rotate);
+
+            mouseY = 0;
+            mouseX = 0;
+            moved = false;
+        }
+        else
+        {
+            this->rotateUp(0);
+            this->rotateDown(0);
+            this->rotateRight(0);
+            this->rotateLeft(0);
+        }
+
+        if(moveForward_ > 0)
+        {
+            accelerationForward_ = moveForward_;
+            if(speedForward_ < maxSpeedForward_)
+                speedForward_ += accelerationForward_*dt;
+            if(speedForward_ > maxSpeedForward_)
+                speedForward_ = maxSpeedForward_;
+        }
+
+        if(moveForward_ <= 0)
+        {
+            accelerationForward_ = -brakeForward_;
+            if(speedForward_ > 0)
+                speedForward_ += accelerationForward_*dt;
+            if(speedForward_ < 0)
+                speedForward_ = 0;
+        }
+
+        if(rotateUp_ > 0)
+        {
+            accelerationRotateUpDown_ = rotateUp_;
+            if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
+                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
+            speedRotateUpDown_ = maxSpeedRotateUpDown_;
+        }
+
+        if(rotateDown_ > 0)
+        {
+            accelerationRotateUpDown_ = rotateDown_;
+            if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
+                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
+                speedRotateUpDown_ = -maxSpeedRotateUpDown_;
+        }
+
+        if(rotateUp_ == 0 && rotateDown_ == 0)
+        {
+            accelerationRotateUpDown_ = brakeRotate_;
+            if(speedRotateUpDown_ > 0)
+                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ < 0)
+                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
+            if(fabs(speedRotateUpDown_) < accelerationRotateUpDown_*dt)
+                speedRotateUpDown_ = 0;
+        }
+
+        if(rotateRight_ > 0)
+        {
+            accelerationRotateRightLeft_ = rotateRight_;
+            if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
+        }
+
+        if(rotateLeft_ > 0)
+        {
+            accelerationRotateRightLeft_ = rotateLeft_;
+            if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
+        }
+
+        if(rotateRight_ == 0 && rotateLeft_ == 0)
+        {
+            accelerationRotateRightLeft_ = brakeRotate_;
+            if(speedRotateRightLeft_ > 0)
+                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ < 0)
+                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
+            if(fabs(speedRotateRightLeft_) < accelerationRotateRightLeft_*dt)
+                speedRotateRightLeft_ = 0;
+        }
+
+        if(loopRight_ > 0)
+        {
+            accelerationLoopRightLeft_ = loopRight_;
+            if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
+        }
+
+        if(loopLeft_ > 0)
+        {
+            accelerationLoopRightLeft_ = loopLeft_;
+            if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
+        }
+
+        if(loopLeft_ == 0 && loopRight_ == 0)
+        {
+            accelerationLoopRightLeft_ = brakeLoop_;
+            if(speedLoopRightLeft_ > 0)
+                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ < 0)
+                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
+            if(fabs(speedLoopRightLeft_) < accelerationLoopRightLeft_*dt)
+                speedLoopRightLeft_ = 0;
+        }
+
+        Vector3 transVector = Vector3::ZERO;
+/*
+        transVector.z = 1;
+        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
+        this->pitch(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
+        this->yaw(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
+        this->roll(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
+*/
+
+        transVector.x = 1;
+        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
+        this->yaw(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
+        this->roll(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
+        this->pitch(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
+
+        if (accelerationForward_ > 25.0)
+        {
+          this->tt->setRate(emitterRate_);
+        }
+        else
+        {
+          this->tt->setRate(0);
+        }
+
+    }
+
+    void Fighter::moveForward(float moveForward) {
+        moveForward_ = moveForward;
+    }
+
+    void Fighter::rotateUp(float rotateUp) {
+        rotateUp_ = rotateUp;
+    }
+
+    void Fighter::rotateDown(float rotateDown) {
+        rotateDown_ = rotateDown;
+    }
+
+    void Fighter::rotateLeft(float rotateLeft) {
+        rotateLeft_ = rotateLeft;
+    }
+
+    void Fighter::rotateRight(float rotateRight) {
+        rotateRight_ = rotateRight;
+    }
+
+    void Fighter::loopLeft(float loopLeft) {
+        loopLeft_ = loopLeft;
+    }
+
+    void Fighter::loopRight(float loopRight) {
+        loopRight_ = loopRight;
+    }
+
+    void Fighter::brakeForward(float brakeForward) {
+        brakeForward_ = brakeForward;
+    }
+
+    void Fighter::brakeRotate(float brakeRotate) {
+        brakeRotate_ = brakeRotate;
+    }
+
+    void Fighter::brakeLoop(float brakeLoop) {
+        brakeLoop_ = brakeLoop;
+    }
+
+    void Fighter::maxSpeedForward(float maxSpeedForward) {
+        maxSpeedForward_ = maxSpeedForward;
+    }
+
+    void Fighter::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
+        maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+    }
+
+    void Fighter::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
+        maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+    }
+
+    void Fighter::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
+        maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+    }
+}
Index: code/trunk/src/orxonox/objects/Fighter.h
===================================================================
--- code/trunk/src/orxonox/objects/Fighter.h	(revision 790)
+++ code/trunk/src/orxonox/objects/Fighter.h	(revision 790)
@@ -0,0 +1,95 @@
+#ifndef _Fighter_H__
+#define _Fighter_H__
+
+#include <OIS/OIS.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "Model.h"
+
+class TiXmlElement; // Forward declaration
+
+namespace orxonox
+{
+    class _OrxonoxExport Fighter : public Model, public OIS::MouseListener
+    {
+        public:
+            Fighter();
+            ~Fighter();
+            void setConfigValues();
+            virtual void loadParams(TiXmlElement* xmlElem);
+            void setMaxSpeedValues(float maxSpeedForward, float maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft);
+            virtual void tick(float dt);
+            void moveForward(float moveForward);
+            void rotateUp(float rotateUp);
+            void rotateDown(float rotateDown);
+            void rotateRight(float rotateRight);
+            void rotateLeft(float rotateLeft);
+            void loopRight(float loopRight);
+            void loopLeft(float loopLeft);
+            void brakeForward(float brakeForward);
+            void brakeRotate(float brakeRotate);
+            void brakeLoop(float brakeLoop);
+            void maxSpeedForward(float maxSpeedForward);
+            void maxSpeedRotateUpDown(float maxSpeedRotateUpDown);
+            void maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft);
+            void maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft);
+            bool mouseMoved(const OIS::MouseEvent &e);
+            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);// { return true; }
+            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);// { return true; }
+
+
+        private:
+            bool bInvertMouse_;
+            bool setMouseEventCallback_;
+
+            ParticleInterface *w;
+            ParticleInterface *tt;
+
+            AmmunitionDump* ammoDump_;
+            BarrelGun* mainWeapon_;
+
+            bool leftButtonPressed_;
+            bool rightButtonPressed_;
+
+            float moveForward_;
+            float rotateUp_;
+            float rotateDown_;
+            float rotateRight_;
+            float rotateLeft_;
+            float loopRight_;
+            float loopLeft_;
+            float brakeForward_;
+            float brakeRotate_;
+            float brakeLoop_;
+
+            float speedForward_;
+            float speedRotateUpDown_;
+            float speedRotateRightLeft_;
+            float speedLoopRightLeft_;
+
+            float maxSpeedForward_;
+            float maxSpeedRotateUpDown_;
+            float maxSpeedRotateRightLeft_;
+            float maxSpeedLoopRightLeft_;
+
+            float accelerationForward_;
+            float accelerationRotateUpDown_;
+            float accelerationRotateRightLeft_;
+            float accelerationLoopRightLeft_;
+
+            float speed;
+            float rotate;
+            float loop;
+            float mouseY;
+            float mouseX;
+            float maxMouseX;
+            float minMouseX;
+            bool moved;
+
+            int emitterRate_;
+    };
+    ExportClass(Fighter, Orxonox);
+}
+
+#endif /* _Fighter_H__ */
Index: code/trunk/src/orxonox/objects/Model.cc
===================================================================
--- code/trunk/src/orxonox/objects/Model.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/Model.cc	(revision 790)
@@ -0,0 +1,75 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/Tokenizer.h"
+#include "util/String2Number.h"
+#include "../core/CoreIncludes.h"
+#include "../Orxonox.h"
+
+#include "Model.h"
+
+namespace orxonox
+{
+    CreateFactory(Model);
+
+    Model::Model()
+    {
+        RegisterObject(Model);
+    }
+
+    Model::~Model()
+    {
+    }
+
+    void Model::loadParams(TiXmlElement* xmlElem)
+    {
+        WorldEntity::loadParams(xmlElem);
+
+        if (xmlElem->Attribute("mesh"))
+        {
+            meshSrc_ = xmlElem->Attribute("mesh");
+        }
+        create();
+    }
+
+    bool Model::create(){
+      if(meshSrc_.compare("")!=0){
+        this->mesh_.setMesh(meshSrc_);
+        this->attachObject(this->mesh_.getEntity());
+        COUT(4) << "Loader: Created model" << std::endl;
+      }
+      registerAllVariables();
+      return true;
+    }
+
+    void Model::registerAllVariables(){
+      registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING);
+    }
+}
Index: code/trunk/src/orxonox/objects/Model.h
===================================================================
--- code/trunk/src/orxonox/objects/Model.h	(revision 790)
+++ code/trunk/src/orxonox/objects/Model.h	(revision 790)
@@ -0,0 +1,30 @@
+#ifndef _Model_H__
+#define _Model_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "WorldEntity.h"
+#include "../tools/Mesh.h"
+
+class TiXmlElement; // Forward declaration
+
+namespace orxonox
+{
+
+    class _OrxonoxExport Model : public WorldEntity
+    {
+        public:
+            Model();
+            virtual ~Model();
+            virtual void loadParams(TiXmlElement* xmlElem);
+            bool create();
+
+        private:
+            std::string meshSrc_;
+            Mesh mesh_;
+            void registerAllVariables();
+    };
+    ExportClass(Model, Orxonox);
+}
+
+#endif /* _Model_H__ */
Index: code/trunk/src/orxonox/objects/NPC.cc
===================================================================
--- code/trunk/src/orxonox/objects/NPC.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/NPC.cc	(revision 790)
@@ -0,0 +1,172 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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, beni_at_orxonox.net
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "../core/CoreIncludes.h"
+#include "NPC.h"
+
+namespace orxonox {
+
+  CreateFactory(NPC);
+
+  NPC::NPC()
+  {
+    RegisterObject(NPC);
+    movable_ = true;
+  }
+
+  NPC::~NPC()
+  {
+  }
+
+  void NPC::loadParams(TiXmlElement* xmlElem)
+  {
+    Model::loadParams(xmlElem);
+  }
+
+  /**
+   * function to chance values of an element
+   */
+  void NPC::setValues(Vector3 location, Vector3 speed, Vector3 acceleration, bool movable) {
+    this->setAcceleration(acceleration);
+    this->setVelocity(speed);
+    this->translate(location);
+    movable_ = movable;
+  }
+
+  /**
+   * calculates the distance between the element and an other point given by temp
+   */
+  float NPC::getDistance(WorldEntity* temp)
+  {
+    Vector3 distance = temp->getPosition() - this->getPosition();
+    return distance.length();
+  }
+
+  /**
+   * updates the data of an element
+   */
+  void NPC::update()
+  {
+
+    //if element is movable, calculate acceleration
+    if (this->movable_ == true) calculateAcceleration();
+
+  }
+
+  /**
+   * tick this NPC
+   */
+  void NPC::tick(float dt)
+  {
+
+    this->setVelocity(0.995*this->getVelocity() + this->getAcceleration()*dt);
+    this->translate(this->getVelocity()*dt);
+    this->setAcceleration(Vector3(0,0,0));
+  }
+
+  /**
+   * calculates the new acceleration of an element
+   */
+  void NPC::calculateAcceleration()
+  {
+    //acceleration consisting of flocking-functions
+    this->setAcceleration(separation() + alignment() + cohesion());
+  }
+
+  /**
+   * separation-function (keep elements separated, avoid crashs)
+   */
+  Vector3 NPC::separation()
+  {
+    Vector3 steering = Vector3(0,0,0); //steeringvector
+    Vector3 inverseDistance = Vector3(0,0,0);  //vector pointing away from possible collisions
+    int numberOfNeighbour = 0;  //number of observed neighbours
+    float distance = 0;  // distance to the actual element
+    for(Iterator<WorldEntity> it = ObjectList<WorldEntity>::start(); it; ++it) {  //go through all elements
+      distance = getDistance(*it);  //get distance between this and actual
+      if ((distance > 0) && (distance < SEPERATIONDISTANCE)) {  //do only if actual is inside detectionradius
+        inverseDistance = Vector3(0,0,0);
+        inverseDistance = this->getPosition() - it->getPosition();  //calculate the distancevector heading towards this
+        //adaptation of the inverseDistance to the distance
+        if ((distance < 200) && (distance >= 120)) {inverseDistance = 2*inverseDistance;}
+        if ((distance < 120) && (distance >= 80)) {inverseDistance = 5*inverseDistance;}
+        if ((distance < 80) && (distance >= 40)) {inverseDistance = 10*inverseDistance;}
+        if ((distance < 40) && (distance > 0)) {inverseDistance = 10*inverseDistance;}
+        steering = steering + inverseDistance;  //add up all significant steeringvectors
+        numberOfNeighbour++;  //counts the elements inside the detectionradius
+      }
+    }
+    if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> separation steeringvector
+    return steering;
+  }
+
+  /**
+   * alignment-function (lead elements to the same heading)
+   */
+  Vector3 NPC::alignment()
+  {
+    Vector3 steering = Vector3(0,0,0); //steeringvector
+    int numberOfNeighbour = 0;  //number of observed neighbours
+    //float distance = 0;
+    //go through all elements
+    for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) {  //just working with 3 elements at the moment
+      float distance = getDistance(*it);  //get distance between this and actual
+      if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) {  //check if actual element is inside detectionradius
+        steering = steering + it->getVelocity();  //add up all speedvectors inside the detectionradius
+        numberOfNeighbour++;  //counts the elements inside the detectionradius
+      }
+    }
+    if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> alignment steeringvector
+    return steering;
+  }
+
+  /**
+   * cohseion-function (keep elements close to each other)
+   */
+  Vector3 NPC::cohesion()
+  {
+    Vector3 steering = Vector3(0,0,0); //steeringvector
+    int numberOfNeighbour = 0;  //number of observed neighbours
+    //float distance = 0;
+    //go through all elements
+    for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) {  //just working with 3 elements at the moment
+      float distance = getDistance(*it);  //get distance between this and actual
+      if ((distance > 0) && (distance < COHESIONDISTANCE)) {  //check if actual element is inside detectionradius
+        steering = steering + it->getPosition();  //add up all locations of elements inside the detectionradius
+        numberOfNeighbour++;  //counts the elements inside the detectionradius
+      }
+    }
+    if(numberOfNeighbour > 0) {
+      steering = steering  / (float)numberOfNeighbour;  //devide the sum steeringvector by the number of elements -> cohesion steeringvector
+      steering = steering - this->getPosition();  //transform the vector for the ship
+    }
+    return steering;
+  }
+
+} // end of class NPC
Index: code/trunk/src/orxonox/objects/NPC.h
===================================================================
--- code/trunk/src/orxonox/objects/NPC.h	(revision 790)
+++ code/trunk/src/orxonox/objects/NPC.h	(revision 790)
@@ -0,0 +1,49 @@
+/**
+  @file NPC.h
+  @brief AI using WorldEntity
+  @author Benjamin Knecht <beni_at_orxonox.net>
+ */
+
+#ifndef _NPC_H__
+#define _NPC_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "Model.h"
+
+class TiXmlElement; // Forward declaration
+
+namespace orxonox {
+
+  class _OrxonoxExport NPC : public Model
+  {
+    public:
+
+      NPC();
+      virtual ~NPC();
+      virtual void loadParams(TiXmlElement* xmlElem);
+      void tick(float dt);
+      void update();
+      void setValues(Vector3 location, Vector3 speed, Vector3 acceleration, bool movable);
+
+    private:
+      float getDistance(WorldEntity* temp);
+      void calculateAcceleration();
+      Vector3 separation();
+      Vector3 alignment();
+      Vector3 cohesion();
+
+
+    private:
+      bool movable_;  // movability of the element, (false) gives the possiblity that an object can`t be moved by flocking but still gets into the calculation
+
+      // those values should maybe be controlled by a higher power and should maybe be parameters that can be changed
+      static int const SEPERATIONDISTANCE = 300;  //detectionradius of seperation
+      static int const ALIGNMENTDISTANCE = 300;  //detectionradius of alignment
+      static int const COHESIONDISTANCE = 5000;  //detectionradius of cohesion
+      static int const NUMELEMENTS = 9;  //number of elements
+  };
+  ExportClass(NPC, Orxonox);
+
+}
+#endif /* _NPC_H__ */
Index: code/trunk/src/orxonox/objects/Projectile.cc
===================================================================
--- code/trunk/src/orxonox/objects/Projectile.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/Projectile.cc	(revision 790)
@@ -0,0 +1,100 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "../core/CoreIncludes.h"
+#include "SpaceShip.h"
+#include "Explosion.h"
+#include "Model.h"
+
+#include "Projectile.h"
+
+namespace orxonox
+{
+    CreateFactory(Projectile);
+
+    Projectile::Projectile(SpaceShip* owner)
+    {
+        RegisterObject(Projectile);
+
+        this->setConfigValues();
+
+        this->owner_ = owner;
+
+        this->billboard_.setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1);
+        this->attachObject(this->billboard_.getBillboardSet());
+        this->scale(0.5);
+
+        if (this->owner_)
+        {
+            this->setStatic(false);
+            this->setOrientation(this->owner_->getOrientation());
+            this->setPosition(this->owner_->getPosition());
+            this->translate(Vector3(55, 0, 0), Ogre::Node::TS_LOCAL);
+            this->setVelocity(Vector3(1, 0, 0) * this->speed_);
+        }
+
+        this->destroyTimer_.setTimer(this->lifetime_, false, this, &Projectile::destroyObject);
+    }
+
+    Projectile::~Projectile()
+    {
+    }
+
+    void Projectile::setConfigValues()
+    {
+        SetConfigValue(lifetime_, 10.0).description("The time in seconds a projectile stays alive");
+        SetConfigValue(speed_, 2000.0).description("The speed of a projectile in units per second");
+    }
+
+    void Projectile::tick(float dt)
+    {
+        WorldEntity::tick(dt);
+
+        float radius;
+        for (Iterator<Model> it = ObjectList<Model>::start(); it; ++it)
+        {
+            if ((*it) != this->owner_)
+            {
+                radius = it->getScale().x * 3.0;
+
+                if (this->getPosition().squaredDistance(it->getPosition()) <= (radius*radius))
+                {
+                    new Explosion(this);
+                    delete this;
+                    return;
+                }
+            }
+        }
+    }
+
+    void Projectile::destroyObject()
+    {
+        delete this;
+    }
+}
Index: code/trunk/src/orxonox/objects/Projectile.h
===================================================================
--- code/trunk/src/orxonox/objects/Projectile.h	(revision 790)
+++ code/trunk/src/orxonox/objects/Projectile.h	(revision 790)
@@ -0,0 +1,33 @@
+#ifndef _Projectile_H__
+#define _Projectile_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "WorldEntity.h"
+#include "../tools/BillboardSet.h"
+#include "../tools/Timer.h"
+
+namespace orxonox
+{
+    class SpaceShip; // Forward declaration
+
+    class _OrxonoxExport Projectile : public WorldEntity
+    {
+        public:
+            Projectile(SpaceShip* owner = 0);
+            virtual ~Projectile();
+            void setConfigValues();
+            void destroyObject();
+            virtual void tick(float dt);
+
+        private:
+            SpaceShip* owner_;
+            BillboardSet billboard_;
+            float speed_;
+            float lifetime_;
+            Timer<Projectile> destroyTimer_;
+    };
+    ExportClass(Projectile, Orxonox);
+}
+
+#endif /* _Projectile_H__ */
Index: code/trunk/src/orxonox/objects/Skybox.cc
===================================================================
--- code/trunk/src/orxonox/objects/Skybox.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/Skybox.cc	(revision 790)
@@ -0,0 +1,68 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <string>
+
+#include <OgreSceneManager.h>
+
+#include "util/tinyxml/tinyxml.h"
+//#include "util/Tokenizer.h"
+//#include "util/String2Number.h"
+#include "../Orxonox.h"
+#include "../core/CoreIncludes.h"
+#include "../core/Debug.h"
+
+#include "Skybox.h"
+
+namespace orxonox
+{
+    CreateFactory(Skybox);
+
+    Skybox::Skybox()
+    {
+        RegisterObject(Skybox);
+    }
+
+    Skybox::~Skybox()
+    {
+    }
+
+    void Skybox::loadParams(TiXmlElement* xmlElem)
+    {
+    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+
+    	if (xmlElem->Attribute("src"))
+    	{
+    		std::string skyboxSrc = xmlElem->Attribute("src");
+	    	mgr->setSkyBox(true, skyboxSrc);
+
+	    	COUT(4) << "Loader: Set skybox: "<< skyboxSrc << std::endl << std::endl;
+    	}
+   }
+}
Index: code/trunk/src/orxonox/objects/Skybox.h
===================================================================
--- code/trunk/src/orxonox/objects/Skybox.h	(revision 790)
+++ code/trunk/src/orxonox/objects/Skybox.h	(revision 790)
@@ -0,0 +1,28 @@
+#ifndef _Skybox_H__
+#define _Skybox_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+
+class TiXmlElement; // Forward declaration
+
+namespace orxonox
+{
+    class _OrxonoxExport Skybox : public BaseObject
+    {
+        public:
+            Skybox();
+            virtual ~Skybox();
+
+            
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+            
+
+    };
+    ExportClass(Skybox, Orxonox);
+}
+
+#endif /* _Skybox_H__ */
Index: code/trunk/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/objects/SpaceShip.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/SpaceShip.cc	(revision 790)
@@ -0,0 +1,714 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <string>
+
+#include <OIS/OIS.h>
+#include <OgreCamera.h>
+#include <OgreRenderWindow.h>
+#include <OgreParticleSystem.h>
+#include <OgreSceneNode.h>
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/String2Number.h"
+#include "util/Math.h"
+#include "../core/CoreIncludes.h"
+#include "../core/Debug.h"
+#include "../Orxonox.h"
+#include "../particle/ParticleInterface.h"
+#include "Projectile.h"
+
+#include "SpaceShip.h"
+
+namespace orxonox
+{
+    CreateFactory(SpaceShip);
+
+    SpaceShip::SpaceShip()
+    {
+        RegisterObject(SpaceShip);
+
+        this->setConfigValues();
+
+        this->setMouseEventCallback_ = false;
+        this->bLMousePressed_ = false;
+        this->bRMousePressed_ = false;
+        this->mouseX_ = 0;
+        this->mouseY_ = 0;
+
+        this->camNode_ = 0;
+
+        this->tt_ = 0;
+        this->redNode_ = 0;
+        this->greenNode_ = 0;
+        this->blinkTime_ = 0;
+
+        this->timeToReload_ = 0;
+
+        this->maxSpeed_ = 0;
+        this->maxSideAndBackSpeed_ = 0;
+        this->maxRotation_ = 0;
+        this->translationAcceleration_ = 0;
+        this->rotationAcceleration_ = 0;
+        this->translationDamping_ = 0;
+        this->rotationDamping_ = 0;
+
+        this->maxRotationRadian_ = 0;
+        this->rotationAccelerationRadian_ = 0;
+        this->rotationDampingRadian_ = 0;
+        this->zeroRadian_ = Radian(0);
+
+        this->setRotationAxis(1, 0, 0);
+        this->setStatic(false);
+/*
+        this->moveForward_ = 0;
+        this->rotateUp_ = 0;
+        this->rotateDown_ = 0;
+        this->rotateRight_ = 0;
+        this->rotateLeft_ = 0;
+        this->loopRight_ = 0;
+        this->loopLeft_ = 0;
+        this->brakeForward_ = 0;
+        this->brakeRotate_ = 0;
+        this->brakeLoop_ = 0;
+        this->speedForward_ = 0;
+        this->speedRotateUpDown_ = 0;
+        this->speedRotateRightLeft_ = 0;
+        this->speedLoopRightLeft_ = 0;
+        this->maxSpeedForward_ = 0;
+        this->maxSpeedRotateUpDown_ = 0;
+        this->maxSpeedRotateRightLeft_ = 0;
+        this->maxSpeedLoopRightLeft_ = 0;
+        this->accelerationForward_ = 0;
+        this->accelerationRotateUpDown_ = 0;
+        this->accelerationRotateRightLeft_ = 0;
+        this->accelerationLoopRightLeft_ = 0;
+
+        this->speed = 250;
+        this->loop = 100;
+        this->rotate = 10;
+        this->mouseX = 0;
+        this->mouseY = 0;
+        this->maxMouseX = 0;
+        this->minMouseX = 0;
+        this->moved = false;
+
+        this->brakeRotate(rotate*10);
+        this->brakeLoop(loop);
+*/
+        COUT(3) << "Info: SpaceShip was loaded" << std::endl;
+    }
+
+    SpaceShip::~SpaceShip()
+    {
+        if (this->tt_)
+            delete this->tt_;
+    }
+
+    void SpaceShip::setConfigValues()
+    {
+        SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
+        SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds");
+        SetConfigValue(testvector_, Vector3()).description("asdfblah");
+    }
+
+    void SpaceShip::loadParams(TiXmlElement* xmlElem)
+    {
+        Model::loadParams(xmlElem);
+
+
+        // START CREATING THRUSTER
+        this->tt_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
+        this->tt_->getParticleSystem()->setParameter("local_space","true");
+        this->tt_->newEmitter();
+/*
+        this->tt_->setDirection(Vector3(0,0,1));
+        this->tt_->setPositionOfEmitter(0, Vector3(20,-1,-15));
+        this->tt_->setPositionOfEmitter(1, Vector3(-20,-1,-15));
+*/
+        this->tt_->setDirection(Vector3(-1,0,0));
+        this->tt_->setPositionOfEmitter(0, Vector3(-15,20,-1));
+        this->tt_->setPositionOfEmitter(1, Vector3(-15,-20,-1));
+        this->tt_->setVelocity(50);
+
+        emitterRate_ = tt_->getRate();
+
+        Ogre::SceneNode* node2 = this->getNode()->createChildSceneNode(this->getName() + "particle2");
+        node2->setInheritScale(false);
+        tt_->addToSceneNode(node2);
+        // END CREATING THRUSTER
+
+        // START CREATING BLINKING LIGHTS
+        this->redBillboard_.setBillboardSet("Examples/Flare", ColourValue(1.0, 0.0, 0.0), 1);
+        this->greenBillboard_.setBillboardSet("Examples/Flare", ColourValue(0.0, 1.0, 0.0), 1);
+
+        this->redNode_ = this->getNode()->createChildSceneNode(this->getName() + "red", Vector3(0.3, 4.7, -0.3));
+        this->redNode_->setInheritScale(false);
+        this->greenNode_ = this->getNode()->createChildSceneNode(this->getName() + "green", Vector3(0.3, -4.7, -0.3));
+        this->greenNode_->setInheritScale(false);
+
+        this->redNode_->attachObject(this->redBillboard_.getBillboardSet());
+        this->redNode_->setScale(0.3, 0.3, 0.3);
+
+        this->greenNode_->attachObject(this->greenBillboard_.getBillboardSet());
+        this->greenNode_->setScale(0.3, 0.3, 0.3);
+        // END CREATING BLINKING LIGHTS
+
+        // START of testing crosshair
+        this->crosshairNear_.setBillboardSet("Orxonox/Crosshair", ColourValue(1.0, 1.0, 0.0), 1);
+        this->crosshairFar_.setBillboardSet("Orxonox/Crosshair", ColourValue(1.0, 1.0, 0.0), 1);
+
+        this->chNearNode_ = this->getNode()->createChildSceneNode(this->getName() + "near", Vector3(50.0, 0.0, 0.0));
+        this->chNearNode_->setInheritScale(false);
+        this->chFarNode_ = this->getNode()->createChildSceneNode(this->getName() + "far", Vector3(200.0, 0.0, 0.0));
+        this->chFarNode_->setInheritScale(false);
+
+        this->chNearNode_->attachObject(this->crosshairNear_.getBillboardSet());
+        this->chNearNode_->setScale(0.2, 0.2, 0.2);
+
+        this->chFarNode_->attachObject(this->crosshairFar_.getBillboardSet());
+        this->chFarNode_->setScale(0.4, 0.4, 0.4);
+
+        // END of testing crosshair
+
+/*
+        if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
+        {
+            std::string forwardStr = xmlElem->Attribute("forward");
+            std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
+            std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
+            std::string looprightleftStr = xmlElem->Attribute("looprightleft");
+
+            String2Number<float>(this->maxSpeedForward_, forwardStr);
+            String2Number<float>(this->maxSpeedRotateUpDown_, rotateupdownStr);
+            String2Number<float>(this->maxSpeedRotateRightLeft_, rotaterightleftStr);
+            String2Number<float>(this->maxSpeedLoopRightLeft_, looprightleftStr);
+
+            COUT(4) << "Loader: Initialized spaceship steering with values " << maxSpeedForward_ << " " << maxSpeedRotateUpDown_ << " " << maxSpeedRotateRightLeft_ << " " << maxSpeedLoopRightLeft_ << " " << std::endl;
+    	}
+*/
+        if (xmlElem->Attribute("maxSpeed") && xmlElem->Attribute("maxSideAndBackSpeed") && xmlElem->Attribute("maxRotation") && xmlElem->Attribute("transAcc") && xmlElem->Attribute("rotAcc") && xmlElem->Attribute("transDamp") && xmlElem->Attribute("rotDamp"))
+        {
+
+            std::string msStr = xmlElem->Attribute("maxSpeed");
+            std::string msabsStr = xmlElem->Attribute("maxSideAndBackSpeed");
+            std::string mrStr = xmlElem->Attribute("maxRotation");
+            std::string taStr = xmlElem->Attribute("transAcc");
+            std::string raStr = xmlElem->Attribute("rotAcc");
+            std::string tdStr = xmlElem->Attribute("transDamp");
+            std::string rdStr = xmlElem->Attribute("rotDamp");
+
+            String2Number<float>(this->maxSpeed_, msStr);
+            String2Number<float>(this->maxSideAndBackSpeed_, msabsStr);
+            String2Number<float>(this->maxRotation_, mrStr);
+            String2Number<float>(this->translationAcceleration_, taStr);
+            String2Number<float>(this->rotationAcceleration_, raStr);
+            String2Number<float>(this->translationDamping_, tdStr);
+            String2Number<float>(this->rotationDamping_, rdStr);
+
+            this->maxRotationRadian_ = Radian(this->maxRotation_);
+            this->rotationAccelerationRadian_ = Radian(this->rotationAcceleration_);
+            this->rotationDampingRadian_ = Radian(this->rotationDamping_);
+
+            COUT(4) << "Loader: Initialized SpaceShip" << std::endl;
+    	}
+
+    	if (xmlElem->Attribute("camera"))
+    	{
+            Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
+            this->camNode_ = this->getNode()->createChildSceneNode("CamNode");
+/*
+//            node->setInheritOrientation(false);
+            cam->setPosition(Vector3(0,50,-150));
+            cam->lookAt(Vector3(0,20,0));
+            cam->roll(Degree(0));
+*/
+
+            cam->setPosition(Vector3(-200,0,35));
+//            cam->setPosition(Vector3(0,-350,0));
+            cam->lookAt(Vector3(0,0,35));
+            cam->roll(Degree(-90));
+
+            this->camNode_->attachObject(cam);
+            Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
+    	}
+    }
+
+    int sgn(float x)
+    {
+        if (x >= 0)
+            return 1;
+        else
+            return -1;
+    }
+
+    bool SpaceShip::mouseMoved(const OIS::MouseEvent &e)
+    {
+/*
+        this->mouseX += e.state.X.rel;
+        if (this->bInvertMouse_)
+            this->mouseY += e.state.Y.rel;
+        else
+            this->mouseY -= e.state.Y.rel;
+
+//        if(mouseX>maxMouseX) maxMouseX = mouseX;
+//        if(mouseX<minMouseX) minMouseX = mouseX;
+//        cout << "mouseX: " << mouseX << "\tmouseY: " << mouseY << endl;
+
+        this->moved = true;
+*/
+        if (this->bRMousePressed_)
+        {
+            this->camNode_->roll(Degree(-e.state.X.rel * 0.10));
+            this->camNode_->yaw(Degree(e.state.Y.rel * 0.10));
+        }
+        else
+        {
+            float minDimension = e.state.height;
+            if (e.state.width < minDimension)
+                minDimension = e.state.width;
+
+            this->mouseX_ += e.state.X.rel;
+            if (this->mouseX_ < -minDimension)
+                this->mouseX_ = -minDimension;
+            if (this->mouseX_ > minDimension)
+                this->mouseX_ = minDimension;
+
+            this->mouseY_ += e.state.Y.rel;
+            if (this->mouseY_ < -minDimension)
+                this->mouseY_ = -minDimension;
+            if (this->mouseY_ > minDimension)
+                this->mouseY_ = minDimension;
+
+            float xRotation = this->mouseX_ / minDimension;
+            xRotation = xRotation*xRotation * sgn(xRotation);
+            xRotation *= -this->rotationAcceleration_;
+            if (xRotation > this->maxRotation_)
+                xRotation = this->maxRotation_;
+            if (xRotation < -this->maxRotation_)
+                xRotation = -this->maxRotation_;
+            this->mouseXRotation_ = Radian(xRotation);
+
+            float yRotation = this->mouseY_ / minDimension;
+            yRotation = yRotation*yRotation * sgn(yRotation);
+            yRotation *= this->rotationAcceleration_;
+            if (yRotation > this->maxRotation_)
+                yRotation = this->maxRotation_;
+            if (yRotation < -this->maxRotation_)
+                yRotation = -this->maxRotation_;
+            this->mouseYRotation_ = Radian(yRotation);
+        }
+
+        return true;
+    }
+
+    bool SpaceShip::mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id)
+    {
+        if (id == OIS::MB_Left)
+            this->bLMousePressed_ = true;
+        else if (id == OIS::MB_Right)
+            this->bRMousePressed_ = true;
+
+        return true;
+    }
+
+    bool SpaceShip::mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id)
+    {
+        if (id == OIS::MB_Left)
+            this->bLMousePressed_ = false;
+        else if (id == OIS::MB_Right)
+        {
+            this->bRMousePressed_ = false;
+            this->camNode_->resetOrientation();
+        }
+
+        return true;
+    }
+
+    void SpaceShip::tick(float dt)
+    {
+        if (!this->setMouseEventCallback_)
+        {
+            if (Orxonox::getSingleton()->getMouse())
+            {
+                Orxonox::getSingleton()->getMouse()->setEventCallback(this);
+                this->setMouseEventCallback_ = true;
+            }
+        }
+
+        if (this->redNode_ && this->greenNode_)
+        {
+            this->blinkTime_ += dt;
+            float redScale = 0.15 + 0.15 * sin(this->blinkTime_ * 10.0);
+            float greenScale = 0.15 - 0.15 * sin(this->blinkTime_ * 10.0);
+            this->redNode_->setScale(redScale, redScale, redScale);
+            this->greenNode_->setScale(greenScale, greenScale, greenScale);
+        }
+
+        if (this->timeToReload_ > 0)
+            this->timeToReload_ -= dt;
+        else
+            this->timeToReload_ = 0;
+
+        if (this->bLMousePressed_ && this->timeToReload_ <= 0)
+        {
+            new Projectile(this);
+            this->timeToReload_ = this->reloadTime_;
+        }
+
+        OIS::Keyboard* mKeyboard = Orxonox::getSingleton()->getKeyboard();
+        OIS::Mouse* mMouse = Orxonox::getSingleton()->getMouse();
+
+        mKeyboard->capture();
+        mMouse->capture();
+
+
+        // #####################################
+        // ############# STEERING ##############
+        // #####################################
+
+        if (this->velocity_.x > this->maxSpeed_)
+            this->velocity_.x = this->maxSpeed_;
+        if (this->velocity_.x < -this->maxSideAndBackSpeed_)
+            this->velocity_.x = -this->maxSideAndBackSpeed_;
+        if (this->velocity_.y > this->maxSideAndBackSpeed_)
+            this->velocity_.y = this->maxSideAndBackSpeed_;
+        if (this->velocity_.y < -this->maxSideAndBackSpeed_)
+            this->velocity_.y = -this->maxSideAndBackSpeed_;
+        if (this->rotationRate_ > this->maxRotationRadian_)
+            this->rotationRate_ = this->maxRotationRadian_;
+        if (this->rotationRate_ < -this->maxRotationRadian_)
+            this->rotationRate_ = -this->maxRotationRadian_;
+
+        if (this->acceleration_.x == 0)
+        {
+            if (this->velocity_.x > 0)
+            {
+                this->velocity_.x -= (this->translationDamping_ * dt);
+                if (this->velocity_.x < 0)
+                    this->velocity_.x = 0;
+            }
+            else if (this->velocity_.x < 0)
+            {
+                this->velocity_.x += (this->translationDamping_ * dt);
+                if (this->velocity_.x > 0)
+                    this->velocity_.x = 0;
+            }
+        }
+
+        if (this->acceleration_.y == 0)
+        {
+            if (this->velocity_.y > 0)
+            {
+                this->velocity_.y -= (this->translationDamping_ * dt);
+                if (this->velocity_.y < 0)
+                    this->velocity_.y = 0;
+            }
+            else if (this->velocity_.y < 0)
+            {
+                this->velocity_.y += (this->translationDamping_ * dt);
+                if (this->velocity_.y > 0)
+                    this->velocity_.y = 0;
+            }
+        }
+
+        if (this->momentum_ == this->zeroRadian_)
+        {
+            if (this->rotationRate_ > this->zeroRadian_)
+            {
+                this->rotationRate_ -= (this->rotationDampingRadian_ * dt);
+                if (this->rotationRate_ < this->zeroRadian_)
+                    this->rotationRate_ = 0;
+            }
+            else if (this->rotationRate_ < this->zeroRadian_)
+            {
+                this->rotationRate_ += (this->rotationDampingRadian_ * dt);
+                if (this->rotationRate_ > this->zeroRadian_)
+                    this->rotationRate_ = 0;
+            }
+        }
+
+        if (mKeyboard->isKeyDown(OIS::KC_UP) || mKeyboard->isKeyDown(OIS::KC_W))
+            this->acceleration_.x = this->translationAcceleration_;
+        else if(mKeyboard->isKeyDown(OIS::KC_DOWN) || mKeyboard->isKeyDown(OIS::KC_S))
+            this->acceleration_.x = -this->translationAcceleration_;
+        else
+            this->acceleration_.x = 0;
+
+        if (mKeyboard->isKeyDown(OIS::KC_RIGHT) || mKeyboard->isKeyDown(OIS::KC_D))
+            this->acceleration_.y = -this->translationAcceleration_;
+        else if (mKeyboard->isKeyDown(OIS::KC_LEFT) || mKeyboard->isKeyDown(OIS::KC_A))
+            this->acceleration_.y = this->translationAcceleration_;
+        else
+            this->acceleration_.y = 0;
+
+        if (mKeyboard->isKeyDown(OIS::KC_DELETE) || mKeyboard->isKeyDown(OIS::KC_Q))
+            this->momentum_ = Radian(-this->rotationAccelerationRadian_);
+        else if (mKeyboard->isKeyDown(OIS::KC_PGDOWN) || mKeyboard->isKeyDown(OIS::KC_E))
+            this->momentum_ = Radian(this->rotationAccelerationRadian_);
+        else
+            this->momentum_ = 0;
+
+        WorldEntity::tick(dt);
+
+        this->roll(this->mouseXRotation_ * dt);
+        if (this->bInvertYAxis_)
+            this->yaw(Radian(-this->mouseYRotation_ * dt));
+        else
+            this->yaw(Radian(this->mouseYRotation_ * dt));
+
+        if (this->acceleration_.x > 0)
+            this->tt_->setRate(emitterRate_);
+        else
+            this->tt_->setRate(0);
+
+/*
+        if (mKeyboard->isKeyDown(OIS::KC_UP) || mKeyboard->isKeyDown(OIS::KC_W))
+            this->moveForward(speed);
+        else
+            this->moveForward(0);
+
+        if(mKeyboard->isKeyDown(OIS::KC_DOWN) || mKeyboard->isKeyDown(OIS::KC_S))
+            this->brakeForward(speed);
+        else
+            this->brakeForward(speed/10);
+
+        if (mKeyboard->isKeyDown(OIS::KC_RIGHT) || mKeyboard->isKeyDown(OIS::KC_D))
+            this->loopRight(loop);
+        else
+            this->loopRight(0);
+
+        if (mKeyboard->isKeyDown(OIS::KC_LEFT) || mKeyboard->isKeyDown(OIS::KC_A))
+            this->loopLeft(loop);
+        else
+            this->loopLeft(0);
+
+        if(moved)
+        {
+            if (mouseY<=0)
+                this->rotateUp(-mouseY*rotate);
+            if (mouseY>0)
+                this->rotateDown(mouseY*rotate);
+            if (mouseX>0)
+                this->rotateRight(mouseX*rotate);
+            if (mouseX<=0)
+                this->rotateLeft(-mouseX*rotate);
+
+            mouseY = 0;
+            mouseX = 0;
+            moved = false;
+        }*/
+/*        else
+        {
+            this->rotateUp(0);
+            this->rotateDown(0);
+            this->rotateRight(0);
+            this->rotateLeft(0);
+        }*/
+/*
+        if(moveForward_ > 0)
+        {
+            accelerationForward_ = moveForward_;
+            if(speedForward_ < maxSpeedForward_)
+                speedForward_ += accelerationForward_*dt;
+            if(speedForward_ > maxSpeedForward_)
+                speedForward_ = maxSpeedForward_;
+        }
+
+        if(moveForward_ <= 0)
+        {
+            accelerationForward_ = -brakeForward_;
+            if(speedForward_ > 0)
+                speedForward_ += accelerationForward_*dt;
+            if(speedForward_ < 0)
+                speedForward_ = 0;
+        }
+
+        if(rotateUp_ > 0)
+        {
+            accelerationRotateUpDown_ = rotateUp_;
+            if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
+                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
+            speedRotateUpDown_ = maxSpeedRotateUpDown_;
+        }
+
+        if(rotateDown_ > 0)
+        {
+            accelerationRotateUpDown_ = rotateDown_;
+            if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
+                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
+                speedRotateUpDown_ = -maxSpeedRotateUpDown_;
+        }
+
+        if(rotateUp_ == 0 && rotateDown_ == 0)
+        {
+            accelerationRotateUpDown_ = brakeRotate_;
+            if(speedRotateUpDown_ > 0)
+                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ < 0)
+                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
+            if(fabs(speedRotateUpDown_) < accelerationRotateUpDown_*dt)
+                speedRotateUpDown_ = 0;
+        }
+
+        if(rotateRight_ > 0)
+        {
+            accelerationRotateRightLeft_ = rotateRight_;
+            if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
+        }
+
+        if(rotateLeft_ > 0)
+        {
+            accelerationRotateRightLeft_ = rotateLeft_;
+            if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
+        }
+
+        if(rotateRight_ == 0 && rotateLeft_ == 0)
+        {
+            accelerationRotateRightLeft_ = brakeRotate_;
+            if(speedRotateRightLeft_ > 0)
+                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ < 0)
+                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
+            if(fabs(speedRotateRightLeft_) < accelerationRotateRightLeft_*dt)
+                speedRotateRightLeft_ = 0;
+        }
+
+        if(loopRight_ > 0)
+        {
+            accelerationLoopRightLeft_ = loopRight_;
+            if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
+        }
+
+        if(loopLeft_ > 0)
+        {
+            accelerationLoopRightLeft_ = loopLeft_;
+            if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
+        }
+
+        if(loopLeft_ == 0 && loopRight_ == 0)
+        {
+            accelerationLoopRightLeft_ = brakeLoop_;
+            if(speedLoopRightLeft_ > 0)
+                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ < 0)
+                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
+            if(fabs(speedLoopRightLeft_) < accelerationLoopRightLeft_*dt)
+                speedLoopRightLeft_ = 0;
+        }
+
+        Vector3 transVector = Vector3::ZERO;
+*/
+/*
+        transVector.z = 1;
+        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
+        this->pitch(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
+        this->yaw(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
+        this->roll(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
+*/
+/*
+        transVector.x = 1;
+        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
+        this->yaw(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
+        this->roll(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
+        this->pitch(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
+*/
+    }
+/*
+    void SpaceShip::moveForward(float moveForward) {
+        moveForward_ = moveForward;
+    }
+
+    void SpaceShip::rotateUp(float rotateUp) {
+        rotateUp_ = rotateUp;
+    }
+
+    void SpaceShip::rotateDown(float rotateDown) {
+        rotateDown_ = rotateDown;
+    }
+
+    void SpaceShip::rotateLeft(float rotateLeft) {
+        rotateLeft_ = rotateLeft;
+    }
+
+    void SpaceShip::rotateRight(float rotateRight) {
+        rotateRight_ = rotateRight;
+    }
+
+    void SpaceShip::loopLeft(float loopLeft) {
+        loopLeft_ = loopLeft;
+    }
+
+    void SpaceShip::loopRight(float loopRight) {
+        loopRight_ = loopRight;
+    }
+
+    void SpaceShip::brakeForward(float brakeForward) {
+        brakeForward_ = brakeForward;
+    }
+
+    void SpaceShip::brakeRotate(float brakeRotate) {
+        brakeRotate_ = brakeRotate;
+    }
+
+    void SpaceShip::brakeLoop(float brakeLoop) {
+        brakeLoop_ = brakeLoop;
+    }
+
+    void SpaceShip::maxSpeedForward(float maxSpeedForward) {
+        maxSpeedForward_ = maxSpeedForward;
+    }
+
+    void SpaceShip::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
+        maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+    }
+
+    void SpaceShip::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
+        maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+    }
+
+    void SpaceShip::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
+        maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+    }
+*/
+}
Index: code/trunk/src/orxonox/objects/SpaceShip.h
===================================================================
--- code/trunk/src/orxonox/objects/SpaceShip.h	(revision 790)
+++ code/trunk/src/orxonox/objects/SpaceShip.h	(revision 790)
@@ -0,0 +1,80 @@
+#ifndef _SpaceShip_H__
+#define _SpaceShip_H__
+
+#include <OgrePrerequisites.h>
+#include <OIS/OISMouse.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "Model.h"
+#include "../tools/BillboardSet.h"
+
+class TiXmlElement;          // Forward declaration
+
+namespace orxonox
+{
+    class ParticleInterface; // Forward declaration
+
+    class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener
+    {
+        public:
+            SpaceShip();
+            ~SpaceShip();
+            void setConfigValues();
+            virtual void loadParams(TiXmlElement* xmlElem);
+            virtual void tick(float dt);
+
+            bool mouseMoved(const OIS::MouseEvent &e);
+            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
+            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
+
+
+        private:
+            Vector3 testvector_;
+            bool bInvertYAxis_;
+            bool setMouseEventCallback_;
+            bool bLMousePressed_;
+            bool bRMousePressed_;
+
+            Ogre::SceneNode* camNode_;
+
+            ParticleInterface* tt_;
+
+            BillboardSet redBillboard_;
+            BillboardSet greenBillboard_;
+            Ogre::SceneNode* redNode_;
+            Ogre::SceneNode* greenNode_;
+            float blinkTime_;
+
+            BillboardSet crosshairNear_;
+            BillboardSet crosshairFar_;
+            Ogre::SceneNode* chNearNode_;
+            Ogre::SceneNode* chFarNode_;
+
+            float timeToReload_;
+            float reloadTime_;
+
+            float maxSideAndBackSpeed_;
+            float maxSpeed_;
+            float maxRotation_;
+            float translationAcceleration_;
+            float rotationAcceleration_;
+            float translationDamping_;
+            float rotationDamping_;
+
+            Radian maxRotationRadian_;
+            Radian rotationAccelerationRadian_;
+            Radian rotationDampingRadian_;
+            Radian zeroRadian_;
+            Radian mouseXRotation_;
+            Radian mouseYRotation_;
+
+            float mouseX_;
+            float mouseY_;
+
+            int emitterRate_;
+    };
+    ExportClass(SpaceShip, Orxonox);
+}
+
+#endif /* _SpaceShip_H__ */
Index: code/trunk/src/orxonox/objects/SpaceshipSteeringObject.cc
===================================================================
--- code/trunk/src/orxonox/objects/SpaceshipSteeringObject.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/SpaceshipSteeringObject.cc	(revision 790)
@@ -0,0 +1,92 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+#include <OgreRoot.h>
+#include <OgreRenderWindow.h>
+
+#include <string>
+
+#include "../Orxonox.h"
+#include "../GraphicsEngine.h"
+#include "util/tinyxml/tinyxml.h"
+#include "util/Tokenizer.h"
+#include "util/String2Number.h"
+#include "../core/Debug.h"
+
+#include "SpaceshipSteeringObject.h"
+
+#include "../SpaceshipSteering.h"
+
+namespace orxonox
+{
+    CreateFactory(SpaceshipSteeringObject);
+
+    SpaceshipSteeringObject::SpaceshipSteeringObject()
+    {
+        RegisterObject(SpaceshipSteeringObject);
+    }
+
+    SpaceshipSteeringObject::~SpaceshipSteeringObject()
+    {
+    }
+
+    void SpaceshipSteeringObject::loadParams(TiXmlElement* xmlElem)
+    {
+      SpaceshipSteering* steering = orxonox::Orxonox::getSingleton()->getSteeringPointer();
+
+      if (xmlElem->Attribute("node") && xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
+      {
+        std::string nodeStr = xmlElem->Attribute("node");
+        std::string forwardStr = xmlElem->Attribute("forward");
+        std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
+        std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
+        std::string looprightleftStr = xmlElem->Attribute("looprightleft");
+
+        float forward, rotateupdown, rotaterightleft, looprightleft;
+        String2Number<float>(forward, forwardStr);
+        String2Number<float>(rotateupdown, rotateupdownStr);
+        String2Number<float>(rotaterightleft, rotaterightleftStr);
+        String2Number<float>(looprightleft, looprightleftStr);
+
+        steering = new SpaceshipSteering(forward, rotateupdown, rotaterightleft, looprightleft);
+
+        Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+        Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->getChild(nodeStr);
+
+        steering->addNode(sceneNode);
+
+
+
+
+        COUT(4) << "Loader: Initialized spaceship steering at node " << nodeStr << " values "<< forward << " " << rotateupdown << " "<< rotaterightleft << " "<< looprightleft << " "<< std::endl << std::endl;
+      }
+   }
+}
Index: code/trunk/src/orxonox/objects/SpaceshipSteeringObject.h
===================================================================
--- code/trunk/src/orxonox/objects/SpaceshipSteeringObject.h	(revision 790)
+++ code/trunk/src/orxonox/objects/SpaceshipSteeringObject.h	(revision 790)
@@ -0,0 +1,24 @@
+#ifndef _OBJECT_SPACESHIPSTEERING_H__
+#define _OBJECT_SPACESHIPSTEERING_H__
+
+#include "core/BaseObject.h"
+#include "util/tinyxml/tinyxml.h"
+
+namespace orxonox
+{
+    class SpaceshipSteeringObject : public BaseObject
+    {
+        public:
+            SpaceshipSteeringObject();
+            virtual ~SpaceshipSteeringObject();
+
+
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+
+
+    };
+}
+
+#endif
Index: code/trunk/src/orxonox/objects/Test.h
===================================================================
--- code/trunk/src/orxonox/objects/Test.h	(revision 265)
+++ code/trunk/src/orxonox/objects/Test.h	(revision 790)
@@ -1,7 +1,34 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 _Test_H__
 #define _Test_H__
 
-#include "BaseObject.h"
-#include "../core/IdentifierIncludes.h"
+#include "core/BaseObject.h"
+#include "../core/CoreIncludes.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/Tickable.h
===================================================================
--- code/trunk/src/orxonox/objects/Tickable.h	(revision 790)
+++ code/trunk/src/orxonox/objects/Tickable.h	(revision 790)
@@ -0,0 +1,87 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file Tickable.h
+    @brief Definition of the Tickable interface.
+
+    The Tickable interface provides a tick(dt) function, that gets called every frame.
+    float dt is the time since the last frame in seconds.
+
+    Attention:
+    Classes derived from a Tickable that want to have a tick(dt) function on their part, MUST call the
+    parent::tick(dt) function explicit in their implementation of tick(dt) because it's a virtual function.
+*/
+
+#ifndef _Tickable_H__
+#define _Tickable_H__
+
+#include <OgreFrameListener.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "../core/CoreIncludes.h"
+
+namespace orxonox
+{
+    class TickFrameListener; // Forward declaration
+
+    //! The Tickable interface provides a tick(dt) function, that gets called every frame.
+    class _OrxonoxExport Tickable : virtual public OrxonoxClass
+    {
+        public:
+            /**
+                @brief Gets called every frame.
+                @param dt The time since the last frame in seconds
+            */
+            virtual void tick(float dt) = 0;
+
+        protected:
+            /**
+                @brief Constructor: Registers the object in the Tickable-list
+            */
+            Tickable() { RegisterRootObject(Tickable); }
+    };
+    ExportAbstractClass(Tickable, Orxonox);
+
+    //! The TickFrameListener calls the tick(dt) function of all Tickables every frame.
+    class _OrxonoxExport TickFrameListener : public Ogre::FrameListener
+    {
+        private:
+            /** @brief Gets called before a frame gets rendered. */
+            bool frameStarted(const Ogre::FrameEvent &evt)
+            {
+                // Iterate through all Tickables and call their tick(dt) function
+                for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; )
+                    (it++)->tick(evt.timeSinceLastFrame);
+
+                return FrameListener::frameStarted(evt);
+            }
+    };
+}
+
+#endif /* _Tickable_H__ */
Index: code/trunk/src/orxonox/objects/WorldEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/WorldEntity.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/WorldEntity.cc	(revision 790)
@@ -0,0 +1,185 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <string>
+#include <sstream>
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/Tokenizer.h"
+#include "util/String2Number.h"
+#include "../core/CoreIncludes.h"
+#include "../Orxonox.h"
+#include "WorldEntity.h"
+
+namespace orxonox
+{
+    CreateFactory(WorldEntity);
+
+    unsigned int WorldEntity::worldEntityCounter_s = 0;
+
+    WorldEntity::WorldEntity()
+    {
+        RegisterObject(WorldEntity);
+
+        if (Orxonox::getSingleton()->getSceneManager())
+        {
+            std::ostringstream name;
+            name << (WorldEntity::worldEntityCounter_s++);
+            this->setName("WorldEntity" + name.str());
+            this->node_ = Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
+        }
+        else
+        {
+            this->node_ = 0;
+        }
+
+        this->bStatic_ = true;
+        this->velocity_ = Vector3(0, 0, 0);
+        this->acceleration_ = Vector3(0, 0, 0);
+        this->rotationAxis_ = Vector3(0, 1, 0);
+        this->rotationRate_ = 0;
+        this->momentum_ = 0;
+    }
+
+    WorldEntity::~WorldEntity()
+    {
+    }
+
+    void WorldEntity::tick(float dt)
+    {
+        if (!this->bStatic_)
+        {
+            this->velocity_ += (dt * this->acceleration_);
+            this->translate(dt * this->velocity_, Ogre::Node::TS_LOCAL);
+
+            this->rotationRate_ += (dt * this->momentum_);
+            this->rotate(this->rotationAxis_, dt * this->rotationRate_);
+        }
+    }
+
+    void WorldEntity::loadParams(TiXmlElement* xmlElem)
+    {
+        BaseObject::loadParams(xmlElem);
+
+        if (xmlElem->Attribute("position"))
+        {
+            std::vector<std::string> pos = tokenize(xmlElem->Attribute("position"),",");
+            float x, y, z;
+            String2Number<float>(x, pos[0]);
+            String2Number<float>(y, pos[1]);
+            String2Number<float>(z, pos[2]);
+            this->setPosition(x, y, z);
+        }
+
+        if (xmlElem->Attribute("direction"))
+        {
+            std::vector<std::string> pos = tokenize(xmlElem->Attribute("direction"),",");
+            float x, y, z;
+            String2Number<float>(x, pos[0]);
+            String2Number<float>(y, pos[1]);
+            String2Number<float>(z, pos[2]);
+            this->setDirection(x, y, z);
+        }
+
+        if (xmlElem->Attribute("yaw") || xmlElem->Attribute("pitch") || xmlElem->Attribute("roll"))
+        {
+            float yaw = 0.0, pitch = 0.0, roll = 0.0;
+            if (xmlElem->Attribute("yaw"))
+                String2Number<float>(yaw,xmlElem->Attribute("yaw"));
+
+            if (xmlElem->Attribute("pitch"))
+                String2Number<float>(pitch,xmlElem->Attribute("pitch"));
+
+            if (xmlElem->Attribute("roll"))
+                String2Number<float>(roll,xmlElem->Attribute("roll"));
+
+            this->yaw(Degree(yaw));
+            this->pitch(Degree(pitch));
+            this->roll(Degree(roll));
+        }
+
+        if (xmlElem->Attribute("scale"))
+        {
+            std::string scaleStr = xmlElem->Attribute("scale");
+            float scale;
+            String2Number<float>(scale, scaleStr);
+            this->setScale(scale);
+        }
+
+        if (xmlElem->Attribute("rotationAxis"))
+        {
+            std::vector<std::string> pos = tokenize(xmlElem->Attribute("rotationAxis"),",");
+            float x, y, z;
+            String2Number<float>(x, pos[0]);
+            String2Number<float>(y, pos[1]);
+            String2Number<float>(z, pos[2]);
+            this->setRotationAxis(x, y, z);
+        }
+
+        if (xmlElem->Attribute("rotationRate"))
+        {
+            float rotationRate;
+            String2Number<float>(rotationRate, xmlElem->Attribute("rotationRate"));
+            this->setRotationRate(Degree(rotationRate));
+            if (rotationRate != 0)
+                this->setStatic(false);
+        }
+
+        create();
+
+    }
+
+    bool WorldEntity::create(){
+      registerAllVariables();
+      return true;
+    }
+
+    void WorldEntity::registerAllVariables()
+    {
+      // register coordinates
+      registerVar( (void*) &(this->getPosition().x), sizeof(this->getPosition().x), network::DATA);
+      registerVar( (void*) &(this->getPosition().y), sizeof(this->getPosition().y), network::DATA);
+      registerVar( (void*) &(this->getPosition().z), sizeof(this->getPosition().z), network::DATA);
+      // register orientation
+      registerVar( (void*) &(this->getOrientation().w), sizeof(this->getOrientation().w), network::DATA);
+      registerVar( (void*) &(this->getOrientation().x), sizeof(this->getOrientation().x), network::DATA);
+      registerVar( (void*) &(this->getOrientation().y), sizeof(this->getOrientation().y), network::DATA);
+      registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA);
+      // not needed at the moment, because we don't have prediction yet
+      /*// register velocity_
+      registerVar( (void*) &(this->getVelocity().x), sizeof(this->getVelocity().x), network::DATA);
+      registerVar( (void*) &(this->getVelocity().y), sizeof(this->getVelocity().y), network::DATA);
+      registerVar( (void*) &(this->getVelocity().z), sizeof(this->getVelocity().z), network::DATA);
+      // register rotationAxis/rate
+      registerVar( (void*) &(this->getRotationRate()), sizeof(this->getRotationRate()), network::DATA);
+      registerVar( (void*) &(this->getRotationAxis().x), sizeof(this->getRotationAxis().x), network::DATA);
+      registerVar( (void*) &(this->getRotationAxis().y), sizeof(this->getRotationAxis().y), network::DATA);
+      registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA);*/
+    }
+}
Index: code/trunk/src/orxonox/objects/WorldEntity.h
===================================================================
--- code/trunk/src/orxonox/objects/WorldEntity.h	(revision 790)
+++ code/trunk/src/orxonox/objects/WorldEntity.h	(revision 790)
@@ -0,0 +1,152 @@
+#ifndef _WorldEntity_H__
+#define _WorldEntity_H__
+
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "network/Synchronisable.h"
+#include "util/tinyxml/tinyxml.h"
+#include "../core/CoreIncludes.h"
+#include "core/BaseObject.h"
+#include "Tickable.h"
+#include "../tools/Mesh.h"
+
+namespace orxonox
+{
+  class _OrxonoxExport WorldEntity : public BaseObject, public Tickable, public network::Synchronisable
+  {
+    public:
+      WorldEntity();
+      virtual ~WorldEntity();
+
+      virtual void tick(float dt);
+      virtual void loadParams(TiXmlElement* xmlElem);
+      bool create();
+
+      inline Ogre::SceneNode* getNode()
+          { return this->node_; }
+
+      inline void setNode(Ogre::SceneNode* node)
+          { this->node_ = node; }
+
+      inline void setPosition(const Vector3& pos)
+          { this->node_->setPosition(pos); }
+      inline void setPosition(Real x, Real y, Real z)
+          { this->node_->setPosition(x, y, z); }
+      inline const Vector3& getPosition() const
+          { return this->node_->getPosition(); }
+
+      inline void translate(const Vector3 &d, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(d, relativeTo); }
+      inline void translate(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(x, y, z, relativeTo); }
+      inline void translate(const Matrix3 &axes, const Vector3 &move, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(axes, move, relativeTo); }
+      inline void translate(const Matrix3 &axes, Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(axes, x, y, z, relativeTo); }
+
+      inline void yaw(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+          { this->node_->yaw(angle, relativeTo); }
+      inline void pitch(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+          { this->node_->pitch(angle, relativeTo); }
+      inline void roll(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+          { this->node_->roll(angle, relativeTo); }
+
+      inline const Ogre::Quaternion& getOrientation()
+        { return this->node_->getOrientation(); }
+      inline void setOrientation(const Ogre::Quaternion& quat)
+        { this->node_->setOrientation(quat); }
+      inline void rotate(const Vector3 &axis, const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+        { this->node_->rotate(axis, angle, relativeTo); }
+      inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+        { this->node_->setDirection(x, y, z, relativeTo, localDirectionVector); }
+      inline void setDirection(const Vector3 &vec, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+        { this->node_->setDirection(vec, relativeTo, localDirectionVector); }
+      inline void lookAt(const Vector3 &targetPoint, Ogre::Node::TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+        { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); }
+
+      inline void setScale(const Vector3 &scale)
+        { this->node_->setScale(scale); }
+      inline void setScale(Real x, Real y, Real z)
+        { this->node_->setScale(x, y, z); }
+      inline void setScale(Real scale)
+        { this->node_->setScale(scale, scale, scale); }
+      inline const Vector3& getScale(void) const
+        { return this->node_->getScale(); }
+      inline void scale(const Vector3 &scale)
+        { this->node_->scale(scale); }
+      inline void scale(Real x, Real y, Real z)
+        { this->node_->scale(x, y, z); }
+      inline void scale(Real scale)
+        { this->node_->scale(scale, scale, scale); }
+
+      inline void attachObject(Ogre::MovableObject *obj)
+        { this->node_->attachObject(obj); }
+      inline void attachObject(Mesh &mesh)
+        { this->node_->attachObject(mesh.getEntity()); }
+      inline void detachObject(Ogre::MovableObject *obj)
+        { this->node_->detachObject(obj); }
+      inline void detachAllObjects()
+        { this->node_->detachAllObjects(); }
+
+      inline void setVelocity(const Vector3& velocity)
+          { this->velocity_ = velocity; }
+      inline void setVelocity(Real x, Real y, Real z)
+          { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; }
+      inline const Vector3& getVelocity() const
+          { return this->velocity_; }
+
+      inline void setAcceleration(const Vector3& acceleration)
+          { this->acceleration_ = acceleration; }
+      inline void setAcceleration(Real x, Real y, Real z)
+          { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; }
+      inline const Vector3& getAcceleration() const
+          { return this->acceleration_; }
+
+      inline void setRotationAxis(const Vector3& axis)
+          { this->rotationAxis_ = axis; }
+      inline void setRotationAxis(Real x, Real y, Real z)
+          { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; }
+      inline const Vector3& getRotationAxis() const
+          { return this->rotationAxis_; }
+
+      inline void setRotationRate(const Radian& angle)
+          { this->rotationRate_ = angle; }
+      inline void setRotationRate(const Degree& angle)
+          { this->rotationRate_ = angle; }
+      inline const Radian& getRotationRate() const
+          { return this->rotationRate_; }
+
+      inline void setMomentum(const Radian& angle)
+          { this->momentum_ = angle; }
+      inline void setMomentum(const Degree& angle)
+          { this->momentum_ = angle; }
+      inline const Radian& getMomentum() const
+          { return this->momentum_; }
+
+      inline void setStatic(bool bStatic)
+          { this->bStatic_ = bStatic; }
+      inline bool isStatic()
+          { return this->bStatic_; }
+
+    protected:
+      void registerAllVariables();
+
+      Vector3 velocity_;
+      Vector3 acceleration_;
+      Vector3 rotationAxis_;
+      Radian rotationRate_;
+      Radian momentum_;
+
+    private:
+      static unsigned int worldEntityCounter_s;
+      Ogre::SceneNode* node_;
+      bool bStatic_;
+  };
+  ExportClass(WorldEntity, Orxonox);
+}
+
+#endif /* _WorldEntity_H__ */
Index: code/trunk/src/orxonox/objects/test1.cc
===================================================================
--- code/trunk/src/orxonox/objects/test1.cc	(revision 265)
+++ code/trunk/src/orxonox/objects/test1.cc	(revision 790)
@@ -1,5 +1,35 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 "test1.h"
 #include "test2.h"
 #include "test3.h"
+#include "util/tinyxml/tinyxml.h"
+#include "../Orxonox.h"
+#include <OgreSceneManager.h>
 
 namespace orxonox
@@ -18,4 +48,9 @@
     Test1::~Test1()
     {
+    }
+
+    void Test1::tick(float dt)
+    {
+        std::cout << "Test1: " << this << std::endl;
     }
 
@@ -37,8 +72,8 @@
     void Test1::setUsefullClass1(Identifier* identifier)
     {
-        std::cout << "\n";
-        std::cout << "Test1: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
-        std::cout << "Test1: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
-        std::cout << "Test1: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        std::cout << std::endl;
+        std::cout << "Test1: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test1: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test1: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
         this->usefullClass1_ = identifier;
     }
@@ -46,8 +81,8 @@
     void Test1::setUsefullClass2(Identifier* identifier)
     {
-        std::cout << "\n";
-        std::cout << "Test1: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
-        std::cout << "Test1: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
-        std::cout << "Test1: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        std::cout << std::endl;
+        std::cout << "Test1: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test1: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test1: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
         this->usefullClass2_ = identifier;
     }
@@ -55,9 +90,16 @@
     void Test1::setUsefullClassOfTypeTest3(Identifier* identifier)
     {
-        std::cout << "\n";
-        std::cout << "Test1: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
-        std::cout << "Test1: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
-        std::cout << "Test1: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        std::cout << std::endl;
+        std::cout << "Test1: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test1: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test1: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
         this->usefullClass3_ = identifier;
     }
+
+    void Test1::loadParams(TiXmlElement* xmlElem)
+    {
+
+
+
+    }
 }
Index: code/trunk/src/orxonox/objects/test1.h
===================================================================
--- code/trunk/src/orxonox/objects/test1.h	(revision 265)
+++ code/trunk/src/orxonox/objects/test1.h	(revision 790)
@@ -2,14 +2,18 @@
 #define _Test1_H__
 
-#include "BaseObject.h"
+#include "core/BaseObject.h"
+#include "Tickable.h"
 #include "test3.h"
+#include "util/tinyxml/tinyxml.h"
 
 namespace orxonox
 {
-    class Test1 : public BaseObject
+    class Test1 : public BaseObject, public Tickable
     {
         public:
             Test1();
             virtual ~Test1();
+
+            virtual void tick(float dt);
 
             bool usefullClass1isA(Identifier* identifier);
@@ -19,4 +23,6 @@
             void setUsefullClass2(Identifier* identifier);
             void setUsefullClassOfTypeTest3(Identifier* identifier);
+
+            void loadParams(TiXmlElement* xmlElem);
 
         private:
Index: code/trunk/src/orxonox/objects/test2.cc
===================================================================
--- code/trunk/src/orxonox/objects/test2.cc	(revision 265)
+++ code/trunk/src/orxonox/objects/test2.cc	(revision 790)
@@ -1,2 +1,29 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 "test1.h"
 #include "test2.h"
@@ -14,8 +41,27 @@
         this->usefullClass2_ = Class(Test2);
         this->usefullClass3_ = Class(Test3);
+
+        timer1.setTimer(1, true, this, &Test2::timerFunction1);
+        timer2.setTimer(5, true, this, &Test2::timerFunction2);
+        timer3.setTimer(10, false, this, &Test2::timerFunction3);
     }
 
     Test2::~Test2()
     {
+    }
+
+    void Test2::timerFunction1()
+    {
+        std::cout << "Test2: 1 Sekunde" << std::endl;
+    }
+
+    void Test2::timerFunction2()
+    {
+        std::cout << "Test2: 5 Sekunden" << std::endl;
+    }
+
+    void Test2::timerFunction3()
+    {
+        std::cout << "Test2: 10 Sekunden sind um!" << std::endl;
     }
 
@@ -37,8 +83,8 @@
     void Test2::setUsefullClass1(Identifier* identifier)
     {
-        std::cout << "\n";
-        std::cout << "Test2: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
-        std::cout << "Test2: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
-        std::cout << "Test2: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        std::cout << std::endl;
+        std::cout << "Test2: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test2: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test2: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
         this->usefullClass1_ = identifier;
     }
@@ -46,8 +92,8 @@
     void Test2::setUsefullClass2(Identifier* identifier)
     {
-        std::cout << "\n";
-        std::cout << "Test2: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
-        std::cout << "Test2: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
-        std::cout << "Test2: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        std::cout << std::endl;
+        std::cout << "Test2: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test2: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test2: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
         this->usefullClass2_ = identifier;
     }
@@ -55,8 +101,8 @@
     void Test2::setUsefullClassOfTypeTest3(Identifier* identifier)
     {
-        std::cout << "\n";
-        std::cout << "Test2: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
-        std::cout << "Test2: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
-        std::cout << "Test2: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
+        std::cout << std::endl;
+        std::cout << "Test2: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test2: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test2: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
         this->usefullClass3_ = identifier;
     }
Index: code/trunk/src/orxonox/objects/test2.h
===================================================================
--- code/trunk/src/orxonox/objects/test2.h	(revision 265)
+++ code/trunk/src/orxonox/objects/test2.h	(revision 790)
@@ -2,5 +2,6 @@
 #define _Test2_H__
 
-#include "BaseObject.h"
+#include "core/BaseObject.h"
+#include "../tools/Timer.h"
 
 namespace orxonox
@@ -21,4 +22,8 @@
             void setUsefullClassOfTypeTest3(Identifier* identifier);
 
+            void timerFunction1();
+            void timerFunction2();
+            void timerFunction3();
+
         private:
             Identifier* usefullClass1_;
@@ -26,4 +31,7 @@
             SubclassIdentifier<Test3> usefullClass3_;
 
+            Timer<Test2> timer1;
+            Timer<Test2> timer2;
+            Timer<Test2> timer3;
     };
 }
Index: code/trunk/src/orxonox/objects/test3.cc
===================================================================
--- code/trunk/src/orxonox/objects/test3.cc	(revision 265)
+++ code/trunk/src/orxonox/objects/test3.cc	(revision 790)
@@ -1,2 +1,29 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 "test1.h"
 #include "test2.h"
@@ -10,4 +37,22 @@
     {
         RegisterObject(Test3);
+
+        this->setConfigValues();
+    }
+
+    void Test3::setConfigValues()
+    {
+        SetConfigValue(value_int_, 1);
+        SetConfigValue(value_uint_, 1);
+        SetConfigValue(value_char_, 1);
+        SetConfigValue(value_uchar_, 1);
+        SetConfigValue(value_float_, 1);
+        SetConfigValue(value_double_, 1);
+        SetConfigValue(value_bool_, 1);
+        SetConfigValue(value_string_, "This is a test");
+        SetConfigValue(value_constchar_, "This is another test");
+        SetConfigValue(value_vector2_, Vector2(101, 202));
+        SetConfigValue(value_vector3_, Vector3(13, 26, 39));
+        SetConfigValue(value_colourvalue_, ColourValue(1.0, 0.5, 0.25, 0.887));
     }
 
@@ -15,19 +60,36 @@
     {
     }
-        #define testandcout(code) \
-          std::cout << #code << " " << code << "\n"
 
-    bool Test3::usefullClassesIsATest(Test1* test1)
+    void Test3::configOutput()
     {
-        std::cout << "\n";
-        std::cout << "Test1:\n";
+        std::cout << this->value_int_ << std::endl;
+        std::cout << this->value_uint_ << std::endl;
+        std::cout << (int)this->value_char_ << std::endl;
+        std::cout << (int)this->value_uchar_ << std::endl;
+        std::cout << this->value_float_ << std::endl;
+        std::cout << this->value_double_ << std::endl;
+        std::cout << this->value_bool_ << std::endl;
+        std::cout << this->value_string_ << std::endl;
+        std::cout << this->value_constchar_ << std::endl;
+        std::cout << this->value_vector2_ << std::endl;
+        std::cout << this->value_vector3_ << std::endl;
+        std::cout << this->value_colourvalue_ << std::endl;
+    }
+
+    #define testandcout(code) \
+      std::cout << #code << " " << code << std::endl
+
+    void Test3::usefullClassesIsATest(Test1* test1)
+    {
+        std::cout << std::endl;
+        std::cout << "Test1:" << std::endl;
         testandcout(test1->usefullClass1isA(Class(Test1)));
         testandcout(test1->usefullClass1isA(Class(Test2)));
         testandcout(test1->usefullClass1isA(Class(Test3)));
-        std::cout << "\n";
+        std::cout << std::endl;
         testandcout(test1->usefullClass2isA(Class(Test1)));
         testandcout(test1->usefullClass2isA(Class(Test2)));
         testandcout(test1->usefullClass2isA(Class(Test3)));
-        std::cout << "\n";
+        std::cout << std::endl;
         testandcout(test1->usefullClass3isA(Class(Test1)));
         testandcout(test1->usefullClass3isA(Class(Test2)));
@@ -35,16 +97,16 @@
     }
 
-    bool Test3::usefullClassesIsATest(Test2* test2)
+    void Test3::usefullClassesIsATest(Test2* test2)
     {
-        std::cout << "\n";
-        std::cout << "Test2:\n";
+        std::cout << std::endl;
+        std::cout << "Test2:" << std::endl;
         testandcout(test2->usefullClass1isA(Class(Test1)));
         testandcout(test2->usefullClass1isA(Class(Test2)));
         testandcout(test2->usefullClass1isA(Class(Test3)));
-        std::cout << "\n";
+        std::cout << std::endl;
         testandcout(test2->usefullClass2isA(Class(Test1)));
         testandcout(test2->usefullClass2isA(Class(Test2)));
         testandcout(test2->usefullClass2isA(Class(Test3)));
-        std::cout << "\n";
+        std::cout << std::endl;
         testandcout(test2->usefullClass3isA(Class(Test1)));
         testandcout(test2->usefullClass3isA(Class(Test2)));
Index: code/trunk/src/orxonox/objects/test3.h
===================================================================
--- code/trunk/src/orxonox/objects/test3.h	(revision 265)
+++ code/trunk/src/orxonox/objects/test3.h	(revision 790)
@@ -2,5 +2,5 @@
 #define _Test3_H__
 
-#include "BaseObject.h"
+#include "core/BaseObject.h"
 
 namespace orxonox
@@ -15,6 +15,24 @@
             virtual ~Test3();
 
-            bool usefullClassesIsATest(Test1* test1);
-            bool usefullClassesIsATest(Test2* test2);
+            void setConfigValues();
+
+            void usefullClassesIsATest(Test1* test1);
+            void usefullClassesIsATest(Test2* test2);
+
+            void configOutput();
+
+        private:
+            int                 value_int_;
+            unsigned int        value_uint_;
+            char                value_char_;
+            unsigned char       value_uchar_;
+            float               value_float_;
+            double              value_double_;
+            bool                value_bool_;
+            std::string         value_string_;
+            const char*         value_constchar_;
+            Vector2             value_vector2_;
+            Vector3             value_vector3_;
+            ColourValue         value_colourvalue_;
     };
 }
Index: code/trunk/src/orxonox/objects/weapon/AmmunitionDump.cc
===================================================================
--- code/trunk/src/orxonox/objects/weapon/AmmunitionDump.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/AmmunitionDump.cc	(revision 790)
@@ -0,0 +1,115 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 "OrxonoxStableHeaders.h"
+
+#include "orxonox/Orxonox.h"
+#include "BulletManager.h"
+#include "util/tinyxml/tinyxml.h"
+
+#include "AmmunitionDump.h"
+
+
+namespace orxonox {
+  CreateFactory(AmmunitionDump);
+
+  AmmunitionDump::AmmunitionDump()
+    : numberOfAmmos_(Orxonox::getSingleton()->getBulletMgr()->getNumberOfAmmos()),
+      stock_(new int[numberOfAmmos_]),
+      capacity_(new int[numberOfAmmos_])
+  {
+    RegisterObject(AmmunitionDump);
+
+    for (int i = 0; i < numberOfAmmos_; i++)
+    {
+      stock_[i] = 0;
+      capacity_[i] = 0;
+    }
+  }
+
+
+  AmmunitionDump::~AmmunitionDump()
+  {
+    if (stock_)
+      delete stock_;
+    if (capacity_)
+      delete capacity_;
+  }
+
+  void AmmunitionDump::setDumpSize(const std::string &name, int size)
+  {
+    if (size < 0)
+      return;
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    if (id == -1)
+      return;
+    capacity_[id] = size;
+  }
+
+
+  int AmmunitionDump::store(const std::string &name, int quantity)
+  {
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    if (id == -1)
+      return quantity;
+    stock_[id] += quantity;
+    if (stock_[id] > capacity_[id])
+    {
+      quantity = capacity_[id] - stock_[id];
+      stock_[id] = capacity_[id];
+      return quantity;
+    }
+    else
+      return 0;
+  }
+
+
+  int AmmunitionDump::getAmmunition(const std::string &name, int quantity)
+  {
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    if (id == -1)
+      return 0;
+    if (stock_[id] >= quantity)
+      stock_[id] -= quantity;
+    else
+    {
+      quantity = stock_[id];
+      stock_[id] = 0;
+    }
+    return quantity;
+  }
+
+
+  int AmmunitionDump::getStockSize(const std::string &name)
+  {
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    // FIXME changed = to ==, check if correct
+    if (id == -1)
+      return -1;
+    return stock_[id];
+  }
+}
Index: code/trunk/src/orxonox/objects/weapon/AmmunitionDump.h
===================================================================
--- code/trunk/src/orxonox/objects/weapon/AmmunitionDump.h	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/AmmunitionDump.h	(revision 790)
@@ -0,0 +1,71 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _AmmunitionDump_H__
+#define _AmmunitionDump_H__
+
+#include <string>
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+#include "network/Synchronisable.h"
+//#include "../core/CoreIncludes.h"
+#include "core/BaseObject.h"
+
+
+namespace orxonox {
+  class _OrxonoxExport AmmunitionDump : public BaseObject, public network::Synchronisable
+  {
+  public:
+    AmmunitionDump();
+	  ~AmmunitionDump();
+
+    void setDumpSize(const std::string &name, int size);
+
+    int store(const std::string &name, int quantiy);
+
+    int getAmmunition(const std::string &name, int quantity);
+
+    int getStockSize(const std::string &name);
+
+    virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
+
+
+  protected:
+    inline bool create() { return true; }
+
+    int numberOfAmmos_;
+    int *stock_;
+    int *capacity_;
+  };
+  ExportClass(AmmunitionDump, Orxonox);
+}
+
+#endif /* _AmmunitionDump_H__ */
Index: code/trunk/src/orxonox/objects/weapon/BarrelGun.cc
===================================================================
--- code/trunk/src/orxonox/objects/weapon/BarrelGun.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/BarrelGun.cc	(revision 790)
@@ -0,0 +1,146 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 "OrxonoxStableHeaders.h"
+
+#include <OgreStringConverter.h>
+#include <OgreSceneNode.h>
+#include <OgreEntity.h>
+#include <OgreSceneManager.h>
+
+#include "util/Math.h"
+#include "Bullet.h"
+#include "BulletManager.h"
+#include "AmmunitionDump.h"
+#include "BaseWeapon.h"
+
+#include "BarrelGun.h"
+
+
+namespace orxonox {
+  CreateFactory(BarrelGun);
+
+  BarrelGun::BarrelGun()
+  {
+    RegisterObject(BarrelGun);
+
+    primaryFirePower_ = 100;
+    secondaryFirePower_ = 500;
+    primaryFiringRate_ = 1.0/7.0;
+    secondaryFiringRate_ = 1.0/2.0;
+    primaryBulletSpeed_ = 800;
+    secondaryBulletSpeed_ = 500;
+    magazineSize_ = 25;
+  }
+
+
+  BarrelGun::~BarrelGun()
+  {
+  }
+
+
+  void BarrelGun::primaryFire()
+  {
+    if (leftAmmo_ < 1)
+    {
+      currentState_ = IDLE;
+      return;
+    }
+
+    Ogre::SceneNode *temp = sceneMgr_->getRootSceneNode()->createChildSceneNode(
+          getNode()->getWorldPosition(),
+          getNode()->getWorldOrientation());
+
+    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
+      + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh");
+
+    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
+          .normalisedCopy() * primaryBulletSpeed_;
+    speed += getVelocity();
+
+	  temp->setScale(Vector3(1, 1, 1) * 1.5);
+    temp->roll(Degree(90));
+
+    Bullet* bullet = new Bullet();
+    bullet->setNode(temp);
+    bullet->attachObject(bulletEntity);
+    bullet->setVelocity(speed);
+	  bulletManager_->addBullet(bullet);
+
+    --leftAmmo_;
+  }
+
+
+  void BarrelGun::primaryFiring(float time)
+  {
+    if (time > primaryFiringRate_)
+    {
+      currentState_ = IDLE;
+    }
+  }
+
+
+  void BarrelGun::secondaryFire()
+  {
+    if (leftAmmo_ < 5)
+    {
+      currentState_ = IDLE;
+      return;
+    }
+
+    Ogre::SceneNode *temp = sceneMgr_->getRootSceneNode()->createChildSceneNode(
+          getNode()->getWorldPosition(),
+          getNode()->getWorldOrientation());
+
+    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
+      + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh");
+
+    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
+          .normalisedCopy() * secondaryBulletSpeed_*0.5;
+    speed += getVelocity();
+
+	  temp->setScale(Vector3(1, 1, 1) * 3);
+	  temp->roll(Degree(90));
+
+    Bullet* bullet = new Bullet();
+    bullet->setNode(temp);
+    bullet->attachObject(bulletEntity);
+    bullet->setVelocity(speed);
+	  bulletManager_->addBullet(bullet);
+
+
+    leftAmmo_ -= 5;
+  }
+
+
+  void BarrelGun::secondaryFiring(float time)
+  {
+    if (time > secondaryFiringRate_)
+      currentState_ = IDLE;
+  }
+
+}
Index: code/trunk/src/orxonox/objects/weapon/BarrelGun.h
===================================================================
--- code/trunk/src/orxonox/objects/weapon/BarrelGun.h	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/BarrelGun.h	(revision 790)
@@ -0,0 +1,65 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _BarrelGun_H__
+#define _BarrelGun_H__
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+#include "BaseWeapon.h"
+
+
+namespace orxonox {
+  class _OrxonoxExport BarrelGun : public BaseWeapon
+  {
+ public:
+    BarrelGun();
+	  virtual ~BarrelGun();
+
+    //virtual void tick(float dt);
+
+  protected:
+    void primaryFire();
+
+    void primaryFiring(float);
+
+    void secondaryFire();
+
+    void secondaryFiring(float);
+
+  public:
+
+  protected:
+
+  };
+  ExportClass(BarrelGun, Orxonox);
+}
+
+#endif /* _BarrelGun_H__ */
Index: code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc
===================================================================
--- code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc	(revision 790)
@@ -0,0 +1,185 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 "OrxonoxStableHeaders.h"
+
+#include <OgreStringConverter.h>
+#include <OgreSceneNode.h>
+#include <OgreEntity.h>
+#include <OgreSceneManager.h>
+
+#include "util/Math.h"
+#include "../../Orxonox.h"
+#include "Bullet.h"
+#include "BulletManager.h"
+#include "AmmunitionDump.h"
+
+#include "BaseWeapon.h"
+
+
+namespace orxonox {
+  float BaseWeapon::nextActionValidityPeriod_s = 0.5;
+
+  BaseWeapon::BaseWeapon()
+    : sceneMgr_(Orxonox::getSingleton()->getSceneManager()),
+      bulletCounter_(0),
+      bulletManager_(Orxonox::getSingleton()->getBulletMgr()),
+      ammoDump_(NULL),
+      primaryFireRequest_(false), secondaryFireRequest_(false),
+      totalTime_(0.0f), actionStartTime_(0.0f),
+      currentState_(IDLE), secondaryFired_(false),
+      nextAction_(NOTHING), actionAdded_(false),
+      timeSinceNextActionAdded_(0.0f),
+      leftAmmo_(0)
+  {
+    RegisterObject(BaseWeapon);
+  }
+
+
+  BaseWeapon::~BaseWeapon()
+  {
+  }
+
+
+  bool BaseWeapon::addAction(const Action act)
+  {
+    if (nextAction_ == NOTHING)
+    {
+      nextAction_ = act;
+      actionAdded_ = true;
+      return true;
+    }
+    else
+      return false;
+  }
+
+
+  void BaseWeapon::primaryFireRequest()
+  {
+    primaryFireRequest_ = true;
+  }
+
+
+  void BaseWeapon::secondaryFireRequest()
+  {
+    secondaryFireRequest_ = true;
+  }
+
+
+  void BaseWeapon::tick(float dt)
+  {
+    totalTime_ += dt;
+    // process action adder
+    if (actionAdded_)
+    {
+      timeSinceNextActionAdded_ = totalTime_;
+      actionAdded_ = false;
+    }
+
+    switch (currentState_)
+    {
+    case IDLE:
+      break;
+
+    case PRIMARY_FIRE:
+      primaryFiring(totalTime_ - actionStartTime_);
+      break;
+
+    case SECONDARY_FIRE:
+      secondaryFiring(totalTime_ - actionStartTime_);
+      break;
+
+    case RELOADING:
+      break;
+
+    case CHANGING_AMMO:
+      break;
+    }
+
+    if (currentState_ == IDLE)
+    {
+      // first, process next action
+      if (nextAction_ != NOTHING)
+      {
+        actionStartTime_ = totalTime_;
+        switch (nextAction_)
+        {
+        case RELOAD:
+          leftAmmo_ += ammoDump_->getAmmunition("Barrel", magazineSize_ - leftAmmo_);
+          break;
+
+        case CHANGE_AMMO:
+          break;
+
+        case SPECIAL:
+          break;
+
+        default:
+          break;
+        }
+
+        // pay attention when multithreaded!
+        nextAction_ = NOTHING;
+      }
+      else
+      {
+        // secondly, execute firing
+        if (primaryFireRequest_ && !(secondaryFired_ && secondaryFireRequest_))
+        {
+          actionStartTime_ = totalTime_;
+          currentState_ = PRIMARY_FIRE;
+          secondaryFired_ = false;
+          primaryFire();
+        }
+        else if (secondaryFireRequest_)
+        {
+          actionStartTime_ = totalTime_;
+          currentState_ = SECONDARY_FIRE;
+          secondaryFired_ = true;
+          secondaryFire();
+        }
+      }
+    }
+
+    primaryFireRequest_ = false;
+    secondaryFireRequest_ = false;
+
+    if (totalTime_ - timeSinceNextActionAdded_ > nextActionValidityPeriod_s)
+      nextAction_ = NOTHING;
+  }
+
+
+  int BaseWeapon::getAmmoState()
+  {
+    return leftAmmo_;
+  }
+
+  void BaseWeapon::setAmmoDump(AmmunitionDump* dump)
+  {
+    this->ammoDump_ = dump;
+  }
+}
Index: code/trunk/src/orxonox/objects/weapon/BaseWeapon.h
===================================================================
--- code/trunk/src/orxonox/objects/weapon/BaseWeapon.h	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/BaseWeapon.h	(revision 790)
@@ -0,0 +1,127 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 _BaseWeapon_H__
+#define _BaseWeapon_H__
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+#include "../Model.h"
+
+
+namespace orxonox {
+  class _OrxonoxExport BaseWeapon : public Model
+  {
+  public:
+    enum Action {
+      NOTHING  = 0,
+      RELOAD   = 1,
+      CHANGE_AMMO  = 2,
+      SPECIAL  = 3
+    };
+
+  protected:
+    enum State {
+      IDLE = 0,
+      PRIMARY_FIRE = 1,
+      SECONDARY_FIRE = 2,
+      RELOADING = 3,
+      CHANGING_AMMO = 4,
+    };
+
+  public:
+    BaseWeapon();
+	  virtual ~BaseWeapon();
+
+    bool addAction(const Action);
+
+    void primaryFireRequest();
+
+    void secondaryFireRequest();
+
+    int getAmmoState();
+
+    void setAmmoDump(AmmunitionDump*);
+
+    inline virtual void loadParams(TiXmlElement* xmlElem) { Model::loadParams(xmlElem); };
+
+    virtual void tick(float dt);
+
+  protected:
+    virtual void primaryFire() = 0;
+
+    virtual void primaryFiring(float) = 0;
+
+    virtual void secondaryFire() = 0;
+
+    virtual void secondaryFiring(float) = 0;
+
+    virtual void registerAllVariables() { };
+
+  public:
+
+  protected:
+    Ogre::SceneManager *sceneMgr_;
+
+    int bulletCounter_;
+    BulletManager *bulletManager_;
+
+    AmmunitionDump *ammoDump_;
+
+    bool primaryFireRequest_;
+    bool secondaryFireRequest_;
+
+    float totalTime_;
+    float actionStartTime_;
+
+    State currentState_;
+    bool secondaryFired_;
+
+    Action nextAction_;
+    bool actionAdded_;
+    float timeSinceNextActionAdded_;
+    static float nextActionValidityPeriod_s;
+
+    // weapon properties
+    int leftAmmo_;
+    float primaryFirePower_;
+    float secondaryFirePower_;
+    float primaryFiringRate_;
+    float secondaryFiringRate_;
+    Real primaryBulletSpeed_;
+    Real secondaryBulletSpeed_;
+
+    int magazineSize_;
+
+  };
+  ExportAbstractClass(BaseWeapon, Orxonox);
+}
+
+#endif /* _BaseWeapon_H__ */
Index: code/trunk/src/orxonox/objects/weapon/Bullet.cc
===================================================================
--- code/trunk/src/orxonox/objects/weapon/Bullet.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/Bullet.cc	(revision 790)
@@ -0,0 +1,43 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 "OrxonoxStableHeaders.h"
+
+#include "Bullet.h"
+
+namespace orxonox {
+  CreateFactory(Bullet);
+
+  Bullet::Bullet()
+  {
+    RegisterObject(Bullet);
+  }
+
+  Bullet::~Bullet()
+  {
+  }
+}
Index: code/trunk/src/orxonox/objects/weapon/Bullet.h
===================================================================
--- code/trunk/src/orxonox/objects/weapon/Bullet.h	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/Bullet.h	(revision 790)
@@ -0,0 +1,52 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _Bullet_H__
+#define _Bullet_H__
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+#include "../Model.h"
+
+namespace orxonox {
+  class _OrxonoxExport Bullet : public Model
+  {
+  public:
+	  Bullet();
+	  ~Bullet();
+
+    virtual void tick(float dt) { }
+
+    inline virtual void loadParams(TiXmlElement* xmlElem) { Model::loadParams(xmlElem); };
+ };
+  ExportClass(Bullet, Orxonox);
+}
+
+#endif /* _Bullet_H__ */
Index: code/trunk/src/orxonox/objects/weapon/BulletManager.cc
===================================================================
--- code/trunk/src/orxonox/objects/weapon/BulletManager.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/BulletManager.cc	(revision 790)
@@ -0,0 +1,104 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 "OrxonoxStableHeaders.h"
+
+#include "BulletManager.h"
+#include "Bullet.h"
+
+
+namespace orxonox {
+  CreateFactory(BulletManager);
+
+  BulletManager::BulletManager() : bulletsSize_(8), bulletsIndex_(0)
+  {
+    RegisterObject(BulletManager);
+    bullets_ = new Bullet*[bulletsSize_];
+  }
+
+
+  BulletManager::~BulletManager()
+  {
+    // clean up the bullet list
+    if (bullets_)
+    {
+      for (int i = 0; i < bulletsIndex_; i++)
+        delete bullets_[i];
+      delete bullets_;
+    }
+  }
+
+
+  void BulletManager::addBullet(Bullet *bullet)
+  {
+    // resize array if neccessary (double the size then)
+    if (bulletsIndex_ >= bulletsSize_)
+    {
+      // redimension the array
+      Bullet **tempArray = new Bullet*[2*bulletsSize_];
+      for (int i = 0; i < bulletsSize_; i++)
+        tempArray[i] = bullets_[i];
+      bulletsSize_ *= 2;
+      delete bullets_;
+      bullets_ = tempArray;
+    }
+
+    // add the bullet to the list
+    bullets_[bulletsIndex_++] = bullet;
+  }
+
+
+  void BulletManager::tick(float dt)
+  {
+    // update the bullet positions
+    for (int i = 0; i < bulletsIndex_; i++)
+    {
+      bullets_[i]->getNode()->translate(bullets_[i]->getVelocity()*dt);
+      //bullets_[i]->getNode()->yaw(Degree(dt*100));
+      //bullets_[i]->getNode()->roll(Degree(dt*300));
+    }
+  }
+
+  int BulletManager::getAmmunitionID(const std::string &ammoName)
+  {
+    std::string ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
+    int ammoTypesLength = 3;
+
+    for (int i = 0; i < ammoTypesLength; i++)
+    {
+      if (ammoTypes[i] == ammoName)
+        return i;
+    }
+    return -1;
+  }
+
+  int BulletManager::getNumberOfAmmos()
+  {
+    return 3;
+  }
+
+}
Index: code/trunk/src/orxonox/objects/weapon/BulletManager.h
===================================================================
--- code/trunk/src/orxonox/objects/weapon/BulletManager.h	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/BulletManager.h	(revision 790)
@@ -0,0 +1,72 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _BulletManager_H__
+#define _BulletManager_H__
+
+#include <string>
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+#include "network/Synchronisable.h"
+#include "util/tinyxml/tinyxml.h"
+#include "../../core/CoreIncludes.h"
+#include "core/BaseObject.h"
+#include "../Tickable.h"
+
+namespace orxonox {
+  class _OrxonoxExport BulletManager : public BaseObject, public network::Synchronisable, public Tickable
+  {
+  public:
+    BulletManager();
+	  virtual ~BulletManager();
+
+    void addBullet(Bullet*);
+
+    int getAmmunitionID(const std::string&);
+
+    int getNumberOfAmmos();
+
+    virtual void tick(float dt);
+
+    inline virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
+
+  protected:
+    inline bool create() { return true; }
+
+    // Bullet array
+	  Bullet **bullets_;
+	  int bulletsSize_;
+	  int bulletsIndex_;
+  };
+  ExportClass(BulletManager, Orxonox);
+}
+
+#endif /* _BulletManager_H__ */
Index: code/trunk/src/orxonox/objects/weapon/WeaponStation.cc
===================================================================
--- code/trunk/src/orxonox/objects/weapon/WeaponStation.cc	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/WeaponStation.cc	(revision 790)
@@ -0,0 +1,70 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 "OrxonoxStableHeaders.h"
+
+#include "BaseWeapon.h"
+#include "WeaponStation.h"
+
+
+namespace orxonox {
+  WeaponStation::WeaponStation(int stationSize)
+        : slots_(new BaseWeapon*[stationSize]),
+          lastActiveSlotIndex_(-1), stationSize_(stationSize)
+  {
+  	//slots_ = new BaseWeapon*[stationSize];
+  }
+
+
+  WeaponStation::~WeaponStation()
+  {
+    if (slots_)
+      delete slots_;
+    // when factory available: delete weapons too
+  }
+
+
+  bool WeaponStation::addWeapon(BaseWeapon *weapon)
+  {
+    if (lastActiveSlotIndex_ == stationSize_ - 1)
+      return false;
+
+    // this is ugly, but for the time being, it has to fit.
+    slots_[++lastActiveSlotIndex_] = weapon;
+    selectedSlot_ = slots_ + lastActiveSlotIndex_;
+    return true;
+  }
+
+
+  BaseWeapon* WeaponStation::selectWeapon(int slotNumber)
+  {
+    if (slotNumber < lastActiveSlotIndex_)
+      return NULL;
+    return slots_[slotNumber];
+  }
+
+}
Index: code/trunk/src/orxonox/objects/weapon/WeaponStation.h
===================================================================
--- code/trunk/src/orxonox/objects/weapon/WeaponStation.h	(revision 790)
+++ code/trunk/src/orxonox/objects/weapon/WeaponStation.h	(revision 790)
@@ -0,0 +1,65 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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 3 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, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _WeaponStation_H__
+#define _WeaponStation_H__
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+
+namespace orxonox {
+  class _OrxonoxExport WeaponStation
+  {
+  public:
+    WeaponStation(int slotSize);
+	  ~WeaponStation();
+
+    bool addWeapon(BaseWeapon*);
+
+    //bool removeCurrentWeapon();
+
+    // TODO: access every weapon by name
+    BaseWeapon* selectWeapon(int slotNumber);
+
+  protected:
+
+  public:
+
+  protected:
+    // slot management
+    BaseWeapon **slots_;
+    BaseWeapon **selectedSlot_;
+    int lastActiveSlotIndex_;
+    int stationSize_;
+
+  };
+}
+
+#endif /* _WeaponStation_H__ */
Index: code/trunk/src/orxonox/orxonox.cc
===================================================================
--- code/trunk/src/orxonox/orxonox.cc	(revision 265)
+++ 	(revision )
@@ -1,280 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   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 3 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, see <http://www.gnu.org/licenses/>.
- *
- *
- *   Author:
- *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
- *   Co-authors:
- *      ...
- *
- */
-
-/**
- @file  orxonox.cc
- @brief Orxonox Main File
- */
-
-#include <Ogre.h>
-#include <OIS/OIS.h>
-#include <CEGUI/CEGUI.h>
-#include <OgreCEGUIRenderer.h>
-
-#include <string>
-#include <iostream>
-
-#include "../xml/xmlParser.h"
-#include "../loader/LevelLoader.h"
-
-
-// some tests to see if enet works without includsion
-//#include <enet/enet.h>
-//#include <enet/protocol.h>
-
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-#include <CoreFoundation/CoreFoundation.h>
-
-// This function will locate the path to our application on OS X,
-// unlike windows you can not rely on the curent working directory
-// for locating your configuration files and resources.
-std::string macBundlePath()
-{
-  char path[1024];
-  CFBundleRef mainBundle = CFBundleGetMainBundle();
-  assert(mainBundle);
-
-  CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
-  assert(mainBundleURL);
-
-  CFStringRef cfStringRef = CFURLCopyFileSystemPath( mainBundleURL, kCFURLPOSIXPathStyle);
-  assert(cfStringRef);
-
-  CFStringGetCString(cfStringRef, path, 1024, kCFStringEncodingASCII);
-
-  CFRelease(mainBundleURL);
-  CFRelease(cfStringRef);
-
-  return std::string(path);
-}
-#endif
-
-namespace orxonox
-{
-  class OrxExitListener : public Ogre::FrameListener
-  {
-    public:
-      OrxExitListener(OIS::Keyboard *keyboard)
-    : mKeyboard(keyboard)
-      {
-      }
-
-      bool frameStarted(const Ogre::FrameEvent& evt)
-      {
-        mKeyboard->capture();
-        return !mKeyboard->isKeyDown(OIS::KC_ESCAPE);
-      }
-
-    private:
-      OIS::Keyboard *mKeyboard;
-  };
-
-  class OrxApplication
-  {
-    public:
-      void go()
-      {
-        createRoot();
-        defineResources();
-        setupRenderSystem();
-        createRenderWindow();
-        initializeResourceGroups();
-        createScene();
-        setupScene();
-        setupInputSystem();
-        setupCEGUI();
-        createFrameListener();
-        startRenderLoop();
-      }
-
-      ~OrxApplication()
-      {
-        mInputManager->destroyInputObject(mKeyboard);
-        OIS::InputManager::destroyInputSystem(mInputManager);
-
-//        delete mRenderer;
-//        delete mSystem;
-
-        delete mListener;
-        delete mRoot;
-      }
-
-    private:
-      Ogre::Root *mRoot;
-      OIS::Keyboard *mKeyboard;
-      OIS::Mouse *mMouse;
-      OIS::InputManager *mInputManager;
-      CEGUI::OgreCEGUIRenderer *mRenderer;
-      CEGUI::System *mSystem;
-      OrxExitListener *mListener;
-
-      void createRoot()
-      {
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-        mRoot = new Ogre::Root(macBundlePath() + "/Contents/Resources/plugins.cfg");
-#else
-        mRoot = new Ogre::Root();
-#endif
-      }
-
-      void defineResources()
-      {
-        Ogre::String secName, typeName, archName;
-        Ogre::ConfigFile cf;
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-        cf.load(macBundlePath() + "/Contents/Resources/resources.cfg");
-#else
-        cf.load("resources.cfg");
-#endif
-
-        Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
-        while (seci.hasMoreElements())
-        {
-          secName = seci.peekNextKey();
-          Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
-          Ogre::ConfigFile::SettingsMultiMap::iterator i;
-          for (i = settings->begin(); i != settings->end(); ++i)
-          {
-            typeName = i->first;
-            archName = i->second;
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-            Ogre::ResourceGroupManager::getSingleton().addResourceLocation( String(macBundlePath() + "/" + archName), typeName, secName);
-#else
-            Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName);
-#endif
-          }
-        }
-      }
-
-      void setupRenderSystem()
-      {
-        if (!mRoot->restoreConfig() && !mRoot->showConfigDialog())
-          throw Ogre::Exception(52, "User canceled the config dialog!", "OrxApplication::setupRenderSystem()");
-      }
-
-      void createRenderWindow()
-      {
-        mRoot->initialise(true, "Ogre Render Window");
-      }
-
-      void initializeResourceGroups()
-      {
-        Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
-        Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
-      }
-
-      void createScene(void)
-      {
-
-        string levelFile = "sp_level_moonstation.oxw";
-        loader::LevelLoader* loader = new loader::LevelLoader(levelFile);
-      }
-
-      void setupScene()
-      {
-        Ogre::SceneManager *mgr = mRoot->createSceneManager(Ogre::ST_GENERIC, "Default SceneManager");
-        Ogre::Camera *cam = mgr->createCamera("Camera");
-        Ogre::Viewport *vp = mRoot->getAutoCreatedWindow()->addViewport(cam);
-      }
-
-      void setupInputSystem()
-      {
-        size_t windowHnd = 0;
-        std::ostringstream windowHndStr;
-        OIS::ParamList pl;
-        Ogre::RenderWindow *win = mRoot->getAutoCreatedWindow();
-
-        win->getCustomAttribute("WINDOW", &windowHnd);
-        windowHndStr << windowHnd;
-        pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
-        mInputManager = OIS::InputManager::createInputSystem(pl);
-
-        try
-        {
-          mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, false));
-          mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, false));
-        }
-        catch (const OIS::Exception &e)
-        {
-          throw new Ogre::Exception(42, e.eText, "OrxApplication::setupInputSystem");
-        }
-      }
-
-      void setupCEGUI()
-      {
-        Ogre::SceneManager *mgr = mRoot->getSceneManager("Default SceneManager");
-        Ogre::RenderWindow *win = mRoot->getAutoCreatedWindow();
-
-        // CEGUI setup
-//        mRenderer = new CEGUI::OgreCEGUIRenderer(win, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mgr);
-//        mSystem = new CEGUI::System(mRenderer);
-
-        // Other CEGUI setup here.
-      }
-
-      void createFrameListener()
-      {
-        mListener = new OrxExitListener(mKeyboard);
-        mRoot->addFrameListener(mListener);
-      }
-
-      void startRenderLoop()
-      {
-        mRoot->startRendering();
-      }
-  };
-}
-
-using namespace Ogre;
-
-#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
-#define WIN32_LEAN_AND_MEAN
-#include "windows.h"
-
-             INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
-#else
-             int main(int argc, char **argv)
-#endif
-{
-  try
-  {
-    orxonox::OrxApplication orxonox;
-    orxonox.go();
-  }
-  catch(Exception& e)
-  {
-#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
-    MessageBoxA(NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
-#else
-    fprintf(stderr, "An exception has occurred: %s\n",
-            e.getFullDescription().c_str());
-#endif
-  }
-
-  return 0;
-}
-
Index: code/trunk/src/orxonox/particle/ParticleInterface.cc
===================================================================
--- code/trunk/src/orxonox/particle/ParticleInterface.cc	(revision 790)
+++ code/trunk/src/orxonox/particle/ParticleInterface.cc	(revision 790)
@@ -0,0 +1,146 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   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:
+*      ...
+*   Co-authors:
+*      ...
+*
+*/
+
+/**
+* @file ParticleInterface.cc
+* @brief class to control praticle effects
+*/
+
+#include "OrxonoxStableHeaders.h"
+
+#include "ParticleInterface.h"
+// #include <OgreParticleSystem.h>
+// #include <Ogre.h>
+// #include <OIS/OIS.h>
+// #include <CEGUI/CEGUI.h>
+// #include <CEGUIRenderer.h>
+
+
+
+namespace orxonox {
+  using namespace Ogre;
+
+  ParticleInterface::ParticleInterface( SceneManager *sceneManager, std::string name, std::string templateName )
+  {
+    sceneManager_ = sceneManager;
+    particleSystem_ = sceneManager->createParticleSystem(name, templateName);
+
+    //Variabeln einlesen, Emitter1_ ist Referenz-Emitter
+    velocity_ = particleSystem_->getSpeedFactor();
+    colour_ = particleSystem_->getEmitter(0)->getColour();
+    rate_ = particleSystem_->getEmitter(0)->getEmissionRate();
+    distance_ = particleSystem_->getEmitter(0)->getTimeToLive();
+
+    //Anzahl der Emitter
+    numberOfEmitters_ = particleSystem_->getNumEmitters();
+    standardizeEmitters();
+  }
+
+  ParticleInterface::~ParticleInterface(void)
+  {
+    sceneManager_->destroyParticleSystem(particleSystem_);
+  }
+
+  void ParticleInterface::standardizeEmitters(void)
+  {
+    //Abgleichen der anderen Emitter an die Variabeln
+    for (int i=1; i < numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setColour( colour_ );
+      particleSystem_->getEmitter(i)->setTimeToLive( distance_ );
+      particleSystem_->getEmitter(i)->setEmissionRate( rate_ );
+    }
+
+  }
+
+  void ParticleInterface::setVelocity(Real v)
+  {
+    velocity_ = v;
+    //partikel anpassen
+    particleSystem_->setSpeedFactor(v);
+  }
+
+  void ParticleInterface::setRate(int r)
+  {
+    rate_ = r;
+    //partikel anpassen
+    for (int i=0; i<numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setEmissionRate(rate_);
+    }
+  }
+
+  void ParticleInterface::setDistance(Real d)
+  {
+    distance_ = d;
+    //partikel anpassen
+    for (int i=0; i < numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setTimeToLive(distance_);
+    }
+  }
+
+  void ParticleInterface::setColour(ColourValue colour)
+  {
+    colour_ = colour;
+    //partikel anpassen
+    for (int i=0; i < numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setColour(colour_);
+    }
+  }
+
+  ParticleEmitter* ParticleInterface::getEmitter( int emitterNr )
+  {
+    if ( (emitterNr >= numberOfEmitters_) || (emitterNr < 0) ) return NULL;
+    return particleSystem_->getEmitter(emitterNr);
+  }
+
+  void ParticleInterface::newEmitter ()
+  {
+    particleSystem_->addEmitter(particleSystem_->getEmitter(0)->getType());
+    particleSystem_->getEmitter(0)->copyParametersTo( particleSystem_->getEmitter(numberOfEmitters_) );
+    numberOfEmitters_++;
+  }
+
+  // TODO check if this really works
+  Vector3 ParticleInterface::getPositionOfEmitter ( int emitterNr )
+  {
+    return particleSystem_->getEmitter(0)->getPosition();
+  }
+
+  void ParticleInterface::setDirection ( Vector3 direction )
+  {
+    for(int i=0; i < numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setDirection(direction);
+    }
+  }
+
+  void ParticleInterface::switchEnable(){
+    bool enable=(!(particleSystem_->getEmitter(0)->getEnabled()));
+    for(int i=0; i < numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setEnabled(enable);
+    }
+  }
+
+}
Index: code/trunk/src/orxonox/particle/ParticleInterface.h
===================================================================
--- code/trunk/src/orxonox/particle/ParticleInterface.h	(revision 790)
+++ code/trunk/src/orxonox/particle/ParticleInterface.h	(revision 790)
@@ -0,0 +1,82 @@
+#ifndef _ParticleInterface_H__
+#define _ParticleInterface_H__
+
+#include <string>
+
+// #include "ParticleInterface.h"
+// #include <Ogre.h>
+// #include <OIS/OIS.h>
+// #include <CEGUI/CEGUI.h>
+// #include <CEGUIRenderer.h>
+#include <OgreParticleSystem.h>
+#include <OgreParticleEmitter.h>
+#include <OgreSceneManager.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+
+
+namespace orxonox
+{
+
+  class _OrxonoxExport ParticleInterface
+  {
+  public:
+
+    ParticleInterface( Ogre::SceneManager *sceneManager, std::string name, std::string templateName );
+    ~ParticleInterface( void );
+
+    inline void addToSceneNode( Ogre::SceneNode* sceneNode )
+        { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
+    inline void detachFromSceneNode( void )
+        { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
+
+    Ogre::ParticleEmitter* getEmitter ( int emitterNr );
+    void newEmitter ( void );
+
+    Vector3 getPositionOfEmitter ( int emitterNr );
+    inline void setPositionOfEmitter ( int emitterNr, Vector3 position )
+        { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
+
+    inline Vector3 getDirection ( void )
+        { return particleSystem_->getEmitter(0)->getDirection(); };
+    void setDirection ( Vector3 direction );
+
+    inline Real getVelocity()
+        {return velocity_; };
+    void setVelocity( Real v );
+
+    inline int getRate()
+      { return rate_; };
+    void setRate( int r );
+
+    inline Real getDistance()
+        { return distance_; };
+    void setDistance( Real d );
+
+    inline ColourValue getColour( void )
+        {return colour_;};
+    void setColour( ColourValue colour );
+
+    void switchEnable();
+
+    inline Ogre::ParticleSystem* getParticleSystem()
+        { return this->particleSystem_; };
+
+  private:
+    Ogre::SceneNode *sceneNode_;
+    Ogre::SceneManager *sceneManager_;
+    Ogre::ParticleSystem *particleSystem_;
+    Real distance_;
+    Real velocity_;
+    int rate_;
+    ColourValue colour_;
+    int numberOfEmitters_;
+
+    void standardizeEmitters();
+  };
+
+}
+
+#endif /* _ParticleInterface_H__ */
Index: code/trunk/src/orxonox/tools/BillboardSet.cc
===================================================================
--- code/trunk/src/orxonox/tools/BillboardSet.cc	(revision 790)
+++ code/trunk/src/orxonox/tools/BillboardSet.cc	(revision 790)
@@ -0,0 +1,62 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <sstream>
+
+#include <OgreSceneManager.h>
+
+#include "../Orxonox.h"
+#include "util/Math.h"
+
+#include "BillboardSet.h"
+
+namespace orxonox
+{
+    unsigned int BillboardSet::billboardSetCounter_s = 0;
+
+    BillboardSet::BillboardSet()
+    {
+        this->billboardSet_ = 0;
+    }
+
+    void BillboardSet::setBillboardSet(const std::string& file, const ColourValue& colour, int count, const Vector3& position)
+    {
+        std::ostringstream name;
+        name << (BillboardSet::billboardSetCounter_s++);
+        this->billboardSet_ = Orxonox::getSingleton()->getSceneManager()->createBillboardSet("Billboard" + name.str(), count);
+        this->billboardSet_->createBillboard(position, colour);
+        this->billboardSet_->setMaterialName(file);
+    }
+
+    BillboardSet::~BillboardSet()
+    {
+        if (this->billboardSet_)
+            Orxonox::getSingleton()->getSceneManager()->destroyBillboardSet(this->billboardSet_);
+    }
+}
Index: code/trunk/src/orxonox/tools/BillboardSet.h
===================================================================
--- code/trunk/src/orxonox/tools/BillboardSet.h	(revision 790)
+++ code/trunk/src/orxonox/tools/BillboardSet.h	(revision 790)
@@ -0,0 +1,34 @@
+#ifndef _BillboardSet_H__
+#define _BillboardSet_H__
+
+#include <string>
+
+#include <OgreBillboardSet.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "../core/CoreIncludes.h"
+#include "util/Math.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport BillboardSet
+    {
+        public:
+            BillboardSet();
+            ~BillboardSet();
+            void setBillboardSet(const std::string& file, const ColourValue& colour = ColourValue(1.0, 1.0, 1.0), int count = 1, const Vector3& position = Vector3::ZERO);
+
+            inline Ogre::BillboardSet* getBillboardSet()
+                { return this->billboardSet_; }
+
+            inline const std::string& getName() const
+                { return this->billboardSet_->getName(); }
+
+        private:
+            static unsigned int billboardSetCounter_s;
+            Ogre::BillboardSet* billboardSet_;
+    };
+}
+
+#endif /* _BillboardSet_H__ */
Index: code/trunk/src/orxonox/tools/Light.cc
===================================================================
--- code/trunk/src/orxonox/tools/Light.cc	(revision 790)
+++ code/trunk/src/orxonox/tools/Light.cc	(revision 790)
@@ -0,0 +1,35 @@
+#include "OrxonoxStableHeaders.h"
+
+#include <sstream>
+
+#include <OgreSceneManager.h>
+
+#include "../Orxonox.h"
+
+#include "Light.h"
+
+namespace orxonox
+{
+    unsigned int Light::lightCounter_s = 0;
+
+    Light::Light()
+    {
+        this->light_ = 0;
+    }
+
+    void Light::setLight(Ogre::Light::LightTypes type, const ColourValue& diffuse, const ColourValue& specular)
+    {
+        std::ostringstream name;
+        name << (Light::lightCounter_s++);
+        this->light_ = Orxonox::getSingleton()->getSceneManager()->createLight("Light" + name.str());
+        this->light_->setType(type);
+        this->light_->setDiffuseColour(diffuse);
+        this->light_->setSpecularColour(specular);
+    }
+
+    Light::~Light()
+    {
+        if (this->light_)
+            Orxonox::getSingleton()->getSceneManager()->destroyLight(this->light_);
+    }
+}
Index: code/trunk/src/orxonox/tools/Light.h
===================================================================
--- code/trunk/src/orxonox/tools/Light.h	(revision 790)
+++ code/trunk/src/orxonox/tools/Light.h	(revision 790)
@@ -0,0 +1,33 @@
+#ifndef _Light_H__
+#define _Light_H__
+
+#include <string>
+
+#include <OgreLight.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Light
+    {
+        public:
+            Light();
+            ~Light();
+            void setLight(Ogre::Light::LightTypes type = Ogre::Light::LT_POINT, const ColourValue& diffuse = ColourValue(1.0, 1.0, 1.0), const ColourValue& specular = ColourValue(1.0, 1.0, 1.0));
+
+            inline Ogre::Light* getLight()
+                { return this->light_; }
+
+            inline const std::string& getName() const
+                { return this->light_->getName(); }
+
+        private:
+            static unsigned int lightCounter_s;
+            Ogre::Light* light_;
+    };
+}
+
+#endif /* _Light_H__ */
Index: code/trunk/src/orxonox/tools/Mesh.cc
===================================================================
--- code/trunk/src/orxonox/tools/Mesh.cc	(revision 790)
+++ code/trunk/src/orxonox/tools/Mesh.cc	(revision 790)
@@ -0,0 +1,59 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <sstream>
+
+#include <OgreSceneManager.h>
+
+#include "../Orxonox.h"
+
+#include "Mesh.h"
+
+namespace orxonox
+{
+    unsigned int Mesh::meshCounter_s = 0;
+
+    Mesh::Mesh()
+    {
+        this->entity_ = 0;
+    }
+
+    void Mesh::setMesh(const std::string& file)
+    {
+        std::ostringstream name;
+        name << (Mesh::meshCounter_s++);
+        this->entity_ = Orxonox::getSingleton()->getSceneManager()->createEntity("Mesh" + name.str(), file);
+    }
+
+    Mesh::~Mesh()
+    {
+        if (this->entity_)
+            Orxonox::getSingleton()->getSceneManager()->destroyEntity(this->entity_);
+    }
+}
Index: code/trunk/src/orxonox/tools/Mesh.h
===================================================================
--- code/trunk/src/orxonox/tools/Mesh.h	(revision 790)
+++ code/trunk/src/orxonox/tools/Mesh.h	(revision 790)
@@ -0,0 +1,31 @@
+#ifndef _Mesh_H__
+#define _Mesh_H__
+
+#include <string>
+
+#include <OgreEntity.h>
+
+#include "../OrxonoxPrereqs.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Mesh
+    {
+        public:
+            Mesh();
+            ~Mesh();
+            void setMesh(const std::string& file);
+
+            inline Ogre::Entity* getEntity()
+                { return this->entity_; }
+
+            inline const std::string& getName() const
+                { return this->entity_->getName(); }
+
+        private:
+            static unsigned int meshCounter_s;
+            Ogre::Entity* entity_;
+    };
+}
+
+#endif /* _Mesh_H__ */
Index: code/trunk/src/orxonox/tools/Timer.h
===================================================================
--- code/trunk/src/orxonox/tools/Timer.h	(revision 790)
+++ code/trunk/src/orxonox/tools/Timer.h	(revision 790)
@@ -0,0 +1,199 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   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:
+ *      ...
+ *
+ */
+
+/*!
+    @file Timer.h
+    @brief Definition and Implementation of the Timer class.
+
+    The Timer is a callback-object, calling a given function after a given time-interval.
+
+    Usage:
+    header.h:
+        class ClassName
+        {
+            public:
+                ClassName();
+                void functionName();
+                Timer<ClassName> myTimer;
+        };
+
+    source.cc:
+        ClassName::ClassName()
+        {
+            myTimer.setTimer(interval_in_seconds, bLoop, this, &ClassName::functionName);
+        }
+
+        void ClassName::functionName()
+        {
+            whateveryouwant();
+            something(else);
+        }
+*/
+
+#ifndef _Timer_H__
+#define _Timer_H__
+
+#include <OgreFrameListener.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "../core/CoreIncludes.h"
+
+namespace orxonox
+{
+    //! TimerBase is the parent of the Timer class.
+    class _OrxonoxExport TimerBase : public OrxonoxClass
+    {
+        friend class TimerFrameListener;
+
+        public:
+            /** @brief Constructor: Sets the default-values. */
+            TimerBase()
+            {
+                RegisterRootObject(TimerBase);
+
+                this->interval_ = 0;
+                this->bLoop_ = false;
+                this->bActive_ = false;
+
+                this->time_ = 0;
+            }
+
+            virtual void run() const = 0;
+
+            /** @brief Starts the Timer: Function-call after 'interval' seconds. */
+            inline void startTimer() { this->bActive_ = true; this->time_ = this->interval_; }
+            /** @brief Stops the Timer. */
+            inline void stopTimer() { this->bActive_ = false; this->time_ = this->interval_; }
+            /** @brief Pauses the Timer - it will continue with the actual state if you unpause it. */
+            inline void pauseTimer() { this->bActive_ = false; }
+            /** @brief Unpauses the Timer - continues with the given state. */
+            inline void unpauseTimer() { this->bActive_ = true; }
+            /** @returns true if the Timer is active (= not stoped, not paused). */
+            inline bool isActive() const { return this->bActive_; }
+
+        protected:
+            float interval_;    //!< The time-interval in seconds
+            bool bLoop_;        //!< If true, the function gets called every 'interval' seconds
+            bool bActive_;      //!< If true, the Timer ticks and calls the function if the time's up
+
+            float time_;        //!< Internal variable, counting the time till the next function-call
+    };
+    ExportAbstractClass(TimerBase, Orxonox);
+
+    //! The Timer is a callback-object, calling a given function after a given time-interval.
+    template <class T = BaseObject>
+    class Timer : public TimerBase
+    {
+        public:
+            /** @brief Constructor: Sets the default-values. */
+            Timer()
+            {
+                this->timerFunction_ = 0;
+                this->object_ = 0;
+            }
+
+            /**
+                @brief Constructor: Initializes the Timer with given values.
+                @param interval The timer-interval in seconds
+                @param bLoop If true, the function gets called every 'interval' seconds
+                @param object The object owning the timer and the function
+                @param timerFunction A function pointer to the function to call
+            */
+            Timer(float interval, bool bLoop, T* object, void (T::*timerFunction)())
+            {
+                this->setTimer(interval, bLoop, timerFunction, object);
+            }
+
+            /**
+                @brief Initializes the Timer with given values.
+                @param interval The timer-interval in seconds
+                @param bLoop If true, the function gets called every 'interval' seconds
+                @param object The object owning the timer and the function
+                @param timerFunction A function pointer to the function to call
+            */
+            void setTimer(float interval, bool bLoop, T* object, void (T::*timerFunction)())
+            {
+                this->interval_ = interval;
+                this->bLoop_ = bLoop;
+                this->timerFunction_ = timerFunction;
+                this->object_ = object;
+                this->bActive_ = true;
+
+                this->time_ = interval;
+            }
+
+            /** @brief Calls the given function of the given object. */
+            void run() const
+            {
+                ((*this->object_).*timerFunction_)();
+            }
+
+        private:
+            void (T::*timerFunction_)();
+            T* object_;
+    };
+    ExportAbstractClass(Timer<BaseObject>, Orxonox);
+
+    //! The TimerFrameListener manages all Timers in the game.
+    class TimerFrameListener : public Ogre::FrameListener
+    {
+        private:
+            /** @brief Gets called before a frame gets rendered. */
+            bool frameStarted(const Ogre::FrameEvent &evt)
+            {
+                // Iterate through all Timers
+                for (Iterator<TimerBase> it = ObjectList<TimerBase>::start(); it; )
+                {
+                    if (it->isActive())
+                    {
+                        // If active: Decrease the timer by the duration of the last frame
+                        it->time_ -= evt.timeSinceLastFrame;
+
+                        if (it->time_ <= 0)
+                        {
+                            // It's time to call the function
+                            if (it->bLoop_)
+                                it->time_ += it->interval_; // Q: Why '+=' and not '='? A: Think about it. It's more accurate like that. Seriously.
+                            else
+                                it->stopTimer(); // Stop the timer if we don't want to loop
+
+                            (it++)->run();
+                        }
+                        else
+                            ++it;
+                    }
+                    else
+                        ++it;
+                }
+
+                return FrameListener::frameStarted(evt);
+            }
+    };
+}
+
+#endif /* _Timer_H__ */
