Index: code/trunk/bin/levels/sample.oxw
===================================================================
--- code/trunk/bin/levels/sample.oxw	(revision 1029)
+++ code/trunk/bin/levels/sample.oxw	(revision 1032)
@@ -15,5 +15,4 @@
 <Skybox src="Orxonox/StarSkyBox" />
 
-<!--Fighter camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assf3.mesh"  forward="500" rotateupdown="200" rotaterightleft="200" looprightleft="200" /-->
 <SpaceShip camera="true" position="0,0,0" scale="10" yawpitchroll="-90,-90,0" mesh="assf3.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
 
Index: code/trunk/src/asylum/orxonox/objects/Fighter.cc
===================================================================
--- code/trunk/src/asylum/orxonox/objects/Fighter.cc	(revision 1032)
+++ code/trunk/src/asylum/orxonox/objects/Fighter.cc	(revision 1032)
@@ -0,0 +1,511 @@
+/*
+ *   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 "GraphicsEngine.h"
+#include "core/InputManager.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(GraphicsEngine::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(GraphicsEngine::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_);
+        GraphicsEngine::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 = GraphicsEngine::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);
+            GraphicsEngine::getSingleton().getRenderWindow()->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 (InputManager::getSingleton()->getMouse())
+            {
+                InputManager::getSingleton()->getMouse()->setEventCallback(this);
+                this->setMouseEventCallback_ = true;
+            }
+        }
+
+        WorldEntity::tick(dt);
+
+        OIS::Keyboard* mKeyboard = InputManager::getSingleton()->getKeyboard();
+        OIS::Mouse* mMouse = InputManager::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/asylum/orxonox/objects/Fighter.h
===================================================================
--- code/trunk/src/asylum/orxonox/objects/Fighter.h	(revision 1032)
+++ code/trunk/src/asylum/orxonox/objects/Fighter.h	(revision 1032)
@@ -0,0 +1,92 @@
+#ifndef _Fighter_H__
+#define _Fighter_H__
+
+#include <OIS/OIS.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "Model.h"
+
+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_;
+    };
+}
+
+#endif /* _Fighter_H__ */
Index: code/trunk/src/orxonox/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/CMakeLists.txt	(revision 1029)
+++ code/trunk/src/orxonox/CMakeLists.txt	(revision 1032)
@@ -13,5 +13,5 @@
   objects/Camera.cc
   objects/Explosion.cc
-  objects/Fighter.cc
+#  objects/Fighter.cc
   objects/Model.cc
   objects/NPC.cc
@@ -24,10 +24,10 @@
 #  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
+#  objects/weapon/AmmunitionDump.cc
+#  objects/weapon/BarrelGun.cc
+#  objects/weapon/BaseWeapon.cc
+#  objects/weapon/Bullet.cc
+#  objects/weapon/BulletManager.cc
+#  objects/weapon/WeaponStation.cc
 )
 
Index: code/trunk/src/orxonox/GraphicsEngine.cc
===================================================================
--- code/trunk/src/orxonox/GraphicsEngine.cc	(revision 1029)
+++ code/trunk/src/orxonox/GraphicsEngine.cc	(revision 1032)
@@ -22,5 +22,5 @@
  *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
  *   Co-authors:
- *      ...
+ *      Reto Grieder
  *
  */
@@ -41,4 +41,5 @@
 #include "core/CoreIncludes.h"
 #include "core/Debug.h"
+
 #include "GraphicsEngine.h"
 
@@ -48,4 +49,17 @@
   using namespace Ogre;
 
+  /**
+    @brief Returns the singleton instance and creates it the first time.
+    @return The only instance of GraphicsEngine.
+  */
+  GraphicsEngine& GraphicsEngine::getSingleton()
+  {
+    static GraphicsEngine theOnlyInstance;
+    return theOnlyInstance;
+  }
+
+  /**
+    @brief Only use constructor to initialise variables and pointers!
+  */
   GraphicsEngine::GraphicsEngine()
   {
@@ -58,12 +72,28 @@
     this->scene_ = 0;
     this->renderWindow_ = 0;
-  }
-
-
+    COUT(4) << "*** GraphicsEngine: Constructed" << std::endl;
+  }
+
+  /**
+    @brief Called after main() --> call destroyObjects()!
+  */
   GraphicsEngine::~GraphicsEngine()
   {
+    this->destroy();
+  }
+
+  /**
+    @brief Destroys all the internal objects. Call this method when you
+           normally would call the destructor.
+  */
+  void GraphicsEngine::destroy()
+  {
+    COUT(4) << "*** GraphicsEngine: Destroying objects..." << std::endl;
     if (this->root_)
       delete this->root_;
-    // delete the ogre log and the logManager (sine we have created it).
+    this->root_ = 0;
+    this->scene_ = 0;
+    this->renderWindow_ = 0;
+    // delete the ogre log and the logManager (since we have created it).
     if (LogManager::getSingletonPtr() != 0)
     {
@@ -72,4 +102,5 @@
       delete LogManager::getSingletonPtr();
     }
+    COUT(4) << "*** GraphicsEngine: Destroying objects done" << std::endl;
   }
 
@@ -78,7 +109,7 @@
     SetConfigValue(dataPath_, "../../media/").description("relative path to media data");
     SetConfigValue(ogreLogfile_, "ogre.log").description("Logfile for messages from Ogre. Use \"\" to suppress log file creation.");
-    SetConfigValue(ogreLogLevelTrivial_ , 5).description("relative path to media data");
-    SetConfigValue(ogreLogLevelNormal_  , 4).description("relative path to media data");
-    SetConfigValue(ogreLogLevelCritical_, 2).description("relative path to media data");
+    SetConfigValue(ogreLogLevelTrivial_ , 5).description("Corresponding orxonox debug level for ogre Trivial");
+    SetConfigValue(ogreLogLevelNormal_  , 4).description("Corresponding orxonox debug level for ogre Normal");
+    SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical");
   }
 
@@ -107,4 +138,5 @@
     else
       logger = LogManager::getSingletonPtr();
+    COUT(4) << "*** GraphicsEngine: Ogre LogManager created/assigned" << std::endl;
 
     // create our own log that we can listen to
@@ -114,4 +146,5 @@
     else
       myLog = logger->createLog(this->ogreLogfile_, true, false, false);
+    COUT(4) << "*** GraphicsEngine: Ogre Log created" << std::endl;
 
     myLog->setLogDetail(LL_BOREME);
@@ -119,5 +152,7 @@
 
     // Root will detect that we've already created a Log
+    COUT(4) << "*** GraphicsEngine: Creating Ogre Root..." << std::endl;
     root_ = new Root(plugin_filename);
+    COUT(4) << "*** GraphicsEngine: Creating Ogre Root done" << std::endl;
   }
 
@@ -192,7 +227,6 @@
     if (this->renderWindow_)
     {
-      Ogre::RenderWindow *renderWindow = this->root_->getAutoCreatedWindow();
       size_t windowHnd = 0;
-      renderWindow->getCustomAttribute("WINDOW", &windowHnd);
+      this->renderWindow_->getCustomAttribute("WINDOW", &windowHnd);
       return windowHnd;
     }
@@ -208,7 +242,5 @@
   {
     if (this->renderWindow_)
-    {
       return this->renderWindow_->getWidth();
-    }
     else
       return 0;
@@ -222,7 +254,5 @@
   {
     if (this->renderWindow_)
-    {
       return this->renderWindow_->getHeight();
-    }
     else
       return 0;
Index: code/trunk/src/orxonox/GraphicsEngine.h
===================================================================
--- code/trunk/src/orxonox/GraphicsEngine.h	(revision 1029)
+++ code/trunk/src/orxonox/GraphicsEngine.h	(revision 1032)
@@ -12,6 +12,4 @@
 #include <OgrePrerequisites.h>
 #include <OgreLog.h>
-#include <OgreRoot.h>
-#include <OgreSceneManager.h>
 
 #include "OrxonoxPrereqs.h"
@@ -21,14 +19,12 @@
 namespace orxonox {
 
-/**
-   * graphics engine manager class
- */
+  /**
+    @brief Graphics engine manager class
+  */
   class _OrxonoxExport GraphicsEngine : public OrxonoxClass, public Ogre::LogListener
   {
+    friend class ClassIdentifier<GraphicsEngine>;
     public:
-      GraphicsEngine();
       void setConfigPath(std::string path) { this->configPath_ = path; };
-      // find a better way for this
-      //inline Ogre::Root* getRoot() { return root_; };
       void setConfigValues();
       void setup();
@@ -37,4 +33,5 @@
       Ogre::SceneManager* getSceneManager();
       void initialise();
+      void destroy();
 
       // several window properties
@@ -44,25 +41,22 @@
       int getWindowHeight() const;
 
-      // Ogre Root access for Orxonox
-      void frameStarted(Ogre::FrameEvent &evt)
-      { if (root_) root_->_fireFrameStarted(evt); }
-      void frameEnded  (Ogre::FrameEvent &evt)
-      { if (root_) root_->_fireFrameEnded(evt);   }
-      void renderOneFrame()
-      { if (root_) root_->_updateAllRenderTargets(); }
-
-      virtual ~GraphicsEngine();
+      static GraphicsEngine& getSingleton();
 
     private:
+      // don't mess with singletons
+      GraphicsEngine();
+      GraphicsEngine(GraphicsEngine&) { }
+      ~GraphicsEngine();
+
       //! Method called by the LogListener from Ogre
-      void messageLogged(const std::string& message, Ogre::LogMessageLevel lml,
-                         bool maskDebug, const std::string &logName);
+      void messageLogged(const std::string&, Ogre::LogMessageLevel,
+                         bool, const std::string&);
 
       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
       Ogre::RenderWindow* renderWindow_;//!< the current render window
       //bool               bOverwritePath_; //!< overwrites path
+      std::string         configPath_;  //!< path to config file
+      std::string         dataPath_;    //!< path to data file
       std::string         ogreLogfile_; //!< log file name for Ogre log messages
       int ogreLogLevelTrivial_;         //!< Corresponding Orxonx debug level for LL_TRIVIAL
Index: code/trunk/src/orxonox/Orxonox.cc
===================================================================
--- code/trunk/src/orxonox/Orxonox.cc	(revision 1029)
+++ code/trunk/src/orxonox/Orxonox.cc	(revision 1032)
@@ -27,5 +27,5 @@
 
 /**
- @file  Orxonox.cc
+ @file
  @brief Orxonox Main Class
  */
@@ -33,4 +33,9 @@
 // Precompiled Headers
 #include "OrxonoxStableHeaders.h"
+
+//****** STD *******
+//#include <iostream>
+//#include <exception>
+#include <deque>
 
 //****** OGRE ******
@@ -39,38 +44,38 @@
 #include <OgreOverlay.h>
 #include <OgreOverlayManager.h>
+#include <OgreRoot.h>
 #include <OgreTimer.h>
 #include <OgreWindowEventUtilities.h>
 
-//****** STD *******
-//#include <iostream>
-//#include <exception>
-#include <deque>
-
 //***** ORXONOX ****
-//misc
+// util
 //#include "util/Sleep.h"
 #include "util/ArgReader.h"
 
-// audio
-#include "audio/AudioManager.h"
-
-// network
-#include "network/Server.h"
-#include "network/Client.h"
-network::Client *client_g;
-network::Server *server_g;
-
-// objects
+// core
 #include "core/Debug.h"
 #include "core/Factory.h"
 #include "core/Loader.h"
 #include "core/Tickable.h"
+#include "core/InputManager.h"
+
+// audio
+#include "audio/AudioManager.h"
+
+// network
+#include "network/Server.h"
+#include "network/Client.h"
+
+// objects and tools
+#include "tools/Timer.h"
 #include "hud/HUD.h"
-#include "tools/Timer.h"
-#include "objects/weapon/BulletManager.h"
-
-#include "core/InputManager.h"
+//#include "objects/weapon/BulletManager.h"
 
 #include "Orxonox.h"
+
+// FIXME: is this really file scope?
+// globals for the server or client
+network::Client *client_g;
+network::Server *server_g;
 
 namespace orxonox
@@ -86,5 +91,5 @@
   Orxonox::Orxonox()
   {
-    this->ogre_ = new GraphicsEngine();
+    this->ogre_ = &GraphicsEngine::getSingleton();
     this->timer_ = 0;
     this->dataPath_ = "";
@@ -103,6 +108,6 @@
   {
     // keep in mind: the order of deletion is very important!
-    if (this->bulletMgr_)
-      delete this->bulletMgr_;
+//    if (this->bulletMgr_)
+//      delete this->bulletMgr_;
     if (this->orxonoxHUD_)
       delete this->orxonoxHUD_;
@@ -113,6 +118,5 @@
     if (this->timer_)
       delete this->timer_;
-    if (this->ogre_)
-      delete this->ogre_;
+    GraphicsEngine::getSingleton().destroy();
 
     if (client_g)
@@ -251,5 +255,5 @@
     auMan_ = new audio::AudioManager();
 
-    bulletMgr_ = new BulletManager();
+    //bulletMgr_ = new BulletManager();
     
     Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
@@ -298,5 +302,5 @@
     auMan_ = new audio::AudioManager();
 
-    bulletMgr_ = new BulletManager();
+    //bulletMgr_ = new BulletManager();
 
     // load this file from config
@@ -342,10 +346,17 @@
     About the loop: The design is almost exactly like the one in ogre, so that
     if any part of ogre registers a framelisteners, it will still behave
-    correctly. Furthermore I have taken over the time smoothing feature from
-    ogre. If turned on (see orxonox constructor), it will calculate the dt_n by
-    means of the recent most dt_n-1, dt_n-2, etc.
+    correctly. Furthermore the time smoothing feature from ogre has been
+    implemented too. If turned on (see orxonox constructor), it will calculate
+    the dt_n by means of the recent most dt_n-1, dt_n-2, etc.
   */
   void Orxonox::startRenderLoop()
   {
+    // first check whether ogre root object has been created
+    if (Ogre::Root::getSingletonPtr() == 0)
+    {
+      COUT(2) << "Error: Could not start rendering. No Ogre root object found" << std::endl;
+      return;
+    }
+
     // Contains the times of recently fired events
     // eventTimes[4] is the list for the times required for the fps counter
@@ -389,9 +400,9 @@
       // don't forget to call _fireFrameStarted in ogre to make sure
       // everything goes smoothly
-      ogre_->frameStarted(evt);
+      Ogre::Root::getSingleton()._fireFrameStarted(evt);
 
       // server still renders at the moment
       //if (mode_ != SERVER)
-      ogre_->renderOneFrame(); // only render in non-server mode
+      Ogre::Root::getSingleton()._updateAllRenderTargets(); // only render in non-server mode
 
       // get current time
@@ -403,5 +414,5 @@
 
       // again, just to be sure ogre works fine
-      ogre_->frameEnded(evt);
+      Ogre::Root::getSingleton()._fireFrameEnded(evt);
 	  }
   }
Index: code/trunk/src/orxonox/Orxonox.h
===================================================================
--- code/trunk/src/orxonox/Orxonox.h	(revision 1029)
+++ code/trunk/src/orxonox/Orxonox.h	(revision 1032)
@@ -11,5 +11,4 @@
 
 #include <OgrePrerequisites.h>
-//#include <OIS/OISPrereqs.h>
 
 #include "OrxonoxPrereqs.h"
@@ -20,6 +19,4 @@
 
 
-// TODO: Orxonox should maybe derive from BaseObject
-//! Orxonox singleton class
 namespace orxonox {
 
@@ -30,4 +27,5 @@
   };
 
+  //! Orxonox singleton class
   class _OrxonoxExport Orxonox : public InputEventListener
   {
@@ -38,8 +36,5 @@
       void abortImmediate(/* some error code */);
       void abortRequest();
-      inline Ogre::SceneManager*  getSceneManager()        { return ogre_->getSceneManager(); };
-      inline GraphicsEngine*      getOgrePointer()         { return ogre_; };
       inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
-      inline BulletManager*       getBulletMgr()           { return this->bulletMgr_; }
 
       static Orxonox* getSingleton();
@@ -74,11 +69,8 @@
       std::string           dataPath_;      //!< path to data
       audio::AudioManager*  auMan_;         //!< audio manager
-      BulletManager*        bulletMgr_;     //!< Keeps track of the thrown bullets
       InputManager*         inputHandler_;  //!< Handles input with key bindings
-      Ogre::Root*           root_;          //!< Holy grail of Ogre
       Ogre::Timer*          timer_;         //!< Main loop timer
       // TODO: make this a config-value by creating a config class for orxonox
       float                 frameSmoothingTime_;
-      // little hack to actually show something dynamic in the HUD
       HUD*                  orxonoxHUD_;
       bool                  bAbort_;        //!< aborts the render loop if true
Index: code/trunk/src/orxonox/OrxonoxPlatform.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxPlatform.h	(revision 1029)
+++ code/trunk/src/orxonox/OrxonoxPlatform.h	(revision 1032)
@@ -22,10 +22,10 @@
  *      An unknown man from the Ogre development crew
  *   Co-authors:
- *      Reto Grieder (OGRE --> ORXONOX)
+ *      Reto Grieder
  *
  */
 
 /**
- @file  OrxonoxPlatform.h
+ @file
  @brief Various constants for compiler, architecture and platform. It's a mere
         copy of the file found in the Ogre source code (OgrePlatform.h).
@@ -108,7 +108,8 @@
 // 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" )
+// FIXME: Try this on linux box. Doesn't work with msvc
+//#define ORXONOX_QUOTE_INPLACE(x) # x
+//#define ORXONOX_QUOTE(x) ORXONOX_QUOTE_INPLACE(x)
+//#define ORXONOX_WARN( x )  message( __FILE__ "(" QUOTE( __LINE__ ) ") : " x "\n" )
 
 //----------------------------------------------------------------------------
@@ -137,5 +138,5 @@
 #  endif
 
-#endif
+#endif /* Platform Win32 */
 //----------------------------------------------------------------------------
 
@@ -171,5 +172,5 @@
 #  define ORXONOX_UNICODE_SUPPORT 1
 
-#endif
+#endif /* Patform Linux/Apple */
 
 //For apple, we always have a custom config.h file
@@ -191,7 +192,7 @@
 // Integer formats of fixed bit width
 // FIXME: consider 64 bit platforms!
-/*typedef unsigned int uint32;
-typedef unsigned short uint16;
-typedef unsigned char uint8;*/
+//typedef unsigned int uint32;
+//typedef unsigned short uint16;
+//typedef unsigned char uint8;
 
 #ifdef ORXONOX_DOUBLE_PRECISION
@@ -261,16 +262,14 @@
 //#   pragma warning (disable : 201)
 
-#endif
-
 
 // Define the english written operators like and, or, xor
-#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
-#  include <iso646.h>
-#endif
+#include <iso646.h>
+
+#endif /* ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC */
+
+// include visual leak detector to search for memory leaks
+//#include <vld.h>
 
 } /* namespace orxonox */
 
-// include visual leak detector to search for memory links
-//#include <vld.h>
-
 #endif /* _OrxonoxPlatform_H__ */
Index: code/trunk/src/orxonox/OrxonoxStableHeaders.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxStableHeaders.h	(revision 1029)
+++ code/trunk/src/orxonox/OrxonoxStableHeaders.h	(revision 1032)
@@ -114,5 +114,5 @@
 #include "objects/WorldEntity.h"
 
-#endif
+#endif /* Compiler MSVC */
 
 #endif /* _OrxonoxStableHeaders_H__ */
Index: code/trunk/src/orxonox/objects/Ambient.cc
===================================================================
--- code/trunk/src/orxonox/objects/Ambient.cc	(revision 1029)
+++ code/trunk/src/orxonox/objects/Ambient.cc	(revision 1032)
@@ -37,7 +37,7 @@
 #include "util/String2Number.h"
 #include "util/Math.h"
-#include "../core/Debug.h"
-#include "../core/CoreIncludes.h"
-#include "../Orxonox.h"
+#include "core/Debug.h"
+#include "core/CoreIncludes.h"
+#include "GraphicsEngine.h"
 #include "core/XMLPort.h"
 
@@ -76,5 +76,5 @@
    void Ambient::setAmbientLight(const ColourValue& colour)
    {
-    	Orxonox::getSingleton()->getSceneManager()->setAmbientLight(colour);
+    	GraphicsEngine::getSingleton().getSceneManager()->setAmbientLight(colour);
    }
 
Index: code/trunk/src/orxonox/objects/Camera.cc
===================================================================
--- code/trunk/src/orxonox/objects/Camera.cc	(revision 1029)
+++ code/trunk/src/orxonox/objects/Camera.cc	(revision 1032)
@@ -13,8 +13,7 @@
 #include "util/String2Number.h"
 #include "util/Math.h"
-#include "../core/Debug.h"
-#include "../core/CoreIncludes.h"
-#include "../Orxonox.h"
-#include "../GraphicsEngine.h"
+#include "core/Debug.h"
+#include "core/CoreIncludes.h"
+#include "GraphicsEngine.h"
 
 #include "Camera.h"
@@ -35,5 +34,5 @@
     void Camera::loadParams(TiXmlElement* xmlElem)
     {
-      Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+      Ogre::SceneManager* mgr = GraphicsEngine::getSingleton().getSceneManager();
 
       if (xmlElem->Attribute("name") && xmlElem->Attribute("pos") && xmlElem->Attribute("lookat") && xmlElem->Attribute("node"))
@@ -68,5 +67,5 @@
 
         // FIXME: unused var
-        Ogre::Viewport* vp = orxonox::Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam);
+        Ogre::Viewport* vp = GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam);
 
 
Index: code/trunk/src/orxonox/objects/Explosion.cc
===================================================================
--- code/trunk/src/orxonox/objects/Explosion.cc	(revision 1029)
+++ code/trunk/src/orxonox/objects/Explosion.cc	(revision 1032)
@@ -32,8 +32,8 @@
 #include <OgreSceneNode.h>
 
-#include "../core/CoreIncludes.h"
+#include "core/CoreIncludes.h"
 #include "util/Math.h"
-#include "../Orxonox.h"
-#include "../particle/ParticleInterface.h"
+#include "GraphicsEngine.h"
+#include "particle/ParticleInterface.h"
 
 #include "Explosion.h"
@@ -56,5 +56,5 @@
             Vector3 position = owner->getNode()->getWorldPosition();
 
-            this->particle_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(), "explosion" + this->getName(), "Orxonox/treibwerk");
+            this->particle_ = new ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(), "explosion" + this->getName(), "Orxonox/treibwerk");
             this->particle_->getParticleSystem()->setParameter("local_space", "true");
             this->particle_->newEmitter();
Index: code/trunk/src/orxonox/objects/Fighter.cc
===================================================================
--- code/trunk/src/orxonox/objects/Fighter.cc	(revision 1029)
+++ 	(revision )
@@ -1,511 +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 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   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 "core/InputManager.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()->getRenderWindow()->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 (InputManager::getSingleton()->getMouse())
-            {
-                InputManager::getSingleton()->getMouse()->setEventCallback(this);
-                this->setMouseEventCallback_ = true;
-            }
-        }
-
-        WorldEntity::tick(dt);
-
-        OIS::Keyboard* mKeyboard = InputManager::getSingleton()->getKeyboard();
-        OIS::Mouse* mMouse = InputManager::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 1029)
+++ 	(revision )
@@ -1,92 +1,0 @@
-#ifndef _Fighter_H__
-#define _Fighter_H__
-
-#include <OIS/OIS.h>
-
-#include "../OrxonoxPrereqs.h"
-
-#include "Model.h"
-
-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_;
-    };
-}
-
-#endif /* _Fighter_H__ */
Index: code/trunk/src/orxonox/objects/Model.cc
===================================================================
--- code/trunk/src/orxonox/objects/Model.cc	(revision 1029)
+++ code/trunk/src/orxonox/objects/Model.cc	(revision 1032)
@@ -31,6 +31,6 @@
 #include "util/Tokenizer.h"
 #include "util/String2Number.h"
-#include "../core/CoreIncludes.h"
-#include "../Orxonox.h"
+#include "core/CoreIncludes.h"
+#include "GraphicsEngine.h"
 #include "core/XMLPort.h"
 
Index: code/trunk/src/orxonox/objects/Skybox.cc
===================================================================
--- code/trunk/src/orxonox/objects/Skybox.cc	(revision 1029)
+++ code/trunk/src/orxonox/objects/Skybox.cc	(revision 1032)
@@ -35,7 +35,7 @@
 //#include "util/Tokenizer.h"
 //#include "util/String2Number.h"
-#include "../Orxonox.h"
-#include "../core/CoreIncludes.h"
-#include "../core/Debug.h"
+#include "GraphicsEngine.h"
+#include "core/CoreIncludes.h"
+#include "core/Debug.h"
 #include "core/XMLPort.h"
 
@@ -68,5 +68,5 @@
    void Skybox::setSkybox(const std::string& skyboxname)
    {
-    	Orxonox::getSingleton()->getSceneManager()->setSkyBox(true, skyboxname);
+    	GraphicsEngine::getSingleton().getSceneManager()->setSkyBox(true, skyboxname);
    }
 
Index: code/trunk/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/objects/SpaceShip.cc	(revision 1029)
+++ code/trunk/src/orxonox/objects/SpaceShip.cc	(revision 1032)
@@ -41,5 +41,5 @@
 #include "core/CoreIncludes.h"
 #include "core/Debug.h"
-#include "Orxonox.h"
+#include "GraphicsEngine.h"
 #include "core/InputManager.h"
 #include "particle/ParticleInterface.h"
@@ -156,5 +156,5 @@
     {
         // START CREATING THRUSTER
-        this->tt_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
+        this->tt_ = new ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
         this->tt_->getParticleSystem()->setParameter("local_space","true");
         this->tt_->newEmitter();
@@ -271,5 +271,5 @@
     void SpaceShip::setCamera(const std::string& camera)
     {
-        Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
+        Ogre::Camera *cam = GraphicsEngine::getSingleton().getSceneManager()->createCamera("ShipCam");
         this->camNode_ = this->getNode()->createChildSceneNode("CamNode");
 /*
@@ -286,5 +286,5 @@
 
         this->camNode_->attachObject(cam);
-        Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam);
+        GraphicsEngine::getSingleton().getRenderWindow()->addViewport(cam);
     }
 
Index: code/trunk/src/orxonox/objects/WorldEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/WorldEntity.cc	(revision 1029)
+++ code/trunk/src/orxonox/objects/WorldEntity.cc	(revision 1032)
@@ -34,6 +34,6 @@
 #include "util/Tokenizer.h"
 #include "util/String2Number.h"
-#include "../core/CoreIncludes.h"
-#include "../Orxonox.h"
+#include "core/CoreIncludes.h"
+#include "GraphicsEngine.h"
 #include "WorldEntity.h"
 #include "core/XMLPort.h"
@@ -58,10 +58,10 @@
         this->momentum_ = 0;
         
-        if (Orxonox::getSingleton()->getSceneManager())
+        if (GraphicsEngine::getSingleton().getSceneManager())
         {
           std::ostringstream name;
           name << (WorldEntity::worldEntityCounter_s++);
           this->setName("WorldEntity" + name.str());
-          this->node_ = Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
+          this->node_ = GraphicsEngine::getSingleton().getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
         
           registerAllVariables();
Index: code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc
===================================================================
--- code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc	(revision 1029)
+++ code/trunk/src/orxonox/objects/weapon/BaseWeapon.cc	(revision 1032)
@@ -34,5 +34,5 @@
 
 #include "util/Math.h"
-#include "../../Orxonox.h"
+#include "Orxonox.h"
 #include "Bullet.h"
 #include "BulletManager.h"
@@ -47,5 +47,5 @@
 
   BaseWeapon::BaseWeapon()
-    : sceneMgr_(Orxonox::getSingleton()->getSceneManager()),
+    : sceneMgr_(GraphicsEngine::getSingleton().getSceneManager()),
       bulletCounter_(0),
       bulletManager_(Orxonox::getSingleton()->getBulletMgr()),
Index: code/trunk/src/orxonox/tools/BillboardSet.cc
===================================================================
--- code/trunk/src/orxonox/tools/BillboardSet.cc	(revision 1029)
+++ code/trunk/src/orxonox/tools/BillboardSet.cc	(revision 1032)
@@ -32,5 +32,5 @@
 #include <OgreSceneManager.h>
 
-#include "../Orxonox.h"
+#include "GraphicsEngine.h"
 #include "util/Math.h"
 
@@ -50,5 +50,5 @@
         std::ostringstream name;
         name << (BillboardSet::billboardSetCounter_s++);
-        this->billboardSet_ = Orxonox::getSingleton()->getSceneManager()->createBillboardSet("Billboard" + name.str(), count);
+        this->billboardSet_ = GraphicsEngine::getSingleton().getSceneManager()->createBillboardSet("Billboard" + name.str(), count);
         this->billboardSet_->createBillboard(position, colour);
         this->billboardSet_->setMaterialName(file);
@@ -58,5 +58,5 @@
     {
         if (this->billboardSet_)
-            Orxonox::getSingleton()->getSceneManager()->destroyBillboardSet(this->billboardSet_);
+            GraphicsEngine::getSingleton().getSceneManager()->destroyBillboardSet(this->billboardSet_);
     }
 }
Index: code/trunk/src/orxonox/tools/Light.cc
===================================================================
--- code/trunk/src/orxonox/tools/Light.cc	(revision 1029)
+++ code/trunk/src/orxonox/tools/Light.cc	(revision 1032)
@@ -5,5 +5,5 @@
 #include <OgreSceneManager.h>
 
-#include "../Orxonox.h"
+#include "GraphicsEngine.h"
 
 #include "Light.h"
@@ -22,5 +22,5 @@
         std::ostringstream name;
         name << (Light::lightCounter_s++);
-        this->light_ = Orxonox::getSingleton()->getSceneManager()->createLight("Light" + name.str());
+        this->light_ = GraphicsEngine::getSingleton().getSceneManager()->createLight("Light" + name.str());
         this->light_->setType(type);
         this->light_->setDiffuseColour(diffuse);
@@ -31,5 +31,5 @@
     {
         if (this->light_)
-            Orxonox::getSingleton()->getSceneManager()->destroyLight(this->light_);
+            GraphicsEngine::getSingleton().getSceneManager()->destroyLight(this->light_);
     }
 }
Index: code/trunk/src/orxonox/tools/Mesh.cc
===================================================================
--- code/trunk/src/orxonox/tools/Mesh.cc	(revision 1029)
+++ code/trunk/src/orxonox/tools/Mesh.cc	(revision 1032)
@@ -32,5 +32,5 @@
 #include <OgreSceneManager.h>
 
-#include "../Orxonox.h"
+#include "GraphicsEngine.h"
 
 #include "Mesh.h"
@@ -49,5 +49,5 @@
         std::ostringstream name;
         name << (Mesh::meshCounter_s++);
-        this->entity_ = Orxonox::getSingleton()->getSceneManager()->createEntity("Mesh" + name.str(), file);
+        this->entity_ = GraphicsEngine::getSingleton().getSceneManager()->createEntity("Mesh" + name.str(), file);
     }
 
@@ -55,5 +55,5 @@
     {
         if (this->entity_)
-            Orxonox::getSingleton()->getSceneManager()->destroyEntity(this->entity_);
+            GraphicsEngine::getSingleton().getSceneManager()->destroyEntity(this->entity_);
     }
 }
Index: code/trunk/visual_studio/vc8/orxonox.vcproj
===================================================================
--- code/trunk/visual_studio/vc8/orxonox.vcproj	(revision 1029)
+++ code/trunk/visual_studio/vc8/orxonox.vcproj	(revision 1032)
@@ -208,8 +208,4 @@
 				</File>
 				<File
-					RelativePath="..\..\src\orxonox\objects\Fighter.cc"
-					>
-				</File>
-				<File
 					RelativePath="..\..\src\orxonox\objects\Model.cc"
 					>
@@ -241,24 +237,72 @@
 						RelativePath="..\..\src\orxonox\objects\weapon\AmmunitionDump.cc"
 						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							ExcludedFromBuild="true"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
 						RelativePath="..\..\src\orxonox\objects\weapon\BarrelGun.cc"
 						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							ExcludedFromBuild="true"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
 						RelativePath="..\..\src\orxonox\objects\weapon\BaseWeapon.cc"
 						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							ExcludedFromBuild="true"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
 						RelativePath="..\..\src\orxonox\objects\weapon\Bullet.cc"
 						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							ExcludedFromBuild="true"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
 						RelativePath="..\..\src\orxonox\objects\weapon\BulletManager.cc"
 						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							ExcludedFromBuild="true"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
 						RelativePath="..\..\src\orxonox\objects\weapon\WeaponStation.cc"
 						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							ExcludedFromBuild="true"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+							/>
+						</FileConfiguration>
 					</File>
 				</Filter>
@@ -339,8 +383,4 @@
 				<File
 					RelativePath="..\..\src\orxonox\objects\Explosion.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\orxonox\objects\Fighter.h"
 					>
 				</File>
