Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 20, 2009, 9:20:47 AM (16 years ago)
Author:
rgrieder
Message:

Merged pch branch back to trunk.

Location:
code/trunk
Files:
12 deleted
229 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/CMakeLists.txt

    r3099 r3196  
    33  EventDispatcher.cc
    44  EventTarget.cc
    5   GametypeMessageListener.cc
    65  GlobalShader.cc
    76  Level.cc
    87  Radar.cc
    9   RadarListener.cc
    10   RadarViewable.cc
    11   Teamcolourable.cc
    12   Tickable.cc
    138  Scene.cc
    149  Script.cc
  • code/trunk/src/orxonox/objects/EventDispatcher.cc

    r3110 r3196  
    3232#include "core/EventIncludes.h"
    3333#include "core/XMLPort.h"
    34 #include "core/EventIncludes.h"
    3534#include "EventTarget.h"
    3635
  • code/trunk/src/orxonox/objects/EventDispatcher.h

    r2087 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include <list>
    3335#include "core/BaseObject.h"
    3436
  • code/trunk/src/orxonox/objects/EventListener.cc

    r3110 r3196  
    3030
    3131#include "core/CoreIncludes.h"
    32 #include "core/EventIncludes.h"
    3332#include "core/XMLPort.h"
    3433
  • code/trunk/src/orxonox/objects/EventListener.h

    r2087 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include <string>
    3335#include "core/BaseObject.h"
    3436#include "core/XMLNameListener.h"
  • code/trunk/src/orxonox/objects/EventTarget.cc

    r3110 r3196  
    2828
    2929#include "EventTarget.h"
    30 
    3130#include "core/CoreIncludes.h"
    32 #include "core/EventIncludes.h"
    3331
    3432namespace orxonox
  • code/trunk/src/orxonox/objects/EventTarget.h

    r2087 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
    3334#include "core/BaseObject.h"
    3435#include "core/XMLNameListener.h"
  • code/trunk/src/orxonox/objects/GlobalShader.cc

    r3110 r3196  
    2929#include "GlobalShader.h"
    3030
     31#include "util/Exception.h"
    3132#include "core/CoreIncludes.h"
    3233#include "core/XMLPort.h"
    3334#include "objects/Scene.h"
    34 #include "util/Exception.h"
    3535
    3636namespace orxonox
  • code/trunk/src/orxonox/objects/Level.cc

    r3110 r3196  
    2929#include "Level.h"
    3030
     31#include "util/Math.h"
     32#include "core/Core.h"
    3133#include "core/CoreIncludes.h"
     34#include "core/Loader.h"
     35#include "core/Template.h"
     36#include "core/XMLFile.h"
    3237#include "core/XMLPort.h"
    33 #include "core/Loader.h"
    34 #include "core/XMLFile.h"
    35 #include "core/Template.h"
    36 #include "core/Core.h"
    3738
    38 #include "LevelManager.h"
    3939#include "objects/infos/PlayerInfo.h"
    4040#include "objects/gametypes/Gametype.h"
    4141#include "overlays/OverlayGroup.h"
    4242#include "sound/SoundBase.h"
    43 
    44 #include "util/Math.h"
     43#include "LevelManager.h"
    4544
    4645namespace orxonox
  • code/trunk/src/orxonox/objects/Level.h

    r3068 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <list>
     35#include <string>
     36#include "core/BaseObject.h"
    3437#include "network/synchronisable/Synchronisable.h"
    35 #include "core/BaseObject.h"
    3638
    3739namespace orxonox
  • code/trunk/src/orxonox/objects/Radar.cc

    r3110 r3196  
    2828
    2929/**
    30     @file
    31     @brief
     30@file
     31@brief
    3232*/
    3333
    3434#include "Radar.h"
    35 #include <cfloat>
     35
    3636#include <cassert>
    37 #include "core/CoreIncludes.h"
     37
     38//#include "util/Math.h"
    3839#include "core/ConsoleCommand.h"
    39 #include "core/Iterator.h"
    40 #include "RadarListener.h"
     40#include "core/ObjectList.h"
     41#include "interfaces/RadarListener.h"
    4142
    4243namespace orxonox
  • code/trunk/src/orxonox/objects/Radar.h

    r1818 r3196  
    2828
    2929/**
    30     @file
    31     @brief
     30@file
     31@brief
    3232*/
    3333
     
    3939#include <map>
    4040#include <string>
    41 #include "core/Iterator.h"
    42 #include "core/OrxonoxClass.h"
    43 #include "objects/Tickable.h"
    44 #include "RadarViewable.h"
     41
     42#include "core/ObjectListIterator.h"
     43#include "interfaces/RadarViewable.h"
     44#include "interfaces/Tickable.h"
    4545
    4646namespace orxonox
  • code/trunk/src/orxonox/objects/Scene.cc

    r3110 r3196  
    3131
    3232#include <OgreRoot.h>
     33#include <OgreSceneManager.h>
    3334#include <OgreSceneManagerEnumerator.h>
    3435#include <OgreSceneNode.h>
    3536
    36 #include "BulletCollision/BroadphaseCollision/btAxisSweep3.h"
    37 #include "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h"
    38 #include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
    39 #include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
     37#include <BulletCollision/BroadphaseCollision/btAxisSweep3.h>
     38#include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h>
     39#include <BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h>
     40#include <BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h>
    4041
    4142#include "core/CoreIncludes.h"
     
    5859        if (GameMode::showsGraphics())
    5960        {
    60             if (Ogre::Root::getSingletonPtr())
    61             {
    62                 this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
    63                 this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
    64             }
    65             else
    66             {
    67                 this->sceneManager_ = 0;
    68                 this->rootSceneNode_ = 0;
    69             }
     61            assert(Ogre::Root::getSingletonPtr());
     62            this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
     63            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
    7064        }
    7165        else
     
    9488        if (this->isInitialized())
    9589        {
    96             if (Ogre::Root::getSingletonPtr())
    97             {
     90            if (GameMode::showsGraphics())
    9891                Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
    99             }
    100             else if (!GameMode::showsGraphics())
    101             {
     92            else
    10293                delete this->sceneManager_;
    103             }
    10494
    10595            this->setPhysicalWorld(false);
     
    112102
    113103        XMLPortParam(Scene, "skybox", setSkybox, getSkybox, xmlelement, mode);
    114         XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2, 0.2, 0.2, 1));
     104        XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2f, 0.2f, 0.2f, 1.0f));
    115105        XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true);
    116106
     
    139129        {
    140130            CCOUT(2) << "Warning: Setting the negative world range to a very small value: "
    141                      << omni_cast<std::string>(range) << std::endl;
     131                     << multi_cast<std::string>(range) << std::endl;
    142132        }
    143133        if (this->hasPhysics())
     
    158148        {
    159149            CCOUT(2) << "Warning: Setting the positive world range to a very small value: "
    160                      << omni_cast<std::string>(range) << std::endl;
     150                     << multi_cast<std::string>(range) << std::endl;
    161151        }
    162152        if (this->hasPhysics())
     
    176166        this->gravity_ = gravity;
    177167        if (this->hasPhysics())
    178             this->physicalWorld_->setGravity(omni_cast<btVector3>(this->gravity_));
     168            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
    179169    }
    180170
     
    187177            //       It would require further investigation to properly dertermine the right choices.
    188178            this->broadphase_      = new bt32BitAxisSweep3(
    189                 omni_cast<btVector3>(this->negativeWorldRange_), omni_cast<btVector3>(this->positiveWorldRange_));
     179                multi_cast<btVector3>(this->negativeWorldRange_), multi_cast<btVector3>(this->positiveWorldRange_));
    190180            this->collisionConfig_ = new btDefaultCollisionConfiguration();
    191181            this->dispatcher_      = new btCollisionDispatcher(this->collisionConfig_);
     
    193183
    194184            this->physicalWorld_   = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_);
    195             this->physicalWorld_->setGravity(omni_cast<btVector3>(this->gravity_));
     185            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
    196186
    197187            // also set the collision callback variable.
  • code/trunk/src/orxonox/objects/Scene.h

    r2662 r3196  
    3333#include "OrxonoxPrereqs.h"
    3434
     35#include <list>
     36#include <set>
     37#include <string>
     38
     39#include "util/Math.h"
     40#include "util/OgreForwardRefs.h"
     41#include "core/BaseObject.h"
    3542#include "network/synchronisable/Synchronisable.h"
    36 #include "core/BaseObject.h"
    37 #include "util/Math.h"
    38 #include "objects/Tickable.h"
     43#include "interfaces/Tickable.h"
    3944
    4045namespace orxonox
  • code/trunk/src/orxonox/objects/Script.cc

    r3110 r3196  
    2929#include "Script.h"
    3030
    31 #include "util/Debug.h"
     31#include <tinyxml/ticpp.h>
    3232#include "core/CoreIncludes.h"
    33 #include "core/XMLPort.h"
    3433#include "core/LuaBind.h"
    3534
  • code/trunk/src/orxonox/objects/Script.h

    r2087 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <string>
    3435#include "core/BaseObject.h"
    3536
  • code/trunk/src/orxonox/objects/Test.h

    r3084 r3196  
    3333#include "core/BaseObject.h"
    3434#include "network/synchronisable/Synchronisable.h"
    35 #include "Tickable.h"
     35#include "interfaces/Tickable.h"
    3636
    3737
  • code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc

    r3110 r3196  
    2929#include "BoxCollisionShape.h"
    3030
    31 #include "BulletCollision/CollisionShapes/btBoxShape.h"
     31#include <BulletCollision/CollisionShapes/btBoxShape.h>
    3232
    3333#include "core/CoreIncludes.h"
     
    7272    btCollisionShape* BoxCollisionShape::createNewShape() const
    7373    {
    74         return new btBoxShape(omni_cast<btVector3>(this->halfExtents_));
     74        return new btBoxShape(multi_cast<btVector3>(this->halfExtents_));
    7575    }
    7676}
  • code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.h

    r2662 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "util/Math.h"
    3435#include "CollisionShape.h"
    3536
  • code/trunk/src/orxonox/objects/collisionshapes/CollisionShape.cc

    r3110 r3196  
    2929#include "CollisionShape.h"
    3030
    31 #include "BulletCollision/CollisionShapes/btCollisionShape.h"
     31#include <BulletCollision/CollisionShapes/btCollisionShape.h>
    3232
    33 #include "util/Exception.h"
    3433#include "core/CoreIncludes.h"
    3534#include "core/XMLPort.h"
    36 #include "tools/BulletConversions.h"
    37 
    3835#include "objects/worldentities/WorldEntity.h"
    3936#include "CompoundCollisionShape.h"
     
    129126    bool CollisionShape::hasTransform() const
    130127    {
    131         return (!this->position_.positionEquals(Vector3(0, 0, 0), 0.001) ||
    132                 !this->orientation_.equals(Quaternion(1,0,0,0), Degree(0.1)));
     128        return (!this->position_.positionEquals(Vector3(0, 0, 0), 0.001f) ||
     129                !this->orientation_.equals(Quaternion(1,0,0,0), Degree(0.1f)));
    133130    }
    134131
  • code/trunk/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc

    r3110 r3196  
    2929#include "CompoundCollisionShape.h"
    3030
    31 #include "BulletCollision/CollisionShapes/btCompoundShape.h"
     31#include <BulletCollision/CollisionShapes/btCompoundShape.h>
    3232
    33 #include "util/Exception.h"
    3433#include "core/CoreIncludes.h"
    3534#include "core/XMLPort.h"
     
    8988        {
    9089            // Only actually attach if we didn't pick a CompoundCollisionShape with no content
    91             btTransform transf(omni_cast<btQuaternion>(shape->getOrientation()), omni_cast<btVector3>(shape->getPosition()));
     90            btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition()));
    9291            this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
    9392
     
    134133        {
    135134            // Only actually attach if we didn't pick a CompoundCollisionShape with no content
    136             btTransform transf(omni_cast<btQuaternion>(shape->getOrientation()), omni_cast<btVector3>(shape->getPosition()));
     135            btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition()));
    137136            this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
    138137            it->second = shape->getCollisionShape();
  • code/trunk/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h

    r2662 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include <vector>
    3534#include <cassert>
     35#include <map>
    3636#include "CollisionShape.h"
    3737
  • code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.cc

    r3110 r3196  
    2929#include "ConeCollisionShape.h"
    3030
    31 #include "BulletCollision/CollisionShapes/btConeShape.h"
     31#include <BulletCollision/CollisionShapes/btConeShape.h>
    3232
    3333#include "core/CoreIncludes.h"
    3434#include "core/XMLPort.h"
    35 #include "tools/BulletConversions.h"
    3635
    3736namespace orxonox
  • code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.h

    r2662 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "CollisionShape.h"
    3534
  • code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc

    r3110 r3196  
    2929#include "PlaneCollisionShape.h"
    3030
    31 #include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
     31#include <BulletCollision/CollisionShapes/btStaticPlaneShape.h>
    3232
    3333#include "core/CoreIncludes.h"
     
    7272    btCollisionShape* PlaneCollisionShape::createNewShape() const
    7373    {
    74         return new btStaticPlaneShape(omni_cast<btVector3>(this->normal_), this->offset_);
     74        return new btStaticPlaneShape(multi_cast<btVector3>(this->normal_), this->offset_);
    7575    }
    7676}
  • code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h

    r2662 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "util/Math.h"
    3435#include "CollisionShape.h"
    3536
  • code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc

    r3110 r3196  
    2929#include "SphereCollisionShape.h"
    3030
    31 #include "BulletCollision/CollisionShapes/btSphereShape.h"
     31#include <BulletCollision/CollisionShapes/btSphereShape.h>
    3232
    3333#include "core/CoreIncludes.h"
    3434#include "core/XMLPort.h"
    35 #include "tools/BulletConversions.h"
    3635
    3736namespace orxonox
  • code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.h

    r2662 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "CollisionShape.h"
    3534
  • code/trunk/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.cc

    r3110 r3196  
    2929#include "WorldEntityCollisionShape.h"
    3030
    31 #include "BulletCollision/CollisionShapes/btCompoundShape.h"
     31#include <BulletCollision/CollisionShapes/btCompoundShape.h>
    3232
    33 #include "util/Exception.h"
     33#include "util/OrxAssert.h"
    3434#include "core/CoreIncludes.h"
    3535#include "objects/worldentities/WorldEntity.h"
  • code/trunk/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.h

    r2662 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "CompoundCollisionShape.h"
    3534
  • code/trunk/src/orxonox/objects/controllers/AIController.cc

    r3110 r3196  
    2929#include "AIController.h"
    3030
     31#include "util/Math.h"
    3132#include "core/CoreIncludes.h"
    3233#include "core/Executor.h"
     
    107108            this->moveToTargetPosition();
    108109
    109         if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0))
     110        if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f))
    110111            this->getControllableEntity()->fire(0);
    111112
  • code/trunk/src/orxonox/objects/controllers/AIController.h

    r2662 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "tools/Timer.h"
     35#include "interfaces/Tickable.h"
    3436#include "ArtificialController.h"
    35 #include "objects/Tickable.h"
    36 #include "tools/Timer.h"
    3737
    3838namespace orxonox
  • code/trunk/src/orxonox/objects/controllers/ArtificialController.cc

    r3110 r3196  
    3232#include "objects/worldentities/ControllableEntity.h"
    3333#include "objects/worldentities/pawns/Pawn.h"
    34 
     34#include "objects/worldentities/pawns/TeamBaseMatchBase.h"
    3535#include "objects/gametypes/TeamDeathmatch.h"
    3636#include "objects/controllers/WaypointPatrolController.h"
    37 #include "objects/worldentities/pawns/TeamBaseMatchBase.h"
    3837
    3938namespace orxonox
  • code/trunk/src/orxonox/objects/controllers/ArtificialController.h

    r3049 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "util/Math.h"
     35#include "interfaces/PawnListener.h"
    3436#include "Controller.h"
    35 #include "objects/worldentities/pawns/Pawn.h"
    36 #include "util/Math.h"
    3737
    3838namespace orxonox
  • code/trunk/src/orxonox/objects/controllers/Controller.cc

    r3110 r3196  
    2828
    2929#include "Controller.h"
    30 
    3130#include "core/CoreIncludes.h"
    32 #include "overlays/OverlayGroup.h"
    3331
    3432namespace orxonox
  • code/trunk/src/orxonox/objects/controllers/Controller.h

    r2826 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "core/BaseObject.h"
    3534
  • code/trunk/src/orxonox/objects/controllers/HumanController.cc

    r3110 r3196  
    192192            HumanController::localController_s->controllableEntity_->dropItems();
    193193    }
     194
     195    Pawn* HumanController::getLocalControllerEntityAsPawn()
     196    {
     197        if (HumanController::localController_s)
     198            return dynamic_cast<Pawn*>(HumanController::localController_s->getControllableEntity());
     199        else
     200            return NULL;
     201    }
    194202}
  • code/trunk/src/orxonox/objects/controllers/HumanController.h

    r3089 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    34 #include "util/Math.h"
    3533#include "Controller.h"
    36 #include "objects/worldentities/pawns/Pawn.h"
    3734
    3835namespace orxonox
     
    6966            static inline HumanController* getLocalControllerSingleton()
    7067                { return HumanController::localController_s; }
    71             static inline Pawn* getLocalControllerEntityAsPawn()
    72             {
    73                 if (HumanController::localController_s) {
    74                     return dynamic_cast<Pawn*>(HumanController::localController_s->getControllableEntity());
    75                 } else {
    76                     return NULL;
    77                 }
    78             }
    79 
     68            static Pawn* getLocalControllerEntityAsPawn();
    8069            //friend class, for mouselook
    8170            friend class Map;
  • code/trunk/src/orxonox/objects/controllers/PongAI.cc

    r3110 r3196  
    3131#include "core/CoreIncludes.h"
    3232#include "core/ConfigValueIncludes.h"
     33#include "tools/Timer.h"
    3334#include "objects/worldentities/ControllableEntity.h"
    3435#include "objects/worldentities/PongBall.h"
    35 #include "tools/Timer.h"
    3636
    3737namespace orxonox
     
    3939    CreateUnloadableFactory(PongAI);
    4040
    41     const static float MAX_REACTION_TIME = 0.4;
     41    const static float MAX_REACTION_TIME = 0.4f;
    4242
    4343    PongAI::PongAI(BaseObject* creator) : Controller(creator)
     
    4949        this->ballEndPosition_ = 0;
    5050        this->randomOffset_ = 0;
    51         this->relHysteresisOffset_ = 0.02;
    52         this->strength_ = 0.5;
     51        this->relHysteresisOffset_ = 0.02f;
     52        this->strength_ = 0.5f;
    5353        this->movement_ = 0;
    5454        this->oldMove_ = 0;
     
    171171
    172172        // The position shouln't be larger than 0.5 (50% of the bat-length from the middle is the end)
    173         position *= 0.48;
     173        position *= 0.48f;
    174174
    175175        // Both sides are equally probable
     
    190190
    191191        // Calculate bounces
    192         for (float limit = 0.35; limit < this->strength_ || this->strength_ > 0.99; limit += 0.4)
     192        for (float limit = 0.35f; limit < this->strength_ || this->strength_ > 0.99f; limit += 0.4f)
    193193        {
    194194            // Calculate a random prediction error, based on the vertical speed of the ball and the strength of the AI
  • code/trunk/src/orxonox/objects/controllers/PongAI.h

    r2885 r3196  
    3333
    3434#include <list>
    35 
     35#include "util/Math.h"
     36#include "interfaces/Tickable.h"
    3637#include "Controller.h"
    37 #include "objects/Tickable.h"
    38 #include "util/Math.h"
    3938
    4039namespace orxonox
  • code/trunk/src/orxonox/objects/controllers/ScriptController.cc

    r3110 r3196  
    2828
    2929#include "ScriptController.h"
    30 
    3130#include "core/CoreIncludes.h"
    3231
     
    3938        RegisterObject(ScriptController);
    4039    }
    41 
    42     ScriptController::~ScriptController()
    43     {
    44     }
    4540}
  • code/trunk/src/orxonox/objects/controllers/ScriptController.h

    r2662 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "ArtificialController.h"
    3534
     
    4039        public:
    4140            ScriptController(BaseObject* creator);
    42             virtual ~ScriptController();
    43 
    44         protected:
     41            virtual ~ScriptController() { }
    4542
    4643        private:
  • code/trunk/src/orxonox/objects/controllers/WaypointController.cc

    r3110 r3196  
    3131#include "core/CoreIncludes.h"
    3232#include "core/XMLPort.h"
     33#include "objects/worldentities/ControllableEntity.h"
    3334
    3435namespace orxonox
  • code/trunk/src/orxonox/objects/controllers/WaypointController.h

    r3078 r3196  
    3333
    3434#include <vector>
    35 
     35#include "interfaces/Tickable.h"
    3636#include "ArtificialController.h"
    37 #include "objects/Tickable.h"
    3837
    3938namespace orxonox
  • code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.cc

    r3110 r3196  
    2929#include "WaypointPatrolController.h"
    3030
     31#include "util/Math.h"
    3132#include "core/CoreIncludes.h"
    3233#include "core/XMLPort.h"
     34#include "objects/worldentities/pawns/Pawn.h"
    3335
    3436namespace orxonox
  • code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.h

    r3078 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "tools/Timer.h"
    3435#include "WaypointController.h"
    35 #include "tools/Timer.h"
    3636
    3737namespace orxonox
  • code/trunk/src/orxonox/objects/gametypes/Asteroids.cc

    r3110 r3196  
    3030
    3131#include "core/CoreIncludes.h"
    32 #include "objects/infos/PlayerInfo.h"
     32#include "network/Host.h"
    3333#include "objects/worldentities/pawns/Pawn.h"
    34 
    35 #include "network/Host.h"
    3634
    3735namespace orxonox
  • code/trunk/src/orxonox/objects/gametypes/Asteroids.h

    r3064 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "Gametype.h"
    3534
  • code/trunk/src/orxonox/objects/gametypes/Deathmatch.cc

    r3110 r3196  
    3030
    3131#include "core/CoreIncludes.h"
     32#include "network/Host.h"
    3233#include "objects/infos/PlayerInfo.h"
    3334#include "objects/worldentities/pawns/Pawn.h"
    34 
    35 #include "network/Host.h"
    3635
    3736namespace orxonox
  • code/trunk/src/orxonox/objects/gametypes/Deathmatch.h

    r2826 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "Gametype.h"
    3534
  • code/trunk/src/orxonox/objects/gametypes/Gametype.cc

    r3110 r3196  
    2929#include "Gametype.h"
    3030
    31 #include <cstdlib>
    32 #include <ctime>
    33 
     31#include "util/Math.h"
    3432#include "core/CoreIncludes.h"
    3533#include "core/ConfigValueIncludes.h"
    36 #include "core/Template.h"
    3734#include "core/GameMode.h"
    38 #include "overlays/OverlayGroup.h"
     35
    3936#include "objects/infos/PlayerInfo.h"
    4037#include "objects/infos/Bot.h"
     38#include "objects/worldentities/Camera.h"
     39#include "objects/worldentities/ControllableEntity.h"
     40#include "objects/worldentities/SpawnPoint.h"
    4141#include "objects/worldentities/pawns/Spectator.h"
    42 #include "objects/worldentities/SpawnPoint.h"
    43 #include "objects/worldentities/Camera.h"
     42#include "objects/worldentities/pawns/Pawn.h"
     43#include "overlays/OverlayGroup.h"
    4444
    4545namespace orxonox
     
    287287        if (this->spawnpoints_.size() > 0)
    288288        {
    289             unsigned int randomspawn = (unsigned int)rnd(this->spawnpoints_.size());
     289            unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(this->spawnpoints_.size())));
    290290            unsigned int index = 0;
    291291            for (std::set<SpawnPoint*>::const_iterator it = this->spawnpoints_.begin(); it != this->spawnpoints_.end(); ++it)
  • code/trunk/src/orxonox/objects/gametypes/Gametype.h

    r3033 r3196  
    3333
    3434#include <map>
     35#include <set>
     36#include <string>
    3537
    3638#include "core/BaseObject.h"
    3739#include "core/Identifier.h"
    38 #include "objects/worldentities/ControllableEntity.h"
    39 #include "objects/Tickable.h"
     40#include "interfaces/Tickable.h"
    4041#include "objects/infos/GametypeInfo.h"
    4142
  • code/trunk/src/orxonox/objects/gametypes/Pong.cc

    r3110 r3196  
    3030
    3131#include "core/CoreIncludes.h"
    32 #include "core/ConfigValueIncludes.h"
    3332#include "core/Executor.h"
    34 #include "objects/worldentities/Model.h"
    3533#include "objects/worldentities/PongCenterpoint.h"
    3634#include "objects/worldentities/PongBall.h"
    3735#include "objects/worldentities/PongBat.h"
    38 #include "objects/infos/HumanPlayer.h"
    3936#include "objects/infos/PongBot.h"
    4037#include "objects/controllers/PongAI.h"
  • code/trunk/src/orxonox/objects/gametypes/Pong.h

    r2890 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "tools/Timer.h"
    3435#include "Deathmatch.h"
    35 #include "tools/Timer.h"
    3636
    3737namespace orxonox
  • code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.cc

    r3104 r3196  
    2929#include "TeamBaseMatch.h"
    3030
     31#include "core/CoreIncludes.h"
     32#include "core/Executor.h"
    3133#include "objects/worldentities/pawns/TeamBaseMatchBase.h"
    32 #include "core/CoreIncludes.h"
    3334#include "objects/infos/PlayerInfo.h"
    3435
  • code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.h

    r3104 r3196  
    3333
    3434#include <set>
     35#include "tools/Timer.h"
    3536#include "TeamDeathmatch.h"
    36 #include "tools/Timer.h"
    3737
    3838namespace orxonox
  • code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.cc

    r3110 r3196  
    3131#include "core/CoreIncludes.h"
    3232#include "core/ConfigValueIncludes.h"
    33 #include "objects/Teamcolourable.h"
     33#include "interfaces/TeamColourable.h"
    3434#include "objects/worldentities/TeamSpawnPoint.h"
     35#include "objects/worldentities/pawns/Pawn.h"
    3536
    3637namespace orxonox
     
    5354        static ColourValue colours[] =
    5455        {
    55             ColourValue(1.0, 0.3, 0.3),
    56             ColourValue(0.3, 0.3, 1.0),
    57             ColourValue(0.3, 1.0, 0.3),
    58             ColourValue(1.0, 1.0, 0.0)
     56            ColourValue(1.0f, 0.3f, 0.3f),
     57            ColourValue(0.3f, 0.3f, 1.0f),
     58            ColourValue(0.3f, 1.0f, 0.3f),
     59            ColourValue(1.0f, 1.0f, 0.0f)
    5960        };
    6061        static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue));
     
    138139        if (teamSpawnPoints.size() > 0)
    139140        {
    140             unsigned int randomspawn = (unsigned int)rnd(teamSpawnPoints.size());
     141            unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
    141142            unsigned int index = 0;
    142143            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
     
    168169                for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it)
    169170                {
    170                     if ((*it)->isA(Class(Teamcolourable)))
     171                    if ((*it)->isA(Class(TeamColourable)))
    171172                    {
    172                         Teamcolourable* tc = dynamic_cast<Teamcolourable*>(*it);
     173                        TeamColourable* tc = dynamic_cast<TeamColourable*>(*it);
    173174                        tc->setTeamColour(this->teamcolours_[it_player->second]);
    174175                    }
  • code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.h

    r3068 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <map>
    3435#include <vector>
    35 
    3636#include "Deathmatch.h"
    3737
  • code/trunk/src/orxonox/objects/gametypes/UnderAttack.cc

    r3110 r3196  
    2929#include "UnderAttack.h"
    3030
     31#include "util/Convert.h"
    3132#include "core/CoreIncludes.h"
    3233#include "core/ConfigValueIncludes.h"
    33 #include "util/Convert.h"
    3434#include "network/Host.h"
    35 
    3635#include "objects/worldentities/pawns/Destroyer.h"
    3736#include "objects/infos/PlayerInfo.h"
  • code/trunk/src/orxonox/objects/gametypes/UnderAttack.h

    r3033 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "interfaces/PawnListener.h"
    3435#include "TeamDeathmatch.h"
    35 #include "objects/worldentities/pawns/Pawn.h"
    3636
    3737namespace orxonox
  • code/trunk/src/orxonox/objects/infos/Bot.cc

    r3110 r3196  
    2929#include "Bot.h"
    3030
     31#include "util/Math.h"
    3132#include "core/GameMode.h"
    3233#include "core/CoreIncludes.h"
     
    3435#include "objects/gametypes/Gametype.h"
    3536#include "objects/controllers/AIController.h"
    36 #include "util/Math.h"
    3737
    3838namespace orxonox
     
    6666    void Bot::setConfigValues()
    6767    {
    68         static std::string names[] =
     68        static const std::string names[] =
    6969        {
    7070            "Dr. Julius No",
  • code/trunk/src/orxonox/objects/infos/Bot.h

    r2662 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
    3334#include <vector>
    34 
    3535#include "PlayerInfo.h"
    3636
  • code/trunk/src/orxonox/objects/infos/GametypeInfo.cc

    r3110 r3196  
    3333#include "network/NetworkFunction.h"
    3434#include "network/Host.h"
    35 #include "objects/GametypeMessageListener.h"
     35#include "interfaces/GametypeMessageListener.h"
    3636
    3737namespace orxonox
     
    6868    }
    6969
    70     void GametypeInfo::sendAnnounceMessage(const std::string& message) const
     70    void GametypeInfo::sendAnnounceMessage(const std::string& message)
    7171    {
    7272        if (GameMode::isMaster())
     
    7777    }
    7878
    79     void GametypeInfo::sendAnnounceMessage(const std::string& message, unsigned int clientID) const
     79    void GametypeInfo::sendAnnounceMessage(const std::string& message, unsigned int clientID)
    8080    {
    8181        if (GameMode::isMaster())
     
    8888    }
    8989
    90     void GametypeInfo::sendKillMessage(const std::string& message, unsigned int clientID) const
     90    void GametypeInfo::sendKillMessage(const std::string& message, unsigned int clientID)
    9191    {
    9292        if (GameMode::isMaster())
     
    9999    }
    100100
    101     void GametypeInfo::sendDeathMessage(const std::string& message, unsigned int clientID) const
     101    void GametypeInfo::sendDeathMessage(const std::string& message, unsigned int clientID)
    102102    {
    103103        if (GameMode::isMaster())
     
    110110    }
    111111
    112     void GametypeInfo::dispatchAnnounceMessage(const std::string& message) const
     112    void GametypeInfo::dispatchAnnounceMessage(const std::string& message)
    113113    {
    114114        for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
     
    116116    }
    117117
    118     void GametypeInfo::dispatchKillMessage(const std::string& message) const
     118    void GametypeInfo::dispatchKillMessage(const std::string& message)
    119119    {
    120120        for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
     
    122122    }
    123123
    124     void GametypeInfo::dispatchDeathMessage(const std::string& message) const
     124    void GametypeInfo::dispatchDeathMessage(const std::string& message)
    125125    {
    126126        for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
  • code/trunk/src/orxonox/objects/infos/GametypeInfo.h

    r3099 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <string>
    3435#include "Info.h"
    3536
     
    5960                { return this->hudtemplate_; }
    6061
    61             void sendAnnounceMessage(const std::string& message) const;
    62             void sendAnnounceMessage(const std::string& message, unsigned int clientID) const;
    63             void sendKillMessage(const std::string& message, unsigned int clientID) const;
    64             void sendDeathMessage(const std::string& message, unsigned int clientID) const;
     62            void sendAnnounceMessage(const std::string& message);
     63            void sendAnnounceMessage(const std::string& message, unsigned int clientID);
     64            void sendKillMessage(const std::string& message, unsigned int clientID);
     65            void sendDeathMessage(const std::string& message, unsigned int clientID);
    6566
    66             void dispatchAnnounceMessage(const std::string& message) const;
    67             void dispatchKillMessage(const std::string& message) const;
    68             void dispatchDeathMessage(const std::string& message) const;
     67            void dispatchAnnounceMessage(const std::string& message);
     68            void dispatchKillMessage(const std::string& message);
     69            void dispatchDeathMessage(const std::string& message);
    6970
    7071        private:
  • code/trunk/src/orxonox/objects/infos/HumanPlayer.cc

    r3110 r3196  
    2929#include "HumanPlayer.h"
    3030
    31 #include "core/GameMode.h"
    3231#include "core/CoreIncludes.h"
    3332#include "core/ConfigValueIncludes.h"
     33#include "core/GameMode.h"
    3434#include "network/ClientInformation.h"
    3535#include "network/Host.h"
     
    143143    float HumanPlayer::getPing() const
    144144    {
    145         return ClientInformation::findClient(this->getClientID())->getRTT();
     145        return static_cast<float>(ClientInformation::findClient(this->getClientID())->getRTT());
    146146    }
    147147
    148148    float HumanPlayer::getPacketLossRatio() const
    149149    {
    150         return ClientInformation::findClient(this->getClientID())->getPacketLoss();
     150        return static_cast<float>(ClientInformation::findClient(this->getClientID())->getPacketLoss());
    151151    }
    152152
  • code/trunk/src/orxonox/objects/infos/HumanPlayer.h

    r2973 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <string>
    3435#include "PlayerInfo.h"
    3536
  • code/trunk/src/orxonox/objects/infos/Info.cc

    r3110 r3196  
    2828
    2929#include "Info.h"
    30 
    3130#include "core/CoreIncludes.h"
    3231
  • code/trunk/src/orxonox/objects/infos/PlayerInfo.cc

    r3110 r3196  
    3434#include "network/ClientInformation.h"
    3535#include "objects/gametypes/Gametype.h"
     36#include "objects/worldentities/ControllableEntity.h"
    3637
    3738namespace orxonox
  • code/trunk/src/orxonox/objects/infos/PongBot.h

    r2839 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "Bot.h"
    3534
  • code/trunk/src/orxonox/objects/items/Engine.cc

    r3110 r3196  
    2929#include "Engine.h"
    3030
     31#include "util/Math.h"
    3132#include "core/CoreIncludes.h"
    3233#include "core/ConfigValueIncludes.h"
     
    3435#include "objects/Scene.h"
    3536#include "objects/worldentities/pawns/SpaceShip.h"
     37#include "objects/pickup/ModifierType.h"
    3638#include "tools/Shader.h"
    3739#include "sound/SoundBase.h"
  • code/trunk/src/orxonox/objects/items/Engine.h

    r3060 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "interfaces/Tickable.h"
    3435#include "Item.h"
    35 #include "objects/Tickable.h"
    36 #include "util/Math.h"
    3736
    3837namespace orxonox
  • code/trunk/src/orxonox/objects/items/Item.cc

    r3110 r3196  
    2828
    2929#include "Item.h"
    30 
    3130#include "core/CoreIncludes.h"
    3231
     
    3736        RegisterObject(Item);
    3837    }
    39 
    40     Item::~Item()
    41     {
    42     }
    4338}
  • code/trunk/src/orxonox/objects/items/Item.h

    r2662 r3196  
    4141        public:
    4242            Item(BaseObject* creator);
    43             virtual ~Item();
     43            virtual ~Item() {}
    4444    };
    4545}
  • code/trunk/src/orxonox/objects/items/MultiStateEngine.cc

    r3110 r3196  
    2929#include "MultiStateEngine.h"
    3030
     31#include "core/CoreIncludes.h"
    3132#include "core/GameMode.h"
    32 #include "core/CoreIncludes.h"
    3333#include "core/XMLPort.h"
    3434#include "objects/worldentities/pawns/SpaceShip.h"
  • code/trunk/src/orxonox/objects/items/MultiStateEngine.h

    r2662 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <list>
    3435#include "Engine.h"
    3536
  • code/trunk/src/orxonox/objects/pickup/BaseItem.cc

    r3073 r3196  
    3434#include "BaseItem.h"
    3535
    36 #include "PickupCollection.h"
    37 
    3836#include "core/CoreIncludes.h"
    3937#include "core/XMLPort.h"
     
    5553        this->setGUIText("");
    5654    }
    57     //! Deconstructor.
     55    //! Destructor.
    5856    BaseItem::~BaseItem()
    5957    {
     
    105103    }
    106104
    107     const std::string& BaseItem::getGUIText() const { return this->guiText_; }
     105    const std::string& BaseItem::getGUIText() const
     106    {
     107        return this->guiText_;
     108    }
    108109}
  • code/trunk/src/orxonox/objects/pickup/BaseItem.h

    r3073 r3196  
    3737#include "OrxonoxPrereqs.h"
    3838
     39#include <string>
    3940#include "core/BaseObject.h"
    4041
  • code/trunk/src/orxonox/objects/pickup/DroppedItem.cc

    r3079 r3196  
    2929#include "DroppedItem.h"
    3030
     31#include "util/Math.h"
     32#include "core/CoreIncludes.h"
     33#include "core/Executor.h"
    3134#include "BaseItem.h"
     35#include "objects/worldentities/Billboard.h"
     36#include "objects/worldentities/Model.h"
    3237#include "objects/worldentities/pawns/Pawn.h"
    33 #include "objects/worldentities/Model.h"
    34 #include "objects/worldentities/Billboard.h"
    35 
    36 #include "core/CoreIncludes.h"
    3738
    3839namespace orxonox
  • code/trunk/src/orxonox/objects/pickup/DroppedItem.h

    r3079 r3196  
    2929/**
    3030    @file
    31     @brief Definition of BaseItem (base-class for items/pickups).
     31    @brief Definition of DroppedItem
    3232*/
    3333
     
    3737#include "OrxonoxPrereqs.h"
    3838
    39 #include "objects/Tickable.h"
     39#include "tools/Timer.h"
     40#include "interfaces/Tickable.h"
    4041#include "objects/worldentities/StaticEntity.h"
    41 #include "tools/Timer.h"
    4242
    4343namespace orxonox
  • code/trunk/src/orxonox/objects/pickup/EquipmentItem.cc

    r3073 r3196  
    3333
    3434#include "EquipmentItem.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736
     
    4645        RegisterObject(EquipmentItem);
    4746    }
    48     //! Deconstructor.
    49     EquipmentItem::~EquipmentItem()
    50     {
    51     }
    5247}
  • code/trunk/src/orxonox/objects/pickup/EquipmentItem.h

    r3073 r3196  
    3838
    3939#include "BaseItem.h"
    40 
    4140namespace orxonox
    4241{
     
    4948    public:
    5049        EquipmentItem(BaseObject* creator);
    51         virtual ~EquipmentItem();
     50        virtual ~EquipmentItem() {}
    5251    };
    5352}
  • code/trunk/src/orxonox/objects/pickup/ModifierPickup.cc

    r3079 r3196  
    3333
    3434#include "ModifierPickup.h"
    35 #include "PickupCollection.h"
    3635
    3736#include "core/CoreIncludes.h"
    3837#include "core/XMLPort.h"
    39 
    4038#include "objects/worldentities/pawns/Pawn.h"
    4139
  • code/trunk/src/orxonox/objects/pickup/ModifierPickup.h

    r3073 r3196  
    3535#define _ModifierPickup_H__
    3636
    37 #include <climits>
    38 
    3937#include "OrxonoxPrereqs.h"
    4038
     39#include <climits>
     40#include <map>
     41
     42#include "orxonox/tools/Timer.h"
     43#include "ModifierType.h"
    4144#include "PassiveItem.h"
    42 #include "ModifierType.h"
    43 #include "orxonox/tools/Timer.h"
    4445
    4546namespace orxonox
  • code/trunk/src/orxonox/objects/pickup/ModifierType.h

    r3073 r3196  
    3535#define _ModifierType_H__
    3636
     37#include "OrxonoxPrereqs.h"
     38
    3739namespace orxonox
    3840{
  • code/trunk/src/orxonox/objects/pickup/PassiveItem.cc

    r3073 r3196  
    2828
    2929#include "PassiveItem.h"
    30 
    3130#include "core/CoreIncludes.h"
    3231
     
    4140        RegisterObject(PassiveItem);
    4241    }
    43     //! Deconstructor.
    44     PassiveItem::~PassiveItem()
    45     {
    46     }
    4742}
  • code/trunk/src/orxonox/objects/pickup/PassiveItem.h

    r3073 r3196  
    3636
    3737#include "OrxonoxPrereqs.h"
    38 
    3938#include "BaseItem.h"
    4039
     
    4948    public:
    5049        PassiveItem(BaseObject* creator);
    51         virtual ~PassiveItem();
     50        virtual ~PassiveItem() {}
    5251    };
    5352}
  • code/trunk/src/orxonox/objects/pickup/PickupCollection.cc

    r3079 r3196  
    3434#include "PickupCollection.h"
    3535
    36 #include "BaseItem.h"
     36#include "core/CoreIncludes.h"
    3737#include "EquipmentItem.h"
    3838#include "PassiveItem.h"
    3939#include "UsableItem.h"
    40 
    41 #include "core/CoreIncludes.h"
    4240
    4341namespace orxonox
  • code/trunk/src/orxonox/objects/pickup/PickupCollection.h

    r3079 r3196  
    3737#include "OrxonoxPrereqs.h"
    3838
     39#include <deque>
    3940#include <map>
    40 #include <deque>
    4141#include <string>
    4242
    4343#include "util/Math.h"
    44 
    4544#include "ModifierType.h"
    4645
  • code/trunk/src/orxonox/objects/pickup/PickupInventory.cc

    r3085 r3196  
    2828
    2929#include "PickupInventory.h"
    30 
    31 #include "EquipmentItem.h"
    32 #include "PassiveItem.h"
    33 #include "UsableItem.h"
    34 
    35 #include "core/ConsoleCommand.h"
    36 #include "core/input/InputManager.h"
    37 
    38 #include "gui/GUIManager.h"
    39 #include "objects/controllers/HumanController.h"
    40 #include "objects/worldentities/pawns/Pawn.h"
    4130
    4231#include <CEGUIImage.h>
     
    4736#include <elements/CEGUITabControl.h>
    4837
     38#include "core/ConsoleCommand.h"
     39#include "core/input/InputManager.h"
     40#include "gui/GUIManager.h"
     41#include "objects/controllers/HumanController.h"
     42#include "objects/worldentities/pawns/Pawn.h"
     43
     44#include "EquipmentItem.h"
     45#include "PassiveItem.h"
     46#include "UsableItem.h"
     47
     48
    4949namespace orxonox
    5050{
     
    8686    {
    8787        if(PickupInventory::getSingleton()->isVisible()) {
    88             GUIManager::getInstancePtr()->executeCode("hideGUI(\"PickupInventory\")");
    89             GUIManager::getInstancePtr()->executeCode("hideCursor()");
     88            GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")");
     89            GUIManager::getInstance().executeCode("hideCursor()");
    9090            InputManager::getInstance().requestLeaveState("guiMouseOnly");
    9191        }
    9292        else
    9393        {
    94             GUIManager::getInstancePtr()->showGUI("PickupInventory");
    95             GUIManager::getInstancePtr()->executeCode("showCursor()");
     94            GUIManager::getInstance().showGUI("PickupInventory");
     95            GUIManager::getInstance().executeCode("showCursor()");
    9696            InputManager::getInstance().requestEnterState("guiMouseOnly");
    9797        }
  • code/trunk/src/orxonox/objects/pickup/PickupInventory.h

    r3079 r3196  
    3737#include "OrxonoxPrereqs.h"
    3838
     39#include <CEGUIForwardRefs.h>
    3940#include "core/BaseObject.h"
    40 
    41 namespace CEGUI { class Window; class WindowManager; class Image; }
    4241
    4342// tolua_begin
  • code/trunk/src/orxonox/objects/pickup/PickupSpawner.cc

    r3079 r3196  
    3333
    3434#include "PickupSpawner.h"
     35
    3536#include "BaseItem.h"
    36 #include "PickupInventory.h"    // HACK; Only for hack, remove later
    37 #include "gui/GUIManager.h"     // HACK; see above
    3837
    3938#include "core/CoreIncludes.h"
     39#include "core/Template.h"
    4040#include "core/XMLPort.h"
    41 #include "core/Template.h"
     41#include "gui/GUIManager.h"     // HACK; see below
     42#include "objects/worldentities/pawns/Pawn.h"
     43#include "PickupInventory.h"    // HACK; Only for hack, remove later
    4244
    43 #include "objects/worldentities/pawns/Pawn.h"
    4445
    4546namespace orxonox
     
    9596        //  & load the GUI itself too, along with some empty windows
    9697        //   = even less delays
    97         GUIManager::getInstancePtr()->showGUI("PickupInventory");
    98         GUIManager::getInstancePtr()->executeCode("hideGUI(\"PickupInventory\")");
     98        GUIManager::getInstance().showGUI("PickupInventory");
     99        GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")");
    99100        PickupInventory::getSingleton();
    100101    }
  • code/trunk/src/orxonox/objects/pickup/PickupSpawner.h

    r3079 r3196  
    3737#include "OrxonoxPrereqs.h"
    3838
    39 #include "objects/Tickable.h"
     39#include <string>
     40#include "tools/Timer.h"
     41#include "interfaces/Tickable.h"
    4042#include "objects/worldentities/StaticEntity.h"
    41 #include "tools/Timer.h"
    4243
    4344namespace orxonox
  • code/trunk/src/orxonox/objects/pickup/UsableItem.cc

    r3073 r3196  
    3333
    3434#include "UsableItem.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736
     
    4645        RegisterObject(UsableItem);
    4746    }
    48     //! Deconstructor.
    49     UsableItem::~UsableItem()
    50     {
    51     }
    5247}
  • code/trunk/src/orxonox/objects/pickup/UsableItem.h

    r3073 r3196  
    3636
    3737#include "OrxonoxPrereqs.h"
    38 
    3938#include "BaseItem.h"
    4039
     
    4948    public:
    5049        UsableItem(BaseObject* creator);
    51         virtual ~UsableItem();
     50        virtual ~UsableItem() { }
    5251
    5352        /**
  • code/trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc

    r3079 r3196  
    3434#include "HealthImmediate.h"
    3535
    36 #include "objects/worldentities/pawns/Pawn.h"
    37 
    3836#include "core/CoreIncludes.h"
    3937#include "core/XMLPort.h"
     38#include "objects/worldentities/pawns/Pawn.h"
    4039
    4140namespace orxonox
  • code/trunk/src/orxonox/objects/pickup/items/HealthImmediate.h

    r3079 r3196  
    3636
    3737#include "OrxonoxPrereqs.h"
    38 
    3938#include "objects/pickup/PassiveItem.h"
    4039
  • code/trunk/src/orxonox/objects/pickup/items/HealthUsable.cc

    r3079 r3196  
    3333
    3434#include "HealthUsable.h"
    35 #include "objects/pickup/DroppedItem.h"
    3635
    37 #include "objects/worldentities/pawns/Pawn.h"
    38 
     36#include "util/Math.h"
    3937#include "core/CoreIncludes.h"
    4038#include "core/XMLPort.h"
     39#include "objects/pickup/DroppedItem.h"
     40#include "objects/worldentities/pawns/Pawn.h"
    4141
    4242namespace orxonox
  • code/trunk/src/orxonox/objects/pickup/items/HealthUsable.h

    r3081 r3196  
    3535#define _HealthUsable_H__
    3636
    37 #include <climits>
    38 
    3937#include "OrxonoxPrereqs.h"
    4038
     39#include <climits>
    4140#include "objects/pickup/UsableItem.h"
    42 #include "util/Math.h"
    4341
    4442namespace orxonox
  • code/trunk/src/orxonox/objects/pickup/items/Jump.cc

    r3079 r3196  
    3333
    3434#include "Jump.h"
    35 #include "objects/pickup/DroppedItem.h"
    36 
    37 #include "objects/worldentities/pawns/Pawn.h"
    3835
    3936#include "core/CoreIncludes.h"
    4037#include "core/XMLPort.h"
     38#include "objects/pickup/DroppedItem.h"
     39#include "objects/worldentities/pawns/Pawn.h"
    4140
    4241namespace orxonox
  • code/trunk/src/orxonox/objects/pickup/items/Jump.h

    r3079 r3196  
    3939#include "OrxonoxPrereqs.h"
    4040
     41#include <climits>
     42#include "util/Math.h"
    4143#include "objects/pickup/UsableItem.h"
    42 #include "util/Math.h"
    4344
    4445namespace orxonox
  • code/trunk/src/orxonox/objects/quest/AddQuest.cc

    r3110 r3196  
    2828
    2929/**
    30     @file AddQuest.cc
     30    @file
    3131    @brief Implementation of the AddQuest class.
    3232*/
     
    3434#include "AddQuest.h"
    3535
    36 #include <string>
    37 
     36#include "util/Exception.h"
    3837#include "core/CoreIncludes.h"
    39 #include "util/Exception.h"
    40 
    41 #include "orxonox/objects/infos/PlayerInfo.h"
    4238#include "QuestManager.h"
    43 #include "QuestDescription.h"
    4439#include "Quest.h"
    4540
  • code/trunk/src/orxonox/objects/quest/AddQuest.h

    r3068 r3196  
    2828
    2929/**
    30     @file AddQuest.h
     30    @file
    3131    @brief Definition of the AddQuest class.
    3232*/
     
    3636
    3737#include "OrxonoxPrereqs.h"
    38 
    39 #include <string>
    40 
    41 #include "core/XMLPort.h"
    4238#include "ChangeQuestStatus.h"
    4339
  • code/trunk/src/orxonox/objects/quest/AddQuestHint.cc

    r3110 r3196  
    2828
    2929/**
    30     @file AddQuestHint.cc
     30    @file
    3131    @brief Implementation of the AddQuestHint class.
    3232*/
     
    3434#include "AddQuestHint.h"
    3535
     36#include "util/Exception.h"
    3637#include "core/CoreIncludes.h"
    37 #include "util/Exception.h"
    38 
    39 #include "orxonox/objects/infos/PlayerInfo.h"
     38#include "core/XMLPort.h"
    4039#include "QuestManager.h"
    4140#include "QuestItem.h"
  • code/trunk/src/orxonox/objects/quest/AddQuestHint.h

    r3068 r3196  
    2828
    2929/**
    30     @file AddQuestHint.h
     30    @file
    3131    @brief Definition of the AddQuestHint class.
    3232*/
     
    3838
    3939#include <string>
    40 
    4140#include "QuestEffect.h"
    4241
  • code/trunk/src/orxonox/objects/quest/AddReward.cc

    r3110 r3196  
    2828
    2929/**
    30     @file AddReward.cc
     30    @file
    3131    @brief Implementation of the AddReward class.
    3232*/
     
    3535
    3636#include "core/CoreIncludes.h"
    37 
    38 #include "orxonox/objects/infos/PlayerInfo.h"
    39 #include "Rewardable.h"
     37#include "core/XMLPort.h"
     38#include "interfaces/Rewardable.h"
    4039
    4140namespace orxonox
  • code/trunk/src/orxonox/objects/quest/AddReward.h

    r3068 r3196  
    2828
    2929/**
    30     @file AddReward.h
     30    @file
    3131    @brief Definition of the AddReward class.
    3232*/
     
    3838
    3939#include <list>
    40 
    41 #include "core/XMLPort.h"
    4240#include "QuestEffect.h"
    4341
  • code/trunk/src/orxonox/objects/quest/CMakeLists.txt

    r2911 r3196  
    1717  QuestManager.cc
    1818  QuestNotification.cc
    19   Rewardable.cc
    2019)
  • code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.cc

    r3110 r3196  
    2828
    2929/**
    30     @file ChangeQuestStatus.cc
     30    @file
    3131    @brief Implementation of the ChangeQuestStatus class.
    3232*/
     
    3535
    3636#include "core/CoreIncludes.h"
    37 
     37#include "core/XMLPort.h"
    3838#include "QuestItem.h"
    3939
  • code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.h

    r3068 r3196  
    2828
    2929/**
    30     @file ChangeQuestStatus.h
     30    @file
    3131    @brief Definition of the ChangeQuestStatus class.
    3232*/
     
    3838
    3939#include <string>
    40 
    41 #include "core/XMLPort.h"
    4240#include "QuestEffect.h"
    4341
  • code/trunk/src/orxonox/objects/quest/CompleteQuest.cc

    r3110 r3196  
    2828 
    2929/**
    30     @file CompleteQuest.cc
     30    @file
    3131    @brief Implementation of the CompleteQuest class.
    3232*/
     
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "util/Exception.h"
    38 
    39 #include "orxonox/objects/infos/PlayerInfo.h"
     37#include "core/XMLPort.h"
    4038#include "QuestManager.h"
    4139#include "Quest.h"
  • code/trunk/src/orxonox/objects/quest/CompleteQuest.h

    r3068 r3196  
    2828
    2929/**
    30     @file CompleteQuest.h
     30    @file
    3131    @brief Definition of the CompleteQuest class.
    3232*/
     
    3636
    3737#include "OrxonoxPrereqs.h"
    38 
    39 #include <string>
    40 
    41 #include "core/XMLPort.h"
    4238#include "ChangeQuestStatus.h"
    4339
  • code/trunk/src/orxonox/objects/quest/FailQuest.cc

    r3110 r3196  
    2828 
    2929/**
    30     @file FailQuest.cc
     30    @file
    3131    @brief Implementation of the FailQuest class.
    3232*/
     
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "util/Exception.h"
    38 
    39 #include "orxonox/objects/infos/PlayerInfo.h"
     37#include "core/XMLPort.h"
    4038#include "QuestManager.h"
    4139#include "Quest.h"
  • code/trunk/src/orxonox/objects/quest/FailQuest.h

    r3068 r3196  
    2828
    2929/**
    30     @file FailQuest.h
     30    @file
    3131    @brief Definition of the FailQuest class.
    3232*/
     
    3636
    3737#include "OrxonoxPrereqs.h"
    38 
    39 #include <string>
    40 
    41 #include "core/XMLPort.h"
    4238#include "ChangeQuestStatus.h"
    4339
  • code/trunk/src/orxonox/objects/quest/GlobalQuest.cc

    r3110 r3196  
    2828 
    2929/**
    30     @file GlobalQuest.cc
     30    @file
    3131    @brief Implementation of the GlobalQuest class.
    3232*/
     
    3434#include "GlobalQuest.h"
    3535
    36 #include "orxonox/objects/infos/PlayerInfo.h"
    3736#include "core/CoreIncludes.h"
    38 #include "core/Super.h"
    39 #include "util/Exception.h"
    40 
     37#include "core/XMLPort.h"
    4138#include "QuestEffect.h"
    4239
  • code/trunk/src/orxonox/objects/quest/GlobalQuest.h

    r3068 r3196  
    2828 
    2929/**
    30     @file GlobalQuest.h
     30    @file
    3131    @brief Definition of the GlobalQuest class.
    3232*/
     
    3737#include "OrxonoxPrereqs.h"
    3838
     39#include <list>
    3940#include <set>
    40 #include <list>
    41 
    42 #include "core/XMLPort.h"
    4341#include "Quest.h"
    4442
  • code/trunk/src/orxonox/objects/quest/LocalQuest.cc

    r3110 r3196  
    2828
    2929/**
    30     @file LocalQuest.cc
     30    @file
    3131    @brief Implementation of the LocalQuest class.
    3232*/
     
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "core/Super.h"
    38 #include "util/Exception.h"
    39 
    40 #include "orxonox/objects/infos/PlayerInfo.h"
     37#include "core/XMLPort.h"
    4138#include "QuestEffect.h"
    4239
  • code/trunk/src/orxonox/objects/quest/LocalQuest.h

    r3068 r3196  
    2828 
    2929/**
    30     @file LocalQuest.h
     30    @file
    3131    @brief Definition of the LocalQuest class.
    3232*/
     
    3838
    3939#include <map>
    40 #include <string>
    41 
    42 #include "core/XMLPort.h"
    4340#include "Quest.h"
    4441
  • code/trunk/src/orxonox/objects/quest/Quest.cc

    r3110 r3196  
    2828 
    2929/**
    30     @file Quest.cc
     30    @file
    3131    @brief Implementation of the Quest class.
    3232*/
     
    3535
    3636#include "core/CoreIncludes.h"
    37 
    38 #include "orxonox/objects/infos/PlayerInfo.h"
     37#include "core/XMLPort.h"
    3938#include "QuestManager.h"
    4039#include "QuestDescription.h"
  • code/trunk/src/orxonox/objects/quest/Quest.h

    r3068 r3196  
    2828 
    2929/**
    30     @file Quest.h
     30    @file
    3131    @brief Definition of the Quest class.
    3232        The Quest is the parent class of LocalQuest and GlobalQuest.
     
    3939
    4040#include <list>
    41 #include <string>
    42 
    43 #include "core/XMLPort.h"
    44 
    4541#include "QuestItem.h"
    4642
  • code/trunk/src/orxonox/objects/quest/QuestDescription.cc

    r3110 r3196  
    2828
    2929/**
    30     @file QuestDescription.cc
     30    @file
    3131    @brief Implementation of the QuestDescription class.
    3232*/
     
    3636
    3737#include "core/CoreIncludes.h"
     38#include "core/XMLPort.h"
    3839#include "QuestNotification.h"
    3940
  • code/trunk/src/orxonox/objects/quest/QuestDescription.h

    r3068 r3196  
    2828
    2929/**
    30     @file QuestDescription.h
     30    @file
    3131    @brief Definition of the QuestDescription class.
    3232*/
     
    3838
    3939#include <string>
    40 
    4140#include "core/BaseObject.h"
    42 #include "core/XMLPort.h"
    4341
    4442// tolua_begin
  • code/trunk/src/orxonox/objects/quest/QuestEffect.cc

    r3110 r3196  
    2828
    2929/**
    30     @file QuestEffect.cc
     30    @file
    3131    @brief Implementation of the QuestEffect class.
    3232*/
    3333
    3434#include "QuestEffect.h"
    35 
    3635#include "core/CoreIncludes.h"
    37 
    38 #include "orxonox/objects/infos/PlayerInfo.h"
    3936
    4037namespace orxonox
  • code/trunk/src/orxonox/objects/quest/QuestEffect.h

    r3068 r3196  
    2828 
    2929/**
    30     @file QuestEffect.h
     30    @file
    3131    @brief Definition of the QuestEffect class.
    3232*/
     
    3838
    3939#include <list>
    40 
    4140#include "core/BaseObject.h"
    4241
  • code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.cc

    r3110 r3196  
    2828
    2929/**
    30     @file QuestEffectBeacon.cc
     30    @file
    3131    @brief Implementation of the QuestEffectBeacon class.
    3232*/
     
    3636#include "core/CoreIncludes.h"
    3737#include "core/XMLPort.h"
    38 #include "core/Event.h"
    3938#include "core/EventIncludes.h"
    40 
    41 #include "orxonox/objects/infos/PlayerInfo.h"
    4239#include "orxonox/objects/worldentities/pawns/Pawn.h"
    4340#include "orxonox/objects/worldentities/triggers/PlayerTrigger.h"
     
    8986        SUPER(QuestEffectBeacon, processEvent, event);
    9087   
    91         SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);
     88        ORXONOX_SET_SUBCLASS_EVENT(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);
    9289    }
    9390   
  • code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.h

    r2911 r3196  
    2828
    2929/**
    30     @file QuestEffectBeacon.h
     30    @file
    3131    @brief Definition of the QuestEffectBeacon class.
    3232*/
     
    3737#include "OrxonoxPrereqs.h"
    3838
     39#include <list>
    3940#include "orxonox/objects/worldentities/StaticEntity.h"
    4041
  • code/trunk/src/orxonox/objects/quest/QuestHint.cc

    r3110 r3196  
    2828 
    2929/**
    30     @file QuestHint.cc
     30    @file
    3131    @brief Implementation of the QuestHint class.
    3232*/
     
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "util/Exception.h"
    38 
    39 #include "orxonox/objects/infos/PlayerInfo.h"
     37#include "core/XMLPort.h"
    4038#include "QuestManager.h"
    4139#include "QuestDescription.h"
  • code/trunk/src/orxonox/objects/quest/QuestHint.h

    r3068 r3196  
    2828 
    2929/**
    30     @file QuestHint.h
     30    @file
    3131    @brief Definition of the QuestHint class.
    3232*/
     
    3838
    3939#include <map>
    40 #include <string>
    41 
    42 #include "core/XMLPort.h"
    4340#include "QuestItem.h"
    4441
  • code/trunk/src/orxonox/objects/quest/QuestItem.cc

    r3110 r3196  
    2828 
    2929/**
    30     @file QuestItem.cc
     30    @file
    3131    @brief Implementation of the QuestItem class.
    3232*/
     
    3535
    3636#include "core/CoreIncludes.h"
    37 
     37#include "core/XMLPort.h"
    3838#include "QuestDescription.h"
    3939
  • code/trunk/src/orxonox/objects/quest/QuestItem.h

    r3068 r3196  
    2828 
    2929/**
    30     @file QuestItem.h
     30    @file
    3131    @brief Definition of the QuestItem class.
    3232        The QuestItem is the parent class of Quest and QuestHint.
     
    4040
    4141#include <string>
    42 
    4342#include "core/BaseObject.h"
    44 #include "core/XMLPort.h"
    4543
    4644namespace orxonox
  • code/trunk/src/orxonox/objects/quest/QuestListener.cc

    r3110 r3196  
    2828
    2929/**
    30     @file QuestListener.cc
     30    @file
    3131    @brief Implementation of the QuestListener class.
    3232*/
     
    3636#include "core/CoreIncludes.h"
    3737#include "core/XMLPort.h"
    38 #include "util/Exception.h"
    39 
    4038#include "Quest.h"
    4139#include "QuestManager.h"
     
    164162        Return the mode of the QuestListener. Can be eighter 'all', 'start', 'fail' or 'complete'.
    165163    */
    166     const std::string QuestListener::getMode(void)
     164    std::string QuestListener::getMode(void)
    167165    {
    168166        if(this->mode_ == questListenerMode::all)
     
    191189    /**
    192190    @brief
     191        Get the questId of the Quest the QuestListener reacts to.
     192    @return
     193        Returns the questId of the Quest the QuestListener reacts to.
     194    */
     195    const std::string & QuestListener::getQuestId(void)   
     196    {
     197        return this->quest_->getId();
     198    }
     199
     200    /**
     201    @brief
    193202        Executes the QuestListener, resp. fires an Event.
    194203    @return
  • code/trunk/src/orxonox/objects/quest/QuestListener.h

    r2911 r3196  
    2828
    2929/**
    30     @file QuestListener.h
     30    @file
    3131    @brief Definition of the QuestListener class.
    3232*/
     
    3939#include <string>
    4040#include <list>
    41 
    4241#include "core/BaseObject.h"
    43 
    44 #include "Quest.h"
    4542
    4643namespace orxonox
     
    9087        bool setMode(const std::string & mode); //!< Sets the mode of the QuestListener.
    9188       
    92         const std::string getMode(void); //!< Get the mode of the QuestListener.
     89        std::string getMode(void); //!< Get the mode of the QuestListener.
    9390       
    94         /**
    95         @brief Get the questId of the Quest the QuestListener reacts to.
    96         @return Returns the questId of the Quest the QuestListener reacts to.
    97         */
    98         inline const std::string & getQuestId(void)
    99                 { return this->quest_->getId(); }
    100        
     91        const std::string & getQuestId(void);       
    10192        bool execute(void); //!< Executes the QuestListener, resp. fires an Event.
    10293       
  • code/trunk/src/orxonox/objects/quest/QuestManager.cc

    r3110 r3196  
    2828
    2929/**
    30     @file QuestManager.cc
     30    @file
    3131    @brief Implementation of the QuestManager class.
    3232*/
     
    3434#include "QuestManager.h"
    3535
     36#include "util/Exception.h"
    3637#include "core/CoreIncludes.h"
    37 #include "core/ConsoleCommand.h"
    38 #include "core/input/InputManager.h"
    39 
    40 #include "util/Exception.h"
    4138#include "gui/GUIManager.h"
     39
    4240#include "objects/infos/PlayerInfo.h"
     41#include "objects/infos/PlayerInfo.h"
     42#include "overlays/GUIOverlay.h"
    4343#include "Quest.h"
    4444#include "QuestHint.h"
     45#include "QuestItem.h"
    4546
    4647namespace orxonox
  • code/trunk/src/orxonox/objects/quest/QuestManager.h

    r3068 r3196  
    2828
    2929/**
    30     @file QuestManager.h
     30    @file
    3131    @brief Definition of the QuestManager class.
    3232*/
     
    3737#include "OrxonoxPrereqs.h"
    3838
     39#include <list>
    3940#include <map>
    40 #include <list>
    4141#include <string>
    42 
    4342#include "core/OrxonoxClass.h"
    44 #include "orxonox/objects/infos/PlayerInfo.h"
    45 #include "overlays/GUIOverlay.h"
    4643
    4744// tolua_begin
  • code/trunk/src/orxonox/objects/quest/QuestNotification.cc

    r3110 r3196  
    2828
    2929#include "QuestNotification.h"
    30 
    3130#include "core/CoreIncludes.h"
    32 
    33 #include "orxonox/overlays/notifications/Notification.h"
    3431
    3532namespace orxonox {
  • code/trunk/src/orxonox/objects/quest/QuestNotification.h

    r3078 r3196  
    3333
    3434#include <string>
    35 
    36 #include "orxonox/overlays/notifications/Notification.h"
     35#include "overlays/notifications/Notification.h"
    3736
    3837namespace orxonox {
  • code/trunk/src/orxonox/objects/weaponsystem/DefaultWeaponmodeLink.cc

    r3110 r3196  
    3131#include "core/CoreIncludes.h"
    3232#include "core/XMLPort.h"
    33 
    3433#include "WeaponSystem.h"
    3534
  • code/trunk/src/orxonox/objects/weaponsystem/Munition.cc

    r3110 r3196  
    2929
    3030#include "Munition.h"
    31 
    3231#include "core/CoreIncludes.h"
    3332
  • code/trunk/src/orxonox/objects/weaponsystem/Munition.h

    r3053 r3196  
    3434
    3535#include <map>
    36 
    3736#include "core/BaseObject.h"
    3837#include "tools/Timer.h"
  • code/trunk/src/orxonox/objects/weaponsystem/MuzzleFlash.cc

    r3110 r3196  
    3030#include "MuzzleFlash.h"
    3131
    32 #include "core/GameMode.h"
    3332#include "core/CoreIncludes.h"
    34 #include "core/XMLPort.h"
    35 #include "util/Math.h"
     33#include "core/Executor.h"
    3634
    3735namespace orxonox
     
    4240    {
    4341        RegisterObject(MuzzleFlash);
    44         this->setScale(0.1);
     42        this->setScale(0.1f);
    4543       
    4644        this->delayTimer_.setTimer(0.1f, false, this, createExecutor(createFunctor(&MuzzleFlash::destroy)));
  • code/trunk/src/orxonox/objects/weaponsystem/MuzzleFlash.h

    r3053 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include "tools/Timer.h"
    3335#include "objects/worldentities/Billboard.h"
    34 #include "tools/Timer.h"
    35 
    3636
    3737namespace orxonox
  • code/trunk/src/orxonox/objects/weaponsystem/Weapon.h

    r3053 r3196  
    3232
    3333#include "OrxonoxPrereqs.h"
     34
     35#include <map>
     36#include "tools/Timer.h"
    3437#include "objects/worldentities/StaticEntity.h"
    35 
    36 #include "tools/Timer.h"
    3738
    3839namespace orxonox
  • code/trunk/src/orxonox/objects/weaponsystem/WeaponMode.h

    r3053 r3196  
    3232
    3333#include "OrxonoxPrereqs.h"
     34
     35#include <string>
     36#include "util/Math.h"
    3437#include "core/BaseObject.h"
    35 
     38#include "core/Identifier.h"
    3639#include "tools/Timer.h"
    37 #include "core/Identifier.h"
    38 #include "util/Math.h"
    3940
    4041namespace orxonox
  • code/trunk/src/orxonox/objects/weaponsystem/WeaponPack.cc

    r3110 r3196  
    3131#include "core/CoreIncludes.h"
    3232#include "core/XMLPort.h"
    33 #include "objects/worldentities/pawns/Pawn.h"
    3433
    3534#include "Weapon.h"
    36 #include "WeaponSlot.h"
    3735#include "WeaponSystem.h"
    3836#include "DefaultWeaponmodeLink.h"
  • code/trunk/src/orxonox/objects/weaponsystem/WeaponPack.h

    r3053 r3196  
    3434
    3535#include <set>
    36 
    3736#include "core/BaseObject.h"
    3837
  • code/trunk/src/orxonox/objects/weaponsystem/WeaponSet.h

    r3053 r3196  
    3434
    3535#include <map>
    36 
    3736#include "core/BaseObject.h"
    3837
  • code/trunk/src/orxonox/objects/weaponsystem/WeaponSystem.h

    r3053 r3196  
    3333#include "OrxonoxPrereqs.h"
    3434
     35#include <map>
    3536#include <set>
    36 #include <map>
    3737#include <vector>
    38 
    3938#include "core/BaseObject.h"
    4039
  • code/trunk/src/orxonox/objects/weaponsystem/munitions/FusionMunition.cc

    r3110 r3196  
    2828
    2929#include "FusionMunition.h"
    30 
    3130#include "core/CoreIncludes.h"
    3231
  • code/trunk/src/orxonox/objects/weaponsystem/munitions/LaserMunition.cc

    r3110 r3196  
    2828
    2929#include "LaserMunition.h"
    30 
    3130#include "core/CoreIncludes.h"
    3231
  • code/trunk/src/orxonox/objects/weaponsystem/munitions/ReplenishingMunition.cc

    r3110 r3196  
    2828
    2929#include "ReplenishingMunition.h"
    30 
    3130#include "core/CoreIncludes.h"
    3231
  • code/trunk/src/orxonox/objects/weaponsystem/munitions/ReplenishingMunition.h

    r3053 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include "tools/Timer.h"
    3335#include "objects/weaponsystem/Munition.h"
    34 #include "tools/Timer.h"
    3536
    3637namespace orxonox
  • code/trunk/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.cc

    r3110 r3196  
    2929#include "BillboardProjectile.h"
    3030
    31 #include <OgreBillboardSet.h>
    32 
     31#include "core/CoreIncludes.h"
    3332#include "core/GameMode.h"
    34 #include "core/CoreIncludes.h"
    3533#include "objects/Scene.h"
    3634
     
    4644        {
    4745            assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity
    48             this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5, 0.5, 0.7, 0.8), 1);
     46            this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5f, 0.5f, 0.7f, 0.8f), 1);
    4947            this->attachOgreObject(this->billboard_.getBillboardSet());
    5048        }
  • code/trunk/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.h

    r3053 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "util/Math.h"
     35#include "tools/BillboardSet.h"
    3436#include "Projectile.h"
    35 #include "tools/BillboardSet.h"
    36 #include "util/Math.h"
    3737
    3838namespace orxonox
  • code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.cc

    r3110 r3196  
    2929#include "LightningGunProjectile.h"
    3030
    31 #include <OgreBillboardSet.h>
    32 
    33 #include "core/GameMode.h"
     31#include "util/Convert.h"
    3432#include "core/CoreIncludes.h"
    35 #include "objects/Scene.h"
    36 #include "util/Convert.h"
    3733
    3834namespace orxonox
     
    4642        this->textureIndex_ = 1;
    4743        this->maxTextureIndex_ = 8;
    48         this->textureTimer_.setTimer(0.01, true, this, createExecutor(createFunctor(&LightningGunProjectile::changeTexture)));
     44        this->textureTimer_.setTimer(0.01f, true, this, createExecutor(createFunctor(&LightningGunProjectile::changeTexture)));
    4945       
    5046        registerVariables();
  • code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.h

    r3088 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <string>
    3435#include "tools/Timer.h"
    35 
    3636#include "BillboardProjectile.h"
    3737
  • code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc

    r3110 r3196  
    2929#include "ParticleProjectile.h"
    3030
    31 #include <OgreParticleSystem.h>
    3231#include <OgreParticleEmitter.h>
    33 
    34 #include "core/GameMode.h"
     32#include "tools/ParticleInterface.h"
    3533#include "core/CoreIncludes.h"
    36 #include "core/ConfigValueIncludes.h"
    3734#include "objects/Scene.h"
    3835
  • code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.h

    r3053 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "BillboardProjectile.h"
    35 #include "tools/ParticleInterface.h"
    36 #include "util/Math.h"
    3734
    3835namespace orxonox
  • code/trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc

    r3110 r3196  
    2929#include "Projectile.h"
    3030
    31 #include <OgreBillboard.h>
    32 
    3331#include "core/CoreIncludes.h"
     32#include "core/ConfigValueIncludes.h"
    3433#include "core/Executor.h"
    35 #include "core/ConfigValueIncludes.h"
    36 #include "core/Iterator.h"
    37 #include "tools/ParticleInterface.h"
    38 
    39 #include "objects/worldentities/Model.h"
     34#include "core/GameMode.h"
     35#include "objects/collisionshapes/SphereCollisionShape.h"
     36#include "objects/worldentities/pawns/Pawn.h"
    4037#include "objects/worldentities/ParticleSpawner.h"
    41 #include "objects/collisionshapes/SphereCollisionShape.h"
    42 #include "core/GameMode.h"
    4338
    4439namespace orxonox
  • code/trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.h

    r3053 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "tools/Timer.h"
     35#include "interfaces/PawnListener.h"
    3436#include "objects/worldentities/MovableEntity.h"
    35 #include "objects/worldentities/pawns/Pawn.h"
    36 #include "tools/Timer.h"
    3737
    3838namespace orxonox
  • code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/EnergyDrink.cc

    r3110 r3196  
    3030
    3131#include "core/CoreIncludes.h"
     32#include "core/Executor.h"
    3233#include "core/XMLPort.h"
    33 #include "objects/weaponsystem/projectiles/ParticleProjectile.h"
    3434#include "objects/worldentities/Model.h"
     35
     36#include "objects/weaponsystem/projectiles/Projectile.h"
    3537#include "objects/weaponsystem/MuzzleFlash.h"
    36 
    3738#include "objects/weaponsystem/Weapon.h"
    3839#include "objects/weaponsystem/WeaponPack.h"
     
    6970    {
    7071        this->material_ = material;
    71     }
    72 
    73     std::string& EnergyDrink::getMaterial()
    74     {
    75         return this->material_;
    7672    }
    7773
  • code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/EnergyDrink.h

    r3053 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include <string>
     35#include "tools/Timer.h"
    3336#include "objects/weaponsystem/WeaponMode.h"
    34 #include "tools/Timer.h"
    3537
    3638namespace orxonox
     
    4749        private:
    4850            void setMaterial(const std::string& material);
    49             std::string& getMaterial();
     51            inline const std::string& getMaterial()
     52                { return this->material_; }
    5053            void setDelay(float d);
    5154            float getDelay() const;
  • code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/FusionFire.cc

    r3110 r3196  
    2929#include "FusionFire.h"
    3030
     31#include "util/Math.h"
    3132#include "core/CoreIncludes.h"
    3233#include "objects/weaponsystem/projectiles/BillboardProjectile.h"
  • code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/HsW01.cc

    r3110 r3196  
    3030
    3131#include "core/CoreIncludes.h"
     32#include "core/Executor.h"
    3233#include "core/XMLPort.h"
    33 #include "objects/weaponsystem/projectiles/ParticleProjectile.h"
    3434#include "objects/worldentities/Model.h"
     35
     36#include "objects/weaponsystem/projectiles/Projectile.h"
    3537#include "objects/weaponsystem/MuzzleFlash.h"
    36 
    3738#include "objects/weaponsystem/Weapon.h"
    3839#include "objects/weaponsystem/WeaponPack.h"
  • code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/HsW01.h

    r3053 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include "tools/Timer.h"
    3335#include "objects/weaponsystem/WeaponMode.h"
    34 #include "tools/Timer.h"
    3536
    3637namespace orxonox
  • code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/LaserFire.cc

    r3110 r3196  
    3131#include "core/CoreIncludes.h"
    3232#include "objects/weaponsystem/projectiles/ParticleProjectile.h"
    33 
    3433#include "objects/weaponsystem/Weapon.h"
    3534#include "objects/weaponsystem/WeaponPack.h"
  • code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/LightningGun.cc

    r3110 r3196  
    3030
    3131#include "core/CoreIncludes.h"
    32 
    33 #include "objects/worldentities/Billboard.h"
    34 
     32#include "objects/weaponsystem/projectiles/LightningGunProjectile.h"
    3533#include "objects/weaponsystem/Weapon.h"
    3634#include "objects/weaponsystem/WeaponPack.h"
    3735#include "objects/weaponsystem/WeaponSystem.h"
    38 
    39 #include "objects/weaponsystem/projectiles/LightningGunProjectile.h"
    40 
    41 #include "util/Math.h"
    4236
    4337namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/Attacher.h

    r3078 r3196  
    3333
    3434#include <list>
    35 
     35#include <string>
     36#include "core/XMLNameListener.h"
    3637#include "objects/worldentities/StaticEntity.h"
    37 #include "core/XMLNameListener.h"
    3838
    3939namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/Backlight.cc

    r3110 r3196  
    3131#include <OgreRibbonTrail.h>
    3232#include <OgreSceneManager.h>
    33 
     33#include <OgreSceneNode.h>
     34
     35#include "util/Exception.h"
     36#include "core/CoreIncludes.h"
    3437#include "core/GameMode.h"
    35 #include "core/CoreIncludes.h"
    36 #include "core/Executor.h"
    3738#include "core/XMLPort.h"
    3839#include "objects/Scene.h"
    39 #include "util/Exception.h"
    4040
    4141namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/Backlight.h

    r3068 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include <string>
     35#include "interfaces/TimeFactorListener.h"
    3336#include "FadingBillboard.h"
    34 #include "tools/TimeFactorListener.h"
    3537
    3638namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc

    r3110 r3196  
    2828
    2929#include "BigExplosion.h"
    30 #include "MovableEntity.h"
     30
     31//#include <sstream>
     32
     33#include "util/Exception.h"
     34#include "core/CoreIncludes.h"
     35#include "core/CommandExecutor.h"
     36#include "core/Executor.h"
     37#include "core/GameMode.h"
     38#include "tools/ParticleInterface.h"
     39#include "objects/Scene.h"
     40#include "objects/worldentities/ParticleSpawner.h"
    3141#include "Model.h"
    32 
    33 #include <OgreParticleSystem.h>
    34 #include <OgreSceneNode.h>
    35 #include <sstream>
    36 
    37 #include "core/GameMode.h"
    38 #include "core/CoreIncludes.h"
    39 #include "core/Executor.h"
    40 #include "core/CommandExecutor.h"
    41 #include "objects/Scene.h"
    42 #include "tools/ParticleInterface.h"
    43 #include "objects/worldentities/ParticleSpawner.h"
    44 #include "util/Exception.h"
    4542
    4643namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/BigExplosion.h

    r3087 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
    3334#include <string>
    34 
    35 
     35#include "tools/Timer.h"
    3636#include "MovableEntity.h"
    37 #include "tools/Timer.h"
    3837
    3938namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/Billboard.cc

    r3110 r3196  
    2929#include "Billboard.h"
    3030
    31 #include <OgreBillboardSet.h>
    32 
    3331#include "core/CoreIncludes.h"
     32#include "core/GameMode.h"
    3433#include "core/XMLPort.h"
    35 #include "core/GameMode.h"
    3634#include "objects/Scene.h"
    3735
  • code/trunk/src/orxonox/objects/worldentities/Billboard.h

    r3053 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 #include "StaticEntity.h"
     33
    3434#include "util/Math.h"
    3535#include "tools/BillboardSet.h"
    36 #include "objects/Teamcolourable.h"
     36#include "interfaces/TeamColourable.h"
     37#include "StaticEntity.h"
    3738
    3839namespace orxonox
    3940{
    40     class _OrxonoxExport Billboard : public StaticEntity, public Teamcolourable
     41    class _OrxonoxExport Billboard : public StaticEntity, public TeamColourable
    4142    {
    4243        public:
  • code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc

    r3110 r3196  
    2929#include "BlinkingBillboard.h"
    3030
     31#include "core/CoreIncludes.h"
    3132#include "core/GameMode.h"
    32 #include "core/CoreIncludes.h"
    3333#include "core/XMLPort.h"
    34 #include "util/Math.h"
    3534
    3635namespace orxonox
     
    8079            this->time_ += dt;
    8180            if (this->bQuadratic_)
    82                 this->setScale(this->amplitude_ * square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));
     81                this->setScale(this->amplitude_ * static_cast<float>(square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_))));
    8382            else
    84                 this->setScale(this->amplitude_ * sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_));
     83                this->setScale(this->amplitude_ * static_cast<float>(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));
    8584        }
    8685    }
  • code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.h

    r2087 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include "util/Math.h"
     35#include "interfaces/Tickable.h"
    3336#include "Billboard.h"
    34 #include "objects/Tickable.h"
    3537
    3638namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/Camera.cc

    r3110 r3196  
    2929#include "Camera.h"
    3030
    31 #include <string>
    32 #include <cassert>
    33 
    3431#include <OgreCamera.h>
    3532#include <OgreSceneManager.h>
     
    3734
    3835#include "util/Exception.h"
     36#include "util/String.h"
    3937#include "core/CoreIncludes.h"
    4038#include "core/ConfigValueIncludes.h"
  • code/trunk/src/orxonox/objects/worldentities/Camera.h

    r3068 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include <OgrePrerequisites.h>
     34#include "util/OgreForwardRefs.h"
     35#include "interfaces/Tickable.h"
    3536#include "objects/worldentities/StaticEntity.h"
    36 #include "objects/Tickable.h"
    3737
    3838namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/CameraPosition.cc

    r3110 r3196  
    2828
    2929#include "CameraPosition.h"
    30 
    31 #include <OgreCamera.h>
    3230
    3331#include "core/CoreIncludes.h"
  • code/trunk/src/orxonox/objects/worldentities/CameraPosition.h

    r3089 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "objects/worldentities/StaticEntity.h"
    3534
  • code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc

    r3110 r3196  
    3030
    3131#include <OgreSceneManager.h>
     32#include <OgreSceneNode.h>
    3233
    3334#include "core/CoreIncludes.h"
     
    3536#include "core/GameMode.h"
    3637#include "core/XMLPort.h"
    37 #include "core/Template.h"
    3838
    3939#include "objects/Scene.h"
  • code/trunk/src/orxonox/objects/worldentities/ControllableEntity.h

    r3089 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include <list>
     35#include <string>
     36#include "util/Math.h"
    3337#include "MobileEntity.h"
    3438
  • code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.cc

    r3110 r3196  
    2929#include "ExplosionChunk.h"
    3030
    31 #include <OgreParticleSystem.h>
    32 
    33 #include "core/GameMode.h"
    3431#include "core/CoreIncludes.h"
    3532#include "core/Executor.h"
     33#include "core/GameMode.h"
     34#include "util/Exception.h"
    3635#include "objects/Scene.h"
    3736#include "tools/ParticleInterface.h"
    38 #include "util/Exception.h"
    3937
    4038namespace orxonox
     
    153151            Vector3 change(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1));
    154152            change.normalise();
    155             change *= rnd(0.4, 0.8);
     153            change *= rnd(0.4f, 0.8f);
    156154            Vector3 velocity = this->getVelocity();
    157155            velocity.normalise();
    158156            velocity += change;
    159157            velocity.normalise();
    160             velocity *= length * rnd(0.8, 1.0);
     158            velocity *= length * rnd(0.8f, 1.0f);
    161159
    162160            this->setVelocity(velocity);
  • code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.h

    r2662 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "tools/Timer.h"
    3435#include "MovableEntity.h"
    35 #include "tools/Timer.h"
    3636
    3737namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/FadingBillboard.cc

    r3110 r3196  
    3030
    3131#include "core/CoreIncludes.h"
    32 #include "core/Executor.h"
    3332#include "core/XMLPort.h"
    3433
  • code/trunk/src/orxonox/objects/worldentities/FadingBillboard.h

    r2662 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include "util/Math.h"
     35#include "tools/Timer.h"
     36#include "interfaces/Tickable.h"
    3337#include "Billboard.h"
    34 #include "objects/Tickable.h"
    35 #include "tools/Timer.h"
    3638
    3739namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/ForceField.cc

    r3064 r3196  
    2828
    2929#include "ForceField.h"
    30 #include "core/XMLPort.h"
    3130
    3231#include "core/CoreIncludes.h"
     32#include "core/XMLPort.h"
    3333#include "objects/worldentities/MobileEntity.h"
    3434
  • code/trunk/src/orxonox/objects/worldentities/ForceField.h

    r3064 r3196  
    3131#define _ForceField_H__
    3232
     33#include "OrxonoxPrereqs.h"
     34
     35#include "interfaces/Tickable.h"
    3336#include "StaticEntity.h"
    34 #include "objects/Tickable.h"
    3537
    3638namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/Light.cc

    r3110 r3196  
    2929#include "Light.h"
    3030
    31 #include <sstream>
    32 #include <cassert>
    33 
    3431#include <OgreSceneManager.h>
     32#include <OgreLight.h>
     33#include <boost/static_assert.hpp>
    3534
    3635#include "util/String.h"
    3736#include "util/Exception.h"
     37#include "core/CoreIncludes.h"
    3838#include "core/GameMode.h"
    39 #include "core/CoreIncludes.h"
    4039#include "core/XMLPort.h"
    4140#include "objects/Scene.h"
     
    4443{
    4544    CreateFactory(Light);
     45
     46    // Be sure we don't do bad conversions
     47    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT       == (int)Light::LT_POINT);
     48    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::LT_DIRECTIONAL);
     49    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::LT_SPOTLIGHT);
    4650
    4751    Light::Light(BaseObject* creator) : StaticEntity(creator)
     
    5256        this->diffuse_ = ColourValue::White;
    5357        this->specular_ = ColourValue::White;
    54         this->type_ = Ogre::Light::LT_POINT;
     58        this->type_ = Light::LT_POINT;
    5559        this->attenuation_ = Vector4(100000, 1, 0, 0);
    5660        this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f);
     
    136140    {
    137141        if (type == "point")
    138             this->setType(Ogre::Light::LT_POINT);
     142            this->setType(Light::LT_POINT);
    139143        else if (type == "directional")
    140             this->setType(Ogre::Light::LT_DIRECTIONAL);
     144            this->setType(Light::LT_DIRECTIONAL);
    141145        else if (type == "spotlight")
    142             this->setType(Ogre::Light::LT_SPOTLIGHT);
     146            this->setType(Light::LT_SPOTLIGHT);
    143147        else
    144             this->setType(Ogre::Light::LT_POINT);
     148            this->setType(Light::LT_POINT);
    145149    }
    146150
     
    149153        switch (this->type_)
    150154        {
    151             case Ogre::Light::LT_DIRECTIONAL:
     155            case Light::LT_DIRECTIONAL:
    152156                return "directional";
    153             case Ogre::Light::LT_SPOTLIGHT:
     157            case Light::LT_SPOTLIGHT:
    154158                return "spotlight";
    155             case Ogre::Light::LT_POINT:
     159            case Light::LT_POINT:
    156160            default:
    157161                return "point";
     
    163167        if (this->light_)
    164168        {
    165             this->light_->setType(this->type_);
     169            this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_));
    166170
    167171            if (this->type_ != Ogre::Light::LT_DIRECTIONAL)
  • code/trunk/src/orxonox/objects/worldentities/Light.h

    r2826 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 #include "StaticEntity.h"
    3433
    3534#include <string>
    36 #include <OgreLight.h>
    37 
    3835#include "util/Math.h"
    39 #include "objects/Teamcolourable.h"
     36#include "interfaces/TeamColourable.h"
     37#include "StaticEntity.h"
    4038
    4139namespace orxonox
    4240{
    43     class _OrxonoxExport Light : public StaticEntity, public Teamcolourable
     41    class _OrxonoxExport Light : public StaticEntity, public TeamColourable
    4442    {
     43        public:
     44            enum LightTypes // Copy from the Ogre enum
     45            {
     46                /// Point light sources give off light equally in all directions, so require only position not direction
     47                LT_POINT,
     48                /// Directional lights simulate parallel light beams from a distant source, hence have direction but no position
     49                LT_DIRECTIONAL,
     50                /// Spotlights simulate a cone of light from a source so require position and direction, plus extra values for falloff
     51                LT_SPOTLIGHT
     52            };
     53
    4554        public:
    4655            Light(BaseObject* creator);
     
    5564                { return this->light_; }
    5665
    57             inline void setType(Ogre::Light::LightTypes type)
     66            inline void setType(Light::LightTypes type)
    5867                { this->type_ = type; this->updateType(); }
    59             inline Ogre::Light::LightTypes getType() const
     68            inline Light::LightTypes getType() const
    6069                { return this->type_; }
    6170
     
    133142
    134143            Ogre::Light* light_;
    135             Ogre::Light::LightTypes type_;
     144            LightTypes type_;
    136145            ColourValue diffuse_;
    137146            ColourValue specular_;
  • code/trunk/src/orxonox/objects/worldentities/MobileEntity.cc

    r3110 r3196  
    3030
    3131#include <OgreSceneNode.h>
    32 #include "BulletDynamics/Dynamics/btRigidBody.h"
    33 
    34 #include "util/Debug.h"
    35 #include "util/MathConvert.h"
    36 #include "util/Exception.h"
     32#include <BulletDynamics/Dynamics/btRigidBody.h>
     33
    3734#include "core/CoreIncludes.h"
    3835#include "core/XMLPort.h"
    39 
    4036#include "objects/Scene.h"
    4137
     
    9692                this->angularVelocity_.z += angularAcceleration_.z * dt;
    9793                // Calculate new orientation with quaternion derivative. This is about 30% faster than with angle/axis method.
    98                 float mult = dt * 0.5;
     94                float mult = dt * 0.5f;
    9995                // TODO: this could be optimized by writing it out. The calls currently create 4 new Quaternions!
    10096                Quaternion newOrientation(0.0f, this->angularVelocity_.x * mult, this->angularVelocity_.y * mult, this->angularVelocity_.z * mult);
  • code/trunk/src/orxonox/objects/worldentities/MobileEntity.h

    r3084 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "util/Math.h"
     35#include "interfaces/Tickable.h"
    3436#include "WorldEntity.h"
    35 #include "objects/Tickable.h"
    3637
    3738namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/Model.cc

    r3110 r3196  
    2727 */
    2828
     29#include "Model.h"
    2930
    3031#include <OgreEntity.h>
    31 #include "Model.h"
     32
     33#include "core/CoreIncludes.h"
    3234#include "core/GameMode.h"
    33 #include "core/CoreIncludes.h"
    3435#include "core/XMLPort.h"
    3536#include "objects/Scene.h"
  • code/trunk/src/orxonox/objects/worldentities/Model.h

    r2662 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include <string>
     35#include "tools/Mesh.h"
    3336#include "StaticEntity.h"
    34 #include "tools/Mesh.h"
    3537
    3638namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc

    r3110 r3196  
    3131
    3232#include "core/CoreIncludes.h"
    33 #include "core/XMLPort.h"
    3433#include "core/Executor.h"
    3534#include "core/GameMode.h"
     35#include "core/XMLPort.h"
    3636#include "objects/worldentities/pawns/Pawn.h"
    3737
  • code/trunk/src/orxonox/objects/worldentities/MovableEntity.h

    r3033 r3196  
    3333#include "OrxonoxPrereqs.h"
    3434
    35 #include "MobileEntity.h"
     35#include "util/Math.h"
    3636#include "network/ClientConnectionListener.h"
    3737#include "tools/Timer.h"
     38#include "MobileEntity.h"
    3839
    3940namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc

    r3110 r3196  
    3434#include "ParticleEmitter.h"
    3535
    36 #include <OgreParticleSystem.h>
    37 
     36#include "util/Exception.h"
     37#include "core/CoreIncludes.h"
     38#include "core/GameMode.h"
     39#include "core/XMLPort.h"
    3840#include "tools/ParticleInterface.h"
    39 #include "util/Exception.h"
    40 #include "core/GameMode.h"
    41 #include "core/CoreIncludes.h"
    42 #include "core/XMLPort.h"
    4341#include "objects/Scene.h"
    4442
  • code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.h

    r2662 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include <string>
    3335#include "StaticEntity.h"
    3436
  • code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.cc

    r3110 r3196  
    7575        SUPER(ParticleSpawner, processEvent, event);
    7676
    77         SetEvent(ParticleSpawner, "spawn", spawn, event);
     77        ORXONOX_SET_EVENT(ParticleSpawner, "spawn", spawn, event);
    7878    }
    7979
  • code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.h

    r3068 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "tools/Timer.h"
    3435#include "ParticleEmitter.h"
    35 #include "tools/Timer.h"
    3636
    3737namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/Planet.cc

    r3110 r3196  
    2929#include "Planet.h"
    3030
    31 #include <math.h>
    32 
    3331#include <OgreEntity.h>
    3432#include <OgreBillboardSet.h>
    35 #include <OgreHardwareVertexBuffer.h>
    36 #include <OgreMeshManager.h>
     33#include <OgreProgressiveMesh.h>
    3734
    3835#include "core/CoreIncludes.h"
     36#include "core/GameMode.h"
    3937#include "core/XMLPort.h"
    4038#include "objects/Scene.h"
     39#include "Camera.h"
    4140#include "CameraManager.h"
    42 #include "Camera.h"
    43 #include "GraphicsManager.h"
    4441
    4542namespace orxonox
     
    7067            return;
    7168
    72         Camera* activeCamera = CameraManager::getInstance().getActiveCamera();
    73         if(activeCamera)
     69        if (GameMode::showsGraphics())
    7470        {
    75             float distance = this->getPosition().distance( activeCamera->getWorldPosition() );
    76             //             COUT(2) << distance << std::endl;
    77             float planetRadius = this->getScale();
     71            Camera* activeCamera = CameraManager::getInstance().getActiveCamera();
     72            if(activeCamera)
     73            {
     74                float distance = this->getPosition().distance( activeCamera->getWorldPosition() );
     75                //             COUT(2) << distance << std::endl;
     76                float planetRadius = this->getScale();
    7877
    79             float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);
    80             float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize));
    81             newScale = tempTest;
     78                float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);
     79                float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize));
     80                newScale = tempTest;
    8281
    83             this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale);
     82                this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale);
     83            }
    8484        }
    8585
     
    9191        float scaleFactor = this->getScale();
    9292
    93         this->distList.push_back(10.0*scaleFactor);
    94         this->distList.push_back(19.0*scaleFactor);
    95         this->distList.push_back(27.0*scaleFactor);
    96         this->distList.push_back(34.0*scaleFactor);
    97         this->distList.push_back(40.0*scaleFactor);
    98         this->distList.push_back(45.0*scaleFactor);
    99         this->distList.push_back(49.0*scaleFactor);
    100         this->distList.push_back(52.0*scaleFactor);
    101         this->distList.push_back(54.0*scaleFactor);
    102         this->distList.push_back(55.0*scaleFactor);
     93        this->distList.push_back(10.0f*scaleFactor);
     94        this->distList.push_back(19.0f*scaleFactor);
     95        this->distList.push_back(27.0f*scaleFactor);
     96        this->distList.push_back(34.0f*scaleFactor);
     97        this->distList.push_back(40.0f*scaleFactor);
     98        this->distList.push_back(45.0f*scaleFactor);
     99        this->distList.push_back(49.0f*scaleFactor);
     100        this->distList.push_back(52.0f*scaleFactor);
     101        this->distList.push_back(54.0f*scaleFactor);
     102        this->distList.push_back(55.0f*scaleFactor);
    103103
    104         float reductionValue = 0.2;
     104        float reductionValue = 0.2f;
    105105
    106106        this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
     
    145145        SUPER(Planet, XMLPort, xmlelement, mode);
    146146
    147         XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere");
    148         XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode);     
    149         XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode);         
    150         XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
    151         XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
     147        if (GameMode::showsGraphics())
     148        {
     149            XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere");
     150            XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode);     
     151            XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode);         
     152            XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
     153            XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
     154        }
    152155    }
    153156
  • code/trunk/src/orxonox/objects/worldentities/Planet.h

    r2710 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include <OgreMesh.h>
    35 
     34#include <string>
    3635#include "tools/BillboardSet.h"
    3736#include "tools/Mesh.h"
    3837#include "MovableEntity.h"
    39 #include "objects/Tickable.h"
    4038
    4139namespace orxonox
     
    108106            float atmosphereSize;
    109107            float imageSize;
    110             Ogre::Mesh::LodDistanceList distList;
     108            std::vector<float> distList;
    111109            BillboardSet billboard_;
    112110            bool bCastShadows_;
  • code/trunk/src/orxonox/objects/worldentities/PongBall.cc

    r3110 r3196  
    3232#include "core/GameMode.h"
    3333#include "objects/gametypes/Gametype.h"
     34#include "objects/worldentities/PongBat.h"
    3435#include "sound/SoundBase.h"
    3536
     
    4950        this->batID_[0] = OBJECTID_UNKNOWN;
    5051        this->batID_[1] = OBJECTID_UNKNOWN;
    51         this->relMercyOffset_ = 0.05;
     52        this->relMercyOffset_ = 0.05f;
    5253
    5354        this->registerVariables();
     
    102103                    if (position.x > this->fieldWidth_ / 2 && this->bat_[1])
    103104                    {
    104                         distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     105                        distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    105106                        if (fabs(distance) <= 1)
    106107                        {
     
    122123                    if (position.x < -this->fieldWidth_ / 2 && this->bat_[0])
    123124                    {
    124                         distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     125                        distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    125126                        if (fabs(distance) <= 1)
    126127                        {
     
    172173              if (position.x > this->fieldWidth_ / 2 && this->bat_[1])
    173174              {
    174                 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     175                distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    175176                if (fabs(distance) <= 1)
    176177                {
     
    183184              if (position.x < -this->fieldWidth_ / 2 && this->bat_[0])
    184185              {
    185                 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     186                distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    186187                if (fabs(distance) <= 1)
    187188                {
     
    217218        }
    218219    }
     220
     221    void PongBall::setBats(PongBat** bats)
     222    {
     223        this->bat_ = bats;
     224        this->batID_[0] = this->bat_[0]->getObjectID();
     225        this->batID_[1] = this->bat_[1]->getObjectID();
     226    }
     227
     228    void PongBall::applyBats()
     229    {
     230        if (!this->bat_)
     231            this->bat_ = new PongBat*[2];
     232        if (this->batID_[0] != OBJECTID_UNKNOWN)
     233            this->bat_[0] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0]));
     234        if (this->batID_[1] != OBJECTID_UNKNOWN)
     235            this->bat_[1] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1]));
     236    }
    219237}
  • code/trunk/src/orxonox/objects/worldentities/PongBall.h

    r3108 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "util/Math.h"
    3435#include "objects/worldentities/MovableEntity.h"
    35 #include "objects/worldentities/PongBat.h"
    3636
    3737namespace orxonox
     
    6363                { return this->batlength_; }
    6464
    65             void setBats(PongBat** bats)
    66             { this->bat_ = bats; this->batID_[0] = this->bat_[0]->getObjectID(); this->batID_[1] = this->bat_[1]->getObjectID(); }
    67 
    68             void applyBats()
    69             { 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])); }
     65            void setBats(PongBat** bats);
     66            void applyBats();
    7067
    7168            static const float MAX_REL_Z_VELOCITY;
  • code/trunk/src/orxonox/objects/worldentities/PongBat.h

    r2839 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    3433#include "objects/worldentities/ControllableEntity.h"
    3534
  • code/trunk/src/orxonox/objects/worldentities/PongCenterpoint.h

    r2826 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <string>
     35#include <util/Math.h>
    3436#include "objects/worldentities/StaticEntity.h"
    3537
  • code/trunk/src/orxonox/objects/worldentities/SpawnPoint.cc

    r3110 r3196  
    3030
    3131#include "core/CoreIncludes.h"
     32#include "core/Template.h"
    3233#include "core/XMLPort.h"
    3334#include "objects/gametypes/Gametype.h"
     35#include "objects/worldentities/pawns/Pawn.h"
    3436
    3537namespace orxonox
     
    7173    }
    7274
     75    void SpawnPoint::setTemplate(Template* temp)
     76    {
     77        this->template_ = temp;
     78        this->templatename_ = temp->getName();
     79    }
     80
    7381    Pawn* SpawnPoint::spawn()
    7482    {
  • code/trunk/src/orxonox/objects/worldentities/SpawnPoint.h

    r2662 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include <string>
    3435#include "core/Identifier.h"
    35 #include "core/Template.h"
    36 #include "objects/worldentities/pawns/Pawn.h"
    3736#include "objects/worldentities/StaticEntity.h"
    3837
     
    5251                { return this->spawnclass_; }
    5352
    54             inline void setTemplate(Template* temp)
    55                 { this->template_ = temp; this->templatename_ = temp->getName(); }
     53            void setTemplate(Template* temp);
    5654            inline Template* getTemplate() const
    5755                { return this->template_; }
  • code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc

    r3110 r3196  
    3131
    3232#include <OgreSceneNode.h>
    33 #include "BulletDynamics/Dynamics/btRigidBody.h"
    34 
    35 #include "util/Exception.h"
     33#include <BulletDynamics/Dynamics/btRigidBody.h>
     34#include "util/OrxAssert.h"
    3635#include "core/CoreIncludes.h"
    3736
  • code/trunk/src/orxonox/objects/worldentities/TeamSpawnPoint.h

    r2826 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "objects/worldentities/pawns/Pawn.h"
    3435#include "SpawnPoint.h"
    3536
  • code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc

    r3110 r3196  
    3030#include "WorldEntity.h"
    3131
    32 #include <cassert>
     32#include <OgreBillboardSet.h>
     33#include <OgreCamera.h>
     34#include <OgreEntity.h>
     35#include <OgreParticleSystem.h>
     36#include <OgreSceneManager.h>
    3337#include <OgreSceneNode.h>
    34 #include <OgreSceneManager.h>
    35 #include "BulletDynamics/Dynamics/btRigidBody.h"
    36 
     38#include <BulletDynamics/Dynamics/btRigidBody.h>
     39#include <boost/static_assert.hpp>
     40
     41#include "util/OrxAssert.h"
     42#include "util/Convert.h"
    3743#include "util/Exception.h"
    38 #include "util/Convert.h"
    3944#include "core/CoreIncludes.h"
    4045#include "core/XMLPort.h"
    41 
    4246#include "objects/Scene.h"
    4347#include "objects/collisionshapes/WorldEntityCollisionShape.h"
     
    5155    const Vector3 WorldEntity::DOWN  = Vector3::NEGATIVE_UNIT_Y;
    5256    const Vector3 WorldEntity::UP    = Vector3::UNIT_Y;
     57
     58    // Be sure we don't do bad conversions
     59    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_LOCAL  == (int)WorldEntity::Local);
     60    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_PARENT == (int)WorldEntity::Parent);
     61    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD  == (int)WorldEntity::World);
    5362
    5463    /**
     
    463472    //! Attaches an Ogre::MovableObject to this WorldEntity.
    464473    void WorldEntity::attachOgreObject(Ogre::MovableObject* object)
    465     {
    466         this->node_->attachObject(object);
    467     }
     474        { this->node_->attachObject(object); }
     475    void WorldEntity::attachOgreObject(Ogre::BillboardSet* object)
     476        { this->node_->attachObject(object); }
     477    void WorldEntity::attachOgreObject(Ogre::Camera* object)
     478        { this->node_->attachObject(object); }
     479    void WorldEntity::attachOgreObject(Ogre::Entity* object)
     480        { this->node_->attachObject(object); }
     481    void WorldEntity::attachOgreObject(Ogre::ParticleSystem* object)
     482        { this->node_->attachObject(object); }
    468483
    469484    //! Detaches an Ogre::MovableObject from this WorldEntity.
    470485    void WorldEntity::detachOgreObject(Ogre::MovableObject* object)
    471     {
    472         this->node_->detachObject(object);
    473     }
     486        { this->node_->detachObject(object); }
     487    void WorldEntity::detachOgreObject(Ogre::BillboardSet* object)
     488        { this->node_->detachObject(object); }
     489    void WorldEntity::detachOgreObject(Ogre::Camera* object)
     490        { this->node_->detachObject(object); }
     491    void WorldEntity::detachOgreObject(Ogre::Entity* object)
     492        { this->node_->detachObject(object); }
     493    void WorldEntity::detachOgreObject(Ogre::ParticleSystem* object)
     494        { this->node_->detachObject(object); }
    474495
    475496    //! Detaches an Ogre::MovableObject (by string) from this WorldEntity.
     
    501522
    502523    // Note: These functions are placed in WorldEntity.h as inline functions for the release build.
    503 #ifndef NDEBUG
     524#ifndef ORXONOX_RELEASE
    504525    const Vector3& WorldEntity::getPosition() const
    505526    {
     
    574595        Translates this WorldEntity by a vector.
    575596    @param relativeTo
    576         @see TransformSpace::Enum
    577     */
    578     void WorldEntity::translate(const Vector3& distance, TransformSpace::Enum relativeTo)
     597        @see WorldEntity::TransformSpace
     598    */
     599    void WorldEntity::translate(const Vector3& distance, TransformSpace relativeTo)
    579600    {
    580601        switch (relativeTo)
    581602        {
    582         case TransformSpace::Local:
     603        case WorldEntity::Local:
    583604            // position is relative to parent so transform downwards
    584605            this->setPosition(this->getPosition() + this->getOrientation() * distance);
    585606            break;
    586         case TransformSpace::Parent:
     607        case WorldEntity::Parent:
    587608            this->setPosition(this->getPosition() + distance);
    588609            break;
    589         case TransformSpace::World:
     610        case WorldEntity::World:
    590611            // position is relative to parent so transform upwards
    591612            if (this->node_->getParent())
     
    602623        Rotates this WorldEntity by a quaternion.
    603624    @param relativeTo
    604         @see TransformSpace::Enum
    605     */
    606     void WorldEntity::rotate(const Quaternion& rotation, TransformSpace::Enum relativeTo)
     625        @see WorldEntity::TransformSpace
     626    */
     627    void WorldEntity::rotate(const Quaternion& rotation, TransformSpace relativeTo)
    607628    {
    608629        switch(relativeTo)
    609630        {
    610         case TransformSpace::Local:
     631        case WorldEntity::Local:
    611632            this->setOrientation(this->getOrientation() * rotation);
    612633            break;
    613         case TransformSpace::Parent:
     634        case WorldEntity::Parent:
    614635            // Rotations are normally relative to local axes, transform up
    615636            this->setOrientation(rotation * this->getOrientation());
    616637            break;
    617         case TransformSpace::World:
     638        case WorldEntity::World:
    618639            // Rotations are normally relative to local axes, transform up
    619640            this->setOrientation(this->getOrientation() * this->getWorldOrientation().Inverse()
     
    627648        Makes this WorldEntity look a specific target location.
    628649    @param relativeTo
    629         @see TransformSpace::Enum
     650        @see WorldEntity::TransformSpace
    630651    @param localDirectionVector
    631652        The vector which normally describes the natural direction of the object, usually -Z.
    632653    */
    633     void WorldEntity::lookAt(const Vector3& target, TransformSpace::Enum relativeTo, const Vector3& localDirectionVector)
    634     {
    635         Vector3 origin;
     654    void WorldEntity::lookAt(const Vector3& target, TransformSpace relativeTo, const Vector3& localDirectionVector)
     655    {
     656        Vector3 origin(0, 0, 0);
    636657        switch (relativeTo)
    637658        {
    638         case TransformSpace::Local:
     659        case WorldEntity::Local:
    639660            origin = Vector3::ZERO;
    640661            break;
    641         case TransformSpace::Parent:
     662        case WorldEntity::Parent:
    642663            origin = this->getPosition();
    643664            break;
    644         case TransformSpace::World:
     665        case WorldEntity::World:
    645666            origin = this->getWorldPosition();
    646667            break;
     
    653674        Makes this WorldEntity look in specific direction.
    654675    @param relativeTo
    655         @see TransformSpace::Enum
     676        @see WorldEntity::TransformSpace
    656677    @param localDirectionVector
    657678        The vector which normally describes the natural direction of the object, usually -Z.
    658679    */
    659     void WorldEntity::setDirection(const Vector3& direction, TransformSpace::Enum relativeTo, const Vector3& localDirectionVector)
     680    void WorldEntity::setDirection(const Vector3& direction, TransformSpace relativeTo, const Vector3& localDirectionVector)
    660681    {
    661682        Quaternion savedOrientation(this->getOrientation());
    662         Ogre::Node::TransformSpace ogreRelativeTo;
    663         switch (relativeTo)
    664         {
    665         case TransformSpace::Local:
    666             ogreRelativeTo = Ogre::Node::TS_LOCAL; break;
    667         case TransformSpace::Parent:
    668             ogreRelativeTo = Ogre::Node::TS_PARENT; break;
    669         case TransformSpace::World:
    670             ogreRelativeTo = Ogre::Node::TS_WORLD; break;
    671         default: OrxAssert(false, "Faulty TransformSpace::Enum assigned.");
    672         }
    673         this->node_->setDirection(direction, ogreRelativeTo, localDirectionVector);
     683        this->node_->setDirection(direction, static_cast<Ogre::Node::TransformSpace>(relativeTo), localDirectionVector);
    674684        Quaternion newOrientation(this->node_->getOrientation());
    675685        this->node_->setOrientation(savedOrientation);
     
    772782            break;
    773783        case Kinematic:
    774             this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT | btCollisionObject::CF_KINEMATIC_OBJECT);
     784            this->physicalBody_->setCollisionFlags((this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT) | btCollisionObject::CF_KINEMATIC_OBJECT);
    775785            break;
    776786        case Static:
    777             this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT | btCollisionObject::CF_STATIC_OBJECT);
     787            this->physicalBody_->setCollisionFlags((this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT) | btCollisionObject::CF_STATIC_OBJECT);
    778788            break;
    779789        case None:
  • code/trunk/src/orxonox/objects/worldentities/WorldEntity.h

    r3077 r3196  
    3333#include "OrxonoxPrereqs.h"
    3434
    35 #ifdef NDEBUG
    36 #include <OgreSceneNode.h>
    37 #else
    38 #include <OgrePrerequisites.h>
     35#ifdef ORXONOX_RELEASE
     36#  include <OgreSceneNode.h>
    3937#endif
    40 #include "LinearMath/btMotionState.h"
     38#include <LinearMath/btMotionState.h>
    4139
    4240#include "util/Math.h"
     41#include "util/OgreForwardRefs.h"
    4342#include "core/BaseObject.h"
    4443#include "network/synchronisable/Synchronisable.h"
     
    7574
    7675        public:
     76            // Define our own transform space enum to avoid Ogre includes here
     77            /**
     78            @brief
     79                Enumeration denoting the spaces which a transform can be relative to.
     80            */
     81            enum TransformSpace
     82            {
     83                //! Transform is relative to the local space
     84                Local,
     85                //! Transform is relative to the space of the parent node
     86                Parent,
     87                //! Transform is relative to world space
     88                World
     89            };
     90
     91        public:
    7792            WorldEntity(BaseObject* creator);
    7893            virtual ~WorldEntity();
     
    97112            const Vector3& getWorldPosition() const;
    98113
    99             void translate(const Vector3& distance, TransformSpace::Enum relativeTo = TransformSpace::Parent);
    100             inline void translate(float x, float y, float z, TransformSpace::Enum relativeTo = TransformSpace::Parent)
     114            void translate(const Vector3& distance, TransformSpace relativeTo = WorldEntity::Parent);
     115            inline void translate(float x, float y, float z, TransformSpace relativeTo = WorldEntity::Parent)
    101116                { this->translate(Vector3(x, y, z), relativeTo); }
    102117
     
    114129            const Quaternion& getWorldOrientation() const;
    115130
    116             void rotate(const Quaternion& rotation, TransformSpace::Enum relativeTo = TransformSpace::Local);
    117             inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
     131            void rotate(const Quaternion& rotation, TransformSpace relativeTo = WorldEntity::Local);
     132            inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
    118133                { this->rotate(Quaternion(angle, axis), relativeTo); }
    119134
    120             inline void yaw(const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
     135            inline void yaw(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
    121136                { this->rotate(Quaternion(angle, Vector3::UNIT_Y), relativeTo); }
    122             inline void pitch(const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
     137            inline void pitch(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
    123138                { this->rotate(Quaternion(angle, Vector3::UNIT_X), relativeTo); }
    124             inline void roll(const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
     139            inline void roll(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
    125140                { this->rotate(Quaternion(angle, Vector3::UNIT_Z), relativeTo); }
    126141
    127             void lookAt(const Vector3& target, TransformSpace::Enum relativeTo = TransformSpace::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
    128             void setDirection(const Vector3& direction, TransformSpace::Enum relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
    129             inline void setDirection(float x, float y, float z, TransformSpace::Enum relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)
     142            void lookAt(const Vector3& target, TransformSpace relativeTo = WorldEntity::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
     143            void setDirection(const Vector3& direction, TransformSpace relativeTo = WorldEntity::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
     144            inline void setDirection(float x, float y, float z, TransformSpace relativeTo = WorldEntity::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)
    130145                { this->setDirection(Vector3(x, y, z), relativeTo, localDirectionVector); }
    131146
     
    157172                { return this->children_; }
    158173
    159             void attachOgreObject(Ogre::MovableObject* object);
    160             void detachOgreObject(Ogre::MovableObject* object);
     174            void attachOgreObject(Ogre::MovableObject*  object);
     175            void attachOgreObject(Ogre::BillboardSet*   object);
     176            void attachOgreObject(Ogre::Camera*         object);
     177            void attachOgreObject(Ogre::Entity*         object);
     178            void attachOgreObject(Ogre::ParticleSystem* object);
     179
     180            void detachOgreObject(Ogre::MovableObject*  object);
     181            void detachOgreObject(Ogre::BillboardSet*   object);
     182            void detachOgreObject(Ogre::Camera*         object);
     183            void detachOgreObject(Ogre::Entity*         object);
     184            void detachOgreObject(Ogre::ParticleSystem* object);
     185
    161186            Ogre::MovableObject* detachOgreObject(const Ogre::String& name);
    162187
     
    427452
    428453    // Inline heavily used functions for release builds. In debug, we better avoid including OgreSceneNode here.
    429 #ifdef NDEBUG
     454#ifdef ORXONOX_RELEASE
    430455    inline const Vector3& WorldEntity::getPosition() const
    431456        { return this->node_->getPosition(); }
  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r3110 r3196  
    2929#include "Pawn.h"
    3030
     31#include "core/CoreIncludes.h"
    3132#include "core/GameMode.h"
    32 #include "core/CoreIncludes.h"
    3333#include "core/XMLPort.h"
    34 #include "util/Math.h"
     34#include "network/NetworkFunction.h"
     35
     36#include "interfaces/PawnListener.h"
    3537#include "PawnManager.h"
    3638#include "objects/infos/PlayerInfo.h"
     
    3941#include "objects/worldentities/ExplosionChunk.h"
    4042#include "objects/worldentities/BigExplosion.h"
    41 
    4243#include "objects/weaponsystem/WeaponSystem.h"
    4344#include "objects/weaponsystem/WeaponSlot.h"
     
    4546#include "objects/weaponsystem/WeaponSet.h"
    4647
    47 #include "network/NetworkFunction.h"
    4848
    4949namespace orxonox
     
    373373        this->isHumanShip_ = true;
    374374    }
    375 
    376 
    377     ///////////////////
    378     // Pawn Listener //
    379     ///////////////////
    380     PawnListener::PawnListener()
    381     {
    382         RegisterRootObject(PawnListener);
    383     }
    384375}
  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h

    r3089 r3196  
    3131
    3232#include "OrxonoxPrereqs.h"
     33
     34#include <string>
     35#include "interfaces/RadarViewable.h"
    3336#include "objects/worldentities/ControllableEntity.h"
    34 #include "objects/RadarViewable.h"
    3537#include "objects/pickup/PickupCollection.h"
    3638
     
    147149                { this->weaponSystem_ = weaponsystem; }
    148150    };
    149 
    150     class _OrxonoxExport PawnListener : virtual public OrxonoxClass
    151     {
    152         public:
    153             PawnListener();
    154             virtual ~PawnListener() {}
    155 
    156             virtual void destroyedPawn(Pawn* pawn) = 0;
    157     };
    158151}
    159152
  • code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc

    r3110 r3196  
    2929#include "SpaceShip.h"
    3030
    31 #include "BulletDynamics/Dynamics/btRigidBody.h"
    32 
    33 #include "util/Math.h"
    34 #include "util/Exception.h"
     31#include <BulletDynamics/Dynamics/btRigidBody.h>
     32
    3533#include "core/CoreIncludes.h"
    3634#include "core/ConfigValueIncludes.h"
  • code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.h

    r2662 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include "LinearMath/btVector3.h"
    35 
     34#include <string>
     35#include <LinearMath/btVector3.h>
     36#include "util/Math.h"
    3637#include "Pawn.h"
    3738
  • code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r3110 r3196  
    2929#include "Spectator.h"
    3030
    31 #include <OgreBillboardSet.h>
    32 
    3331#include "core/CoreIncludes.h"
    3432#include "core/ConfigValueIncludes.h"
    3533#include "core/GameMode.h"
    36 #include "objects/worldentities/Model.h"
     34
     35#include "tools/BillboardSet.h"
    3736#include "objects/Scene.h"
    3837#include "objects/infos/PlayerInfo.h"
    39 #include "objects/gametypes/Gametype.h"
    40 #include "tools/BillboardSet.h"
    41 #include "overlays/OverlayText.h"
    42 #include "overlays/OverlayGroup.h"
    43 #include "util/Convert.h"
    4438
    4539namespace orxonox
     
    6559        {
    6660            this->greetingFlare_ = new BillboardSet();
    67             this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1);
     61            this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0f, 1.0f, 0.8f), Vector3(0, 20, 0), 1);
    6862            if (this->greetingFlare_->getBillboardSet())
    6963                this->attachOgreObject(this->greetingFlare_->getBillboardSet());
  • code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.h

    r3053 r3196  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "util/Math.h"
    3435#include "objects/worldentities/ControllableEntity.h"
    3536
  • code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc

    r3086 r3196  
    2929
    3030#include "TeamBaseMatchBase.h"
     31
    3132#include "core/CoreIncludes.h"
     33#include "interfaces/PawnListener.h"
     34#include "interfaces/TeamColourable.h"
    3235#include "objects/gametypes/TeamBaseMatch.h"
    33 #include "objects/Teamcolourable.h"
    3436
    3537namespace orxonox
     
    8082        for (std::set<WorldEntity*>::iterator it = attachments.begin(); it != attachments.end(); ++it)
    8183        {
    82             if ((*it)->isA(Class(Teamcolourable)))
     84            if ((*it)->isA(Class(TeamColourable)))
    8385            {
    84                 Teamcolourable* tc = dynamic_cast<Teamcolourable*>(*it);
     86                TeamColourable* tc = dynamic_cast<TeamColourable*>(*it);
    8587                tc->setTeamColour(colour);
    8688            }
  • code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h

    r3033 r3196  
    3030#define _TeamBaseMatchBase_H__
    3131
     32#include "OrxonoxPrereqs.h"
     33
    3234#include "Pawn.h"
    3335
    3436namespace orxonox
    3537{
    36 
    37 
    3838    namespace BaseState
    3939    {
  • code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.cc

    r3110 r3196  
    3131#include "core/CoreIncludes.h"
    3232#include "core/XMLPort.h"
    33 
    3433#include "objects/gametypes/Asteroids.h"
    35 #include "orxonox/objects/worldentities/pawns/Pawn.h"
     34#include "objects/worldentities/pawns/Pawn.h"
    3635
    3736namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.h

    r3064 r3196  
    3535#define _CheckPoint_H__
    3636
     37#include "OrxonoxPrereqs.h"
     38
     39#include "interfaces/RadarViewable.h"
    3740#include "DistanceTrigger.h"
    38 #include "objects/RadarViewable.h"
    3941
    4042namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc

    r3110 r3196  
    2929#include "DistanceTrigger.h"
    3030
    31 #include <OgreNode.h>
    32 
    3331#include "core/CoreIncludes.h"
    3432#include "core/XMLPort.h"
    35 
    3633#include "orxonox/objects/worldentities/pawns/Pawn.h"
    3734
  • code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h

    r3068 r3196  
    3030#define _DistanceTrigger_H__
    3131
    32 #include "PlayerTrigger.h"
     32#include "OrxonoxPrereqs.h"
    3333
    3434#include <set>
    35 
    3635#include "core/ClassTreeMask.h"
    37 #include "core/BaseObject.h"
    38 
    39 #include "orxonox/objects/worldentities/ControllableEntity.h"
     36#include "PlayerTrigger.h"
    4037
    4138namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc

    r3110 r3196  
    5151        SUPER(EventTrigger, processEvent, event);
    5252
    53         SetEvent(EventTrigger, "trigger", trigger, event);
     53        ORXONOX_SET_EVENT(EventTrigger, "trigger", trigger, event);
    5454    }
    5555
  • code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h

    r2087 r3196  
    3030#define _EventTrigger_H__
    3131
     32#include "OrxonoxPrereqs.h"
    3233#include "Trigger.h"
    33 
    34 #include "core/ClassTreeMask.h"
    35 #include "core/BaseObject.h"
    3634
    3735namespace orxonox
  • code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc

    r3110 r3196  
    3434
    3535#include "PlayerTrigger.h"
    36 
    3736#include "core/CoreIncludes.h"
    3837
  • code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h

    r3033 r3196  
    3737
    3838#include "OrxonoxPrereqs.h"
    39 
    4039#include "Trigger.h"
    4140
  • code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc

    r3110 r3196  
    2929#include "Trigger.h"
    3030
    31 #include <OgreBillboard.h>
    32 #include <OgreBillboardSet.h>
    33 #include "util/Debug.h"
    3431#include "core/CoreIncludes.h"
    3532#include "core/ConsoleCommand.h"
     33#include "core/GameMode.h"
    3634#include "core/XMLPort.h"
    37 #include "core/GameMode.h"
    3835#include "objects/Scene.h"
    3936
     
    237234  {
    238235    if (( (this->latestState_ & 2) && this->bStayActive_ && (this->remainingActivations_ <= 0))
    239      || (!(this->latestState_ & 2))                      && (this->remainingActivations_ == 0))
     236     || (!(this->latestState_ & 2)                       && (this->remainingActivations_ == 0)))
    240237      return false;
    241238    else
  • code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h

    r3068 r3196  
    3030#define _Trigger_H__
    3131
     32#include "OrxonoxPrereqs.h"
     33
    3234#include <set>
    3335#include <queue>
    3436
    35 #include "OrxonoxPrereqs.h"
    36 
    37 #include "objects/Tickable.h"
     37#include "tools/BillboardSet.h"
     38#include "interfaces/Tickable.h"
    3839#include "objects/worldentities/StaticEntity.h"
    39 #include "tools/BillboardSet.h"
    4040
    4141namespace orxonox
Note: See TracChangeset for help on using the changeset viewer.