Index: code/branches/pch/src/orxonox/objects/gametypes/Gametype.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/gametypes/Gametype.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/gametypes/Gametype.cc	(revision 3186)
@@ -33,5 +33,4 @@
 #include "core/ConfigValueIncludes.h"
 #include "core/GameMode.h"
-#include "core/ObjectList.h"
 
 #include "objects/infos/PlayerInfo.h"
@@ -41,4 +40,5 @@
 #include "objects/worldentities/SpawnPoint.h"
 #include "objects/worldentities/pawns/Spectator.h"
+#include "objects/worldentities/pawns/Pawn.h"
 #include "overlays/OverlayGroup.h"
 
Index: code/branches/pch/src/orxonox/objects/gametypes/TeamDeathmatch.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/gametypes/TeamDeathmatch.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/gametypes/TeamDeathmatch.cc	(revision 3186)
@@ -33,4 +33,5 @@
 #include "interfaces/TeamColourable.h"
 #include "objects/worldentities/TeamSpawnPoint.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/Attacher.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Attacher.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Attacher.h	(revision 3186)
@@ -33,7 +33,7 @@
 
 #include <list>
-
+#include <string>
+#include "core/XMLNameListener.h"
 #include "objects/worldentities/StaticEntity.h"
-#include "core/XMLNameListener.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/Backlight.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Backlight.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Backlight.cc	(revision 3186)
@@ -31,8 +31,9 @@
 #include <OgreRibbonTrail.h>
 #include <OgreSceneManager.h>
-
+#include <OgreSceneNode.h>
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-#include "core/Executor.h"
 #include "core/XMLPort.h"
 #include "objects/Scene.h"
Index: code/branches/pch/src/orxonox/objects/worldentities/Backlight.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Backlight.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Backlight.h	(revision 3186)
@@ -31,6 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "interfaces/TimeFactorListener.h"
 #include "FadingBillboard.h"
-#include "interfaces/TimeFactorListener.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/BigExplosion.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/BigExplosion.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/BigExplosion.cc	(revision 3186)
@@ -28,19 +28,17 @@
 
 #include "BigExplosion.h"
-#include "MovableEntity.h"
+
+//#include <sstream>
+#include <OgreParticleSystem.h>
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "core/CommandExecutor.h"
+#include "core/Executor.h"
+#include "core/GameMode.h"
+#include "tools/ParticleInterface.h"
+#include "objects/Scene.h"
+#include "objects/worldentities/ParticleSpawner.h"
 #include "Model.h"
-
-#include <OgreParticleSystem.h>
-#include <OgreSceneNode.h>
-#include <sstream>
-
-#include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-#include "core/Executor.h"
-#include "core/CommandExecutor.h"
-#include "objects/Scene.h"
-#include "tools/ParticleInterface.h"
-#include "objects/worldentities/ParticleSpawner.h"
-#include "util/Exception.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/BigExplosion.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/BigExplosion.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/BigExplosion.h	(revision 3186)
@@ -31,9 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
 #include <string>
-
-
+#include "tools/Timer.h"
 #include "MovableEntity.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/Billboard.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Billboard.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Billboard.cc	(revision 3186)
@@ -32,6 +32,6 @@
 
 #include "core/CoreIncludes.h"
+#include "core/GameMode.h"
 #include "core/XMLPort.h"
-#include "core/GameMode.h"
 #include "objects/Scene.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/Billboard.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Billboard.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Billboard.h	(revision 3186)
@@ -31,8 +31,9 @@
 
 #include "OrxonoxPrereqs.h"
-#include "StaticEntity.h"
+
 #include "util/Math.h"
 #include "tools/BillboardSet.h"
 #include "interfaces/TeamColourable.h"
+#include "StaticEntity.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/BlinkingBillboard.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/BlinkingBillboard.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/BlinkingBillboard.cc	(revision 3186)
@@ -29,8 +29,7 @@
 #include "BlinkingBillboard.h"
 
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/Math.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/BlinkingBillboard.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/BlinkingBillboard.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/BlinkingBillboard.h	(revision 3186)
@@ -31,6 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "interfaces/Tickable.h"
 #include "Billboard.h"
-#include "interfaces/Tickable.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/Camera.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Camera.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Camera.cc	(revision 3186)
@@ -28,7 +28,4 @@
 
 #include "Camera.h"
-
-#include <string>
-#include <cassert>
 
 #include <OgreCamera.h>
Index: code/branches/pch/src/orxonox/objects/worldentities/Camera.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Camera.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Camera.h	(revision 3186)
@@ -33,6 +33,6 @@
 
 #include <OgrePrerequisites.h>
+#include "interfaces/Tickable.h"
 #include "objects/worldentities/StaticEntity.h"
-#include "interfaces/Tickable.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/CameraPosition.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/CameraPosition.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/CameraPosition.cc	(revision 3186)
@@ -30,5 +30,4 @@
 
 #include <OgreCamera.h>
-
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
Index: code/branches/pch/src/orxonox/objects/worldentities/CameraPosition.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/CameraPosition.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/CameraPosition.h	(revision 3186)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "objects/worldentities/StaticEntity.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 3186)
@@ -30,4 +30,5 @@
 
 #include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
 
 #include "core/CoreIncludes.h"
@@ -35,5 +36,4 @@
 #include "core/GameMode.h"
 #include "core/XMLPort.h"
-#include "core/Template.h"
 
 #include "objects/Scene.h"
Index: code/branches/pch/src/orxonox/objects/worldentities/ControllableEntity.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/ControllableEntity.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/ControllableEntity.h	(revision 3186)
@@ -31,4 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <list>
+#include <string>
+#include "util/Math.h"
 #include "MobileEntity.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.cc	(revision 3186)
@@ -31,10 +31,10 @@
 #include <OgreParticleSystem.h>
 
-#include "core/GameMode.h"
 #include "core/CoreIncludes.h"
 #include "core/Executor.h"
+#include "core/GameMode.h"
+#include "util/Exception.h"
 #include "objects/Scene.h"
 #include "tools/ParticleInterface.h"
-#include "util/Exception.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.h	(revision 3186)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "tools/Timer.h"
 #include "MovableEntity.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/FadingBillboard.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/FadingBillboard.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/FadingBillboard.cc	(revision 3186)
@@ -30,5 +30,4 @@
 
 #include "core/CoreIncludes.h"
-#include "core/Executor.h"
 #include "core/XMLPort.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/FadingBillboard.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/FadingBillboard.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/FadingBillboard.h	(revision 3186)
@@ -31,7 +31,9 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "tools/Timer.h"
+#include "interfaces/Tickable.h"
 #include "Billboard.h"
-#include "interfaces/Tickable.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/ForceField.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/ForceField.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/ForceField.cc	(revision 3186)
@@ -28,7 +28,7 @@
 
 #include "ForceField.h"
-#include "core/XMLPort.h"
 
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 #include "objects/worldentities/MobileEntity.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/ForceField.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/ForceField.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/ForceField.h	(revision 3186)
@@ -31,6 +31,8 @@
 #define _ForceField_H__
 
+#include "OrxonoxPrereqs.h"
+
+#include "interfaces/Tickable.h"
 #include "StaticEntity.h"
-#include "interfaces/Tickable.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/Light.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Light.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Light.cc	(revision 3186)
@@ -29,13 +29,12 @@
 #include "Light.h"
 
-#include <sstream>
-#include <cassert>
-
 #include <OgreSceneManager.h>
+#include <OgreLight.h>
+#include <boost/static_assert.hpp>
 
 #include "util/String.h"
 #include "util/Exception.h"
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "objects/Scene.h"
@@ -44,4 +43,9 @@
 {
     CreateFactory(Light);
+
+    // Be sure we don't do bad conversions
+    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT       == (int)Light::LT_POINT);
+    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::LT_DIRECTIONAL);
+    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::LT_SPOTLIGHT);
 
     Light::Light(BaseObject* creator) : StaticEntity(creator)
@@ -52,5 +56,5 @@
         this->diffuse_ = ColourValue::White;
         this->specular_ = ColourValue::White;
-        this->type_ = Ogre::Light::LT_POINT;
+        this->type_ = Light::LT_POINT;
         this->attenuation_ = Vector4(100000, 1, 0, 0);
         this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f);
@@ -136,11 +140,11 @@
     {
         if (type == "point")
-            this->setType(Ogre::Light::LT_POINT);
+            this->setType(Light::LT_POINT);
         else if (type == "directional")
-            this->setType(Ogre::Light::LT_DIRECTIONAL);
+            this->setType(Light::LT_DIRECTIONAL);
         else if (type == "spotlight")
-            this->setType(Ogre::Light::LT_SPOTLIGHT);
+            this->setType(Light::LT_SPOTLIGHT);
         else
-            this->setType(Ogre::Light::LT_POINT);
+            this->setType(Light::LT_POINT);
     }
 
@@ -149,9 +153,9 @@
         switch (this->type_)
         {
-            case Ogre::Light::LT_DIRECTIONAL:
+            case Light::LT_DIRECTIONAL:
                 return "directional";
-            case Ogre::Light::LT_SPOTLIGHT:
+            case Light::LT_SPOTLIGHT:
                 return "spotlight";
-            case Ogre::Light::LT_POINT:
+            case Light::LT_POINT:
             default:
                 return "point";
@@ -163,5 +167,5 @@
         if (this->light_)
         {
-            this->light_->setType(this->type_);
+            this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_));
 
             if (this->type_ != Ogre::Light::LT_DIRECTIONAL)
Index: code/branches/pch/src/orxonox/objects/worldentities/Light.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Light.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Light.h	(revision 3186)
@@ -31,11 +31,9 @@
 
 #include "OrxonoxPrereqs.h"
-#include "StaticEntity.h"
 
 #include <string>
-#include <OgreLight.h>
-
 #include "util/Math.h"
 #include "interfaces/TeamColourable.h"
+#include "StaticEntity.h"
 
 namespace orxonox
@@ -43,4 +41,15 @@
     class _OrxonoxExport Light : public StaticEntity, public TeamColourable
     {
+        public:
+            enum LightTypes // Copy from the Ogre enum
+            {
+                /// Point light sources give off light equally in all directions, so require only position not direction
+                LT_POINT,
+                /// Directional lights simulate parallel light beams from a distant source, hence have direction but no position
+                LT_DIRECTIONAL,
+                /// Spotlights simulate a cone of light from a source so require position and direction, plus extra values for falloff
+                LT_SPOTLIGHT
+            };
+
         public:
             Light(BaseObject* creator);
@@ -55,7 +64,7 @@
                 { return this->light_; }
 
-            inline void setType(Ogre::Light::LightTypes type)
+            inline void setType(Light::LightTypes type)
                 { this->type_ = type; this->updateType(); }
-            inline Ogre::Light::LightTypes getType() const
+            inline Light::LightTypes getType() const
                 { return this->type_; }
 
@@ -133,5 +142,5 @@
 
             Ogre::Light* light_;
-            Ogre::Light::LightTypes type_;
+            LightTypes type_;
             ColourValue diffuse_;
             ColourValue specular_;
Index: code/branches/pch/src/orxonox/objects/worldentities/MobileEntity.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/MobileEntity.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/MobileEntity.cc	(revision 3186)
@@ -32,8 +32,6 @@
 #include <BulletDynamics/Dynamics/btRigidBody.h>
 
-#include "util/MathConvert.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "objects/Scene.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/MobileEntity.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/MobileEntity.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/MobileEntity.h	(revision 3186)
@@ -32,6 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
+#include "interfaces/Tickable.h"
 #include "WorldEntity.h"
-#include "interfaces/Tickable.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/Model.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Model.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Model.cc	(revision 3186)
@@ -27,9 +27,10 @@
  */
 
+#include "Model.h"
 
 #include <OgreEntity.h>
-#include "Model.h"
+
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "objects/Scene.h"
Index: code/branches/pch/src/orxonox/objects/worldentities/Model.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Model.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Model.h	(revision 3186)
@@ -31,6 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "tools/Mesh.h"
 #include "StaticEntity.h"
-#include "tools/Mesh.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/MovableEntity.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 3186)
@@ -31,7 +31,7 @@
 
 #include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
 #include "core/Executor.h"
 #include "core/GameMode.h"
+#include "core/XMLPort.h"
 #include "objects/worldentities/pawns/Pawn.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/MovableEntity.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/MovableEntity.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/MovableEntity.h	(revision 3186)
@@ -33,7 +33,8 @@
 #include "OrxonoxPrereqs.h"
 
-#include "MobileEntity.h"
+#include "util/Math.h"
 #include "network/ClientConnectionListener.h"
 #include "tools/Timer.h"
+#include "MobileEntity.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/ParticleEmitter.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/ParticleEmitter.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/ParticleEmitter.cc	(revision 3186)
@@ -36,9 +36,9 @@
 #include <OgreParticleSystem.h>
 
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
 #include "tools/ParticleInterface.h"
-#include "util/Exception.h"
-#include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
 #include "objects/Scene.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/ParticleEmitter.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/ParticleEmitter.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/ParticleEmitter.h	(revision 3186)
@@ -31,4 +31,6 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
 #include "StaticEntity.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/ParticleSpawner.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/ParticleSpawner.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/ParticleSpawner.h	(revision 3186)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "tools/Timer.h"
 #include "ParticleEmitter.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/Planet.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Planet.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Planet.cc	(revision 3186)
@@ -29,17 +29,14 @@
 #include "Planet.h"
 
-#include <math.h>
-
 #include <OgreEntity.h>
 #include <OgreBillboardSet.h>
-#include <OgreHardwareVertexBuffer.h>
-#include <OgreMeshManager.h>
+#include <OgreProgressiveMesh.h>
 
 #include "core/CoreIncludes.h"
+#include "core/GameMode.h"
 #include "core/XMLPort.h"
 #include "objects/Scene.h"
+#include "Camera.h"
 #include "CameraManager.h"
-#include "Camera.h"
-#include "GraphicsManager.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/Planet.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/Planet.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/Planet.h	(revision 3186)
@@ -32,10 +32,8 @@
 #include "OrxonoxPrereqs.h"
 
-#include <OgreMesh.h>
-
+#include <string>
 #include "tools/BillboardSet.h"
 #include "tools/Mesh.h"
 #include "MovableEntity.h"
-#include "interfaces/Tickable.h"
 
 namespace orxonox
@@ -108,5 +106,5 @@
             float atmosphereSize;
             float imageSize;
-            Ogre::Mesh::LodDistanceList distList;
+            std::vector<float> distList;
             BillboardSet billboard_;
             bool bCastShadows_;
Index: code/branches/pch/src/orxonox/objects/worldentities/PongBall.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/PongBall.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/PongBall.cc	(revision 3186)
@@ -32,4 +32,5 @@
 #include "core/GameMode.h"
 #include "objects/gametypes/Gametype.h"
+#include "objects/worldentities/PongBat.h"
 #include "sound/SoundBase.h"
 
@@ -217,3 +218,20 @@
         }
     }
+
+    void PongBall::setBats(PongBat** bats)
+    {
+        this->bat_ = bats;
+        this->batID_[0] = this->bat_[0]->getObjectID();
+        this->batID_[1] = this->bat_[1]->getObjectID();
+    }
+
+    void PongBall::applyBats()
+    {
+        if (!this->bat_)
+            this->bat_ = new PongBat*[2];
+        if (this->batID_[0] != OBJECTID_UNKNOWN)
+            this->bat_[0] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0]));
+        if (this->batID_[1] != OBJECTID_UNKNOWN)
+            this->bat_[1] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1]));
+    }
 }
Index: code/branches/pch/src/orxonox/objects/worldentities/PongBall.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/PongBall.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/PongBall.h	(revision 3186)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
 #include "objects/worldentities/MovableEntity.h"
-#include "objects/worldentities/PongBat.h"
 
 namespace orxonox
@@ -63,9 +63,6 @@
                 { return this->batlength_; }
 
-            void setBats(PongBat** bats)
-            { this->bat_ = bats; this->batID_[0] = this->bat_[0]->getObjectID(); this->batID_[1] = this->bat_[1]->getObjectID(); }
-
-            void applyBats()
-            { if(!this->bat_) this->bat_ = new PongBat*[2]; if(this->batID_[0] != OBJECTID_UNKNOWN) this->bat_[0] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0])); if(this->batID_[1] != OBJECTID_UNKNOWN) this->bat_[1] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1])); }
+            void setBats(PongBat** bats);
+            void applyBats();
 
             static const float MAX_REL_Z_VELOCITY;
Index: code/branches/pch/src/orxonox/objects/worldentities/PongBat.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/PongBat.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/PongBat.h	(revision 3186)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "objects/worldentities/ControllableEntity.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/PongCenterpoint.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/PongCenterpoint.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/PongCenterpoint.h	(revision 3186)
@@ -32,4 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
+#include <util/Math.h>
 #include "objects/worldentities/StaticEntity.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/SpawnPoint.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/SpawnPoint.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/SpawnPoint.cc	(revision 3186)
@@ -30,6 +30,8 @@
 
 #include "core/CoreIncludes.h"
+#include "core/Template.h"
 #include "core/XMLPort.h"
 #include "objects/gametypes/Gametype.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
@@ -71,4 +73,10 @@
     }
 
+    void SpawnPoint::setTemplate(Template* temp)
+    {
+        this->template_ = temp;
+        this->templatename_ = temp->getName();
+    }
+
     Pawn* SpawnPoint::spawn()
     {
Index: code/branches/pch/src/orxonox/objects/worldentities/SpawnPoint.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/SpawnPoint.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/SpawnPoint.h	(revision 3186)
@@ -32,7 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
 #include "core/Identifier.h"
-#include "core/Template.h"
-#include "objects/worldentities/pawns/Pawn.h"
 #include "objects/worldentities/StaticEntity.h"
 
@@ -52,6 +51,5 @@
                 { return this->spawnclass_; }
 
-            inline void setTemplate(Template* temp)
-                { this->template_ = temp; this->templatename_ = temp->getName(); }
+            void setTemplate(Template* temp);
             inline Template* getTemplate() const
                 { return this->template_; }
Index: code/branches/pch/src/orxonox/objects/worldentities/StaticEntity.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/StaticEntity.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/StaticEntity.cc	(revision 3186)
@@ -32,5 +32,4 @@
 #include <OgreSceneNode.h>
 #include <BulletDynamics/Dynamics/btRigidBody.h>
-
 #include "util/OrxAssert.h"
 #include "core/CoreIncludes.h"
Index: code/branches/pch/src/orxonox/objects/worldentities/TeamSpawnPoint.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/TeamSpawnPoint.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/TeamSpawnPoint.h	(revision 3186)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include "objects/worldentities/pawns/Pawn.h"
 #include "SpawnPoint.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 3186)
@@ -30,5 +30,4 @@
 #include "WorldEntity.h"
 
-#include <cassert>
 #include <OgreSceneNode.h>
 #include <OgreSceneManager.h>
@@ -38,7 +37,7 @@
 #include "util/OrxAssert.h"
 #include "util/Convert.h"
+#include "util/Exception.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "objects/Scene.h"
 #include "objects/collisionshapes/WorldEntityCollisionShape.h"
@@ -507,5 +506,5 @@
 
     // Note: These functions are placed in WorldEntity.h as inline functions for the release build.
-#ifndef NDEBUG
+#ifndef ORXONOX_RELEASE
     const Vector3& WorldEntity::getPosition() const
     {
Index: code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.h	(revision 3186)
@@ -33,5 +33,5 @@
 #include "OrxonoxPrereqs.h"
 
-#ifdef NDEBUG
+#ifdef ORXONOX_RELEASE
 #include <OgreSceneNode.h>
 #else
@@ -443,5 +443,5 @@
 
     // Inline heavily used functions for release builds. In debug, we better avoid including OgreSceneNode here.
-#ifdef NDEBUG
+#ifdef ORXONOX_RELEASE
     inline const Vector3& WorldEntity::getPosition() const
         { return this->node_->getPosition(); }
Index: code/branches/pch/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 3186)
@@ -29,10 +29,11 @@
 #include "Pawn.h"
 
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/Math.h"
+#include "network/NetworkFunction.h"
+
+#include "interfaces/PawnListener.h"
 #include "PawnManager.h"
-#include "interfaces/PawnListener.h"
 #include "objects/infos/PlayerInfo.h"
 #include "objects/gametypes/Gametype.h"
@@ -40,5 +41,4 @@
 #include "objects/worldentities/ExplosionChunk.h"
 #include "objects/worldentities/BigExplosion.h"
-
 #include "objects/weaponsystem/WeaponSystem.h"
 #include "objects/weaponsystem/WeaponSlot.h"
@@ -46,5 +46,4 @@
 #include "objects/weaponsystem/WeaponSet.h"
 
-#include "network/NetworkFunction.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 3186)
@@ -31,6 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "interfaces/RadarViewable.h"
 #include "objects/worldentities/ControllableEntity.h"
-#include "interfaces/RadarViewable.h"
 #include "objects/pickup/PickupCollection.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 3186)
@@ -31,5 +31,4 @@
 #include <BulletDynamics/Dynamics/btRigidBody.h>
 
-#include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
Index: code/branches/pch/src/orxonox/objects/worldentities/pawns/SpaceShip.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/pawns/SpaceShip.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/pawns/SpaceShip.h	(revision 3186)
@@ -32,6 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
 #include <LinearMath/btVector3.h>
-
+#include "util/Math.h"
 #include "Pawn.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 3186)
@@ -34,12 +34,8 @@
 #include "core/ConfigValueIncludes.h"
 #include "core/GameMode.h"
-#include "objects/worldentities/Model.h"
+
+#include "tools/BillboardSet.h"
 #include "objects/Scene.h"
 #include "objects/infos/PlayerInfo.h"
-#include "objects/gametypes/Gametype.h"
-#include "tools/BillboardSet.h"
-#include "overlays/OverlayText.h"
-#include "overlays/OverlayGroup.h"
-#include "util/Convert.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.h	(revision 3186)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
 #include "objects/worldentities/ControllableEntity.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc	(revision 3186)
@@ -29,8 +29,9 @@
 
 #include "TeamBaseMatchBase.h"
+
 #include "core/CoreIncludes.h"
+#include "interfaces/PawnListener.h"
+#include "interfaces/TeamColourable.h"
 #include "objects/gametypes/TeamBaseMatch.h"
-#include "interfaces/TeamColourable.h"
-#include "interfaces/PawnListener.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h	(revision 3186)
@@ -30,10 +30,10 @@
 #define _TeamBaseMatchBase_H__
 
+#include "OrxonoxPrereqs.h"
+
 #include "Pawn.h"
 
 namespace orxonox
 {
-
-
     namespace BaseState
     {
Index: code/branches/pch/src/orxonox/objects/worldentities/triggers/CheckPoint.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/triggers/CheckPoint.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/triggers/CheckPoint.cc	(revision 3186)
@@ -31,7 +31,6 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "objects/gametypes/Asteroids.h"
-#include "orxonox/objects/worldentities/pawns/Pawn.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/triggers/CheckPoint.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/triggers/CheckPoint.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/triggers/CheckPoint.h	(revision 3186)
@@ -35,6 +35,8 @@
 #define _CheckPoint_H__
 
+#include "OrxonoxPrereqs.h"
+
+#include "interfaces/RadarViewable.h"
 #include "DistanceTrigger.h"
-#include "interfaces/RadarViewable.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc	(revision 3186)
@@ -29,9 +29,6 @@
 #include "DistanceTrigger.h"
 
-#include <OgreNode.h>
-
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "orxonox/objects/worldentities/pawns/Pawn.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h	(revision 3186)
@@ -30,12 +30,9 @@
 #define _DistanceTrigger_H__
 
-#include "PlayerTrigger.h"
+#include "OrxonoxPrereqs.h"
 
 #include <set>
-
 #include "core/ClassTreeMask.h"
-#include "core/BaseObject.h"
-
-#include "orxonox/objects/worldentities/ControllableEntity.h"
+#include "PlayerTrigger.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/triggers/EventTrigger.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/triggers/EventTrigger.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/triggers/EventTrigger.h	(revision 3186)
@@ -30,8 +30,6 @@
 #define _EventTrigger_H__
 
+#include "OrxonoxPrereqs.h"
 #include "Trigger.h"
-
-#include "core/ClassTreeMask.h"
-#include "core/BaseObject.h"
 
 namespace orxonox
Index: code/branches/pch/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc	(revision 3186)
@@ -34,5 +34,4 @@
 
 #include "PlayerTrigger.h"
-
 #include "core/CoreIncludes.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h	(revision 3186)
@@ -37,5 +37,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "Trigger.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.cc	(revision 3186)
@@ -29,10 +29,10 @@
 #include "Trigger.h"
 
-#include <OgreBillboard.h>
 #include <OgreBillboardSet.h>
+
 #include "core/CoreIncludes.h"
 #include "core/ConsoleCommand.h"
+#include "core/GameMode.h"
 #include "core/XMLPort.h"
-#include "core/GameMode.h"
 #include "objects/Scene.h"
 
Index: code/branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.h
===================================================================
--- code/branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.h	(revision 3185)
+++ code/branches/pch/src/orxonox/objects/worldentities/triggers/Trigger.h	(revision 3186)
@@ -30,12 +30,12 @@
 #define _Trigger_H__
 
+#include "OrxonoxPrereqs.h"
+
 #include <set>
 #include <queue>
 
-#include "OrxonoxPrereqs.h"
-
+#include "tools/BillboardSet.h"
 #include "interfaces/Tickable.h"
 #include "objects/worldentities/StaticEntity.h"
-#include "tools/BillboardSet.h"
 
 namespace orxonox
