Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2016, 1:54:11 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11_v2 into cpp11_v3

Location:
code/branches/cpp11_v3
Files:
293 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3

  • code/branches/cpp11_v3/src/modules/designtools/CreateStars.h

    r9667 r11054  
    4343            void createBillboards();
    4444
    45             void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     45            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4646
    4747            void setNumStars(int num) {
  • code/branches/cpp11_v3/src/modules/designtools/ScreenshotManager.cc

    r10624 r11054  
    6969        Constructor.
    7070    */
    71     ScreenshotManager::ScreenshotManager() : finalPicturePB_(NULL), data_(NULL)
     71    ScreenshotManager::ScreenshotManager() : finalPicturePB_(nullptr), data_(nullptr)
    7272    {
    7373        RegisterObject(ScreenshotManager);
     
    9090    void ScreenshotManager::cleanup(void)
    9191    {
    92         if(this->finalPicturePB_ != NULL)
     92        if(this->finalPicturePB_ != nullptr)
    9393        {
    9494            delete this->finalPicturePB_;
    95             this->finalPicturePB_ = NULL;
    96         }
    97         if(this->data_ != NULL)
     95            this->finalPicturePB_ = nullptr;
     96        }
     97        if(this->data_ != nullptr)
    9898        {
    9999            delete this->data_;
    100             this->data_ = NULL;
     100            this->data_ = nullptr;
    101101        }
    102102        if(!this->tempTexture_.isNull())
     
    151151        // Get the screenshot.
    152152        Ogre::Image* finalImage = getScreenshot();
    153         if(finalImage != NULL)
     153        if(finalImage != nullptr)
    154154        {
    155155            // Save it.
     
    173173    Ogre::Image* ScreenshotManager::getScreenshot()
    174174    {
    175         if(CameraManager::getInstance().getActiveCamera() == NULL )
    176             return NULL;
     175        if(CameraManager::getInstance().getActiveCamera() == nullptr )
     176            return nullptr;
    177177        return this->getScreenshot(CameraManager::getInstance().getActiveCamera()->getOgreCamera());
    178178    }
     
    189189    Ogre::Image* ScreenshotManager::getScreenshot(Ogre::Camera* camera)
    190190    {
    191         if(camera == NULL)
    192             return NULL;
     191        if(camera == nullptr)
     192            return nullptr;
    193193       
    194194        // Update the internal parameters.
  • code/branches/cpp11_v3/src/modules/designtools/SkyboxGenerator.cc

    r10624 r11054  
    8282        this->faceCounter_ = 0;
    8383       
    84         this->names_.push_back("fr");
    85         this->names_.push_back("lf");
    86         this->names_.push_back("bk");
    87         this->names_.push_back("rt");
    88         this->names_.push_back("up");
    89         this->names_.push_back("dn");
    90        
    91         this->rotations_.push_back(std::pair<int, int>(90, 0));
    92         this->rotations_.push_back(std::pair<int, int>(90, 0));
    93         this->rotations_.push_back(std::pair<int, int>(90, 0));
    94         this->rotations_.push_back(std::pair<int, int>(90, 90));
    95         this->rotations_.push_back(std::pair<int, int>(0, 180));
    96         this->rotations_.push_back(std::pair<int, int>(0, 90));
     84        this->names_.emplace_back("fr");
     85        this->names_.emplace_back("lf");
     86        this->names_.emplace_back("bk");
     87        this->names_.emplace_back("rt");
     88        this->names_.emplace_back("up");
     89        this->names_.emplace_back("dn");
     90       
     91        this->rotations_.emplace_back(90, 0);
     92        this->rotations_.emplace_back(90, 0);
     93        this->rotations_.emplace_back(90, 0);
     94        this->rotations_.emplace_back(90, 90);
     95        this->rotations_.emplace_back(0, 180);
     96        this->rotations_.emplace_back(0, 90);
    9797    }
    9898
     
    146146            }
    147147
    148             ControllableEntity* entity = NULL;
    149             if(HumanController::getLocalControllerSingleton() != NULL && HumanController::getLocalControllerSingleton()->getControllableEntity() != NULL)
     148            ControllableEntity* entity = nullptr;
     149            if(HumanController::getLocalControllerSingleton() != nullptr && HumanController::getLocalControllerSingleton()->getControllableEntity() != nullptr)
    150150                entity = HumanController::getLocalControllerSingleton()->getControllableEntity();
    151151            else
  • code/branches/cpp11_v3/src/modules/designtools/SkyboxGenerator.h

    r9667 r11054  
    6565            SkyboxGenerator();
    6666            virtual ~SkyboxGenerator();
    67             void tick(float dt); // This is where the skybox generation happens.
     67            virtual void tick(float dt) override; // This is where the skybox generation happens.
    6868            static void createSkybox(void); // Generate the 6 faces of a skybox.
    6969            void setConfigValues(void); // Sets some config values.
     
    106106           
    107107            std::vector<std::string> names_; //!< The names of the image files for the skybox faces to be generated.
    108             std::vector< std::pair<int, int> > rotations_; //!< The rotation in yaw an pitch direction that is applied to the camera after a specific face has been generated.
     108            std::vector< std::pair<int, int>> rotations_; //!< The rotation in yaw an pitch direction that is applied to the camera after a specific face has been generated.
    109109           
    110110            // Storage variables
  • code/branches/cpp11_v3/src/modules/docking/Dock.cc

    r10624 r11054  
    8787
    8888        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
    89         PlayerInfo* player = NULL;
     89        PlayerInfo* player = nullptr;
    9090
    9191        // Check whether it is a player trigger and extract pawn from it
    92         if(pTrigger != NULL)
     92        if(pTrigger != nullptr)
    9393        {
    9494            if(!pTrigger->isForPlayer()) {  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
     
    103103            return false;
    104104        }
    105         if(player == NULL)
     105        if(player == nullptr)
    106106        {
    107107            orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
     
    131131    {
    132132        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
    133         PlayerInfo* player = NULL;
     133        PlayerInfo* player = nullptr;
    134134
    135135        // Check whether it is a player trigger and extract pawn from it
    136         if(pTrigger != NULL)
     136        if(pTrigger != nullptr)
    137137        {
    138138            if(!pTrigger->isForPlayer()) {  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
     
    147147            return false;
    148148        }
    149         if(player == NULL)
     149        if(player == nullptr)
    150150        {
    151151            orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
     
    214214    {
    215215        PlayerInfo* player = HumanController::getLocalControllerSingleton()->getPlayer();
    216         for(ObjectList<Dock>::iterator it = ObjectList<Dock>::begin(); it != ObjectList<Dock>::end(); ++it)
    217         {
    218             if(it->dock(player))
     216        for(Dock* dock : ObjectList<Dock>())
     217        {
     218            if(dock->dock(player))
    219219                break;
    220220        }
     
    224224    {
    225225        PlayerInfo* player = HumanController::getLocalControllerSingleton()->getPlayer();
    226         for(ObjectList<Dock>::iterator it = ObjectList<Dock>::begin(); it != ObjectList<Dock>::end(); ++it)
    227         {
    228             if(it->undock(player))
     226        for(Dock* dock : ObjectList<Dock>())
     227        {
     228            if(dock->undock(player))
    229229                break;
    230230        }
     
    295295        int i = 0;
    296296        PlayerInfo* player = HumanController::getLocalControllerSingleton()->getPlayer();
    297         for(ObjectList<Dock>::iterator it = ObjectList<Dock>::begin(); it != ObjectList<Dock>::end(); ++it)
    298         {
    299             if(it->candidates_.find(player) != it->candidates_.end())
     297        for(Dock* dock : ObjectList<Dock>())
     298        {
     299            if(dock->candidates_.find(player) != dock->candidates_.end())
    300300                i++;
    301301        }
     
    306306    {
    307307        PlayerInfo* player = HumanController::getLocalControllerSingleton()->getPlayer();
    308         for(ObjectList<Dock>::iterator it = ObjectList<Dock>::begin(); it != ObjectList<Dock>::end(); ++it)
    309         {
    310             if(it->candidates_.find(player) != it->candidates_.end())
     308        for(Dock* dock : ObjectList<Dock>())
     309        {
     310            if(dock->candidates_.find(player) != dock->candidates_.end())
    311311            {
    312312                if(index == 0)
    313                     return *it;
     313                    return dock;
    314314                index--;
    315315            }
    316316        }
    317         return NULL;
     317        return nullptr;
    318318    }
    319319
     
    327327    const DockingEffect* Dock::getEffect(unsigned int i) const
    328328    {
    329         for (std::list<DockingEffect*>::const_iterator effect = this->effects_.begin(); effect != this->effects_.end(); ++effect)
     329        for (DockingEffect* effect : this->effects_)
    330330        {
    331331            if(i == 0)
    332                return *effect;
     332               return effect;
    333333            i--;
    334334        }
    335         return NULL;
     335        return nullptr;
    336336    }
    337337
     
    346346    const DockingAnimation* Dock::getAnimation(unsigned int i) const
    347347    {
    348         for (std::list<DockingAnimation*>::const_iterator animation = this->animations_.begin(); animation != this->animations_.end(); ++animation)
     348        for (DockingAnimation* animation : this->animations_)
    349349        {
    350350            if(i == 0)
    351                return *animation;
     351               return animation;
    352352            i--;
    353353        }
    354         return NULL;
     354        return nullptr;
    355355    }
    356356}
  • code/branches/cpp11_v3/src/modules/docking/Dock.h

    r9939 r11054  
    6565
    6666            // XML interface
    67             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    68             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
     67            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     68            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    6969
    7070            // XML functions
  • code/branches/cpp11_v3/src/modules/docking/DockToShip.cc

    r9974 r11054  
    7272
    7373        DockingTarget *target = DockingEffect::findTarget(this->target_);
    74         if (target == NULL) {
     74        if (target == nullptr) {
    7575            orxout(internal_warning, context::docking) << "Can't retrieve target for '" << this->target_ << "'.." << endl;
    7676            return false;
     
    7878
    7979        ControllableEntity *dockTo = (ControllableEntity*) target->getParent();
    80         if (dockTo == NULL) {
     80        if (dockTo == nullptr) {
    8181            orxout(internal_warning, context::docking) << "Parent is not a ControllableEntity.." << endl;
    8282            return false;
  • code/branches/cpp11_v3/src/modules/docking/DockToShip.h

    r9667 r11054  
    6060            virtual ~DockToShip();
    6161
    62             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     62            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    6363            void setTargetId(const std::string& str);
    6464            const std::string& getTargetId() const;
    6565
    66             virtual bool docking(PlayerInfo* player); //!< Called when docking starts
    67             virtual bool release(PlayerInfo* player); //!< Called when player wants undock
     66            virtual bool docking(PlayerInfo* player) override; //!< Called when docking starts
     67            virtual bool release(PlayerInfo* player) override; //!< Called when player wants undock
    6868        private:
    6969            std::string target_;
  • code/branches/cpp11_v3/src/modules/docking/DockingAnimation.cc

    r10624 r11054  
    4545        RegisterObject(DockingAnimation);
    4646
    47         this->parent_ = NULL;
     47        this->parent_ = nullptr;
    4848    }
    4949
     
    5757        bool check = true;
    5858
    59         for (std::list<DockingAnimation*>::iterator animation = animations.begin(); animation != animations.end(); animation++)
     59        for (DockingAnimation* animation : animations)
    6060        {
    6161            if(dock)
    62                 check &= (*animation)->docking(player);
     62                check &= animation->docking(player);
    6363            else
    64                 check &= (*animation)->release(player);
     64                check &= animation->release(player);
    6565        }
    6666
  • code/branches/cpp11_v3/src/modules/docking/DockingController.cc

    r11052 r11054  
    4444        RegisterObject(DockingController);
    4545
    46         this->dock_ = NULL;
    47         this->player_ = NULL;
    48         this->entity_ = NULL;
     46        this->dock_ = nullptr;
     47        this->player_ = nullptr;
     48        this->entity_ = nullptr;
    4949    }
    5050
     
    122122        this->player_->startControl(this->entity_);
    123123        this->setActive(false);
    124         this->controllableEntity_ = NULL;
     124        this->controllableEntity_ = nullptr;
    125125
    126126        if (this->docking_)
  • code/branches/cpp11_v3/src/modules/docking/DockingController.h

    r9667 r11054  
    4545            virtual ~DockingController();
    4646
    47             virtual void tick(float dt);
     47            virtual void tick(float dt) override;
    4848
    4949            void takeControl(bool docking);
     
    5353
    5454        protected:
    55             virtual void positionReached();
     55            virtual void positionReached() override;
    5656
    5757        private:
  • code/branches/cpp11_v3/src/modules/docking/DockingEffect.cc

    r10624 r11054  
    5353        bool check = true;
    5454
    55         for (std::list<DockingEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
     55        for (DockingEffect* effect : effects)
    5656        {
    5757            if (dock)
    58                 check &= (*effect)->docking(player);
     58                check &= effect->docking(player);
    5959            else
    60                 check &= (*effect)->release(player);
     60                check &= effect->release(player);
    6161        }
    6262
     
    6565
    6666    DockingTarget *DockingEffect::findTarget(std::string name) {
    67         for (ObjectList<DockingTarget>::iterator it = ObjectList<DockingTarget>::begin(); it != ObjectList<DockingTarget>::end(); ++it)
     67        for (DockingTarget* target : ObjectList<DockingTarget>())
    6868        {
    69             if ((*it)->getName().compare(name) == 0)
    70                 return (*it);
     69            if (target->getName().compare(name) == 0)
     70                return target;
    7171        }
    72         return NULL;
     72        return nullptr;
    7373    }
    7474}
  • code/branches/cpp11_v3/src/modules/docking/DockingTarget.h

    r9667 r11054  
    5858            virtual ~DockingTarget();
    5959
    60             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     60            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    6161
    6262    };
  • code/branches/cpp11_v3/src/modules/docking/MoveToDockingTarget.h

    r9667 r11054  
    5959            virtual ~MoveToDockingTarget();
    6060
    61             virtual bool docking(PlayerInfo* player); //!< Called when a player starts docking
    62             virtual bool release(PlayerInfo* player); //!< Called when player wants to undock
     61            virtual bool docking(PlayerInfo* player) override; //!< Called when a player starts docking
     62            virtual bool release(PlayerInfo* player) override; //!< Called when player wants to undock
    6363    };
    6464
  • code/branches/cpp11_v3/src/modules/dodgerace/DodgeRace.cc

    r11052 r11054  
    5959        comboTimer.setTimer(3.0f, true, createExecutor(createFunctor(&DodgeRace::comboControll, this)));
    6060        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
    61         this->center_ = 0;
     61        this->center_ = nullptr;
    6262
    6363        this->setHUDTemplate("DodgeRaceHUD");
     
    6767    {
    6868        level++;
    69         if (getPlayer() != NULL)
     69        if (getPlayer() != nullptr)
    7070        {
    7171            for (int i = 0; i < 7; i++)
     
    8989    void DodgeRace::tick(float dt)
    9090    {
    91         if (getPlayer() != NULL)
     91        if (getPlayer() != nullptr)
    9292        {
    9393            currentPosition = getPlayer()->getWorldPosition().x;
     
    138138    DodgeRaceShip* DodgeRace::getPlayer()
    139139    {
    140         if (player == NULL)
    141         {
    142             for (ObjectList<DodgeRaceShip>::iterator it = ObjectList<DodgeRaceShip>::begin(); it != ObjectList<DodgeRaceShip>::end(); ++it)
    143             {
    144                 player = *it;
     140        if (player == nullptr)
     141        {
     142            for (DodgeRaceShip* ship : ObjectList<DodgeRaceShip>())
     143            {
     144                player = ship;
    145145            }
    146146        }
     
    177177        this->bForceSpawn_ = false;
    178178
    179         if (this->center_ == NULL)  // abandon mission!
     179        if (this->center_ == nullptr)  // abandon mission!
    180180        {
    181181            orxout(internal_error) << "DodgeRace: No Centerpoint specified." << endl;
  • code/branches/cpp11_v3/src/modules/dodgerace/DodgeRace.h

    r11052 r11054  
    6868            DodgeRace(Context* context);
    6969
    70             virtual void start();
    71             virtual void end();
     70            virtual void start() override;
     71            virtual void end() override;
    7272
    73             virtual void tick(float dt);
     73            virtual void tick(float dt) override;
    7474
    75             virtual void playerPreSpawn(PlayerInfo* player);
     75            virtual void playerPreSpawn(PlayerInfo* player) override;
    7676
    7777            void levelUp();
     
    8484            void setCenterpoint(DodgeRaceCenterPoint* center)
    8585                       { this->center_ = center; }
    86             virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command
     86            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
    8787
    8888            // checks if multiplier should be reset.
  • code/branches/cpp11_v3/src/modules/dodgerace/DodgeRaceCenterPoint.cc

    r10624 r11054  
    5656    void DodgeRaceCenterPoint::checkGametype()
    5757    {
    58         if (this->getGametype() != NULL && this->getGametype()->isA(Class(DodgeRace)))
     58        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(DodgeRace)))
    5959        {
    6060            DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype());
  • code/branches/cpp11_v3/src/modules/dodgerace/DodgeRaceCenterPoint.h

    r10624 r11054  
    5050            DodgeRaceCenterPoint(Context* context); //checks whether the gametype is actually DodgeRace.
    5151
    52             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     52            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5353
    5454        private:
  • code/branches/cpp11_v3/src/modules/dodgerace/DodgeRaceHUDinfo.cc

    r10624 r11054  
    4040        RegisterObject(DodgeRaceHUDinfo);
    4141
    42         this->DodgeRaceGame = 0;
     42        this->DodgeRaceGame = nullptr;
    4343        this->bShowPoints_ = true;
    4444    }
     
    8686        else
    8787        {
    88             this->DodgeRaceGame = 0;
     88            this->DodgeRaceGame = nullptr;
    8989        }
    9090    }
  • code/branches/cpp11_v3/src/modules/dodgerace/DodgeRaceHUDinfo.h

    r10234 r11054  
    4444            DodgeRaceHUDinfo(Context* context);
    4545
    46             virtual void tick(float dt);
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    48             virtual void changedOwner();
     46            virtual void tick(float dt) override;
     47            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     48            virtual void changedOwner() override;
    4949
    5050            inline void setShowPoints(bool value)
  • code/branches/cpp11_v3/src/modules/dodgerace/DodgeRaceShip.cc

    r10624 r11054  
    9191        // Camera
    9292        Camera* camera = this->getCamera();
    93         if (camera != NULL)
     93        if (camera != nullptr)
    9494        {
    9595            // camera->setPosition(Vector3(-pos.z, -posforeward, 0));
     
    142142    }
    143143
    144     inline bool DodgeRaceShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
     144    inline bool DodgeRaceShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
    145145    {
    146146
     
    152152    DodgeRace* DodgeRaceShip::getGame()
    153153    {
    154         if (game == NULL)
     154        if (game == nullptr)
    155155        {
    156             for (ObjectList<DodgeRace>::iterator it = ObjectList<DodgeRace>::begin(); it != ObjectList<DodgeRace>::end(); ++it)
     156            for (DodgeRace* race : ObjectList<DodgeRace>())
    157157            {
    158                 game = *it;
     158                game = race;
    159159            }
    160160        }
  • code/branches/cpp11_v3/src/modules/dodgerace/DodgeRaceShip.h

    r10624 r11054  
    5252            DodgeRaceShip(Context* context);
    5353
    54             virtual void tick(float dt);
     54            virtual void tick(float dt) override;
    5555
    5656            // overwrite for 2d movement
    57             virtual void moveFrontBack(const Vector2& value);
    58             virtual void moveRightLeft(const Vector2& value);
     57            virtual void moveFrontBack(const Vector2& value) override;
     58            virtual void moveRightLeft(const Vector2& value) override;
    5959
    6060            // Starts or stops fireing
    61             virtual void boost(bool bBoost);
     61            virtual void boost(bool bBoost) override;
    6262
    6363            //no rotation!
    64             virtual void rotateYaw(const Vector2& value){};
    65             virtual void rotatePitch(const Vector2& value){};
     64            virtual void rotateYaw(const Vector2& value) override{};
     65            virtual void rotatePitch(const Vector2& value) override{};
    6666
    6767            //return to main menu if game has ended.
    68             virtual void rotateRoll(const Vector2& value){if (getGame()) if (getGame()->bEndGame) getGame()->end();};
     68            virtual void rotateRoll(const Vector2& value) override{if (getGame()) if (getGame()->bEndGame) getGame()->end();};
    6969
    7070            virtual void updateLevel();
     71
     72            virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
    7173
    7274            float speed, damping, posforeward;
     
    7476
    7577        protected:
    76             virtual void death();
     78            virtual void death() override;
    7779
    7880        private:
    79             virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    8081            DodgeRace* getGame();
    8182            WeakPtr<DodgeRace> game;
  • code/branches/cpp11_v3/src/modules/gametypes/OldRaceCheckPoint.h

    r9667 r11054  
    4848            virtual ~OldRaceCheckPoint();
    4949
    50             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    51             virtual void tick(float dt);
     50            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     51            virtual void tick(float dt) override;
    5252
    5353            protected:
    54             virtual void triggered(bool bIsTriggered);
     54            virtual void triggered(bool bIsTriggered) override;
    5555            inline void setLast(bool isLast)
    5656                { this->bIsLast_ = isLast; }
     
    6464            inline float getTimeLimit()
    6565                { return this->bTimeLimit_;}
    66             inline const WorldEntity* getWorldEntity() const
     66            virtual inline const WorldEntity* getWorldEntity() const override
    6767                { return this; }
    6868
  • code/branches/cpp11_v3/src/modules/gametypes/OldSpaceRace.h

    r9667 r11054  
    5555            virtual ~OldSpaceRace() {}
    5656
    57             virtual void start();
    58             virtual void end();
     57            virtual void start() override;
     58            virtual void end() override;
    5959
    6060            virtual void newCheckpointReached();
    61             virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command.
     61            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command.
    6262                                                        //<! This is only a temporary solution. Better: create racingBots.
    6363
  • code/branches/cpp11_v3/src/modules/gametypes/RaceCheckPoint.cc

    r9973 r11054  
    125125            }
    126126        }
    127         return NULL;
     127        return nullptr;
    128128    }
    129129
     
    146146    {
    147147        Vector3 checkpoints(-1,-1,-1); int count=0;
    148         for (std::set<int>::iterator it= nextCheckpoints_.begin();it!=nextCheckpoints_.end(); it++ )
     148        for (int nextCheckpoint : nextCheckpoints_)
    149149        {
    150150            switch (count)
    151151            {
    152                 case 0: checkpoints.x = static_cast<Ogre::Real>(*it); break;
    153                 case 1: checkpoints.y = static_cast<Ogre::Real>(*it); break;
    154                 case 2: checkpoints.z = static_cast<Ogre::Real>(*it); break;
     152                case 0: checkpoints.x = static_cast<Ogre::Real>(nextCheckpoint); break;
     153                case 1: checkpoints.y = static_cast<Ogre::Real>(nextCheckpoint); break;
     154                case 2: checkpoints.z = static_cast<Ogre::Real>(nextCheckpoint); break;
    155155            }
    156156            ++count;
  • code/branches/cpp11_v3/src/modules/gametypes/RaceCheckPoint.h

    r9971 r11054  
    4848            virtual ~RaceCheckPoint();
    4949
    50             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     50            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5151
    5252            inline void setCheckpointIndex(int checkpointIndex)
     
    9292        protected:
    9393
    94             virtual void fire(bool bIsTriggered, BaseObject* originator);
     94            virtual void fire(bool bIsTriggered, BaseObject* originator) override;
    9595
    96             inline const WorldEntity* getWorldEntity() const
     96            virtual inline const WorldEntity* getWorldEntity() const override
    9797            {
    9898                return this;
  • code/branches/cpp11_v3/src/modules/gametypes/SpaceRace.cc

    r9804 r11054  
    8888            this->cantMove_ = true;
    8989
    90             for (ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
    91                 it->setActive(false);
     90            for (Engine* engine : ObjectList<Engine>())
     91                engine->setActive(false);
    9292        }
    9393
     
    9595        if (!this->isStartCountdownRunning() && this->cantMove_)
    9696        {
    97             for (ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
    98                 it->setActive(true);
     97            for (Engine* engine : ObjectList<Engine>())
     98                engine->setActive(true);
    9999
    100100            this->cantMove_= false;
  • code/branches/cpp11_v3/src/modules/gametypes/SpaceRace.h

    r9667 r11054  
    5757            virtual ~SpaceRace() {}
    5858
    59             void tick(float dt);
     59            virtual void tick(float dt) override;
    6060
    61             virtual void end();
     61            virtual void end() override;
    6262
    6363            void newCheckpointReached(RaceCheckPoint* checkpoint, PlayerInfo* player);
     
    7070                { return this->clock_; }
    7171
    72             bool allowPawnHit(Pawn* victim, Pawn* originator);
    73             bool allowPawnDamage(Pawn* victim, Pawn* originator);
    74             bool allowPawnDeath(Pawn* victim, Pawn* originator);
     72            virtual bool allowPawnHit(Pawn* victim, Pawn* originator) override;
     73            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator) override;
     74            virtual bool allowPawnDeath(Pawn* victim, Pawn* originator) override;
    7575
    7676        private:
  • code/branches/cpp11_v3/src/modules/gametypes/SpaceRaceController.cc

    r10318 r11054  
    5959
    6060        virtualCheckPointIndex = -2;
    61         if (ObjectList<SpaceRaceManager>::size() != 1)
    62             orxout(internal_warning) << "Expected 1 instance of SpaceRaceManager but found " << ObjectList<SpaceRaceManager>::size() << endl;
    63         for (ObjectList<SpaceRaceManager>::iterator it = ObjectList<SpaceRaceManager>::begin(); it != ObjectList<SpaceRaceManager>::end(); ++it)
    64         {
    65             checkpoints = it->getAllCheckpoints();
    66             nextRaceCheckpoint_ = it->findCheckpoint(0);
     61        if (ObjectList<SpaceRaceManager>().size() != 1)
     62            orxout(internal_warning) << "Expected 1 instance of SpaceRaceManager but found " << ObjectList<SpaceRaceManager>().size() << endl;
     63        for (SpaceRaceManager* manager : ObjectList<SpaceRaceManager>())
     64        {
     65            checkpoints = manager->getAllCheckpoints();
     66            nextRaceCheckpoint_ = manager->findCheckpoint(0);
    6767        }
    6868
     
    9898                    RaceCheckPoint* point2 = findCheckpoint((*numb));
    9999
    100                     //if(point2 != NULL)
     100                    //if(point2 != nullptr)
    101101                    //placeVirtualCheckpoints((*it), point2);
    102102                }
     
    126126        staticRacePoints_ = findStaticCheckpoints(nextRaceCheckpoint_, checkpoints);
    127127        // initialisation of currentRaceCheckpoint_
    128         currentRaceCheckpoint_ = NULL;
     128        currentRaceCheckpoint_ = nullptr;
    129129
    130130        int i;
    131         for (i = -2; findCheckpoint(i) != NULL; i--)
     131        for (i = -2; findCheckpoint(i) != nullptr; i--)
    132132        {
    133133            continue;
     
    154154    {
    155155        std::map<RaceCheckPoint*, int> zaehler; // counts how many times the checkpoint was reached (for simulation)
    156         for (unsigned int i = 0; i < allCheckpoints.size(); i++)
    157         {
    158             zaehler.insert(std::pair<RaceCheckPoint*, int>(allCheckpoints[i],0));
     156        for (RaceCheckPoint* checkpoint : allCheckpoints)
     157        {
     158            zaehler.insert(std::pair<RaceCheckPoint*, int>(checkpoint,0));
    159159        }
    160160        int maxWays = rekSimulationCheckpointsReached(currentCheckpoint, zaehler);
    161161
    162162        std::vector<RaceCheckPoint*> returnVec;
    163         for (std::map<RaceCheckPoint*, int>::iterator iter = zaehler.begin(); iter != zaehler.end(); iter++)
    164         {
    165             if (iter->second == maxWays)
    166             {
    167                 returnVec.push_back(iter->first);
     163        for (const auto& mapEntry : zaehler)
     164        {
     165            if (mapEntry.second == maxWays)
     166            {
     167                returnVec.push_back(mapEntry.first);
    168168            }
    169169        }
     
    187187        {
    188188            int numberOfWays = 0; // counts number of ways from this Point to the last point
    189             for (std::set<int>::iterator it = currentCheckpoint->getNextCheckpoints().begin(); it!= currentCheckpoint->getNextCheckpoints().end(); ++it)
    190             {
    191                 if (currentCheckpoint == findCheckpoint(*it))
     189            for (int checkpointIndex : currentCheckpoint->getNextCheckpoints())
     190            {
     191                if (currentCheckpoint == findCheckpoint(checkpointIndex))
    192192                {
    193193                    //orxout() << currentCheckpoint->getCheckpointIndex()<<endl;
    194194                    continue;
    195195                }
    196                 if (findCheckpoint(*it) == NULL)
    197                     orxout(internal_warning) << "Problematic Point: " << (*it) << endl;
     196                if (findCheckpoint(checkpointIndex) == nullptr)
     197                    orxout(internal_warning) << "Problematic Point: " << checkpointIndex << endl;
    198198                else
    199                     numberOfWays += rekSimulationCheckpointsReached(findCheckpoint(*it), zaehler);
     199                    numberOfWays += rekSimulationCheckpointsReached(findCheckpoint(checkpointIndex), zaehler);
    200200            }
    201201            zaehler[currentCheckpoint] += numberOfWays;
     
    209209    float SpaceRaceController::distanceSpaceshipToCheckPoint(RaceCheckPoint* CheckPoint)
    210210    {
    211         if (this->getControllableEntity() != NULL)
     211        if (this->getControllableEntity() != nullptr)
    212212        {
    213213            return (CheckPoint->getPosition()- this->getControllableEntity()->getPosition()).length();
     
    223223    {
    224224        float minDistance = 0;
    225         RaceCheckPoint* minNextRaceCheckPoint = NULL;
     225        RaceCheckPoint* minNextRaceCheckPoint = nullptr;
    226226
    227227        // find the next checkpoint with the minimal distance
    228         for (std::set<int>::iterator it = raceCheckpoint->getNextCheckpoints().begin(); it != raceCheckpoint->getNextCheckpoints().end(); ++it)
    229         {
    230             RaceCheckPoint* nextRaceCheckPoint = findCheckpoint(*it);
     228        for (int checkpointIndex : raceCheckpoint->getNextCheckpoints())
     229        {
     230            RaceCheckPoint* nextRaceCheckPoint = findCheckpoint(checkpointIndex);
    231231            float distance = recCalculateDistance(nextRaceCheckPoint, this->getControllableEntity()->getPosition());
    232232
    233             if (distance < minDistance || minNextRaceCheckPoint == NULL)
     233            if (distance < minDistance || minNextRaceCheckPoint == nullptr)
    234234            {
    235235                minDistance = distance;
     
    255255        {
    256256            float minimum = std::numeric_limits<float>::max();
    257             for (std::set<int>::iterator it = currentCheckPoint->getNextCheckpoints().begin(); it != currentCheckPoint->getNextCheckpoints().end(); ++it)
     257            for (int checkpointIndex : currentCheckPoint->getNextCheckpoints())
    258258            {
    259259                int dist_currentCheckPoint_currentPosition = static_cast<int> ((currentPosition- currentCheckPoint->getPosition()).length());
    260260
    261                 minimum = std::min(minimum, dist_currentCheckPoint_currentPosition + recCalculateDistance(findCheckpoint(*it), currentCheckPoint->getPosition()));
     261                minimum = std::min(minimum, dist_currentCheckPoint_currentPosition + recCalculateDistance(findCheckpoint(checkpointIndex), currentCheckPoint->getPosition()));
    262262                // minimum of distanz from 'currentPosition' to the next static Checkpoint
    263263            }
     
    271271    RaceCheckPoint* SpaceRaceController::adjustNextPoint()
    272272    {
    273         if (currentRaceCheckpoint_ == NULL) // no Adjust possible
     273        if (currentRaceCheckpoint_ == nullptr) // no Adjust possible
    274274
    275275        {
     
    289289    RaceCheckPoint* SpaceRaceController::findCheckpoint(int index) const
    290290    {
    291         for (size_t i = 0; i < this->checkpoints_.size(); ++i)
    292             if (this->checkpoints_[i]->getCheckpointIndex() == index)
    293                 return this->checkpoints_[i];
    294         return NULL;
     291        for (RaceCheckPoint* checkpoint : this->checkpoints_)
     292            if (checkpoint->getCheckpointIndex() == index)
     293                return checkpoint;
     294        return nullptr;
    295295    }
    296296
     
    299299        orxout()<<"add VCP at"<<virtualCheckPointPosition.x<<", "<<virtualCheckPointPosition.y<<", "<<virtualCheckPointPosition.z<<endl;
    300300        RaceCheckPoint* newTempRaceCheckPoint;
    301         for (ObjectList<SpaceRaceManager>::iterator it = ObjectList<SpaceRaceManager>::begin(); it!= ObjectList<SpaceRaceManager>::end(); ++it)
     301        ObjectList<SpaceRaceManager> list;
     302        for (ObjectList<SpaceRaceManager>::iterator it = list.begin(); it!= list.end(); ++it)
    302303        {
    303304            newTempRaceCheckPoint = new RaceCheckPoint((*it));
     
    347348    void SpaceRaceController::tick(float dt)
    348349    {
    349         if (this->getControllableEntity() == NULL || this->getControllableEntity()->getPlayer() == NULL )
     350        if (this->getControllableEntity() == nullptr || this->getControllableEntity()->getPlayer() == nullptr )
    350351        {
    351352            //orxout()<< this->getControllableEntity() << " in tick"<<endl;
     
    414415        btScalar radiusObject;
    415416
    416         for (std::vector<StaticEntity*>::const_iterator it = allObjects.begin(); it != allObjects.end(); ++it)
    417         {
    418             for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != 0; everyShape++)
    419             {
    420                 btCollisionShape* currentShape = (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape();
    421                 if(currentShape == NULL)
     417        for (StaticEntity* object : allObjects)
     418        {
     419            for (int everyShape=0; object->getAttachedCollisionShape(everyShape) != nullptr; everyShape++)
     420            {
     421                btCollisionShape* currentShape = object->getAttachedCollisionShape(everyShape)->getCollisionShape();
     422                if(currentShape == nullptr)
    422423                continue;
    423424
     
    444445        for (std::vector<StaticEntity*>::iterator it = allObjects.begin(); it != allObjects.end(); ++it)
    445446        {
    446             for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != 0; everyShape++)
     447            for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != nullptr; everyShape++)
    447448            {
    448449                btCollisionShape* currentShape = (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape();
    449                 if(currentShape == NULL)
     450                if(currentShape == nullptr)
    450451                continue;
    451452
     
    488489        std::vector<StaticEntity*> problematicObjects;
    489490
    490         for (ObjectList<StaticEntity>::iterator it = ObjectList<StaticEntity>::begin(); it!= ObjectList<StaticEntity>::end(); ++it)
    491         {
    492 
    493             if (dynamic_cast<RaceCheckPoint*>(*it) != NULL)
     491        ObjectList<StaticEntity> list;
     492        for (ObjectList<StaticEntity>::iterator it = list.begin(); it!= list.end(); ++it)
     493        {
     494
     495            if (dynamic_cast<RaceCheckPoint*>(*it) != nullptr)
    494496            {
    495497                continue;
     
    537539        //                    btVector3 positionObject;
    538540        //                    btScalar radiusObject;
    539         //                    if((*it)==NULL)
     541        //                    if((*it)==nullptr)
    540542        //                    {   orxout()<<"Problempoint 1.1"<<endl; continue;}
    541543        //                    //TODO: Probably it points on a wrong object
    542         //                    for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=0; everyShape++)
     544        //                    for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=nullptr; everyShape++)
    543545        //                    {
    544         //                        if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==NULL)
     546        //                        if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==nullptr)
    545547        //                        {    continue;}
    546548        //
     
    570572        //                        btVector3 positionObject;
    571573        //                        btScalar radiusObject;
    572         //                        if((*it)==NULL)
     574        //                        if((*it)==nullptr)
    573575        //                        {   orxout()<<"Problempoint 1"<<endl; continue;}
    574         //                        for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=0; everyShape++)
     576        //                        for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=nullptr; everyShape++)
    575577        //                        {
    576         //                            if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==NULL)
     578        //                            if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==nullptr)
    577579        //                            {   orxout()<<"Problempoint 2.2"<<endl; continue;}
    578580        //                            (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()->getBoundingSphere(positionObject,radiusObject);
  • code/branches/cpp11_v3/src/modules/gametypes/SpaceRaceController.h

    r10262 r11054  
    4242            SpaceRaceController(Context* context);
    4343            virtual ~SpaceRaceController();
    44             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    45             virtual void tick(float dt);
     44            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     45            virtual void tick(float dt) override;
    4646
    4747        private:
  • code/branches/cpp11_v3/src/modules/gametypes/SpaceRaceManager.cc

    r10624 r11054  
    5454    SpaceRaceManager::~SpaceRaceManager()
    5555    {
    56         for (size_t i = 0; i < this->checkpoints_.size(); ++i)
    57         this->checkpoints_[i]->destroy();
     56        for (RaceCheckPoint* checkpoint : this->checkpoints_)
     57        checkpoint->destroy();
    5858    }
    5959
     
    7171        this->players_ = this->race_->getPlayers();
    7272
    73         if (this->checkpoints_[0] != NULL && !this->firstcheckpointvisible_)
     73        if (this->checkpoints_[0] != nullptr && !this->firstcheckpointvisible_)
    7474        {
    7575            this->checkpoints_[0]->setRadarVisibility(true);
     
    7777        }
    7878
    79         for ( std::map< PlayerInfo*, Player>::iterator it = players_.begin(); it != players_.end(); ++it)
     79        for (const auto& mapEntry : players_)
    8080        {
    8181
    82             for (size_t i = 0; i < this->checkpoints_.size(); ++i)
     82            for (RaceCheckPoint* checkpoint : this->checkpoints_)
    8383            {
    84                 if (this->checkpoints_[i]->playerWasHere(it->first)){
    85                 this->checkpointReached(this->checkpoints_[i], it->first /*this->checkpoints_[i]->getPlayer()*/);
     84                if (checkpoint->playerWasHere(mapEntry.first)){
     85                this->checkpointReached(checkpoint, mapEntry.first /*this->checkpoints_[i]->getPlayer()*/);
    8686                }
    8787            }
     
    100100        return this->checkpoints_[index];
    101101        else
    102         return 0;
     102        return nullptr;
    103103    }
    104104
     
    113113    RaceCheckPoint* SpaceRaceManager::findCheckpoint(int index) const
    114114    {
    115         for (size_t i = 0; i < this->checkpoints_.size(); ++i)
    116         if (this->checkpoints_[i]->getCheckpointIndex() == index)
    117         return this->checkpoints_[i];
    118         return 0;
     115        for (RaceCheckPoint* checkpoint : this->checkpoints_)
     116        if (checkpoint->getCheckpointIndex() == index)
     117        return checkpoint;
     118        return nullptr;
    119119    }
    120120
    121121    bool SpaceRaceManager::reachedValidCheckpoint(RaceCheckPoint* oldCheckpoint, RaceCheckPoint* newCheckpoint, PlayerInfo* player) const
    122122    {
    123         if (oldCheckpoint != NULL)
     123        if (oldCheckpoint != nullptr)
    124124        {
    125125            // the player already visited an old checkpoint; see which checkpoints are possible now
    126126            const std::set<int>& possibleCheckpoints = oldCheckpoint->getNextCheckpoints();
    127             for (std::set<int>::const_iterator it = possibleCheckpoints.begin(); it != possibleCheckpoints.end(); ++it)
    128             if (this->findCheckpoint(*it) == newCheckpoint)
     127            for (int possibleCheckpoint : possibleCheckpoints)
     128            if (this->findCheckpoint(possibleCheckpoint) == newCheckpoint)
    129129            return true;
    130130            return false;
     
    179179        {
    180180            const std::set<int>& oldVisible = oldCheckpoint->getNextCheckpoints();
    181             for (std::set<int>::const_iterator it = oldVisible.begin(); it != oldVisible.end(); ++it)
    182             this->findCheckpoint(*it)->setRadarVisibility(false);
     181            for (int checkpointIndex : oldVisible)
     182            this->findCheckpoint(checkpointIndex)->setRadarVisibility(false);
    183183        }
    184184
     
    188188
    189189            const std::set<int>& newVisible = newCheckpoint->getNextCheckpoints();
    190             for (std::set<int>::const_iterator it = newVisible.begin(); it != newVisible.end(); ++it)
    191             this->findCheckpoint(*it)->setRadarVisibility(true);
     190            for (int checkpointIndex : newVisible)
     191            this->findCheckpoint(checkpointIndex)->setRadarVisibility(true);
    192192        }
    193193    }
  • code/branches/cpp11_v3/src/modules/gametypes/SpaceRaceManager.h

    r9667 r11054  
    5858            virtual ~SpaceRaceManager() ;
    5959
    60             void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     60            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    6161
    6262            void addCheckpoint(RaceCheckPoint* checkpoint);
     
    6969            std::vector<RaceCheckPoint*> getAllCheckpoints();
    7070
    71             void tick(float dt);
     71            virtual void tick(float dt) override;
    7272
    7373        protected:
  • code/branches/cpp11_v3/src/modules/invader/Invader.cc

    r11052 r11054  
    6161        RegisterObject(Invader);
    6262        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
    63         this->center_ = 0;
     63        this->center_ = nullptr;
    6464        bEndGame = false;
    6565        lives = 3;
     
    7878    {
    7979        level++;
    80         if (getPlayer() != NULL)
     80        if (getPlayer() != nullptr)
    8181        {
    8282            for (int i = 0; i < 7; i++)
     
    103103    InvaderShip* Invader::getPlayer()
    104104    {
    105         if (player == NULL)
     105        if (player == nullptr)
    106106        {
    107             for (ObjectList<InvaderShip>::iterator it = ObjectList<InvaderShip>::begin(); it != ObjectList<InvaderShip>::end(); ++it)
    108                 player = *it;
     107            for (InvaderShip* ship : ObjectList<InvaderShip>())
     108                player = ship;
    109109        }
    110110        return player;
     
    113113    void Invader::spawnEnemy()
    114114    {
    115         if (getPlayer() == NULL)
     115        if (getPlayer() == nullptr)
    116116            return;
    117117
     
    134134            newPawn->setPosition(player->getPosition() + Vector3(500.f + 100 * i, 0, float(rand())/RAND_MAX * 400 - 200));
    135135        }
     136    }
     137
     138    void Invader::setCenterpoint(InvaderCenterPoint* center)
     139    {
     140        this->center_ = center;
    136141    }
    137142
     
    160165        this->bForceSpawn_ = true;
    161166
    162         if (this->center_ == NULL)  // abandon mission!
     167        if (this->center_ == nullptr)  // abandon mission!
    163168        {
    164169            orxout(internal_error) << "Invader: No Centerpoint specified." << endl;
  • code/branches/cpp11_v3/src/modules/invader/Invader.h

    r10624 r11054  
    3939
    4040#include "gametypes/Deathmatch.h"
    41 
    42 #include "InvaderCenterPoint.h"
    43 
    4441#include "tools/Timer.h"
    4542
     
    5249            Invader(Context* context);
    5350
    54             virtual void start();
    55             virtual void end();
    56             virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command
     51            virtual void start() override;
     52            virtual void end() override;
     53            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
    5754
    5855            void spawnEnemy();
    5956
    60             void setCenterpoint(InvaderCenterPoint* center)
    61             { this->center_ = center; }
     57            void setCenterpoint(InvaderCenterPoint* center);
    6258
    6359            int getLives(){return this->lives;}
  • code/branches/cpp11_v3/src/modules/invader/InvaderCenterPoint.cc

    r10624 r11054  
    5656    void InvaderCenterPoint::checkGametype()
    5757    {
    58         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Invader)))
     58        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Invader)))
    5959        {
    6060            Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype());
  • code/branches/cpp11_v3/src/modules/invader/InvaderCenterPoint.h

    r10624 r11054  
    4747            InvaderCenterPoint(Context* context); //checks whether the gametype is actually Invader.
    4848
    49             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5050
    5151        private:
  • code/branches/cpp11_v3/src/modules/invader/InvaderEnemy.cc

    r10625 r11054  
    3232*/
    3333
    34 #include "invader/InvaderPrereqs.h"
    3534#include "InvaderEnemy.h"
     35
     36#include "core/CoreIncludes.h"
     37#include "Invader.h"
    3638#include "InvaderShip.h"
    3739
     
    5456            removeHealth(2000);
    5557
    56         if (player != NULL)
     58        if (player != nullptr)
    5759        {
    5860            float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * (player->getPosition().z - getPosition().z);
     
    6264    }
    6365
    64     inline bool InvaderEnemy::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
     66    inline bool InvaderEnemy::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
    6567    {
    6668        if(orxonox_cast<InvaderShip*>(otherObject))
     
    7173    Invader* InvaderEnemy::getGame()
    7274    {
    73         if (game == NULL)
     75        if (game == nullptr)
    7476        {
    75             for (ObjectList<Invader>::iterator it = ObjectList<Invader>::begin(); it != ObjectList<Invader>::end(); ++it)
    76                 game = *it;
     77            for (Invader* invader : ObjectList<Invader>())
     78                game = invader;
    7779        }
    7880        return game;
     
    8284    {
    8385        Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
    84         if (getGame() && orxonox_cast<InvaderShip*>(originator) != NULL && getHealth() <= 0)
     86        if (getGame() && orxonox_cast<InvaderShip*>(originator) != nullptr && getHealth() <= 0)
    8587            getGame()->addPoints(42);
    8688    }
  • code/branches/cpp11_v3/src/modules/invader/InvaderEnemy.h

    r10625 r11054  
    3737#include "invader/InvaderPrereqs.h"
    3838
    39 #include "worldentities/pawns/SpaceShip.h"
     39#include "worldentities/pawns/Pawn.h"
    4040
    4141namespace orxonox
     
    4646            InvaderEnemy(Context* context);
    4747
    48             virtual void tick(float dt);
    49             virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    50             virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs);
     48            virtual void tick(float dt) override;
     49            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
     50            virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs) override;
    5151            virtual void setPlayer(InvaderShip* player){this->player = player;}
    5252
  • code/branches/cpp11_v3/src/modules/invader/InvaderEnemyShooter.cc

    r10628 r11054  
    3232*/
    3333
    34 #include "invader/InvaderPrereqs.h"
    3534#include "InvaderEnemyShooter.h"
    36 // #include "worldentities/pawns/SpaceShip.h"
     35
     36#include "core/CoreIncludes.h"
     37#include "core/command/Executor.h"
     38#include "Invader.h"
     39#include "InvaderShip.h"
    3740
    3841namespace orxonox
     
    5659            removeHealth(2000);
    5760
    58         if (player != NULL)
     61        if (player != nullptr)
    5962        {
    6063            float distPlayer = player->getPosition().z - getPosition().z;
     
    7477    {
    7578        Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
    76         if (getGame() && orxonox_cast<InvaderShip*>(originator) != NULL && getHealth() <= 0)
     79        if (getGame() && orxonox_cast<InvaderShip*>(originator) != nullptr && getHealth() <= 0)
    7780            getGame()->addPoints(3*42);
    7881    }
  • code/branches/cpp11_v3/src/modules/invader/InvaderEnemyShooter.h

    r10626 r11054  
    4747            InvaderEnemyShooter(Context* context);
    4848
    49             virtual void tick(float dt);
    50             virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs);
     49            virtual void tick(float dt) override;
     50            virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs) override;
    5151        protected:
    5252            void shoot();
  • code/branches/cpp11_v3/src/modules/invader/InvaderHUDinfo.cc

    r10624 r11054  
    3030#include "core/XMLPort.h"
    3131#include "util/Convert.h"
    32 // #include "Invader.h"
     32#include "Invader.h"
    3333
    3434namespace orxonox
     
    4040        RegisterObject(InvaderHUDinfo);
    4141
    42         this->InvaderGame = 0;
     42        this->InvaderGame = nullptr;
    4343        this->bShowLives_ = false;
    4444        this->bShowLevel_ = false;
     
    132132        else
    133133        {
    134             this->InvaderGame = 0;
     134            this->InvaderGame = nullptr;
    135135        }
    136136    }
  • code/branches/cpp11_v3/src/modules/invader/InvaderHUDinfo.h

    r9957 r11054  
    4040            InvaderHUDinfo(Context* context);
    4141
    42             virtual void tick(float dt);
    43             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    44             virtual void changedOwner();
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     44            virtual void changedOwner() override;
    4545
    4646            inline void setShowLives(bool value)
  • code/branches/cpp11_v3/src/modules/invader/InvaderShip.cc

    r10624 r11054  
    3737#include "core/XMLPort.h"
    3838#include "Invader.h"
     39#include "InvaderEnemy.h"
     40#include "graphics/Camera.h"
     41#include "weapons/projectiles/Projectile.h"
    3942
    4043namespace orxonox
     
    9295        // Camera
    9396        Camera* camera = this->getCamera();
    94         if (camera != NULL)
     97        if (camera != nullptr)
    9598        {
    9699            camera->setPosition(Vector3(-pos.z, -posforeward, 0));
     
    139142        isFireing = bBoost;
    140143    }
    141     inline bool InvaderShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
     144    void InvaderShip::rotateRoll(const Vector2& value)
     145    {
     146        if (getGame())
     147            if (getGame()->bEndGame)
     148                getGame()->end();
     149    }
     150    inline bool InvaderShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
    142151    {
    143152        // orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint;
     
    145154        Projectile* shot = orxonox_cast<Projectile*>(otherObject);
    146155        // ensure that this gets only called once per enemy.
    147         if (enemy != NULL && lastEnemy != enemy)
     156        if (enemy != nullptr && lastEnemy != enemy)
    148157        {
    149158            lastEnemy = enemy;
     
    156165        }
    157166        // was shot, decrease multiplier
    158         else if (shot != NULL  && lastShot != shot)
     167        else if (shot != nullptr  && lastShot != shot)
    159168        {
    160             if (getGame() && orxonox_cast<InvaderEnemy*>(shot->getShooter()) != NULL)
     169            if (getGame() && orxonox_cast<InvaderEnemy*>(shot->getShooter()) != nullptr)
    161170            {
    162171                if (getGame()->multiplier > 1)
     
    173182    Invader* InvaderShip::getGame()
    174183    {
    175         if (game == NULL)
     184        if (game == nullptr)
    176185        {
    177             for (ObjectList<Invader>::iterator it = ObjectList<Invader>::begin(); it != ObjectList<Invader>::end(); ++it)
    178                 game = *it;
     186            for (Invader* invader : ObjectList<Invader>())
     187                game = invader;
    179188        }
    180189        return game;
  • code/branches/cpp11_v3/src/modules/invader/InvaderShip.h

    r10624 r11054  
    3737#include "invader/InvaderPrereqs.h"
    3838
     39#include "weapons/WeaponsPrereqs.h"
    3940#include "worldentities/pawns/SpaceShip.h"
    40 #include "graphics/Camera.h"
    41 #include "weapons/projectiles/Projectile.h"
    4241
    4342namespace orxonox
     
    4847            InvaderShip(Context* context);
    4948
    50             virtual void tick(float dt);
     49            virtual void tick(float dt) override;
    5150
    5251            // overwrite for 2d movement
    53             virtual void moveFrontBack(const Vector2& value);
    54             virtual void moveRightLeft(const Vector2& value);
     52            virtual void moveFrontBack(const Vector2& value) override;
     53            virtual void moveRightLeft(const Vector2& value) override;
    5554
    5655            // Starts or stops fireing
    57             virtual void boost(bool bBoost);
     56            virtual void boost(bool bBoost) override;
    5857
    5958            //no rotation!
    60             virtual void rotateYaw(const Vector2& value){};
    61             virtual void rotatePitch(const Vector2& value){};
     59            virtual void rotateYaw(const Vector2& value) override{};
     60            virtual void rotatePitch(const Vector2& value) override{};
    6261            //return to main menu if game has ended.
    63             virtual void rotateRoll(const Vector2& value){if (getGame()) if (getGame()->bEndGame) getGame()->end();};
     62            virtual void rotateRoll(const Vector2& value) override;
    6463
    6564            virtual void updateLevel();
    6665
    67             virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
     66            virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
    6867
    6968        protected:
    70             virtual void death();
     69            virtual void death() override;
    7170        private:
    7271            Invader* getGame();
  • code/branches/cpp11_v3/src/modules/invader/InvaderWeapon.h

    r9943 r11054  
    3535#define _InvaderWeapon_H__
    3636
     37#include "invader/InvaderPrereqs.h"
     38
     39#include "weapons/WeaponsPrereqs.h"
    3740#include "weapons/weaponmodes/HsW01.h"
    38 #include "weapons/WeaponsPrereqs.h"
    39 
    40 #include "tools/Timer.h"
    4141
    4242namespace orxonox
     
    4848            virtual ~InvaderWeapon();
    4949        protected:
    50             virtual void shot();
     50            virtual void shot() override;
    5151            WeakPtr<Projectile> projectile;
    5252    };
  • code/branches/cpp11_v3/src/modules/invader/InvaderWeaponEnemy.cc

    r9945 r11054  
    3434#include "InvaderWeaponEnemy.h"
    3535
     36#include "core/CoreIncludes.h"
     37#include "weapons/projectiles/Projectile.h"
     38
    3639namespace orxonox
    3740{
  • code/branches/cpp11_v3/src/modules/invader/InvaderWeaponEnemy.h

    r9943 r11054  
    3535#define _InvaderWeaponEnemy_H__
    3636
    37 // #include "weapons/weaponmodes/HsW01.h"
    38 // #include "weapons/WeaponsPrereqs.h"
    39 #include "invader/InvaderWeapon.h"
     37#include "invader/InvaderPrereqs.h"
     38
     39#include "InvaderWeapon.h"
    4040#include "tools/Timer.h"
    4141
     
    4747            InvaderWeaponEnemy(Context* context);
    4848        protected:
    49             virtual void shot();
     49            virtual void shot() override;
    5050    };
    5151}
  • code/branches/cpp11_v3/src/modules/jump/Jump.cc

    r10262 r11054  
    3434#include "Jump.h"
    3535#include "core/CoreIncludes.h"
    36 #include "core/EventIncludes.h"
    37 #include "core/command/Executor.h"
    38 #include "core/config/ConfigValueIncludes.h"
    39 #include "gamestates/GSLevel.h"
    40 #include "chat/ChatManager.h"
     36
    4137#include "JumpCenterpoint.h"
    4238#include "JumpPlatform.h"
     
    5652#include "JumpBoots.h"
    5753#include "JumpShield.h"
     54
     55#include "gamestates/GSLevel.h"
    5856#include "infos/PlayerInfo.h"
     57#include "graphics/Camera.h"
    5958
    6059namespace orxonox
     
    6665        RegisterObject(Jump);
    6766
    68         center_ = 0;
    69         figure_ = 0;
    70         camera = 0;
     67        center_ = nullptr;
     68        figure_ = nullptr;
     69        camera = nullptr;
    7170        setHUDTemplate("JumpHUD");
    72 
    73         setConfigValues();
    7471    }
    7572
     
    8683        SUPER(Jump, tick, dt);
    8784
    88         if (figure_ != NULL)
     85        if (figure_ != nullptr)
    8986        {
    9087            Vector3 figurePosition = figure_->getPosition();
     
    10198                if (screenShiftSinceLastUpdate_ > center_->getSectionLength())
    10299                {
    103                     if (sectionNumber_ > 2 && sectionNumber_%4 == 0 && rand()%2 == 0 && figure_->propellerActive_ == false && figure_->rocketActive_ == false && addAdventure(adventureNumber_) == true)
     100                    if (sectionNumber_ > 2 && sectionNumber_%4 == 0 && rand()%2 == 0 && figure_->propellerActive_ == nullptr && figure_->rocketActive_ == nullptr && addAdventure(adventureNumber_) == true)
    104101                    {
    105102                        screenShiftSinceLastUpdate_ -= 2*center_->getSectionLength();
     
    133130
    134131
    135             if (camera != NULL)
     132            if (camera != nullptr)
    136133            {
    137134                Vector3 cameraPosition = Vector3(0, totalScreenShift_, 0);
     
    144141        }
    145142
    146         ObjectList<JumpPlatform>::iterator beginPlatform = ObjectList<JumpPlatform>::begin();
    147         ObjectList<JumpPlatform>::iterator endPlatform = ObjectList<JumpPlatform>::end();
    148         ObjectList<JumpPlatform>::iterator itPlatform = beginPlatform;
     143        ObjectList<JumpPlatform> listPlatform;
     144        ObjectList<JumpPlatform>::iterator itPlatform = listPlatform.begin();
    149145        Vector3 platformPosition;
    150146
    151         while (itPlatform != endPlatform)
     147        while (itPlatform != listPlatform.end())
    152148        {
    153149            platformPosition = itPlatform->getPosition();
     
    166162
    167163        // Deleted deactivated platforms
    168         ObjectList<JumpPlatformDisappear>::iterator beginDisappear = ObjectList<JumpPlatformDisappear>::begin();
    169         ObjectList<JumpPlatformDisappear>::iterator endDisappear = ObjectList<JumpPlatformDisappear>::end();
    170         ObjectList<JumpPlatformDisappear>::iterator itDisappear = beginDisappear;
    171 
    172         while (itDisappear != endDisappear)
     164        ObjectList<JumpPlatformDisappear> listDisappear;
     165        ObjectList<JumpPlatformDisappear>::iterator itDisappear = listDisappear.begin();
     166
     167        while (itDisappear != listDisappear.end())
    173168        {
    174169            if (!itDisappear->isActive())
     
    185180        }
    186181
    187         ObjectList<JumpPlatformTimer>::iterator beginTimer = ObjectList<JumpPlatformTimer>::begin();
    188         ObjectList<JumpPlatformTimer>::iterator endTimer = ObjectList<JumpPlatformTimer>::end();
    189         ObjectList<JumpPlatformTimer>::iterator itTimer = beginTimer;
    190 
    191         while (itTimer != endTimer)
     182        ObjectList<JumpPlatformTimer> listTimer;
     183        ObjectList<JumpPlatformTimer>::iterator itTimer = listTimer.begin();
     184
     185        while (itTimer != listTimer.end())
    192186        {
    193187            if (!itTimer->isActive())
     
    204198        }
    205199
    206         ObjectList<JumpProjectile>::iterator beginProjectile = ObjectList<JumpProjectile>::begin();
    207         ObjectList<JumpProjectile>::iterator endProjectile = ObjectList<JumpProjectile>::end();
    208         ObjectList<JumpProjectile>::iterator itProjectile = beginProjectile;
     200        ObjectList<JumpProjectile> listProjectile;
     201        ObjectList<JumpProjectile>::iterator itProjectile = listProjectile.begin();
    209202        Vector3 projectilePosition;
    210203
    211         while (itProjectile != endProjectile)
     204        while (itProjectile != listProjectile.end())
    212205        {
    213206            projectilePosition = itProjectile->getPosition();
     
    225218        }
    226219
    227         ObjectList<JumpEnemy>::iterator beginEnemy = ObjectList<JumpEnemy>::begin();
    228         ObjectList<JumpEnemy>::iterator endEnemy = ObjectList<JumpEnemy>::end();
    229         ObjectList<JumpEnemy>::iterator itEnemy = beginEnemy;
     220        ObjectList<JumpEnemy> listEnemy;
     221        ObjectList<JumpEnemy>::iterator itEnemy = listEnemy.begin();
    230222        Vector3 enemyPosition;
    231223
    232         while (itEnemy != endEnemy)
     224        while (itEnemy != listEnemy.end())
    233225        {
    234226            enemyPosition = itEnemy->getPosition();
     
    246238        }
    247239
    248         ObjectList<JumpItem>::iterator beginItem = ObjectList<JumpItem>::begin();
    249         ObjectList<JumpItem>::iterator endItem = ObjectList<JumpItem>::end();
    250         ObjectList<JumpItem>::iterator itItem = beginItem;
     240        ObjectList<JumpItem> listItem;
     241        ObjectList<JumpItem>::iterator itItem = listItem.begin();
    251242        Vector3 itemPosition;
    252243
    253         while (itItem != endItem)
     244        while (itItem != listItem.end())
    254245        {
    255246            itemPosition = itItem->getPosition();
     
    273264    void Jump::cleanup()
    274265    {
    275         camera = 0;
     266        camera = nullptr;
    276267    }
    277268
    278269    void Jump::start()
    279270    {
    280         if (center_ != NULL) // There needs to be a JumpCenterpoint, i.e. the area the game takes place.
    281         {
    282             if (figure_ == NULL)
     271        if (center_ != nullptr) // There needs to be a JumpCenterpoint, i.e. the area the game takes place.
     272        {
     273            if (figure_ == nullptr)
    283274            {
    284275                figure_ = new JumpFigure(center_->getContext());
     
    301292        Deathmatch::start();
    302293
    303         if (figure_ != NULL)
     294        if (figure_ != nullptr)
    304295        {
    305296            camera = figure_->getCamera();
     
    328319        assert(player);
    329320
    330         if (figure_->getPlayer() == NULL)
     321        if (figure_->getPlayer() == nullptr)
    331322        {
    332323            player->startControl(figure_);
     
    337328    PlayerInfo* Jump::getPlayer() const
    338329    {
    339         if (this->figure_ != NULL)
     330        if (this->figure_ != nullptr)
    340331        {
    341332            return this->figure_->getPlayer();
     
    343334        else
    344335        {
    345             return 0;
     336            return nullptr;
    346337        }
    347338    }
     
    349340    void Jump::addPlatform(JumpPlatform* newPlatform, std::string platformTemplate, float xPosition, float zPosition)
    350341    {
    351         if (newPlatform != NULL && center_ != NULL)
     342        if (newPlatform != nullptr && center_ != nullptr)
    352343        {
    353344            newPlatform->addTemplate(platformTemplate);
     
    417408    {
    418409        JumpProjectile* newProjectile = new JumpProjectile(center_->getContext());
    419         if (newProjectile != NULL && center_ != NULL)
     410        if (newProjectile != nullptr && center_ != nullptr)
    420411        {
    421412            newProjectile->addTemplate(center_->getProjectileTemplate());
     
    430421    {
    431422        JumpSpring* newSpring = new JumpSpring(center_->getContext());
    432         if (newSpring != NULL && center_ != NULL)
     423        if (newSpring != nullptr && center_ != nullptr)
    433424        {
    434425            newSpring->addTemplate(center_->getSpringTemplate());
     
    443434    {
    444435        JumpSpring* newSpring = new JumpSpring(center_->getContext());
    445         if (newSpring != NULL && center_ != NULL)
     436        if (newSpring != nullptr && center_ != nullptr)
    446437        {
    447438            newSpring->addTemplate(center_->getSpringTemplate());
     
    456447    {
    457448        JumpRocket* newRocket = new JumpRocket(center_->getContext());
    458         if (newRocket != NULL && center_ != NULL)
     449        if (newRocket != nullptr && center_ != nullptr)
    459450        {
    460451            newRocket->addTemplate(center_->getRocketTemplate());
     
    469460    {
    470461        JumpRocket* newRocket = new JumpRocket(center_->getContext());
    471         if (newRocket != NULL && center_ != NULL)
     462        if (newRocket != nullptr && center_ != nullptr)
    472463        {
    473464            newRocket->addTemplate(center_->getRocketTemplate());
     
    482473    {
    483474        JumpPropeller* newPropeller = new JumpPropeller(center_->getContext());
    484         if (newPropeller != NULL && center_ != NULL)
     475        if (newPropeller != nullptr && center_ != nullptr)
    485476        {
    486477            newPropeller->addTemplate(center_->getPropellerTemplate());
     
    495486    {
    496487        JumpPropeller* newPropeller = new JumpPropeller(center_->getContext());
    497         if (newPropeller != NULL && center_ != NULL)
     488        if (newPropeller != nullptr && center_ != nullptr)
    498489        {
    499490            newPropeller->addTemplate(center_->getPropellerTemplate());
     
    508499    {
    509500        JumpBoots* newBoots = new JumpBoots(center_->getContext());
    510         if (newBoots != NULL && center_ != NULL)
     501        if (newBoots != nullptr && center_ != nullptr)
    511502        {
    512503            newBoots->addTemplate(center_->getBootsTemplate());
     
    521512    {
    522513        JumpBoots* newBoots = new JumpBoots(center_->getContext());
    523         if (newBoots != NULL && center_ != NULL)
     514        if (newBoots != nullptr && center_ != nullptr)
    524515        {
    525516            newBoots->addTemplate(center_->getBootsTemplate());
     
    534525    {
    535526        JumpShield* newShield = new JumpShield(center_->getContext());
    536         if (newShield != NULL && center_ != NULL)
     527        if (newShield != nullptr && center_ != nullptr)
    537528        {
    538529            newShield->addTemplate(center_->getShieldTemplate());
     
    547538    {
    548539        JumpShield* newShield = new JumpShield(center_->getContext());
    549         if (newShield != NULL && center_ != NULL)
     540        if (newShield != nullptr && center_ != nullptr)
    550541        {
    551542            newShield->addTemplate(center_->getShieldTemplate());
     
    560551    {
    561552        JumpEnemy* newEnemy = new JumpEnemy(center_->getContext());
    562         if (newEnemy != NULL && center_ != NULL)
     553        if (newEnemy != nullptr && center_ != nullptr)
    563554        {
    564555            switch (type)
     
    12731264    float Jump::getFuel() const
    12741265    {
    1275         if (this->figure_ != NULL)
    1276         {
    1277             if (this->figure_->rocketActive_ != NULL)
     1266        if (this->figure_ != nullptr)
     1267        {
     1268            if (this->figure_->rocketActive_ != nullptr)
    12781269            {
    12791270                return this->figure_->rocketActive_->getFuelState();
    12801271            }
    1281             else if (this->figure_->propellerActive_ != NULL)
     1272            else if (this->figure_->propellerActive_ != nullptr)
    12821273            {
    12831274                return this->figure_->propellerActive_->getFuelState();
    12841275            }
    1285             else if (this->figure_->shieldActive_ != NULL)
     1276            else if (this->figure_->shieldActive_ != nullptr)
    12861277            {
    12871278                return this->figure_->shieldActive_->getFuelState();
    12881279            }
    1289             else if (this->figure_->bootsActive_ != NULL)
     1280            else if (this->figure_->bootsActive_ != nullptr)
    12901281            {
    12911282                return this->figure_->bootsActive_->getFuelState();
     
    13001291        return figure_->dead_;
    13011292    }
     1293
     1294    void Jump::setCenterpoint(JumpCenterpoint* center)
     1295    {
     1296        center_ = center;
     1297    }
     1298
    13021299}
  • code/branches/cpp11_v3/src/modules/jump/Jump.h

    r10262 r11054  
    3131
    3232#include "jump/JumpPrereqs.h"
    33 #include "tools/Timer.h"
    34 #include "graphics/Camera.h"
    3533#include "gametypes/Deathmatch.h"
    36 #include "JumpCenterpoint.h"
    37 #include <list>
    3834
    3935namespace orxonox
     
    4440            Jump(Context* context);
    4541            virtual ~Jump();
    46             virtual void tick(float dt);
    47             virtual void start();
    48             virtual void end();
    49             virtual void spawnPlayer(PlayerInfo* player);
     42            virtual void tick(float dt) override;
     43            virtual void start() override;
     44            virtual void end() override;
     45            virtual void spawnPlayer(PlayerInfo* player) override;
    5046            int getScore(PlayerInfo* player) const;
    5147            float getFuel() const;
    5248            bool getDead(PlayerInfo* player) const;
    53             void setCenterpoint(JumpCenterpoint* center)
    54                 { center_ = center; }
     49            void setCenterpoint(JumpCenterpoint* center);
    5550            PlayerInfo* getPlayer() const;
    5651
  • code/branches/cpp11_v3/src/modules/jump/JumpBoots.cc

    r10262 r11054  
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "core/GameMode.h"
    38 #include "graphics/Model.h"
    39 #include "gametypes/Gametype.h"
    40 
     37#include "core/XMLPort.h"
    4138#include "JumpFigure.h"
    42 
    43 #include "sound/WorldSound.h"
    44 #include "core/XMLPort.h"
    4539
    4640namespace orxonox
     
    7872        Vector3 rocketPosition = getWorldPosition();
    7973
    80         if (attachedToFigure_ == false && figure_ != NULL)
     74        if (attachedToFigure_ == false && figure_ != nullptr)
    8175        {
    8276            Vector3 figurePosition = figure_->getWorldPosition();
  • code/branches/cpp11_v3/src/modules/jump/JumpBoots.h

    r10262 r11054  
    3030#define _JumpBoots_H__
    3131
    32 #include "jump/JumpPrereqs.h"
    33 #include "util/Math.h"
    34 #include "worldentities/MovableEntity.h"
    35 
     32#include "JumpPrereqs.h"
     33#include "JumpItem.h"
    3634
    3735namespace orxonox
     
    4240            JumpBoots(Context* context);
    4341            virtual ~JumpBoots();
    44             virtual void tick(float dt);
    45             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    46             virtual void touchFigure();
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     44            virtual void touchFigure() override;
    4745            virtual float getFuelState();
    4846        protected:
  • code/branches/cpp11_v3/src/modules/jump/JumpCenterpoint.cc

    r10624 r11054  
    3333
    3434#include "JumpCenterpoint.h"
     35
    3536#include "core/CoreIncludes.h"
    3637#include "core/XMLPort.h"
     
    8283    void JumpCenterpoint::checkGametype()
    8384    {
    84         if (getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
     85        if (getGametype() != nullptr && this->getGametype()->isA(Class(Jump)))
    8586        {
    8687            Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype());
  • code/branches/cpp11_v3/src/modules/jump/JumpCenterpoint.h

    r10624 r11054  
    3131
    3232#include "jump/JumpPrereqs.h"
    33 
    34 #include <string>
    35 
    36 #include <util/Math.h>
    37 
    3833#include "worldentities/StaticEntity.h"
    3934
     
    113108            JumpCenterpoint(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Jump.
    114109            virtual ~JumpCenterpoint() {}
    115             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a JumpCenterpoint through XML.
     110            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a JumpCenterpoint through XML.
    116111            void setPlatformStaticTemplate(const std::string& balltemplate)
    117112                { this->platformStaticTemplate_ = balltemplate; }
  • code/branches/cpp11_v3/src/modules/jump/JumpEnemy.cc

    r10624 r11054  
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "core/GameMode.h"
    38 #include "graphics/Model.h"
    39 #include "gametypes/Gametype.h"
    40 
     37#include "core/XMLPort.h"
    4138#include "JumpFigure.h"
    42 
    43 #include "sound/WorldSound.h"
    44 #include "core/XMLPort.h"
    4539
    4640namespace orxonox
     
    5751
    5852        dead_ = false;
    59         figure_ = 0;
     53        figure_ = nullptr;
    6054        width_ = 0.0;
    6155        height_ = 0.0;
     
    125119        Vector3 enemyPosition = getPosition();
    126120
    127         if (figure_ != NULL)
     121        if (figure_ != nullptr)
    128122        {
    129123            Vector3 figurePosition = figure_->getPosition();
  • code/branches/cpp11_v3/src/modules/jump/JumpEnemy.h

    r10624 r11054  
    3737
    3838#include "jump/JumpPrereqs.h"
    39 
    40 #include "util/Math.h"
    41 
    4239#include "worldentities/MovableEntity.h"
    43 
    4440
    4541namespace orxonox
     
    5046            JumpEnemy(Context* context);
    5147            virtual ~JumpEnemy();
    52             virtual void tick(float dt);
    53             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void tick(float dt) override;
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5450            void setFieldDimension(float width, float height)
    5551                { this->fieldWidth_ = width; this->fieldHeight_ = height; }
  • code/branches/cpp11_v3/src/modules/jump/JumpFigure.cc

    r10262 r11054  
    3636#include "core/CoreIncludes.h"
    3737#include "core/XMLPort.h"
     38#include "graphics/Model.h"
     39#include "JumpRocket.h"
     40#include "JumpPropeller.h"
     41#include "JumpBoots.h"
     42#include "JumpShield.h"
    3843
    3944namespace orxonox
     
    4651
    4752        // initialize variables
    48         leftHand_ = NULL;
    49         rightHand_ = NULL;
     53        leftHand_ = nullptr;
     54        rightHand_ = nullptr;
    5055        fieldHeight_ = 0;
    5156        fieldWidth_ = 0;
     
    7075        animateHands_ = false;
    7176        turnUp_ = false;
    72         rocketActive_ = NULL;
    73         propellerActive_ = NULL;
    74         bootsActive_ = NULL;
    75         shieldActive_ = NULL;
     77        rocketActive_ = nullptr;
     78        propellerActive_ = nullptr;
     79        bootsActive_ = nullptr;
     80        shieldActive_ = nullptr;
    7681        rocketSpeed_ = 0.0;
    7782        propellerSpeed_ = 0.0;
     
    106111            // Move up/down
    107112            Vector3 velocity = getVelocity();
    108             if (rocketActive_ != NULL)
     113            if (rocketActive_ != nullptr)
    109114            {
    110115                velocity.z = rocketSpeed_;
    111116            }
    112             else if (propellerActive_ != NULL)
     117            else if (propellerActive_ != nullptr)
    113118            {
    114119                velocity.z = propellerSpeed_;
     
    139144                }
    140145
    141                 if (leftHand_ != NULL)
     146                if (leftHand_ != nullptr)
    142147                {
    143148                    leftHand_->setOrientation(Vector3(0.0, 1.0, 0.0), Degree(-handAngle_));
    144149                }
    145                 if (rightHand_ != NULL)
     150                if (rightHand_ != nullptr)
    146151                {
    147152                    rightHand_->setOrientation(Vector3(0.0, 1.0, 0.0), Degree(handAngle_));
     
    207212        {
    208213            Vector3 velocity = getVelocity();
    209             if (bootsActive_ == NULL)
     214            if (bootsActive_ == nullptr)
    210215            {
    211216                velocity.z = 1.2f*jumpSpeed_;
     
    234239    void JumpFigure::CollisionWithEnemy(JumpEnemy* enemy)
    235240    {
    236         if (rocketActive_ == NULL && propellerActive_ == NULL && shieldActive_ == NULL)
     241        if (rocketActive_ == nullptr && propellerActive_ == nullptr && shieldActive_ == nullptr)
    237242        {
    238243            dead_ = true;
     
    242247    bool JumpFigure::StartRocket(JumpRocket* rocket)
    243248    {
    244         if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
     249        if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
    245250        {
    246251            attach(rocket);
     
    261266        detach(rocket);
    262267        rocket->destroy();
    263         rocketActive_ = NULL;
     268        rocketActive_ = nullptr;
    264269    }
    265270
    266271    bool JumpFigure::StartPropeller(JumpPropeller* propeller)
    267272    {
    268         if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
     273        if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
    269274        {
    270275            attach(propeller);
     
    285290        detach(propeller);
    286291        propeller->destroy();
    287         propellerActive_ = NULL;
     292        propellerActive_ = nullptr;
    288293    }
    289294
    290295    bool JumpFigure::StartBoots(JumpBoots* boots)
    291296    {
    292         if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
     297        if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
    293298        {
    294299            attach(boots);
     
    309314        detach(boots);
    310315        boots->destroy();
    311         bootsActive_ = NULL;
     316        bootsActive_ = nullptr;
    312317    }
    313318
    314319    bool JumpFigure::StartShield(JumpShield* shield)
    315320    {
    316         if (shieldActive_ == false)
     321        if (shieldActive_ == nullptr)
    317322        {
    318323            attach(shield);
     
    333338        detach(shield);
    334339        shield->destroy();
    335         shieldActive_ = NULL;
     340        shieldActive_ = nullptr;
    336341    }
    337342
  • code/branches/cpp11_v3/src/modules/jump/JumpFigure.h

    r10262 r11054  
    4040            JumpFigure(Context* context); //!< Constructor. Registers and initializes the object.
    4141            virtual ~JumpFigure() {}
    42             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    43             virtual void tick(float dt);
    44             virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    45             virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    46             virtual void rotateYaw(const Vector2& value);
    47             virtual void rotatePitch(const Vector2& value);
    48             virtual void rotateRoll(const Vector2& value);
     42            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     43            virtual void tick(float dt) override;
     44            virtual void moveFrontBack(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
     45            virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
     46            virtual void rotateYaw(const Vector2& value) override;
     47            virtual void rotatePitch(const Vector2& value) override;
     48            virtual void rotateRoll(const Vector2& value) override;
    4949            void fire(unsigned int firemode);
    50             virtual void fired(unsigned int firemode);
     50            virtual void fired(unsigned int firemode) override;
    5151            virtual void JumpFromPlatform(JumpPlatform* platform);
    5252            virtual void JumpFromSpring(JumpSpring* spring);
  • code/branches/cpp11_v3/src/modules/jump/JumpItem.cc

    r10624 r11054  
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "core/GameMode.h"
    38 #include "graphics/Model.h"
    39 #include "gametypes/Gametype.h"
    40 
     37#include "core/XMLPort.h"
    4138#include "JumpFigure.h"
    42 
    43 #include "sound/WorldSound.h"
    44 #include "core/XMLPort.h"
    4539
    4640namespace orxonox
     
    5448        attachedToFigure_ = false;
    5549
    56         figure_ = 0;
     50        figure_ = nullptr;
    5751        height_ = 0.0;
    5852        width_ = 0.0;
  • code/branches/cpp11_v3/src/modules/jump/JumpItem.h

    r10624 r11054  
    3737
    3838#include "jump/JumpPrereqs.h"
    39 
    40 #include "util/Math.h"
    41 
    4239#include "worldentities/MovableEntity.h"
    4340
     
    5047            JumpItem(Context* context);
    5148            virtual ~JumpItem();
    52             virtual void tick(float dt);
    53             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     49            virtual void tick(float dt) override;
     50            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5451            virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed);
    5552            virtual void setFigure(JumpFigure* newFigure);
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatform.cc

    r10632 r11054  
    3636#include "core/CoreIncludes.h"
    3737#include "core/GameMode.h"
    38 #include "graphics/Model.h"
    39 #include "gametypes/Gametype.h"
    40 
     38#include "core/XMLPort.h"
     39#include "sound/WorldSound.h"
    4140#include "JumpFigure.h"
    42 
    43 #include "sound/WorldSound.h"
    44 #include "core/XMLPort.h"
    4541
    4642namespace orxonox
     
    5248        RegisterObject(JumpPlatform);
    5349
    54         figure_ = 0;
     50        figure_ = nullptr;
    5551
    5652        setPosition(Vector3(0,0,0));
     
    9086        Vector3 platformPosition = this->getPosition();
    9187
    92         if (figure_ != NULL)
     88        if (figure_ != nullptr)
    9389        {
    9490            Vector3 figurePosition = figure_->getPosition();
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatform.h

    r10632 r11054  
    3636#define _JumpPlatform_H__
    3737
    38 #include "jump/JumpPrereqs.h"
    39 #include "util/Math.h"
     38#include "JumpPrereqs.h"
    4039#include "worldentities/MovableEntity.h"
    4140
     
    4746            JumpPlatform(Context* context);
    4847            virtual ~JumpPlatform();
    49             virtual void tick(float dt);
    50             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void tick(float dt) override;
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5150            void setFigure(JumpFigure* newFigure);
    5251            virtual void touchFigure();
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformDisappear.cc

    r10262 r11054  
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "core/GameMode.h"
    38 
    39 #include "gametypes/Gametype.h"
    40 
     37#include "core/XMLPort.h"
    4138#include "JumpFigure.h"
    42 
    43 #include "sound/WorldSound.h"
    44 #include "core/XMLPort.h"
    4539
    4640namespace orxonox
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformDisappear.h

    r10262 r11054  
    3636#define _JumpPlatformDisappear_H__
    3737
    38 #include "jump/JumpPrereqs.h"
    39 #include "util/Math.h"
    40 #include "worldentities/MovableEntity.h"
     38#include "JumpPrereqs.h"
     39#include "JumpPlatform.h"
    4140
    4241namespace orxonox
     
    4746            JumpPlatformDisappear(Context* context);
    4847            virtual ~JumpPlatformDisappear();
    49             virtual void tick(float dt);
    50             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void tick(float dt) override;
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5150            virtual void setProperties(bool active);
    5251            virtual bool isActive();
    53             virtual void touchFigure();
     52            virtual void touchFigure() override;
    5453
    5554        protected:
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformFake.cc

    r10262 r11054  
    3333
    3434#include "JumpPlatformFake.h"
     35
    3536#include "core/CoreIncludes.h"
    36 #include "core/GameMode.h"
    37 #include "gametypes/Gametype.h"
    38 #include "JumpFigure.h"
    39 #include "sound/WorldSound.h"
    4037#include "core/XMLPort.h"
    4138
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformFake.h

    r10262 r11054  
    3636#define _JumpPlatformFake_H__
    3737
    38 #include "jump/JumpPrereqs.h"
    39 
    40 #include "util/Math.h"
    41 
    42 #include "worldentities/MovableEntity.h"
    43 
     38#include "JumpPrereqs.h"
     39#include "JumpPlatform.h"
    4440
    4541namespace orxonox
     
    5046            JumpPlatformFake(Context* context);
    5147            virtual ~JumpPlatformFake();
    52             virtual void tick(float dt);
    53             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void tick(float dt) override;
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5450    };
    5551}
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformHMove.cc

    r10262 r11054  
    3333
    3434#include "JumpPlatformHMove.h"
     35
    3536#include "core/CoreIncludes.h"
    36 #include "core/GameMode.h"
    37 #include "gametypes/Gametype.h"
     37#include "core/XMLPort.h"
    3838#include "JumpFigure.h"
    39 #include "sound/WorldSound.h"
    40 #include "core/XMLPort.h"
    4139
    4240namespace orxonox
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformHMove.h

    r10262 r11054  
    3030#define _JumpPlatformHMove_H__
    3131
    32 #include "jump/JumpPrereqs.h"
    33 
    34 #include "util/Math.h"
    35 
    36 #include "worldentities/MovableEntity.h"
    37 
     32#include "JumpPrereqs.h"
     33#include "JumpPlatform.h"
    3834
    3935namespace orxonox
     
    4541            JumpPlatformHMove(Context* context);
    4642            virtual ~JumpPlatformHMove();
    47             virtual void tick(float dt);
    48             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     43            virtual void tick(float dt) override;
     44            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4945            virtual void setProperties(float leftBoundary, float rightBoundary, float speed);
    50             virtual void touchFigure();
     46            virtual void touchFigure() override;
    5147
    5248        protected:
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformStatic.cc

    r10262 r11054  
    3333
    3434#include "JumpPlatformStatic.h"
     35
    3536#include "core/CoreIncludes.h"
    36 #include "core/GameMode.h"
    37 #include "gametypes/Gametype.h"
     37#include "core/XMLPort.h"
    3838#include "JumpFigure.h"
    39 #include "sound/WorldSound.h"
    40 #include "core/XMLPort.h"
    4139
    4240namespace orxonox
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformStatic.h

    r10262 r11054  
    3030#define _JumpPlatformStatic_H__
    3131
    32 #include "jump/JumpPrereqs.h"
    33 
    34 #include "util/Math.h"
    35 
    36 #include "worldentities/MovableEntity.h"
    37 
     32#include "JumpPrereqs.h"
     33#include "JumpPlatform.h"
    3834
    3935namespace orxonox
     
    4541            virtual ~JumpPlatformStatic();
    4642
    47             virtual void tick(float dt);
    48             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     43            virtual void tick(float dt) override;
     44            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4945
    50             virtual void touchFigure();
     46            virtual void touchFigure() override;
    5147    };
    5248}
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformTimer.cc

    r10262 r11054  
    3333
    3434#include "JumpPlatformTimer.h"
     35
    3536#include "core/CoreIncludes.h"
    36 #include "core/GameMode.h"
    37 #include "gametypes/Gametype.h"
     37#include "core/XMLPort.h"
     38#include "graphics/ParticleSpawner.h"
    3839#include "JumpFigure.h"
    39 #include "sound/WorldSound.h"
    40 #include "core/XMLPort.h"
    4140
    4241namespace orxonox
     
    4847        RegisterObject(JumpPlatformTimer);
    4948
    50         particleSpawner_ = NULL;
     49        particleSpawner_ = nullptr;
    5150
    5251        setProperties(3.0);
     
    7271
    7372        time_ -= dt;
    74         if (time_ < effectStartTime_ && particleSpawner_ == NULL)
     73        if (time_ < effectStartTime_ && particleSpawner_ == nullptr)
    7574        {
    7675
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformTimer.h

    r10262 r11054  
    3636#define _JumpPlatformTimer_H__
    3737
    38 #include "jump/JumpPrereqs.h"
    39 
    40 #include "util/Math.h"
    41 
    42 #include "worldentities/MovableEntity.h"
    43 #include "graphics/ParticleSpawner.h"
    44 
     38#include "JumpPrereqs.h"
     39#include "JumpPlatform.h"
    4540
    4641namespace orxonox
     
    5146            JumpPlatformTimer(Context* context);
    5247            virtual ~JumpPlatformTimer();
    53             virtual void tick(float dt);
    54             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     48            virtual void tick(float dt) override;
     49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5550            virtual void setProperties(float time);
    5651            virtual bool isActive(void);
    57             virtual void touchFigure();
     52            virtual void touchFigure() override;
    5853
    5954            void setEffectPath(const std::string& effectPath)
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformVMove.cc

    r10262 r11054  
    3333
    3434#include "JumpPlatformVMove.h"
     35
    3536#include "core/CoreIncludes.h"
    36 #include "core/GameMode.h"
    37 #include "gametypes/Gametype.h"
     37#include "core/XMLPort.h"
    3838#include "JumpFigure.h"
    39 #include "sound/WorldSound.h"
    40 #include "core/XMLPort.h"
    4139
    4240namespace orxonox
  • code/branches/cpp11_v3/src/modules/jump/JumpPlatformVMove.h

    r10262 r11054  
    3030#define _JumpPlatformVMove_H__
    3131
    32 #include "jump/JumpPrereqs.h"
    33 #include "util/Math.h"
    34 #include "worldentities/MovableEntity.h"
     32#include "JumpPrereqs.h"
     33#include "JumpPlatform.h"
    3534
    3635namespace orxonox
     
    4140            JumpPlatformVMove(Context* context);
    4241            virtual ~JumpPlatformVMove();
    43             virtual void tick(float dt);
    44             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4544            virtual void setProperties(float leftBoundary, float rightBoundary, float speed);
    46             virtual void touchFigure();
     45            virtual void touchFigure() override;
    4746
    4847        protected:
  • code/branches/cpp11_v3/src/modules/jump/JumpProjectile.cc

    r10624 r11054  
    3333
    3434#include "JumpProjectile.h"
     35
    3536#include "core/CoreIncludes.h"
    36 #include "core/GameMode.h"
    37 #include "graphics/Model.h"
    38 #include "gametypes/Gametype.h"
     37#include "core/XMLPort.h"
    3938#include "JumpFigure.h"
    40 #include "sound/WorldSound.h"
    41 #include "core/XMLPort.h"
     39#include "JumpEnemy.h"
    4240
    4341namespace orxonox
     
    4947        RegisterObject(JumpProjectile);
    5048
    51         figure_ = 0;
     49        figure_ = nullptr;
    5250        setPosition(Vector3(0,0,0));
    5351        setVelocity(Vector3(0,0,250.0));
     
    7169        Vector3 projectilePosition = getPosition();
    7270
    73         for (ObjectList<JumpEnemy>::iterator it = ObjectList<JumpEnemy>::begin(); it != ObjectList<JumpEnemy>::end(); ++it)
     71        for (JumpEnemy* enemy : ObjectList<JumpEnemy>())
    7472        {
    75             Vector3 enemyPosition = it->getPosition();
    76             float enemyWidth = it->getWidth();
    77             float enemyHeight = it->getHeight();
     73            Vector3 enemyPosition = enemy->getPosition();
     74            float enemyWidth = enemy->getWidth();
     75            float enemyHeight = enemy->getHeight();
    7876
    7977            if(projectilePosition.x > enemyPosition.x-enemyWidth && projectilePosition.x < enemyPosition.x+enemyWidth && projectilePosition.z > enemyPosition.z-enemyHeight && projectilePosition.z < enemyPosition.z+enemyHeight)
    8078            {
    81                 it->dead_ = true;
     79                enemy->dead_ = true;
    8280            }
    8381        }
  • code/branches/cpp11_v3/src/modules/jump/JumpProjectile.h

    r10624 r11054  
    4343            virtual ~JumpProjectile();
    4444
    45             virtual void tick(float dt);
     45            virtual void tick(float dt) override;
    4646
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     47            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4848
    4949            void setFieldDimension(float width, float height)
  • code/branches/cpp11_v3/src/modules/jump/JumpPropeller.cc

    r10262 r11054  
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "core/GameMode.h"
    38 #include "graphics/Model.h"
    39 #include "gametypes/Gametype.h"
    40 
     37#include "core/XMLPort.h"
    4138#include "JumpFigure.h"
    42 
    43 #include "sound/WorldSound.h"
    44 #include "core/XMLPort.h"
    4539
    4640namespace orxonox
     
    7872        Vector3 PropellerPosition = getWorldPosition();
    7973
    80         if (attachedToFigure_ == false && figure_ != NULL)
     74        if (attachedToFigure_ == false && figure_ != nullptr)
    8175        {
    8276            Vector3 figurePosition = figure_->getWorldPosition();
  • code/branches/cpp11_v3/src/modules/jump/JumpPropeller.h

    r10262 r11054  
    3030#define _JumpPropeller_H__
    3131
    32 #include "jump/JumpPrereqs.h"
    33 
    34 #include "util/Math.h"
    35 
    36 #include "worldentities/MovableEntity.h"
    37 
     32#include "JumpPrereqs.h"
     33#include "JumpItem.h"
    3834
    3935namespace orxonox
     
    4440            JumpPropeller(Context* context);
    4541            virtual ~JumpPropeller();
    46             virtual void tick(float dt);
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    48             virtual void touchFigure();
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     44            virtual void touchFigure() override;
    4945            virtual float getFuelState();
    5046        protected:
  • code/branches/cpp11_v3/src/modules/jump/JumpRocket.cc

    r10262 r11054  
    3333
    3434#include "JumpRocket.h"
     35
    3536#include "core/CoreIncludes.h"
    36 #include "core/GameMode.h"
    37 #include "graphics/Model.h"
    38 #include "gametypes/Gametype.h"
     37#include "core/XMLPort.h"
    3938#include "JumpFigure.h"
    40 #include "sound/WorldSound.h"
    41 #include "core/XMLPort.h"
    4239
    4340namespace orxonox
     
    7572        Vector3 rocketPosition = getWorldPosition();
    7673
    77         if (attachedToFigure_ == false && figure_ != NULL)
     74        if (attachedToFigure_ == false && figure_ != nullptr)
    7875        {
    7976            Vector3 figurePosition = figure_->getWorldPosition();
  • code/branches/cpp11_v3/src/modules/jump/JumpRocket.h

    r10262 r11054  
    3030#define _JumpRocket_H__
    3131
    32 #include "jump/JumpPrereqs.h"
    33 #include "util/Math.h"
    34 #include "worldentities/MovableEntity.h"
     32#include "JumpPrereqs.h"
     33#include "JumpItem.h"
    3534
    3635namespace orxonox
     
    4140            JumpRocket(Context* context);
    4241            virtual ~JumpRocket();
    43             virtual void tick(float dt);
    44             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    45             virtual void touchFigure();
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     44            virtual void touchFigure() override;
    4645            virtual float getFuelState();
    4746        protected:
  • code/branches/cpp11_v3/src/modules/jump/JumpScore.cc

    r10624 r11054  
    3333
    3434#include "JumpScore.h"
     35
    3536#include "core/CoreIncludes.h"
    3637#include "core/XMLPort.h"
     
    3839#include "infos/PlayerInfo.h"
    3940#include "Jump.h"
    40 #include "sound/WorldSound.h"
    4141
    4242namespace orxonox
     
    4848        RegisterObject(JumpScore);
    4949
    50         owner_ = NULL;
     50        owner_ = nullptr;
    5151        showScore_ = false;
    5252        showFuel_ = false;
     
    7373        SUPER(JumpScore, tick, dt);
    7474
    75         if (owner_ != NULL)
     75        if (owner_ != nullptr)
    7676        {
    7777            if (!owner_->hasEnded())
     
    7979                player_ = owner_->getPlayer();
    8080
    81                 if (player_ != NULL)
     81                if (player_ != nullptr)
    8282                {
    8383                    if (showScore_ == true)
     
    116116        SUPER(JumpScore, changedOwner);
    117117
    118         if (this->getOwner() != NULL && this->getOwner()->getGametype())
     118        if (this->getOwner() != nullptr && this->getOwner()->getGametype())
    119119        {
    120120            this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype());
     
    122122        else
    123123        {
    124             this->owner_ = NULL;
     124            this->owner_ = nullptr;
    125125        }
    126126    }
  • code/branches/cpp11_v3/src/modules/jump/JumpScore.h

    r10262 r11054  
    4444            virtual ~JumpScore();
    4545
    46             virtual void tick(float dt);
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    48             virtual void changedOwner();
     46            virtual void tick(float dt) override;
     47            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     48            virtual void changedOwner() override;
    4949
    5050            void setShowScore(const bool showScore)
  • code/branches/cpp11_v3/src/modules/jump/JumpShield.cc

    r10262 r11054  
    3535
    3636#include "core/CoreIncludes.h"
    37 #include "core/GameMode.h"
    38 #include "graphics/Model.h"
    39 #include "gametypes/Gametype.h"
    40 
     37#include "core/XMLPort.h"
    4138#include "JumpFigure.h"
    42 
    43 #include "sound/WorldSound.h"
    44 #include "core/XMLPort.h"
    4539
    4640namespace orxonox
     
    7872        Vector3 shieldPosition = getWorldPosition();
    7973
    80         if (attachedToFigure_ == false && figure_ != NULL)
     74        if (attachedToFigure_ == false && figure_ != nullptr)
    8175        {
    8276            Vector3 figurePosition = figure_->getWorldPosition();
  • code/branches/cpp11_v3/src/modules/jump/JumpShield.h

    r10262 r11054  
    3030#define _JumpShield_H__
    3131
    32 #include "jump/JumpPrereqs.h"
    33 
    34 #include "util/Math.h"
    35 
    36 #include "worldentities/MovableEntity.h"
    37 
     32#include "JumpPrereqs.h"
     33#include "JumpItem.h"
    3834
    3935namespace orxonox
     
    4440            JumpShield(Context* context);
    4541            virtual ~JumpShield();
    46             virtual void tick(float dt);
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    48             virtual void touchFigure();
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     44            virtual void touchFigure() override;
    4945            virtual float getFuelState();
    5046        protected:
  • code/branches/cpp11_v3/src/modules/jump/JumpSpring.cc

    r10262 r11054  
    3333
    3434#include "JumpSpring.h"
     35
    3536#include "core/CoreIncludes.h"
    36 #include "core/GameMode.h"
    37 #include "graphics/Model.h"
    38 #include "gametypes/Gametype.h"
     37#include "core/XMLPort.h"
    3938#include "JumpFigure.h"
    40 #include "sound/WorldSound.h"
    41 #include "core/XMLPort.h"
    4239
    4340namespace orxonox
     
    8077        Vector3 springPosition = getWorldPosition();
    8178
    82         if (figure_ != NULL)
     79        if (figure_ != nullptr)
    8380        {
    8481            Vector3 figurePosition = figure_->getWorldPosition();
     
    103100    void JumpSpring::accelerateFigure()
    104101    {
    105         if (figure_ != 0)
     102        if (figure_ != nullptr)
    106103        {
    107104            figure_->JumpFromSpring(this);
  • code/branches/cpp11_v3/src/modules/jump/JumpSpring.h

    r10262 r11054  
    3030#define _JumpSpring_H__
    3131
    32 #include "jump/JumpPrereqs.h"
    33 
    34 #include "util/Math.h"
    35 
    36 #include "worldentities/MovableEntity.h"
    37 
     32#include "JumpPrereqs.h"
     33#include "JumpItem.h"
    3834
    3935namespace orxonox
     
    4440            JumpSpring(Context* context);
    4541            virtual ~JumpSpring();
    46             virtual void tick(float dt);
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     42            virtual void tick(float dt) override;
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4844            virtual void accelerateFigure();
    49             virtual void touchFigure();
     45            virtual void touchFigure() override;
    5046        protected:
    5147            float stretch_;
  • code/branches/cpp11_v3/src/modules/mini4dgame/Mini4Dgame.cc

    r10624 r11054  
    6666        RegisterObject(Mini4Dgame);
    6767
    68         this->board_ = 0;
     68        this->board_ = nullptr;
    6969
    7070        // Set the type of Bots for this particular Gametype.
     
    8888    void Mini4Dgame::cleanup()
    8989    {
    90         if(this->board_ != NULL)// Destroy the board, if present.
     90        if(this->board_ != nullptr)// Destroy the board, if present.
    9191        {
    9292            //this->board_->destroy();
    93             this->board_ = 0;
     93            this->board_ = nullptr;
    9494        }
    9595    }
     
    101101    void Mini4Dgame::start()
    102102    {
    103         if (this->board_ != NULL) // There needs to be a Mini4DgameCenterpoint, i.e. the area the game takes place.
     103        if (this->board_ != nullptr) // There needs to be a Mini4DgameCenterpoint, i.e. the area the game takes place.
    104104        {
    105105            /*
    106             if (this->board_ == NULL)
     106            if (this->board_ == nullptr)
    107107            {
    108108                this->board_ = new Mini4DgameBoard(this->board_->getContext());
     
    155155    {
    156156        // first spawn human players to assign always the left bat to the player in singleplayer
    157         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
    158             if (it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
    159                 this->spawnPlayer(it->first);
     157        for (const auto& mapEntry : this->players_)
     158            if (mapEntry.first->isHumanPlayer() && (mapEntry.first->isReadyToSpawn() || this->bForceSpawn_))
     159                this->spawnPlayer(mapEntry.first);
    160160        // now spawn bots
    161         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
    162             if (!it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
    163                 this->spawnPlayer(it->first);
     161        for (const auto& mapEntry : this->players_)
     162            if (!mapEntry.first->isHumanPlayer() && (mapEntry.first->isReadyToSpawn() || this->bForceSpawn_))
     163                this->spawnPlayer(mapEntry.first);
    164164    }
    165165
     
    174174        assert(player);
    175175
    176         if(false)//this->player_ == NULL)
     176        if(false)//this->player_ == nullptr)
    177177        {
    178178            //this->player_ = player;
     
    183183    void Mini4Dgame::undoStone()//Vector4 move, const int playerColor)
    184184    {
    185         ObjectList<Mini4DgameBoard>::iterator it = ObjectList<Mini4DgameBoard>::begin();
     185        ObjectList<Mini4DgameBoard>::iterator it = ObjectList<Mini4DgameBoard>().begin();
    186186        it->undoMove();
    187187    }
     
    191191    {
    192192        Mini4DgamePosition move = Mini4DgamePosition(x,y,z,w);
    193         ObjectList<Mini4DgameBoard>::iterator it = ObjectList<Mini4DgameBoard>::begin();
     193        ObjectList<Mini4DgameBoard>::iterator it = ObjectList<Mini4DgameBoard>().begin();
    194194        it->makeMove(move);
    195195    }
  • code/branches/cpp11_v3/src/modules/mini4dgame/Mini4Dgame.h

    r10230 r11054  
    6565            virtual ~Mini4Dgame(); //!< Destructor. Cleans up, if initialized.
    6666
    67             virtual void start(void); //!< Starts the Mini4Dgame minigame.
    68             virtual void end(void); ///!< Ends the Mini4Dgame minigame.
     67            virtual void start(void) override; //!< Starts the Mini4Dgame minigame.
     68            virtual void end(void) override; ///!< Ends the Mini4Dgame minigame.
    6969
    70             virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
     70            virtual void spawnPlayer(PlayerInfo* player) override; //!< Spawns the input player.
    7171
    7272            void setGameboard(Mini4DgameBoard* board)
     
    8484
    8585        protected:
    86             virtual void spawnPlayersIfRequested(); //!< Spawns player.
     86            virtual void spawnPlayersIfRequested() override; //!< Spawns player.
    8787
    8888
  • code/branches/cpp11_v3/src/modules/mini4dgame/Mini4DgameAI.cc

    r10230 r11054  
    6060
    6161        this->setConfigValues();
    62         this->center_ = 0;
     62        this->center_ = nullptr;
    6363    }
    6464
  • code/branches/cpp11_v3/src/modules/mini4dgame/Mini4DgameAI.h

    r10230 r11054  
    8181        protected:
    8282
    83             std::list<std::pair<Timer*, char> > reactionTimers_; //!< A list of reaction timers and the directions that take effect when their timer expires.
     83            std::list<std::pair<Timer*, char>> reactionTimers_; //!< A list of reaction timers and the directions that take effect when their timer expires.
    8484            Mini4DgameCenterpoint* center_;
    8585
  • code/branches/cpp11_v3/src/modules/mini4dgame/Mini4DgameBoard.cc

    r10624 r11054  
    6464                    for(int l=0;l<4;l++){
    6565                        this->board[i][j][k][l]=mini4DgamePlayerColor::none;
    66                         this->blinkingBillboards[i][j][k][l] = 0;
     66                        this->blinkingBillboards[i][j][k][l] = nullptr;
    6767                    }
    6868                }
     
    9797        this->board[move.x][move.y][move.z][move.w] = mini4DgamePlayerColor::none;
    9898        this->blinkingBillboards[move.x][move.y][move.z][move.w]->destroy();
    99         this->blinkingBillboards[move.x][move.y][move.z][move.w] = 0;
     99        this->blinkingBillboards[move.x][move.y][move.z][move.w] = nullptr;
    100100        if(player_toggle_){
    101101            this->player_toggle_ = false;
     
    905905    void Mini4DgameBoard::checkGametype()
    906906    {
    907         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Mini4Dgame)))
     907        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Mini4Dgame)))
    908908        {
    909909            Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype());
  • code/branches/cpp11_v3/src/modules/mini4dgame/Mini4DgameBoard.h

    r10624 r11054  
    7474            //virtual ~Mini4DgameBoard();
    7575
    76             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     76            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    7777
    7878            bool isValidMove(const Mini4DgamePosition& move);
  • code/branches/cpp11_v3/src/modules/notifications/NotificationDispatcher.cc

    r10624 r11054  
    177177
    178178        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
    179         PlayerInfo* player = NULL;
     179        PlayerInfo* player = nullptr;
    180180
    181181        // If the trigger is a PlayerTrigger.
    182         if(pTrigger != NULL)
     182        if(pTrigger != nullptr)
    183183        {
    184184            if(!pTrigger->isForPlayer())  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
     
    190190            return false;
    191191
    192         if(player == NULL)
     192        if(player == nullptr)
    193193        {
    194194            orxout(verbose, context::notifications) << "The NotificationDispatcher was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << endl;
  • code/branches/cpp11_v3/src/modules/notifications/NotificationDispatcher.h

    r9667 r11054  
    7979            virtual ~NotificationDispatcher(); //!< Destructor.
    8080
    81             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a NotificationDispatcher object through XML.
    82             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
     81            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a NotificationDispatcher object through XML.
     82            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    8383
    8484            /**
  • code/branches/cpp11_v3/src/modules/notifications/NotificationManager.cc

    r10624 r11054  
    6969    {
    7070        // Destroys all Notifications.
    71         for(std::multimap<std::time_t, Notification*>::iterator it = this->allNotificationsList_.begin(); it!= this->allNotificationsList_.end(); it++)
    72             it->second->destroy();
     71        for(const auto& mapEntry : this->allNotificationsList_)
     72            mapEntry.second->destroy();
    7373        this->allNotificationsList_.clear();
    7474
     
    152152        bool executed = false;
    153153        // Clear all NotificationQueues that have the input sender as target.
    154         for(std::map<const std::string, NotificationQueue*>::iterator it = this->queues_.begin(); it != this->queues_.end(); it++) // Iterate through all NotificationQueues.
    155         {
    156             const std::set<std::string>& set = it->second->getTargetsSet();
     154        for(const auto& mapEntry : this->queues_) // Iterate through all NotificationQueues.
     155        {
     156            const std::set<std::string>& set = mapEntry.second->getTargetsSet();
    157157            // If either the sender is 'all', the NotificationQueue has as target all or the NotificationQueue has the input sender as a target.
    158158            if(all || set.find(NotificationListener::ALL) != set.end() || set.find(sender) != set.end())
    159                 executed = it->second->tidy() || executed;
     159                executed = mapEntry.second->tidy() || executed;
    160160        }
    161161
     
    187187
    188188        // Insert the Notification in all NotificationQueues that have its sender as target.
    189         for(std::map<const std::string, NotificationQueue*>::iterator it = this->queues_.begin(); it != this->queues_.end(); it++) // Iterate through all NotificationQueues.
    190         {
    191             const std::set<std::string>& set = it->second->getTargetsSet();
     189        for(const auto& mapEntry : this->queues_) // Iterate through all NotificationQueues.
     190        {
     191            const std::set<std::string>& set = mapEntry.second->getTargetsSet();
    192192            bool bAll = set.find(NotificationListener::ALL) != set.end();
    193193            // If either the Notification has as sender 'all', the NotificationQueue displays all Notifications or the NotificationQueue has the sender of the Notification as target.
     
    195195            {
    196196                if(!bAll)
    197                     this->notificationLists_[it->second->getName()]->insert(std::pair<std::time_t, Notification*>(time, notification)); // Insert the Notification in the notifications list of the current NotificationQueue.
    198                 it->second->update(notification, time); // Update the NotificationQueue.
     197                    this->notificationLists_[mapEntry.second->getName()]->insert(std::pair<std::time_t, Notification*>(time, notification)); // Insert the Notification in the notifications list of the current NotificationQueue.
     198                mapEntry.second->update(notification, time); // Update the NotificationQueue.
    199199            }
    200200        }
     
    334334        // If all senders are the target of the NotificationQueue, then the list of Notifications for that specific NotificationQueue is the same as the list of all Notifications.
    335335        bool bAll = set.find(NotificationListener::ALL) != set.end();
    336         std::multimap<std::time_t, Notification*>* map = NULL;
     336        std::multimap<std::time_t, Notification*>* map = nullptr;
    337337        if(bAll)
    338338            this->notificationLists_[queue->getName()] = &this->allNotificationsList_;
     
    345345
    346346        // Iterate through all Notifications to determine whether any of them should belong to the newly registered NotificationQueue.
    347         for(std::multimap<std::time_t, Notification*>::iterator it = this->allNotificationsList_.begin(); it != this->allNotificationsList_.end(); it++)
    348         {
    349             if(!bAll && set.find(it->second->getSender()) != set.end()) // Checks whether the listener has the sender of the current Notification as target.
    350                 map->insert(std::pair<std::time_t, Notification*>(it->first, it->second));
     347        for(const auto& mapEntry : this->allNotificationsList_)
     348        {
     349            if(!bAll && set.find(mapEntry.second->getSender()) != set.end()) // Checks whether the listener has the sender of the current Notification as target.
     350                map->insert(std::pair<std::time_t, Notification*>(mapEntry.first, mapEntry.second));
    351351        }
    352352
     
    395395        The name of the NotificationQueue.
    396396    @return
    397         Returns a pointer to the NotificationQueue with the input name. Returns NULL if no NotificationQueue with such a name exists.
     397        Returns a pointer to the NotificationQueue with the input name. Returns nullptr if no NotificationQueue with such a name exists.
    398398    */
    399399    NotificationQueue* NotificationManager::getQueue(const std::string & name)
    400400    {
    401401        std::map<const std::string, NotificationQueue*>::iterator it = this->queues_.find(name);
    402         // Returns NULL if no such NotificationQueue exists.
     402        // Returns nullptr if no such NotificationQueue exists.
    403403        if(it == this->queues_.end())
    404             return NULL;
     404            return nullptr;
    405405
    406406        return (*it).second;
  • code/branches/cpp11_v3/src/modules/notifications/NotificationManager.h

    r9667 r11054  
    120120            virtual ~NotificationManager();
    121121
    122             virtual void preDestroy(void); // Is called before the object is destroyed.
     122            virtual void preDestroy(void) override; // Is called before the object is destroyed.
    123123
    124124            /**
     
    128128            static NotificationManager& getInstance() { return Singleton<NotificationManager>::getInstance(); } // tolua_export
    129129
    130             virtual bool registerNotification(const std::string& message, const std::string& sender, notificationMessageType::Value type);
    131             virtual bool executeCommand(notificationCommand::Value command, const std::string& sender);
     130            virtual bool registerNotification(const std::string& message, const std::string& sender, notificationMessageType::Value type) override;
     131            virtual bool executeCommand(notificationCommand::Value command, const std::string& sender) override;
    132132
    133133            bool registerNotification(Notification* notification); // Registers a Notification within the NotificationManager.
  • code/branches/cpp11_v3/src/modules/notifications/NotificationQueue.cc

    r9667 r11054  
    206206        {
    207207            // Add all Notifications that have been created after this NotificationQueue was created.
    208             for(std::multimap<std::time_t, Notification*>::iterator it = notifications->begin(); it != notifications->end(); it++)
     208            for(const auto& mapEntry : *notifications)
    209209            {
    210                 if(it->first >= this->creationTime_)
    211                     this->push(it->second, it->first);
     210                if(mapEntry.first >= this->creationTime_)
     211                    this->push(mapEntry.second, mapEntry.first);
    212212            }
    213213        }
     
    336336        this->ordering_.clear();
    337337        // Delete all NotificationContainers in the list.
    338         for(std::vector<NotificationContainer*>::iterator it = this->notifications_.begin(); it != this->notifications_.end(); it++)
    339             delete *it;
     338        for(NotificationContainer* notification : this->notifications_)
     339            delete notification;
    340340
    341341        this->notifications_.clear();
     
    426426        bool first = true;
    427427        // Iterate through the set of targets.
    428         for(std::set<std::string>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++)
     428        for(const std::string& target : this->targets_)
    429429        {
    430430            if(!first)
     
    432432            else
    433433                first = false;
    434             stream << *it;
     434            stream << target;
    435435        }
    436436
  • code/branches/cpp11_v3/src/modules/notifications/NotificationQueue.h

    r9667 r11054  
    9797            virtual ~NotificationQueue();
    9898
    99             virtual void tick(float dt); // To update from time to time.
    100             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    101 
    102             virtual void changedName(void);
     99            virtual void tick(float dt) override; // To update from time to time.
     100            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     101
     102            virtual void changedName(void) override;
    103103           
    104104            void update(void); // Updates the NotificationQueue.
  • code/branches/cpp11_v3/src/modules/notifications/NotificationQueueCEGUI.cc

    r10258 r11054  
    290290        The name of the NotificationQueueCEGUI to be got.
    291291    @return
    292         Returns a pointer to the NotificationQueueCEGUI, or NULL if it doesn't exist.
     292        Returns a pointer to the NotificationQueueCEGUI, or nullptr if it doesn't exist.
    293293    */
    294294    /*static*/ NotificationQueueCEGUI* NotificationQueueCEGUI::getQueue(const std::string& name)
    295295    {
    296296        NotificationQueue* queue = NotificationManager::getInstance().getQueue(name);
    297         if(queue == NULL || !queue->isA(Class(NotificationQueueCEGUI)))
    298             return NULL;
     297        if(queue == nullptr || !queue->isA(Class(NotificationQueueCEGUI)))
     298            return nullptr;
    299299        return static_cast<NotificationQueueCEGUI*>(queue);
    300300    }
  • code/branches/cpp11_v3/src/modules/notifications/NotificationQueueCEGUI.h

    r9667 r11054  
    7373            virtual ~NotificationQueueCEGUI();
    7474
    75             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     75            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    7676
    77             virtual void changedName(void);
     77            virtual void changedName(void) override;
    7878
    7979            void destroy(bool noGraphics = false); // Destroys the NotificationQueue.
     
    136136            void registerVariables();
    137137           
    138             virtual void create(void); // Creates the NotificationQueue in lua.
     138            virtual void create(void) override; // Creates the NotificationQueue in lua.
    139139           
    140             virtual void notificationPushed(Notification* notification); // Is called by the NotificationQueue when a Notification was pushed
    141             virtual void notificationPopped(void); // Is called by the NotificationQueue when a Notification was popped.
    142             virtual void notificationRemoved(unsigned int index); // Is called when a Notification was removed.
     140            virtual void notificationPushed(Notification* notification) override; // Is called by the NotificationQueue when a Notification was pushed
     141            virtual void notificationPopped(void) override; // Is called by the NotificationQueue when a Notification was popped.
     142            virtual void notificationRemoved(unsigned int index) override; // Is called when a Notification was removed.
    143143           
    144             virtual void clear(bool noGraphics = false); // Clears the NotificationQueue by removing all NotificationContainers.
     144            virtual void clear(bool noGraphics = false) override; // Clears the NotificationQueue by removing all NotificationContainers.
    145145
    146146        protected:
  • code/branches/cpp11_v3/src/modules/objects/Attacher.cc

    r9667 r11054  
    4040        RegisterObject(Attacher);
    4141
    42         this->target_ = 0;
     42        this->target_ = nullptr;
    4343    }
    4444
     
    6161        SUPER(Attacher, changedActivity);
    6262
    63         for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
    64             (*it)->setActive(this->isActive());
     63        for (WorldEntity* object : this->objects_)
     64            object->setActive(this->isActive());
    6565    }
    6666
     
    6969        SUPER(Attacher, changedVisibility);
    7070
    71         for (std::list<WorldEntity*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
    72             (*it)->setVisible(this->isVisible());
     71        for (WorldEntity* object : this->objects_)
     72            object->setVisible(this->isVisible());
    7373    }
    7474
     
    8383    {
    8484        unsigned int i = 0;
    85         for (std::list<WorldEntity*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
     85        for (WorldEntity* object : this->objects_)
    8686        {
    8787            if (i == index)
    88                 return (*it);
     88                return object;
    8989
    9090            ++i;
    9191        }
    92         return 0;
     92        return nullptr;
    9393    }
    9494
     
    9696    {
    9797        this->targetname_ = target;
    98         this->target_ = 0;
     98        this->target_ = nullptr;
    9999
    100100        if (this->targetname_.empty())
    101101            return;
    102102
    103         for (ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it != ObjectList<WorldEntity>::end(); ++it)
     103        for (WorldEntity* worldEntity : ObjectList<WorldEntity>())
    104104        {
    105             if (it->getName() == this->targetname_)
     105            if (worldEntity->getName() == this->targetname_)
    106106            {
    107                 this->target_ = *it;
    108                 this->attachToParent(*it);
     107                this->target_ = worldEntity;
     108                this->attachToParent(worldEntity);
    109109            }
    110110        }
  • code/branches/cpp11_v3/src/modules/objects/Attacher.h

    r9667 r11054  
    5151            virtual ~Attacher() {}
    5252
    53             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     53            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5454
    55             virtual void processEvent(Event& event);
    56             virtual void changedActivity();
    57             virtual void changedVisibility();
     55            virtual void processEvent(Event& event) override;
     56            virtual void changedActivity() override;
     57            virtual void changedVisibility() override;
    5858
    5959            void addObject(WorldEntity* object);
     
    6464                { return this->targetname_; }
    6565
    66             void loadedNewXMLName(BaseObject* object);
     66            virtual void loadedNewXMLName(BaseObject* object) override;
    6767
    6868        private:
  • code/branches/cpp11_v3/src/modules/objects/ForceField.cc

    r9945 r11054  
    118118        {
    119119            // Iterate over all objects that could possibly be affected by the ForceField.
    120             for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
     120            for (MobileEntity* mobileEntity : ObjectList<MobileEntity>())
    121121            {
    122122                // The direction of the orientation of the force field.
     
    125125
    126126                // Vector from the center of the force field to the object its acting on.
    127                 Vector3 distanceVector = it->getWorldPosition() - (this->getWorldPosition() + (this->halfLength_ * direction));
     127                Vector3 distanceVector = mobileEntity->getWorldPosition() - (this->getWorldPosition() + (this->halfLength_ * direction));
    128128
    129129                // The object is outside a ball around the center with radius length/2 of the ForceField.
     
    132132
    133133                // The distance of the object form the orientation vector. (Or rather the smallest distance from the orientation vector)
    134                 float distanceFromDirectionVector = ((it->getWorldPosition() - this->getWorldPosition()).crossProduct(direction)).length();
     134                float distanceFromDirectionVector = ((mobileEntity->getWorldPosition() - this->getWorldPosition()).crossProduct(direction)).length();
    135135
    136136                // If the object in a tube of radius 'radius' around the direction of orientation.
     
    140140                // Apply a force to the object in the direction of the orientation.
    141141                // The force is highest when the object is directly on the direction vector, with a linear decrease, finally reaching zero, when distanceFromDirectionVector = radius.
    142                 it->applyCentralForce((this->radius_ - distanceFromDirectionVector)/this->radius_ * this->velocity_ * direction);
     142                mobileEntity->applyCentralForce((this->radius_ - distanceFromDirectionVector)/this->radius_ * this->velocity_ * direction);
    143143            }
    144144        }
     
    146146        {
    147147            // Iterate over all objects that could possibly be affected by the ForceField.
    148             for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
    149             {
    150                 Vector3 distanceVector = it->getWorldPosition() - this->getWorldPosition();
     148            for (MobileEntity* mobileEntity : ObjectList<MobileEntity>())
     149            {
     150                Vector3 distanceVector = mobileEntity->getWorldPosition() - this->getWorldPosition();
    151151                float distance = distanceVector.length();
    152152                // If the object is within 'radius' distance.
     
    155155                    distanceVector.normalise();
    156156                    // Apply a force proportional to the velocity, with highest force at the origin of the sphere, linear decreasing until reaching a distance of 'radius' from the origin, where the force reaches zero.
    157                     it->applyCentralForce((this->radius_ - distance)/this->radius_ * this->velocity_ * distanceVector);
     157                    mobileEntity->applyCentralForce((this->radius_ - distance)/this->radius_ * this->velocity_ * distanceVector);
    158158                }
    159159            }
     
    162162        {
    163163            // Iterate over all objects that could possibly be affected by the ForceField.
    164             for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
    165             {
    166                 Vector3 distanceVector = this->getWorldPosition() - it->getWorldPosition();
     164            for (MobileEntity* mobileEntity : ObjectList<MobileEntity>())
     165            {
     166                Vector3 distanceVector = this->getWorldPosition() - mobileEntity->getWorldPosition();
    167167                float distance = distanceVector.length();
    168168                // If the object is within 'radius' distance and no more than 'length' away from the boundary of the sphere.
     
    172172                    distanceVector.normalise();
    173173                    // Apply a force proportional to the velocity, with highest force at the boundary of the sphere, linear decreasing until reaching a distance of 'radius-length' from the origin, where the force reaches zero.
    174                     it->applyCentralForce((distance-range)/range * this->velocity_ * distanceVector);
     174                    mobileEntity->applyCentralForce((distance-range)/range * this->velocity_ * distanceVector);
    175175                }
    176176            }
     
    179179        {
    180180            // Iterate over all objects that could possibly be affected by the ForceField.
    181             for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
    182             {
    183                 Vector3 distanceVector = it->getWorldPosition() - this->getWorldPosition();
     181            for (MobileEntity* mobileEntity : ObjectList<MobileEntity>())
     182            {
     183                Vector3 distanceVector = mobileEntity->getWorldPosition() - this->getWorldPosition();
    184184                float distance = distanceVector.length();
    185185                // If the object is within 'radius' distance and especially further away than massRadius_
     
    197197                   
    198198                    // Note: this so called force is actually an acceleration!
    199                     it->applyCentralForce((-1) * (ForceField::attenFactor_ * ForceField::gravConstant_ * this->getMass()) / (distance * distance) * distanceVector);
     199                    mobileEntity->applyCentralForce((-1) * (ForceField::attenFactor_ * ForceField::gravConstant_ * this->getMass()) / (distance * distance) * distanceVector);
    200200                }
    201201            }
     
    204204        {
    205205            // Iterate over all objects that could possibly be affected by the ForceField.
    206             for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
    207             {
    208                 Vector3 distanceVector = it->getWorldPosition() - this->getWorldPosition();
     206            for (MobileEntity* mobileEntity : ObjectList<MobileEntity>())
     207            {
     208                Vector3 distanceVector = mobileEntity->getWorldPosition() - this->getWorldPosition();
    209209                float distance = distanceVector.length();
    210210                if (distance < this->radius_ && distance > this->massRadius_)
     
    212212                    // Add a Acceleration in forceDirection_.
    213213                    // Vector3(0,0,0) is the direction, where the force should work.
    214                     it->addAcceleration(forceDirection_ , Vector3(0,0,0));
     214                    mobileEntity->addAcceleration(forceDirection_ , Vector3(0,0,0));
    215215                }
    216216            }
  • code/branches/cpp11_v3/src/modules/objects/ForceField.h

    r10622 r11054  
    9292            virtual ~ForceField();
    9393
    94             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a ForceField object through XML.
     94            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Creates a ForceField object through XML.
    9595            void registerVariables(); //!< Registers the variables that should get synchronised over the network
    96             virtual void tick(float dt); //!< A method that is called every tick.
     96            virtual void tick(float dt) override; //!< A method that is called every tick.
    9797           
    9898
  • code/branches/cpp11_v3/src/modules/objects/Planet.h

    r10624 r11054  
    5252            virtual ~Planet();
    5353
    54             virtual void tick(float dt);
     54            virtual void tick(float dt) override;
    5555
    56             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     56            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5757
    58             virtual void changedVisibility();
     58            virtual void changedVisibility() override;
    5959
    6060            inline void setMeshSource(const std::string& meshname)
  • code/branches/cpp11_v3/src/modules/objects/Script.cc

    r10624 r11054  
    140140
    141141        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
    142         PlayerInfo* player = NULL;
     142        PlayerInfo* player = nullptr;
    143143
    144144        // If the trigger is a PlayerTrigger.
    145         if(pTrigger != NULL)
     145        if(pTrigger != nullptr)
    146146        {
    147147            if(!pTrigger->isForPlayer())  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
     
    153153            return false;
    154154
    155         if(player == NULL)  //TODO: Will this ever happen? If not, change in NotificationDispatcher as well.
     155        if(player == nullptr)  //TODO: Will this ever happen? If not, change in NotificationDispatcher as well.
    156156        {
    157157            orxout(internal_warning) << "The Script was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << endl;
     
    196196            {
    197197                const std::map<unsigned int, PlayerInfo*> clients = PlayerManager::getInstance().getClients();
    198                 for(std::map<unsigned int, PlayerInfo*>::const_iterator it = clients.begin(); it != clients.end(); it++)
     198                for(const auto& mapEntry : clients)
    199199                {
    200                     callStaticNetworkFunction(&Script::executeHelper, it->first, this->getCode(), this->getMode(), this->getNeedsGraphics());
     200                    callStaticNetworkFunction(&Script::executeHelper, mapEntry.first, this->getCode(), this->getMode(), this->getNeedsGraphics());
    201201                    if(this->times_ != Script::INF) // Decrement the number of remaining executions.
    202202                    {
  • code/branches/cpp11_v3/src/modules/objects/Script.h

    r9667 r11054  
    9898            virtual ~Script();
    9999
    100             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Script object through XML.
    101             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a port that can be used to channel events and react to them.
     100            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a Script object through XML.
     101            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Creates a port that can be used to channel events and react to them.
    102102
    103103            bool trigger(bool triggered, BaseObject* trigger); //!< Is called when an event comes in trough the event port.
     
    168168                { return this->forAll_; }
    169169
    170             virtual void clientConnected(unsigned int clientId); //!< Callback that is called when a new client has connected.
    171             virtual void clientDisconnected(unsigned int clientid) {}
     170            virtual void clientConnected(unsigned int clientId) override; //!< Callback that is called when a new client has connected.
     171            virtual void clientDisconnected(unsigned int clientid) override {}
    172172
    173173        private:
  • code/branches/cpp11_v3/src/modules/objects/SpaceBoundaries.cc

    r10624 r11054  
    5959            this->pawnsIn_.clear();
    6060
    61             for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
     61            for(BillboardAdministration& billboard : this->billboards_)
    6262            {
    63                 if( current->billy != NULL)
    64                 {
    65                     delete current->billy;
     63                if( billboard.billy != nullptr)
     64                {
     65                    delete billboard.billy;
    6666                }
    6767            }
     
    7373    {
    7474        pawnsIn_.clear();
    75         for(ObjectList<Pawn>::iterator current = ObjectList<Pawn>::begin(); current != ObjectList<Pawn>::end(); ++current)
    76         {
    77             Pawn* currentPawn = *current;
     75        for(Pawn* currentPawn : ObjectList<Pawn>())
     76        {
    7877            if( this->reaction_ == 0 )
    7978            {
     
    127126    void SpaceBoundaries::setBillboardOptions(Billboard *billy)
    128127    {
    129         if(billy != NULL)
     128        if(billy != nullptr)
    130129        {
    131130            billy->setMaterial("Grid");
     
    138137    void SpaceBoundaries::removeAllBillboards()
    139138    {
    140         for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++ )
    141         {
    142             current->usedYet = false;
    143             current->billy->setVisible(false);
     139        for(BillboardAdministration& billboard : this->billboards_)
     140        {
     141            billboard.usedYet = false;
     142            billboard.billy->setVisible(false);
    144143        }
    145144    }
     
    208207        float distance;
    209208        bool humanItem;
    210         for( std::list<WeakPtr<Pawn> >::iterator current = pawnsIn_.begin(); current != pawnsIn_.end(); current++ )
    211         {
    212             Pawn* currentPawn = *current;
     209        for(Pawn* currentPawn : pawnsIn_)
     210        {
    213211            if( currentPawn && currentPawn->getNode() )
    214212            {
     
    250248    float SpaceBoundaries::computeDistance(WorldEntity *item)
    251249    {
    252         if(item != NULL)
     250        if(item != nullptr)
    253251        {
    254252            Vector3 itemPosition = item->getWorldPosition();
     
    310308    bool SpaceBoundaries::isHumanPlayer(Pawn *item)
    311309    {
    312         if(item != NULL)
     310        if(item != nullptr)
    313311        {
    314312            if(item->getPlayer())
  • code/branches/cpp11_v3/src/modules/objects/SpaceBoundaries.h

    r9667 r11054  
    9393            int getReaction();
    9494
    95             void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     95            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    9696
    97             void tick(float dt);
     97            virtual void tick(float dt) override;
    9898
    9999        private:
     
    101101
    102102            // Variabeln::
    103             std::list<WeakPtr<Pawn> > pawnsIn_; //!< List of the pawns that this instance of SpaceBoundaries has to handle.
     103            std::list<WeakPtr<Pawn>> pawnsIn_; //!< List of the pawns that this instance of SpaceBoundaries has to handle.
    104104
    105105            std::vector<BillboardAdministration> billboards_;
  • code/branches/cpp11_v3/src/modules/objects/Turret.h

    r11052 r11054  
    6161            virtual ~Turret();
    6262
    63             virtual void rotatePitch(const Vector2& value);
    64             virtual void rotateYaw(const Vector2& value);
    65             virtual void rotateRoll(const Vector2& value);
     63            virtual void rotatePitch(const Vector2& value) override;
     64            virtual void rotateYaw(const Vector2& value) override;
     65            virtual void rotateRoll(const Vector2& value) override;
    6666            virtual float isInRange(const WorldEntity* target);
    6767            virtual void aimAtPosition(const Vector3 &position);
    6868
    69             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    70             virtual void tick(float dt);
     69            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     70            virtual void tick(float dt) override;
    7171
    7272            /** @brief Sets the maximum distance the turret is allowed to shoot. @param radius The distance*/
  • code/branches/cpp11_v3/src/modules/objects/controllers/TeamTargetProxy.cc

    r10262 r11054  
    2828
    2929#include "TeamTargetProxy.h"
     30#include "core/CoreIncludes.h"
    3031#include "worldentities/ControllableEntity.h"
    3132#include "worldentities/pawns/Pawn.h"
  • code/branches/cpp11_v3/src/modules/objects/controllers/TurretController.cc

    r10622 r11054  
    3030#include "worldentities/pawns/Pawn.h"
    3131#include "objects/Turret.h"
     32#include "core/object/ObjectList.h"
     33#include "core/CoreIncludes.h"
    3234
    3335 namespace orxonox
     
    8183        {
    8284            this->forgetTarget();
    83             turret->setTarget(0);
     85            turret->setTarget(nullptr);
    8486        }
    8587
     
    99101        float minScore = FLT_MAX;
    100102        float tempScore;
    101         Pawn* minScorePawn = 0;
    102 
    103         for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
    104         {
    105             Pawn* entity = orxonox_cast<Pawn*>(*it);
    106             if (!entity || FormationController::sameTeam(turret, entity, this->getGametype()))
     103        Pawn* minScorePawn = nullptr;
     104
     105        for (Pawn* pawn : ObjectList<Pawn>())
     106        {
     107            if (!pawn || FormationController::sameTeam(turret, pawn, this->getGametype()))
    107108                continue;
    108             tempScore = turret->isInRange(entity);
     109            tempScore = turret->isInRange(pawn);
    109110            if(tempScore != -1.f)
    110111            {
     
    112113                {
    113114                    minScore = tempScore;
    114                     minScorePawn = entity;
     115                    minScorePawn = pawn;
    115116                }
    116117            }
  • code/branches/cpp11_v3/src/modules/objects/eventsystem/EventDispatcher.cc

    r9667 r11054  
    4545    {
    4646        if (this->isInitialized())
    47             for (std::list<BaseObject*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
    48                 (*it)->destroy();
     47            for (BaseObject* target : this->targets_)
     48                target->destroy();
    4949    }
    5050
     
    6161    void EventDispatcher::processEvent(Event& event)
    6262    {
    63         for (std::list<BaseObject*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
    64             (*it)->processEvent(event);
     63        for (BaseObject* target : this->targets_)
     64            target->processEvent(event);
    6565    }
    6666
     
    7373    {
    7474        unsigned int i = 0;
    75         for (std::list<BaseObject*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
     75        for (BaseObject* target : this->targets_)
    7676        {
    7777            if (i == index)
    78                 return (*it);
     78                return target;
    7979            ++i;
    8080        }
    81         return 0;
     81        return nullptr;
    8282    }
    8383}
  • code/branches/cpp11_v3/src/modules/objects/eventsystem/EventFilter.cc

    r9667 r11054  
    7070        {
    7171            bool success = false;
    72             for (std::list<EventName*>::const_iterator it = this->names_.begin(); it != this->names_.end(); ++it)
     72            for (EventName* name : this->names_)
    7373            {
    74                 if ((*it)->getName() == event.name_)
     74                if (name->getName() == event.name_)
    7575                {
    7676                    success = true;
     
    9696    {
    9797        unsigned int i = 0;
    98         for (std::list<BaseObject*>::const_iterator it = this->sources_.begin(); it != this->sources_.end(); ++it)
     98        for (BaseObject* source : this->sources_)
    9999        {
    100100            if (i == index)
    101                 return (*it);
     101                return source;
    102102            ++i;
    103103        }
    104         return 0;
     104        return nullptr;
    105105    }
    106106
     
    113113    {
    114114        unsigned int i = 0;
    115         for (std::list<EventName*>::const_iterator it = this->names_.begin(); it != this->names_.end(); ++it)
     115        for (EventName* name : this->names_)
    116116        {
    117117            if (i == index)
    118                 return (*it);
     118                return name;
    119119            ++i;
    120120        }
    121         return 0;
     121        return nullptr;
    122122    }
    123123}
  • code/branches/cpp11_v3/src/modules/objects/eventsystem/EventListener.cc

    r9667 r11054  
    7878            return;
    7979
    80         for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
    81             if (it->getName() == this->eventName_)
    82                 this->addEventSource(*it, "");
     80        for (BaseObject* object : ObjectList<BaseObject>())
     81            if (object->getName() == this->eventName_)
     82                this->addEventSource(object, "");
    8383    }
    8484
  • code/branches/cpp11_v3/src/modules/objects/eventsystem/EventTarget.cc

    r9667 r11054  
    7373        this->target_ = name;
    7474
    75         for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it)
    76             if (it->getName() == this->target_)
    77                 this->addEventTarget(*it);
     75        for (BaseObject* object : ObjectList<BaseObject>())
     76            if (object->getName() == this->target_)
     77                this->addEventTarget(object);
    7878    }
    7979
  • code/branches/cpp11_v3/src/modules/objects/triggers/DistanceMultiTrigger.cc

    r10624 r11054  
    9797    {
    9898
    99         std::queue<MultiTriggerState*>* queue = NULL;
     99        std::queue<MultiTriggerState*>* queue = nullptr;
    100100
    101101        // Check for objects that were in range but no longer are. Iterate through all objects, that are in range.
    102         for(std::set<WeakPtr<WorldEntity> >::iterator it = this->range_.begin(); it != this->range_.end(); )
     102        for(std::set<WeakPtr<WorldEntity>>::iterator it = this->range_.begin(); it != this->range_.end(); )
    103103        {
    104104            WorldEntity* entity = *it;
    105105
    106106            // If the entity no longer exists.
    107             if(entity == NULL)
     107            if(entity == nullptr)
    108108            {
    109109                this->range_.erase(it++);
     
    118118
    119119                // If no queue has been created, yet.
    120                 if(queue == NULL)
     120                if(queue == nullptr)
    121121                    queue = new std::queue<MultiTriggerState*>();
    122122
     
    158158            {
    159159               
    160                 const std::set<WorldEntity*> attached = entity->getAttachedObjects();
     160                const std::set<WorldEntity*> attachedObjects = entity->getAttachedObjects();
    161161                bool found = false;
    162                 for(std::set<WorldEntity*>::const_iterator it = attached.begin(); it != attached.end(); it++)
     162                for(WorldEntity* attachedObject : attachedObjects)
    163163                {
    164                     if((*it)->isA(ClassIdentifier<DistanceTriggerBeacon>::getIdentifier()) && static_cast<DistanceTriggerBeacon*>(*it)->getName() == this->targetName_)
     164                    if(attachedObject->isA(ClassIdentifier<DistanceTriggerBeacon>::getIdentifier()) && static_cast<DistanceTriggerBeacon*>(attachedObject)->getName() == this->targetName_)
    165165                    {
    166166                        found = true;
     
    186186
    187187                // If no queue has been created, yet.
    188                 if(queue == NULL)
     188                if(queue == nullptr)
    189189                    queue = new std::queue<MultiTriggerState*>();
    190190
     
    261261    bool DistanceMultiTrigger::addToRange(WorldEntity* entity)
    262262    {
    263         std::pair<std::set<WeakPtr<WorldEntity> >::iterator, bool> pair = this->range_.insert(entity);
     263        std::pair<std::set<WeakPtr<WorldEntity>>::iterator, bool> pair = this->range_.insert(entity);
    264264        return pair.second;
    265265    }
  • code/branches/cpp11_v3/src/modules/objects/triggers/DistanceMultiTrigger.h

    r10624 r11054  
    153153            ClassTreeMask beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons.
    154154
    155             std::set<WeakPtr<WorldEntity> > range_; //!< The set of entities that currently are in range of the DistanceMultiTrigger.
     155            std::set<WeakPtr<WorldEntity>> range_; //!< The set of entities that currently are in range of the DistanceMultiTrigger.
    156156
    157157    };
  • code/branches/cpp11_v3/src/modules/objects/triggers/DistanceTrigger.cc

    r10624 r11054  
    106106            this->setForPlayer(true);
    107107
    108         if (targetId == NULL)
     108        if (targetId == nullptr)
    109109        {
    110110            orxout(internal_error, context::triggers) << "\"" << targetStr << "\" is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ')' << endl;
     
    147147    {
    148148        // Check whether there is a cached object, it still exists and whether it is still in range, if so nothing further needs to be done.
    149         if(this->cache_ != NULL)
     149        if(this->cache_ != nullptr)
    150150        {
    151151            if((this->cache_->getWorldPosition() - this->getWorldPosition()).length() < this->distance_)
     
    180180            {
    181181
    182                 const std::set<WorldEntity*> attached = entity->getAttachedObjects();
     182                const std::set<WorldEntity*> attachedObjects = entity->getAttachedObjects();
    183183                bool found = false;
    184                 for(std::set<WorldEntity*>::const_iterator it = attached.begin(); it != attached.end(); it++)
     184                for(WorldEntity* attachedObject : attachedObjects)
    185185                {
    186                     if((*it)->isA(ClassIdentifier<DistanceTriggerBeacon>::getIdentifier()) && static_cast<DistanceTriggerBeacon*>(*it)->getName() == this->targetName_)
     186                    if(attachedObject->isA(ClassIdentifier<DistanceTriggerBeacon>::getIdentifier()) && static_cast<DistanceTriggerBeacon*>(attachedObject)->getName() == this->targetName_)
    187187                    {
    188188                        found = true;
     
    206206
    207207                    Pawn* pawn = orxonox_cast<Pawn*>(entity);
    208                     if(pawn != NULL)
     208                    if(pawn != nullptr)
    209209                        this->setTriggeringPawn(pawn);
    210210                    else
    211                         orxout(internal_warning, context::triggers) << "Pawn was NULL." << endl;
     211                        orxout(internal_warning, context::triggers) << "Pawn was nullptr." << endl;
    212212                }
    213213               
  • code/branches/cpp11_v3/src/modules/objects/triggers/EventMultiTrigger.cc

    r9667 r11054  
    9696    {
    9797        // If the originator is a MultiTriggerContainer, the event originates from a MultiTrigger and thus the event only triggers the EventMultiTrigger for the originator that caused the MultiTrigger to trigger.
    98         if(originator != NULL && originator->isA(ClassIdentifier<MultiTriggerContainer>::getIdentifier()))
     98        if(originator != nullptr && originator->isA(ClassIdentifier<MultiTriggerContainer>::getIdentifier()))
    9999        {
    100100            MultiTriggerContainer* container = static_cast<MultiTriggerContainer*>(originator);
  • code/branches/cpp11_v3/src/modules/objects/triggers/MultiTrigger.cc

    r11020 r11054  
    124124        // Let the MultiTrigger return the states that trigger and process the new states if there are any.
    125125        std::queue<MultiTriggerState*>* queue  = this->letTrigger();
    126         if(queue != NULL)
     126        if(queue != nullptr)
    127127        {
    128128            while(queue->size() > 0)
    129129            {
    130130                MultiTriggerState* state = queue->front();
    131                 // If the state is NULL. (This really shouldn't happen)
    132                 if(state == NULL)
     131                // If the state is nullptr. (This really shouldn't happen)
     132                if(state == nullptr)
    133133                {
    134                     orxout(internal_error, context::triggers) << "In MultiTrigger '" << this->getName() << "' (&" << this << "), Error: State of new states queue was NULL. State ignored." << endl;
     134                    orxout(internal_error, context::triggers) << "In MultiTrigger '" << this->getName() << "' (&" << this << "), Error: State of new states queue was nullptr. State ignored." << endl;
    135135                    queue->pop();
    136136                    continue;
     
    227227                            {
    228228                                // If the MultiTrigger is set to broadcast and has no originator a boradcast is fired.
    229                                 if(this->getBroadcast() && state->originator == NULL)
     229                                if(this->getBroadcast() && state->originator == nullptr)
    230230                                    this->broadcast(bActive);
    231231                                // Else a normal event is fired.
     
    240240                        {
    241241                            // Print some debug output if the state has changed.
    242                             if(state->originator != NULL)
     242                            if(state->originator != nullptr)
    243243                                orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: " << state->originator->getIdentifier()->getName() << " (&" << state->originator << "), active: " << bActive << ", triggered: " << state->bTriggered << "." << endl;
    244244                            else
    245                                 orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: NULL, active: " << bActive << ", triggered: " << state->bTriggered << "." << endl;
     245                                orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: nullptr, active: " << bActive << ", triggered: " << state->bTriggered << "." << endl;
    246246
    247247                            // If the MultiTrigger has a parent trigger, that is itself a MultiTrigger, it needs to call a method to notify him, that its activity has changed.
    248                             if(this->parent_ != NULL && this->parent_->isMultiTrigger())
     248                            if(this->parent_ != nullptr && this->parent_->isMultiTrigger())
    249249                                static_cast<MultiTrigger*>(this->parent_)->childActivityChanged(state->originator);
    250250                        }
     
    265265                else
    266266                {
    267                     this->stateQueue_.push_back(std::pair<float, MultiTriggerState*>(timeRemaining-dt, state));
     267                    this->stateQueue_.emplace_back(timeRemaining-dt, state);
    268268                    this->stateQueue_.pop_front();
    269269                }
     
    299299
    300300        // If the target is not a valid class name display an error.
    301         if (target == NULL)
     301        if (target == nullptr)
    302302        {
    303303            orxout(internal_error, context::triggers) << "'" << targetStr << "' is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ")" << endl;
     
    327327
    328328        // If the target is not a valid class name display an error.
    329         if (target == NULL)
     329        if (target == nullptr)
    330330        {
    331331            orxout(internal_error, context::triggers) << "'" << targetStr << "' is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ")" << endl;
     
    346346    std::queue<MultiTriggerState*>* MultiTrigger::letTrigger(void)
    347347    {
    348         return NULL;
     348        return nullptr;
    349349    }
    350350
     
    443443    void MultiTrigger::fire(bool status, BaseObject* originator)
    444444    {
    445         // If the originator is NULL, a normal event without MultiTriggerContainer is sent.
    446         if(originator == NULL)
     445        // If the originator is nullptr, a normal event without MultiTriggerContainer is sent.
     446        if(originator == nullptr)
    447447        {
    448448            this->fireEvent(status);
     
    479479    bool MultiTrigger::addState(MultiTriggerState* state)
    480480    {
    481         assert(state); // The state really shouldn't be NULL.
     481        assert(state); // The state really shouldn't be nullptr.
    482482
    483483        // If the originator is no target of this MultiTrigger.
     
    489489
    490490        // Add it ot the state queue with the delay specified for the MultiTrigger.
    491         this->stateQueue_.push_back(std::pair<float, MultiTriggerState*>(this->getDelay(), state));
     491        this->stateQueue_.emplace_back(this->getDelay(), state);
    492492
    493493        return true;
     
    504504    bool MultiTrigger::checkAnd(BaseObject* triggerer)
    505505    {
    506         for(std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
    507         {
    508             TriggerBase* trigger = *it;
     506        for(TriggerBase* trigger : this->children_)
     507        {
    509508            if(trigger->isMultiTrigger())
    510509            {
     
    531530    bool MultiTrigger::checkOr(BaseObject* triggerer)
    532531    {
    533         for(std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
    534         {
    535             TriggerBase* trigger = *it;
     532        for(TriggerBase* trigger : this->children_)
     533        {
    536534            if(trigger->isMultiTrigger())
    537535            {
     
    559557    {
    560558        bool triggered = false;
    561         for(std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
    562         {
    563             TriggerBase* trigger = *it;
     559        for(TriggerBase* trigger : this->children_)
     560        {
    564561            if(triggered)
    565562            {
  • code/branches/cpp11_v3/src/modules/objects/triggers/MultiTrigger.h

    r9667 r11054  
    7676        - @b simultaneousTriggerers The number of simultaneous triggerers limits the number of objects that are allowed to trigger the MultiTrigger at the same time. Or more precisely, the number of distinct objects the MultiTrigger has <em>triggered</em> states for, at each point in time. The default is <code>-1</code>, which denotes infinity.
    7777        - @b mode The mode describes how the MultiTrigger acts in relation to all the triggers, that are appended to it. There are 3 modes: <em>and</em>, meaning that the MultiTrigger can only be triggered if all the appended triggers are active. <em>or</em>, meaning that the MultiTrigger can only triggered if at least one of the appended triggers is active. And <em>xor</em>, meaning that the MultiTrigger can only be triggered if one and only one appended trigger is active. Note, that I wrote <em>can only be active</em>, that implies, that there is an additional condition to the <em>activity</em> of the MultiTrigger and that is the fulfillment of the triggering condition (the MultiTrigger itself doesn't have one, but all derived classes should). Also bear in mind, that the <em>activity</em> of a MultiTrigger is still coupled to the object that triggered it. The default is <em>and</em>.
    78         - @b broadcast Broadcast is a boolean, if true the MutliTrigger is in <em>broadcast-mode</em>, meaning, that all trigger events that are caused by no originator (originator is NULL) are broadcast as having come from every possible originator, or more precisely as having come from all objects that are specified targets of this MultiTrigger. The default is false.
     78        - @b broadcast Broadcast is a boolean, if true the MutliTrigger is in <em>broadcast-mode</em>, meaning, that all trigger events that are caused by no originator (originator is nullptr) are broadcast as having come from every possible originator, or more precisely as having come from all objects that are specified targets of this MultiTrigger. The default is false.
    7979        - @b target The target describes the kind of objects that are allowed to trigger this MultiTrigger. The default is @ref orxonox::Pawn "Pawn".
    8080        - Also there is the possibility of appending triggers (as long as they inherit from TriggerBase) to the MultiTrigger just by adding them as children in the XML description of your MultiTrigger.
     
    110110            */
    111111            inline bool isActive(void) const
    112                 { return this->isActive(NULL); }
    113             bool isActive(BaseObject* triggerer = NULL) const; //!< Check whether the MultiTrigger is active for a given object.
     112                { return this->isActive(nullptr); }
     113            bool isActive(BaseObject* triggerer = nullptr) const; //!< Check whether the MultiTrigger is active for a given object.
    114114
    115115            /**
     
    145145            */
    146146            inline bool isTarget(BaseObject* target)
    147                 { if(target == NULL) return true; else return targetMask_.isIncluded(target->getIdentifier()); }
     147                { if(target == nullptr) return true; else return targetMask_.isIncluded(target->getIdentifier()); }
    148148               
    149149            void addTarget(const std::string& targets); //!< Add some target to the MultiTrigger.
     
    152152            virtual std::queue<MultiTriggerState*>* letTrigger(void); //!< This method is called by the MultiTrigger to get information about new trigger events that need to be looked at.
    153153
    154             void changeTriggered(BaseObject* originator = NULL); //!< This method can be called by any class inheriting from MultiTrigger to change it's triggered status for a specified originator.
    155 
    156             bool isModeTriggered(BaseObject* triggerer = NULL); //!< Checks whether the MultiTrigger is triggered concerning it's children.
    157             bool isTriggered(BaseObject* triggerer = NULL); //!< Get whether the MultiTrigger is triggered for a given object.
    158 
    159             virtual void fire(bool status, BaseObject* originator = NULL);  //!< Helper method. Creates an Event for the given status and originator and fires it.
     154            void changeTriggered(BaseObject* originator = nullptr); //!< This method can be called by any class inheriting from MultiTrigger to change it's triggered status for a specified originator.
     155
     156            bool isModeTriggered(BaseObject* triggerer = nullptr); //!< Checks whether the MultiTrigger is triggered concerning it's children.
     157            bool isTriggered(BaseObject* triggerer = nullptr); //!< Get whether the MultiTrigger is triggered for a given object.
     158
     159            virtual void fire(bool status, BaseObject* originator = nullptr);  //!< Helper method. Creates an Event for the given status and originator and fires it.
    160160            void broadcast(bool status); //!< Helper method. Broadcasts an Event for every object that is a target.
    161161
     
    192192            std::set<BaseObject*> triggered_; //!< The set of all objects the MultiTrigger is triggered for.
    193193
    194             std::deque< std::pair<float, MultiTriggerState*> > stateQueue_; //!< The queue of states waiting to become active.
     194            std::deque<std::pair<float, MultiTriggerState*>> stateQueue_; //!< The queue of states waiting to become active.
    195195
    196196            ClassTreeMask targetMask_; //!< The target mask, masking all objects that can trigger this MultiTrigger.
  • code/branches/cpp11_v3/src/modules/objects/triggers/MultiTriggerContainer.cc

    r9667 r11054  
    5050        The creator.
    5151    */
    52     MultiTriggerContainer::MultiTriggerContainer(Context* context) : BaseObject(context), originator_(NULL), data_(NULL)
     52    MultiTriggerContainer::MultiTriggerContainer(Context* context) : BaseObject(context), originator_(nullptr), data_(nullptr)
    5353    {
    5454        RegisterObject(MultiTriggerContainer);
     
    7070
    7171        Pawn* pawn = orxonox_cast<Pawn*>(data);
    72         if(pawn != NULL)
     72        if(pawn != nullptr)
    7373        {
    7474            this->setForPlayer(true);
  • code/branches/cpp11_v3/src/modules/objects/triggers/Trigger.cc

    r10624 r11054  
    234234    {
    235235        // Iterate over all sub-triggers.
    236         for (std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
    237         {
    238             if (!(*it)->isActive())
     236        for (TriggerBase* child : this->children_)
     237        {
     238            if (!child->isActive())
    239239                return false;
    240240        }
     
    252252    {
    253253        // Iterate over all sub-triggers.
    254         for (std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
    255         {
    256             if ((*it)->isActive())
     254        for (TriggerBase* child : this->children_)
     255        {
     256            if (child->isActive())
    257257                return true;
    258258        }
     
    270270    {
    271271        bool test = false;
    272         for (std::set<TriggerBase*>::iterator it = this->children_.begin(); it != this->children_.end(); ++it)
    273         {
    274             if (test && (*it)->isActive())
     272        for (TriggerBase* child : this->children_)
     273        {
     274            if (test && child->isActive())
    275275                return false;
    276             if ((*it)->isActive())
     276            if (child->isActive())
    277277                test = true;
    278278        }
     
    346346    {
    347347        // Iterate over all Triggers.
    348         for (ObjectList<Trigger>::iterator it = ObjectList<Trigger>::begin(); it != ObjectList<Trigger>::end(); ++it)
    349             it->setVisible(bVisible);
     348        for (Trigger* trigger : ObjectList<Trigger>())
     349            trigger->setVisible(bVisible);
    350350    }
    351351
  • code/branches/cpp11_v3/src/modules/objects/triggers/Trigger.h

    r9667 r11054  
    127127            BillboardSet debugBillboard_; //!< A set of debug billboards to visualize the state of the trigger.
    128128
    129             std::queue<std::pair<float, char> > stateChanges_; //!< A queue of state changes (in the same format as latestState_) paired with the time they will take effect since the last state change took effect.
     129            std::queue<std::pair<float, char>> stateChanges_; //!< A queue of state changes (in the same format as latestState_) paired with the time they will take effect since the last state change took effect.
    130130    };
    131131
  • code/branches/cpp11_v3/src/modules/objects/triggers/TriggerBase.cc

    r9667 r11054  
    6767        this->mode_ = TriggerMode::EventTriggerAND;
    6868
    69         this->parent_ = NULL;
     69        this->parent_ = nullptr;
    7070
    7171        this->bMultiTrigger_ = false;
     
    170170        The index.
    171171    @return
    172         Returns a pointer ot the trigger. NULL if no such trigger exists.
     172        Returns a pointer ot the trigger. nullptr if no such trigger exists.
    173173    */
    174174    const TriggerBase* TriggerBase::getTrigger(unsigned int index) const
     
    176176        // If the index is greater than the number of children.
    177177        if (this->children_.size() <= index)
    178             return NULL;
     178            return nullptr;
    179179
    180180        std::set<TriggerBase*>::const_iterator it;
  • code/branches/cpp11_v3/src/modules/overlays/FadeoutText.h

    r9667 r11054  
    4444            virtual ~FadeoutText() {}
    4545
    46             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             virtual void tick(float dt);
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     47            virtual void tick(float dt) override;
    4848
    4949            inline void setDelay(float delay)
     
    5858
    5959        private:
    60             virtual void changedColour();
    61             virtual void changedCaption();
     60            virtual void changedColour() override;
     61            virtual void changedCaption() override;
    6262
    6363            void fadeout();
  • code/branches/cpp11_v3/src/modules/overlays/GUIOverlay.cc

    r9667 r11054  
    9292            ControllableEntity* entity = orxonox_cast<ControllableEntity*>(this->getOwner());
    9393            if (entity)
    94                 GUIManager::getInstance().setPlayer(name, entity->getPlayer()); //Set Player is going to be NULL, so it needs to be set in changedVisibility() as well.
     94                GUIManager::getInstance().setPlayer(name, entity->getPlayer()); //Set Player is going to be nullptr, so it needs to be set in changedVisibility() as well.
    9595        }
    9696    }
  • code/branches/cpp11_v3/src/modules/overlays/GUIOverlay.h

    r9667 r11054  
    4444            virtual ~GUIOverlay();
    4545
    46             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4747
    4848            void setGUIName(const std::string& name);
    4949            inline const std::string& getGUIName() const { return this->guiName_; }
    5050
    51             virtual void changedVisibility();
    52             virtual void changedOwner();
     51            virtual void changedVisibility() override;
     52            virtual void changedOwner() override;
    5353
    5454        private:
  • code/branches/cpp11_v3/src/modules/overlays/OverlayText.cc

    r9667 r11054  
    3232#include <OgrePanelOverlayElement.h>
    3333#include <OgreTextAreaOverlayElement.h>
    34 #include <boost/static_assert.hpp>
    3534
    3635#include "util/StringUtils.h"
     
    4342    RegisterClass(OverlayText);
    4443
    45     BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Left   == (int)OverlayText::Left);
    46     BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Center == (int)OverlayText::Center);
    47     BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Right  == (int)OverlayText::Right);
     44    static_assert((int)Ogre::TextAreaOverlayElement::Left   == (int)OverlayText::Left,   "check enum");
     45    static_assert((int)Ogre::TextAreaOverlayElement::Center == (int)OverlayText::Center, "check enum");
     46    static_assert((int)Ogre::TextAreaOverlayElement::Right  == (int)OverlayText::Right,  "check enum");
    4847
    4948    OverlayText::OverlayText(Context* context)
  • code/branches/cpp11_v3/src/modules/overlays/OverlayText.h

    r9667 r11054  
    5252        virtual ~OverlayText();
    5353
    54         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     54        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5555
    5656        void setCaption(const std::string& caption);
     
    7676
    7777    protected:
    78         virtual void sizeChanged();
     78        virtual void sizeChanged() override;
    7979        virtual void changedColour() {}
    8080        virtual void changedCaption() {}
  • code/branches/cpp11_v3/src/modules/overlays/debugging/DebugFPSText.h

    r9667 r11054  
    4343        virtual ~DebugFPSText();
    4444
    45         virtual void tick(float dt);
     45        virtual void tick(float dt) override;
    4646    };
    4747}
  • code/branches/cpp11_v3/src/modules/overlays/debugging/DebugPositionText.cc

    r9943 r11054  
    5252        SUPER(DebugPositionText, tick, dt);
    5353       
    54         ObjectList<NewHumanController>::iterator it = ObjectList<NewHumanController>::begin();
     54        ObjectList<NewHumanController>::iterator it = ObjectList<NewHumanController>().begin();
    5555        if (it && it->getControllableEntity() )
    5656        {
  • code/branches/cpp11_v3/src/modules/overlays/debugging/DebugPositionText.h

    r9943 r11054  
    4343        virtual ~DebugPositionText();
    4444
    45         virtual void tick(float dt);
     45        virtual void tick(float dt) override;
    4646    };
    4747}
  • code/branches/cpp11_v3/src/modules/overlays/debugging/DebugRTRText.h

    r9667 r11054  
    4343        virtual ~DebugRTRText();
    4444
    45         virtual void tick(float dt);
     45        virtual void tick(float dt) override;
    4646    };
    4747}
  • code/branches/cpp11_v3/src/modules/overlays/hud/AnnounceMessage.cc

    r9667 r11054  
    4040        RegisterObject(AnnounceMessage);
    4141
    42         this->owner_ = 0;
     42        this->owner_ = nullptr;
    4343
    4444        this->setDelay(3.0f);
  • code/branches/cpp11_v3/src/modules/overlays/hud/AnnounceMessage.h

    r9667 r11054  
    4343            virtual ~AnnounceMessage() {}
    4444
    45             virtual void changedOwner();
     45            virtual void changedOwner() override;
    4646
    47             void announcemessage(const GametypeInfo* gtinfo, const std::string& message);
     47            virtual void announcemessage(const GametypeInfo* gtinfo, const std::string& message) override;
    4848
    4949        private:
  • code/branches/cpp11_v3/src/modules/overlays/hud/ChatOverlay.cc

    r9667 r11054  
    5858    ChatOverlay::~ChatOverlay()
    5959    {
    60         for (std::set<Timer*>::iterator it = this->timers_.begin(); it != this->timers_.end(); ++it)
    61             delete (*it);
     60        for (Timer* timer : this->timers_)
     61            delete timer;
    6262    }
    6363
     
    9292        this->text_->setCaption("");
    9393
    94         for (std::list<Ogre::DisplayString>::iterator it = this->messages_.begin(); it != this->messages_.end(); ++it)
     94        for (const Ogre::DisplayString& message : this->messages_)
    9595        {
    96             this->text_->setCaption(this->text_->getCaption() + "\n" + (*it));
     96            this->text_->setCaption(this->text_->getCaption() + "\n" + message);
    9797        }
    9898    }
  • code/branches/cpp11_v3/src/modules/overlays/hud/ChatOverlay.h

    r9667 r11054  
    4949
    5050        protected:
    51             virtual void incomingChat(const std::string& message, const std::string& name);
     51            virtual void incomingChat(const std::string& message, const std::string& name) override;
    5252
    5353            std::list<Ogre::DisplayString> messages_;
  • code/branches/cpp11_v3/src/modules/overlays/hud/CountDown.cc

    r9943 r11054  
    7171        RegisterObject(CountDown);
    7272
    73         this->owner_ = 0;
     73        this->owner_ = nullptr;
    7474        this->hasStopped_ = false;
    7575    }
  • code/branches/cpp11_v3/src/modules/overlays/hud/CountDown.h

    r9943 r11054  
    4444            virtual ~CountDown();
    4545
    46             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             virtual void changedOwner();
    48             virtual void tick(float dt);
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     47            virtual void changedOwner() override;
     48            virtual void tick(float dt) override;
    4949
    5050            inline void setCounter(float value)
  • code/branches/cpp11_v3/src/modules/overlays/hud/DeathMessage.cc

    r9667 r11054  
    4040        RegisterObject(DeathMessage);
    4141
    42         this->owner_ = 0;
     42        this->owner_ = nullptr;
    4343
    4444        this->setDelay(2.0f);
  • code/branches/cpp11_v3/src/modules/overlays/hud/DeathMessage.h

    r9667 r11054  
    4343            virtual ~DeathMessage() {}
    4444
    45             virtual void changedOwner();
     45            virtual void changedOwner() override;
    4646
    47             void deathmessage(const GametypeInfo* gtinfo, const std::string& message);
     47            virtual void deathmessage(const GametypeInfo* gtinfo, const std::string& message) override;
    4848
    4949        private:
  • code/branches/cpp11_v3/src/modules/overlays/hud/GametypeFadingMessage.cc

    r9667 r11054  
    4040        RegisterObject(GametypeFadingMessage);
    4141
    42         this->owner_ = 0;
     42        this->owner_ = nullptr;
    4343        this->setDelay(2.0f);
    4444        this->setFadeouttime(0.5f);
  • code/branches/cpp11_v3/src/modules/overlays/hud/GametypeFadingMessage.h

    r9667 r11054  
    4343            virtual ~GametypeFadingMessage();
    4444
    45             virtual void changedOwner();
     45            virtual void changedOwner() override;
    4646
    47             void fadingmessage(const GametypeInfo* gtinfo, const std::string& message);
     47            virtual void fadingmessage(const GametypeInfo* gtinfo, const std::string& message) override;
    4848
    4949        private:
  • code/branches/cpp11_v3/src/modules/overlays/hud/GametypeStaticMessage.cc

    r9667 r11054  
    4242    {
    4343        RegisterObject(GametypeStaticMessage);
    44         this->owner_ = 0;
     44        this->owner_ = nullptr;
    4545    }
    4646
  • code/branches/cpp11_v3/src/modules/overlays/hud/GametypeStaticMessage.h

    r9667 r11054  
    4646            virtual ~GametypeStaticMessage();
    4747
    48             virtual void changedOwner();
     48            virtual void changedOwner() override;
    4949
    50             void staticmessage(const GametypeInfo* gtinfo, const std::string& message, const ColourValue& colour);
     50            virtual void staticmessage(const GametypeInfo* gtinfo, const std::string& message, const ColourValue& colour) override;
    5151
    5252        private:
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDBar.cc

    r11052 r11054  
    219219            return barColours_[index];
    220220        else
    221             return 0;
     221            return nullptr;
    222222    }
    223223
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDBar.h

    r11052 r11054  
    5252        virtual ~BarColour() { }
    5353
    54         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);     
     54        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5555
    5656        void setColour(const ColourValue& colour) { this->colour_ = colour; }
     
    7272        virtual ~HUDBar();
    7373
    74         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     74        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    7575
    7676        void clearColours();
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDBoostBar.cc

    r11052 r11054  
    4242        RegisterObject(HUDBoostBar);
    4343
    44         this->owner_ = 0;
     44        this->owner_ = nullptr;
    4545        this->flashInterval_ = 0.25f;
    4646        this->flashDt_ = 0.0f;
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDBoostBar.h

    r9667 r11054  
    4343        virtual ~HUDBoostBar();
    4444
    45         virtual void tick(float dt);
    46         virtual void changedOwner();
     45        virtual void tick(float dt) override;
     46        virtual void changedOwner() override;
    4747
    4848    private:
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDEnemyHealthBar.cc

    r9667 r11054  
    3030
    3131#include "core/config/ConfigValueIncludes.h"
     32#include "core/CoreIncludes.h"
    3233#include "worldentities/pawns/Pawn.h"
    3334
     
    4142
    4243        this->setConfigValues();
    43         this->owner_ = 0;
     44        this->owner_ = nullptr;
    4445    }
    4546
     
    6263    void HUDEnemyHealthBar::updateTarget()
    6364    {
    64         Pawn* pawn = NULL;
     65        Pawn* pawn = nullptr;
    6566        if (this->owner_ && this->useEnemyBar_)
    6667        {
     
    7374            // Don't show the HealthBar if the pawn is invisible
    7475            if (pawn && !pawn->isVisible())
    75                 pawn = NULL;
     76                pawn = nullptr;
    7677        }
    7778        // Set the pawn as owner of the HealthBar
    7879        this->setHealthBarOwner(pawn);
    79         this->setVisible(pawn != NULL);
     80        this->setVisible(pawn != nullptr);
    8081    }
    8182
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDEnemyHealthBar.h

    r9667 r11054  
    4141
    4242            void setConfigValues();
    43             virtual void tick(float dt);
     43            virtual void tick(float dt) override;
    4444
    45             void changedOwner();
     45            virtual void changedOwner() override;
    4646
    4747        private:
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDHealthBar.cc

    r11052 r11054  
    4343        RegisterObject(HUDHealthBar);
    4444
    45         this->owner_ = 0;
     45        this->owner_ = nullptr;
    4646        this->bUseBarColour_ = false;
    4747        this->textOffset_ = Vector2(0.0f, 0.0f);
     
    6666        {
    6767            this->textoverlay_->destroy();
    68             this->textoverlay_ = NULL;
     68            this->textoverlay_ = nullptr;
    6969        }
    7070    }
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDHealthBar.h

    r11052 r11054  
    4545            virtual ~HUDHealthBar();
    4646
    47             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    48             virtual void tick(float dt);
    49             virtual void changedOwner();
    50             virtual void changedOverlayGroup();
    51             virtual void changedVisibility();
    52             virtual void changedName();
     47            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     48            virtual void tick(float dt) override;
     49            virtual void changedOwner() override;
     50            virtual void changedOverlayGroup() override;
     51            virtual void changedVisibility() override;
     52            virtual void changedName() override;
    5353
    5454            inline void setTextFont(const std::string& font)
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDNavigation.cc

    r11023 r11054  
    5353#include "core/config/ConfigValueIncludes.h"
    5454#include "tools/TextureGenerator.h"
    55 // #include <boost/bind/bind_template.hpp>
    5655
    5756
     
    6968    RegisterClass ( HUDNavigation );
    7069
    71     HUDNavigation* HUDNavigation::localHUD_s = 0;
     70    HUDNavigation* HUDNavigation::localHUD_s = nullptr;
    7271
    7372    HUDNavigation::HUDNavigation(Context* context) :
     
    132131        }
    133132        this->fontName_ = font;
    134         for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
    135         {
    136             if (it->second.text_ != NULL)
    137                 it->second.text_->setFontName(this->fontName_);
     133        for (const auto& mapEntry : this->activeObjectList_)
     134        {
     135            if (mapEntry.second.text_ != nullptr)
     136                mapEntry.second.text_->setFontName(this->fontName_);
    138137        }
    139138    }
     
    152151        }
    153152        this->textSize_ = size;
    154         for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it!=this->activeObjectList_.end(); ++it)
    155         {
    156             if (it->second.text_)
    157                 it->second.text_->setCharHeight(size);
     153        for (const auto& mapEntry : this->activeObjectList_)
     154        {
     155            if (mapEntry.second.text_)
     156                mapEntry.second.text_->setCharHeight(size);
    158157        }
    159158    }
     
    183182
    184183        Camera* cam = CameraManager::getInstance().getActiveCamera();
    185         if (cam == NULL)
     184        if (cam == nullptr)
    186185        return;
    187186        const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
    188187
    189         for (std::list<std::pair<RadarViewable*, unsigned int> >::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt)
    190         listIt->second = (int)((listIt->first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f);
     188        for (std::pair<RadarViewable*, unsigned int>& pair : this->sortedObjectList_)
     189        pair.second = (int)((pair.first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f);
    191190
    192191        this->sortedObjectList_.sort(compareDistance);
     
    209208        bool nextHasToBeSelected = false;
    210209
    211         for (std::list<std::pair<RadarViewable*, unsigned int> >::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++markerCount, ++listIt)
     210        for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++markerCount, ++listIt)
    212211        {
    213212
     
    469468                    if(!it->second.selected_
    470469                            || it->first->getRVVelocity().squaredLength() == 0
    471                             || pawn == NULL
     470                            || pawn == nullptr
    472471                            /* TODO : improve getTeam in such a way that it works
    473                              * || humanPawn == NULL
     472                             * || humanPawn == nullptr
    474473                             * || pawn->getTeam() == humanPawn->getTeam()*/)
    475474                    {
     
    525524        float yScale = this->getActualSize().y;
    526525
    527         for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
    528         {
    529             if (it->second.health_ != NULL)
    530                 it->second.health_->setDimensions(this->healthMarkerSize_ * xScale, this->healthMarkerSize_ * yScale);
    531             if (it->second.healthLevel_ != NULL)
    532                 it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * xScale, this->healthLevelMarkerSize_ * yScale);
    533             if (it->second.panel_ != NULL)
    534                 it->second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
    535             if (it->second.text_ != NULL)
    536                 it->second.text_->setCharHeight(this->textSize_ * yScale);
    537             if (it->second.target_ != NULL)
    538                 it->second.target_->setDimensions(this->aimMarkerSize_ * xScale, this->aimMarkerSize_ * yScale);
     526        for (const auto& mapEntry : this->activeObjectList_)
     527        {
     528            if (mapEntry.second.health_ != nullptr)
     529                mapEntry.second.health_->setDimensions(this->healthMarkerSize_ * xScale, this->healthMarkerSize_ * yScale);
     530            if (mapEntry.second.healthLevel_ != nullptr)
     531                mapEntry.second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * xScale, this->healthLevelMarkerSize_ * yScale);
     532            if (mapEntry.second.panel_ != nullptr)
     533                mapEntry.second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
     534            if (mapEntry.second.text_ != nullptr)
     535                mapEntry.second.text_->setCharHeight(this->textSize_ * yScale);
     536            if (mapEntry.second.target_ != nullptr)
     537                mapEntry.second.target_->setDimensions(this->aimMarkerSize_ * xScale, this->aimMarkerSize_ * yScale);
    539538        }
    540539    }
     
    546545
    547546        if (this->activeObjectList_.size() >= this->markerLimit_)
    548         if (object == NULL)
     547        if (object == nullptr)
    549548        return;
    550549
     
    634633        }
    635634
    636         for (std::list<std::pair<RadarViewable*, unsigned int> >::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt)
     635        for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt)
    637636        {
    638637            if ((listIt->first) == viewable)
     
    664663    {
    665664        const std::set<RadarViewable*>& respawnObjects = this->getOwner()->getScene()->getRadar()->getRadarObjects();
    666         for (std::set<RadarViewable*>::const_iterator it = respawnObjects.begin(); it != respawnObjects.end(); ++it)
    667         {
    668             if (!(*it)->isHumanShip_)
    669             this->addObject(*it);
     665        for (RadarViewable* respawnObject : respawnObjects)
     666        {
     667            if (!respawnObject->isHumanShip_)
     668            this->addObject(respawnObject);
    670669        }
    671670    }
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDNavigation.h

    r10291 r11054  
    5151            void setConfigValues();
    5252
    53             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    54             virtual void tick(float dt);
     53            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     54            virtual void tick(float dt) override;
    5555
    5656            // RadarListener interface
    57             virtual void addObject(RadarViewable* object);
    58             virtual void removeObject(RadarViewable* viewable);
    59             virtual void objectChanged(RadarViewable* viewable);
     57            virtual void addObject(RadarViewable* object) override;
     58            virtual void removeObject(RadarViewable* viewable) override;
     59            virtual void objectChanged(RadarViewable* viewable) override;
    6060
    61             virtual void changedOwner();
    62             virtual void sizeChanged();
    63             virtual void angleChanged() { }
    64             virtual void positionChanged() { }
    65             virtual void radarTick(float dt) {}
     61            virtual void changedOwner() override;
     62            virtual void sizeChanged() override;
     63            virtual void angleChanged() override { }
     64            virtual void positionChanged() override { }
     65            virtual void radarTick(float dt) override {}
    6666
    67             inline float getRadarSensitivity() const
     67            virtual inline float getRadarSensitivity() const override
    6868                { return 1.0f; }
    6969
     
    141141
    142142            std::map<RadarViewable*, ObjectInfo> activeObjectList_;
    143             std::list<std::pair<RadarViewable*, unsigned int> > sortedObjectList_;
     143            std::list<std::pair<RadarViewable*, unsigned int>> sortedObjectList_;
    144144
    145145            float healthMarkerSize_;
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDRadar.cc

    r11052 r11054  
    6868        this->shapeMaterials_[RadarViewable::Triangle] = "RadarTriangle.png";
    6969        this->shapeMaterials_[RadarViewable::Square]   = "RadarSquare.png";
    70         this->owner_ = 0;
     70        this->owner_ = nullptr;
    7171
    7272        this->map3DFront_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
     
    9292            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->map3DBack_);
    9393
    94             for (std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it = this->radarObjects_.begin();
    95                 it != this->radarObjects_.end(); ++it)
    96             {
    97                 Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second);
     94            for (const auto& mapEntry : this->radarObjects_)
     95            {
     96                Ogre::OverlayManager::getSingleton().destroyOverlayElement(mapEntry.second);
    9897            }
    9998        }
     
    166165    {
    167166        const std::set<RadarViewable*>& objectSet = this->getCreator()->getScene()->getRadar()->getRadarObjects();
    168         std::set<RadarViewable*>::const_iterator it;
    169         for( it=objectSet.begin(); it!=objectSet.end(); ++it )
    170             this->addObject(*it);
     167        for( RadarViewable* viewable : objectSet )
     168            this->addObject(viewable);
    171169        this->radarTick(0);
    172170    }
     
    184182
    185183        // update the distances for all objects
    186         std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it;
    187 
    188184
    189185        if(RadarMode_)
     
    202198        }
    203199
    204         for( it = this->radarObjects_.begin(); it != this->radarObjects_.end(); ++it )
     200        for( const auto& mapEntry : this->radarObjects_ )
    205201        {
    206202            // Make sure the object really is a WorldEntity
    207             const WorldEntity* wePointer = it->first->getWorldEntity();
     203            const WorldEntity* wePointer = mapEntry.first->getWorldEntity();
    208204            if( !wePointer )
    209205            {
     
    211207                assert(0);
    212208            }
    213             bool isFocus = (it->first == focusObject);
     209            bool isFocus = (mapEntry.first == focusObject);
    214210            // set size to fit distance...
    215211            float distance = (wePointer->getWorldPosition() - this->owner_->getPosition()).length();
     
    218214            float size;
    219215            if(RadarMode_)
    220                 size = maximumDotSize3D_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();
     216                size = maximumDotSize3D_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * mapEntry.first->getRadarObjectScale();
    221217            else
    222                 size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();
    223             it->second->setDimensions(size, size);
     218                size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * mapEntry.first->getRadarObjectScale();
     219            mapEntry.second->setDimensions(size, size);
    224220
    225221            // calc position on radar...
     
    235231                int zOrder = determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_);
    236232                if(overXZPlain == false /*&& (it->second->getZOrder() >  100 * this->overlay_->getZOrder())*/) // it appears that zOrder of attached Overlayelements is 100 times the zOrder of the Overlay
    237                     it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + zOrder);
     233                    mapEntry.second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + zOrder);
    238234                if(overXZPlain == true /*&& (it->second->getZOrder() <= 100 * this->overlay_->getZOrder())*/)
    239                     it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + zOrder);
     235                    mapEntry.second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + zOrder);
    240236            }
    241237            else
     
    243239
    244240            coord *= math::pi / 3.5f; // small adjustment to make it fit the texture
    245             it->second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);
     241            mapEntry.second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);
    246242
    247243            if( distance < detectionLimit_ || detectionLimit_ < 0 )
    248                 it->second->show();
     244                mapEntry.second->show();
    249245            else
    250                 it->second->hide();
     246                mapEntry.second->hide();
    251247
    252248            // if this object is in focus, then set the focus marker
     
    256252                this->marker_->setPosition((1.0f + coord.x - size * 1.5f) * 0.5f, (1.0f - coord.y - size * 1.5f) * 0.5f);
    257253                if(RadarMode_)
    258                     this->marker_->_notifyZOrder(it->second->getZOrder() -1);
     254                    this->marker_->_notifyZOrder(mapEntry.second->getZOrder() -1);
    259255                this->marker_->show();
    260256            }
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDRadar.h

    r9945 r11054  
    5050        virtual ~HUDRadar();
    5151
    52         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    53         virtual void changedOwner();
     52        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     53        virtual void changedOwner() override;
    5454        void setConfigValues();
    5555
     
    8080        void set3DMaterialBack(std::string material3DBack) { this->material3DBack_ = material3DBack; }
    8181
    82         float getRadarSensitivity() const { return this->sensitivity_; }
     82        virtual float getRadarSensitivity() const override { return this->sensitivity_; }
    8383        // used also by RadarListener interface!
    8484        void setRadarSensitivity(float sensitivity) { this->sensitivity_ = sensitivity; }
     
    8989
    9090        // RadarListener interface
    91         virtual void addObject(RadarViewable* viewable);
    92         virtual void removeObject(RadarViewable* viewable);
    93         virtual void objectChanged( RadarViewable* rv );
    94         void radarTick(float dt);
     91        virtual void addObject(RadarViewable* viewable) override;
     92        virtual void removeObject(RadarViewable* viewable) override;
     93        virtual void objectChanged( RadarViewable* rv ) override;
     94        virtual void radarTick(float dt) override;
    9595        bool showObject( RadarViewable* rv ); //!< Do not display an object on radar, if showObject(.) is false.
    9696
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDSpeedBar.cc

    r9667 r11054  
    4343        RegisterObject(HUDSpeedBar);
    4444
    45         this->owner_ = 0;
     45        this->owner_ = nullptr;
    4646    }
    4747
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDSpeedBar.h

    r9667 r11054  
    4444        virtual ~HUDSpeedBar();
    4545
    46         virtual void tick(float dt);
    47         virtual void changedOwner();
     46        virtual void tick(float dt) override;
     47        virtual void changedOwner() override;
    4848
    4949    private:
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDTimer.cc

    r9667 r11054  
    4242        RegisterObject(HUDTimer);
    4343
    44         this->owner_ = 0;
     44        this->owner_ = nullptr;
    4545    }
    4646
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDTimer.h

    r9667 r11054  
    4343        virtual ~HUDTimer();
    4444
    45         virtual void tick(float dt);
     45        virtual void tick(float dt) override;
    4646
    47         virtual void changedOwner();
     47        virtual void changedOwner() override;
    4848
    4949    private:
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDWeapon.cc

    r11052 r11054  
    141141    void HUDWeapon::updateWeaponModeList()
    142142    {
    143         if (owner_ == NULL || weapon_ == NULL)
     143        if (owner_ == nullptr || weapon_ == nullptr)
    144144        {
    145145            return;
  • code/branches/cpp11_v3/src/modules/overlays/hud/HUDWeaponSystem.cc

    r11052 r11054  
    117117    void HUDWeaponSystem::updateWeaponList()
    118118    {
    119         if (owner_ == NULL)
     119        if (owner_ == nullptr)
    120120        {
    121121            return;
  • code/branches/cpp11_v3/src/modules/overlays/hud/KillMessage.cc

    r9667 r11054  
    4040        RegisterObject(KillMessage);
    4141
    42         this->owner_ = 0;
     42        this->owner_ = nullptr;
    4343
    4444        this->setDelay(2.0f);
  • code/branches/cpp11_v3/src/modules/overlays/hud/KillMessage.h

    r9667 r11054  
    4343            virtual ~KillMessage() {}
    4444
    45             virtual void changedOwner();
     45            virtual void changedOwner() override;
    4646
    47             void killmessage(const GametypeInfo* gtinfo, const std::string& message);
     47            virtual void killmessage(const GametypeInfo* gtinfo, const std::string& message) override;
    4848
    4949        private:
  • code/branches/cpp11_v3/src/modules/overlays/hud/LastManStandingInfos.cc

    r10624 r11054  
    4343        RegisterObject(LastManStandingInfos);
    4444
    45         this->lms_ = 0;
    46         this->player_ = 0;
     45        this->lms_ = nullptr;
     46        this->player_ = nullptr;
    4747        this->bShowLives_ = false;
    4848        this->bShowPlayers_ = false;
     
    9191        else
    9292        {
    93             this->player_ = 0;
    94             this->lms_ = 0;
     93            this->player_ = nullptr;
     94            this->lms_ = nullptr;
    9595        }
    9696    }
  • code/branches/cpp11_v3/src/modules/overlays/hud/LastManStandingInfos.h

    r9667 r11054  
    4343            virtual ~LastManStandingInfos();
    4444
    45             virtual void tick(float dt);
    46             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             virtual void changedOwner();
     45            virtual void tick(float dt) override;
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     47            virtual void changedOwner() override;
    4848
    4949            inline void setShowLives(bool value)
  • code/branches/cpp11_v3/src/modules/overlays/hud/LastTeamStandingInfos.cc

    r10624 r11054  
    4343        RegisterObject(LastTeamStandingInfos);
    4444
    45         this->lts_ = 0;
    46         this->player_ = 0;
     45        this->lts_ = nullptr;
     46        this->player_ = nullptr;
    4747        this->bShowLives_ = false;
    4848        this->bShowTeams_ = false;
     
    9191        else
    9292        {
    93             this->player_ = 0;
    94             this->lts_ = 0;
     93            this->player_ = nullptr;
     94            this->lts_ = nullptr;
    9595        }
    9696    }
  • code/branches/cpp11_v3/src/modules/overlays/hud/LastTeamStandingInfos.h

    r9667 r11054  
    4343            virtual ~LastTeamStandingInfos();
    4444
    45             virtual void tick(float dt);
    46             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             virtual void changedOwner();
     45            virtual void tick(float dt) override;
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     47            virtual void changedOwner() override;
    4848
    4949            inline void setShowLives(bool value)
  • code/branches/cpp11_v3/src/modules/overlays/hud/PauseNotice.cc

    r9667 r11054  
    4040        RegisterObject(PauseNotice);
    4141
    42         this->owner_ = 0;
     42        this->owner_ = nullptr;
    4343    }
    4444
  • code/branches/cpp11_v3/src/modules/overlays/hud/PauseNotice.h

    r9667 r11054  
    4242            PauseNotice(Context* context);
    4343
    44             virtual void changedOwner();
     44            virtual void changedOwner() override;
    4545
    4646        protected:
    47             virtual void changedTimeFactor(float factor_new, float factor_old);
     47            virtual void changedTimeFactor(float factor_new, float factor_old) override;
    4848
    4949        private:
  • code/branches/cpp11_v3/src/modules/overlays/hud/TeamBaseMatchScore.cc

    r10624 r11054  
    4343        RegisterObject(TeamBaseMatchScore);
    4444
    45         this->owner_ = 0;
     45        this->owner_ = nullptr;
    4646
    4747        this->bShowBases_ = false;
     
    120120            this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype());
    121121        else
    122             this->owner_ = 0;
     122            this->owner_ = nullptr;
    123123    }
    124124}
  • code/branches/cpp11_v3/src/modules/overlays/hud/TeamBaseMatchScore.h

    r9667 r11054  
    4343            virtual ~TeamBaseMatchScore();
    4444
    45             virtual void tick(float dt);
    46             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             virtual void changedOwner();
     45            virtual void tick(float dt) override;
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     47            virtual void changedOwner() override;
    4848
    4949            inline void setShowBases(bool value)
  • code/branches/cpp11_v3/src/modules/overlays/stats/CreateLines.cc

    r6502 r11054  
    3737    CreateLines::CreateLines(float leftOffset, float topOffset, float width, float height)
    3838    {
    39         playerNameText_ = new OverlayText(0);
     39        playerNameText_ = new OverlayText(nullptr);
    4040        playerNameText_->setTextSize(0.04f);
    4141        playerNameText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f));
    4242        playerNameText_->setPosition(Vector2(0.1f, topOffset + 0.01f));
    4343
    44         scoreText_ = new OverlayText(0);
     44        scoreText_ = new OverlayText(nullptr);
    4545        scoreText_->setTextSize(0.04f);
    4646        scoreText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f));
    4747        scoreText_->setPosition(Vector2(0.6f, topOffset + 0.01f));
    4848
    49         deathsText_ = new OverlayText(0);
     49        deathsText_ = new OverlayText(nullptr);
    5050        deathsText_->setTextSize(0.04f);
    5151        deathsText_->setColour(ColourValue(0, 0.75f, 0.2f, 1.0f));
    5252        deathsText_->setPosition(Vector2(0.8f, topOffset + 0.01f));
    5353
    54         background_ = new Stats(0);
     54        background_ = new Stats(nullptr);
    5555        background_->setPosition(Vector2(leftOffset, topOffset));
    5656        background_->setSize(Vector2(width, height));
  • code/branches/cpp11_v3/src/modules/overlays/stats/Scoreboard.cc

    r9667 r11054  
    6060        SUPER(Scoreboard, changedVisibility);
    6161
    62         for (unsigned int i = 0; i < this->lines_.size(); ++i)
    63             this->lines_[i]->changedVisibility();
     62        for (CreateLines* line : this->lines_)
     63            line->changedVisibility();
    6464    }
    6565
     
    9494
    9595        unsigned int index = 0;
    96         for (std::map<PlayerInfo*, Player>::const_iterator it = playerList.begin(); it != playerList.end(); ++it)
     96        for (const auto& mapEntry : playerList)
    9797        {
    98             this->lines_[index]->setPlayerName(multi_cast<std::string>(it->first->getName()));
    99             this->lines_[index]->setScore(multi_cast<std::string>(it->second.frags_));
    100             this->lines_[index]->setDeaths(multi_cast<std::string>(it->second.killed_));
     98            this->lines_[index]->setPlayerName(multi_cast<std::string>(mapEntry.first->getName()));
     99            this->lines_[index]->setScore(multi_cast<std::string>(mapEntry.second.frags_));
     100            this->lines_[index]->setDeaths(multi_cast<std::string>(mapEntry.second.killed_));
    101101            index++;
    102102        }
  • code/branches/cpp11_v3/src/modules/overlays/stats/Scoreboard.h

    r9667 r11054  
    4444        virtual ~Scoreboard();
    4545
    46         virtual void tick(float dt);
     46        virtual void tick(float dt) override;
    4747
    4848        inline void setCreateLines(CreateLines* cl)
     
    5151            { return this->createlines_; }
    5252
    53         virtual void changedVisibility();
     53        virtual void changedVisibility() override;
    5454
    5555    private: // functions
  • code/branches/cpp11_v3/src/modules/overlays/stats/Stats.cc

    r9667 r11054  
    4646    Stats::Stats(Context* context)
    4747        : OrxonoxOverlay(context)
    48         , statsOverlayNoise_(0)
    49         , statsOverlayBorder_(0)
     48        , statsOverlayNoise_(nullptr)
     49        , statsOverlayBorder_(nullptr)
    5050    {
    5151        RegisterObject(Stats);
  • code/branches/cpp11_v3/src/modules/overlays/stats/Stats.h

    r9667 r11054  
    4646        void setConfigValues();
    4747
    48         virtual void tick(float dt);
     48        virtual void tick(float dt) override;
    4949
    5050    private: // variables
  • code/branches/cpp11_v3/src/modules/pickup/CollectiblePickup.cc

    r10624 r11054  
    4747        Registers the object and initializes variables.
    4848    */
    49     CollectiblePickup::CollectiblePickup() : collection_(NULL)
     49    CollectiblePickup::CollectiblePickup() : collection_(nullptr)
    5050    {
    5151        RegisterObject(CollectiblePickup);
     
    103103    void CollectiblePickup::wasRemovedFromCollection(void)
    104104    {
    105         this->collection_ = NULL;
     105        this->collection_ = nullptr;
    106106    }
    107107}
  • code/branches/cpp11_v3/src/modules/pickup/CollectiblePickup.h

    r9348 r11054  
    6161            virtual ~CollectiblePickup(); //! Destructor.
    6262
    63             virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    64             virtual void changedPickedUp(void); //!< Is called when the pickup has transited from picked up to dropped or the other way around.
     63            virtual void changedUsed(void) override; //!< Is called when the pickup has transited from used to unused or the other way around.
     64            virtual void changedPickedUp(void) override; //!< Is called when the pickup has transited from picked up to dropped or the other way around.
    6565
    6666            /**
     
    6969            */
    7070            bool isInCollection(void) const
    71                 { return this->collection_ != NULL; }
     71                { return this->collection_ != nullptr; }
    7272
    7373        private:
  • code/branches/cpp11_v3/src/modules/pickup/Pickup.h

    r9667 r11054  
    103103            virtual ~Pickup(); //!< Destructor.
    104104
    105             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     105            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    106106
    107             virtual const std::string& getRepresentationName() const
     107            virtual const std::string& getRepresentationName() const override
    108108                { return this->representationName_; }
    109109
     
    149149                { return this->getDurationType() == pickupDurationType::continuous; }
    150150
    151             virtual void changedPickedUp(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
     151            virtual void changedPickedUp(void) override; //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
    152152
    153153        protected:
    154             virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
     154            virtual bool createSpawner(void) override; //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    155155
    156156            /**
  • code/branches/cpp11_v3/src/modules/pickup/PickupCollection.cc

    r9667 r11054  
    6868    {
    6969        // Destroy all Pickupables constructing this PickupCollection.
    70         for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
    71         {
    72             (*it)->wasRemovedFromCollection();
    73             (*it)->destroy();
     70        for(CollectiblePickup* pickup : this->pickups_)
     71        {
     72            pickup->wasRemovedFromCollection();
     73            pickup->destroy();
    7474        }
    7575        this->pickups_.clear();
     
    9999        this->processingUsed_ = true;
    100100        // Change used for all Pickupables this PickupCollection consists of.
    101         for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
    102             (*it)->setUsed(this->isUsed());
     101        for(CollectiblePickup* pickup : this->pickups_)
     102            pickup->setUsed(this->isUsed());
    103103
    104104        this->processingUsed_ = false;
     
    119119        size_t numPickupsEnabled = 0;
    120120        size_t numPickupsInUse = 0;
    121         for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
    122         {
    123             if ((*it)->isEnabled())
     121        for(CollectiblePickup* pickup : this->pickups_)
     122        {
     123            if (pickup->isEnabled())
    124124                ++numPickupsEnabled;
    125             if ((*it)->isUsed())
     125            if (pickup->isUsed())
    126126                ++numPickupsInUse;
    127127        }
     
    146146
    147147        // Change the PickupCarrier for all Pickupables this PickupCollection consists of.
    148         for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
    149         {
    150             if(this->getCarrier() == NULL)
    151                 (*it)->setCarrier(NULL);
     148        for(CollectiblePickup* pickup : this->pickups_)
     149        {
     150            if(this->getCarrier() == nullptr)
     151                pickup->setCarrier(nullptr);
    152152            else
    153                 (*it)->setCarrier(this->getCarrier()->getTarget(*it));
     153                pickup->setCarrier(this->getCarrier()->getTarget(pickup));
    154154        }
    155155    }
     
    186186        // If at least all the enabled pickups of this PickupCollection are no longer picked up.
    187187        bool isOnePickupEnabledAndPickedUp = false;
    188         for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
    189         {
    190             if ((*it)->isEnabled() && (*it)->isPickedUp())
     188        for(CollectiblePickup* pickup : this->pickups_)
     189        {
     190            if (pickup->isEnabled() && pickup->isPickedUp())
    191191            {
    192192                isOnePickupEnabledAndPickedUp = true;
     
    208208    bool PickupCollection::isTarget(const PickupCarrier* carrier) const
    209209    {
    210         for(std::list<CollectiblePickup*>::const_iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
    211         {
    212             if(!carrier->isTarget(*it))
     210        for(CollectiblePickup* pickup : this->pickups_)
     211        {
     212            if(!carrier->isTarget(pickup))
    213213                return false;
    214214        }
     
    227227    bool PickupCollection::addPickupable(CollectiblePickup* pickup)
    228228    {
    229         if(pickup == NULL)
     229        if(pickup == nullptr)
    230230            return false;
    231231
     
    247247    {
    248248        if(this->pickups_.size() >= index)
    249             return NULL;
     249            return nullptr;
    250250
    251251        std::list<CollectiblePickup*>::const_iterator it = this->pickups_.begin();
  • code/branches/cpp11_v3/src/modules/pickup/PickupCollection.h

    r9667 r11054  
    7373            virtual ~PickupCollection(); //!< Destructor.
    7474
    75             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates an instance of this Class through XML.
     75            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Creates an instance of this Class through XML.
    7676
    77             virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    78             virtual void changedCarrier(void); //!< Is called when the pickup has changed its PickupCarrier.
    79             virtual void changedPickedUp(void); //!< Is called when the pickup has transited from picked up to dropped or the other way around.
     77            virtual void changedUsed(void) override; //!< Is called when the pickup has transited from used to unused or the other way around.
     78            virtual void changedCarrier(void) override; //!< Is called when the pickup has changed its PickupCarrier.
     79            virtual void changedPickedUp(void) override; //!< Is called when the pickup has transited from picked up to dropped or the other way around.
    8080
    81             virtual bool isTarget(const PickupCarrier* carrier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
     81            virtual bool isTarget(const PickupCarrier* carrier) const override; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
    8282
    8383            inline void setRepresentationName(const std::string& name)
    8484                { this->representationName_ = name; }
    85             virtual const std::string& getRepresentationName() const
     85            virtual const std::string& getRepresentationName() const override
    8686                { return this->representationName_; }
    8787
     
    9898
    9999        protected:
    100             virtual bool createSpawner(void); //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
     100            virtual bool createSpawner(void) override; //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    101101
    102102        private:
  • code/branches/cpp11_v3/src/modules/pickup/PickupManager.cc

    r10624 r11054  
    6868        Constructor. Registers the PickupManager and creates the default PickupRepresentation.
    6969    */
    70     PickupManager::PickupManager() : guiLoaded_(false), pickupHighestIndex_(0), defaultRepresentation_(NULL)
     70    PickupManager::PickupManager() : guiLoaded_(false), pickupHighestIndex_(0), defaultRepresentation_(nullptr)
    7171    {
    7272        RegisterObject(PickupManager);
     
    8585    {
    8686        // Destroying the default representation.
    87         if(this->defaultRepresentation_ != NULL)
     87        if(this->defaultRepresentation_ != nullptr)
    8888            this->defaultRepresentation_->destroy();
    8989
     
    9191
    9292        // Destroying all the PickupInventoryContainers that are still there.
    93         for(std::map<uint32_t, PickupInventoryContainer*>::iterator it = this->pickupInventoryContainers_.begin(); it != this->pickupInventoryContainers_.end(); it++)
    94             delete it->second;
     93        for(const auto& mapEntry : this->pickupInventoryContainers_)
     94            delete mapEntry.second;
    9595        this->pickupInventoryContainers_.clear();
    9696
     
    184184        CollectiblePickup* collectible = orxonox_cast<CollectiblePickup*>(pickup);
    185185        // If the Pickupable is part of a PickupCollection it isn't displayed in the PickupInventory, just the PickupCollection is.
    186         if(collectible != NULL && collectible->isInCollection())
     186        if(collectible != nullptr && collectible->isInCollection())
    187187            return;
    188188
    189189        // Getting clientId of the host this change of the pickup's used status concerns.
    190190        PickupCarrier* carrier = pickup->getCarrier();
    191         while(carrier->getCarrierParent() != NULL)
     191        while(carrier->getCarrierParent() != nullptr)
    192192            carrier = carrier->getCarrierParent();
    193193        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    194         if(pawn == NULL)
     194        if(pawn == nullptr)
    195195            return;
    196196        PlayerInfo* info = pawn->getPlayer();
    197         if(info == NULL)
     197        if(info == nullptr)
    198198            return;
    199199        unsigned int clientId = info->getClientID();
     
    265265        CollectiblePickup* collectible = orxonox_cast<CollectiblePickup*>(pickup);
    266266        // If the Pickupable is part of a PickupCollection it isn't displayed in the PickupInventory, just the PickupCollection is.
    267         if(collectible != NULL && collectible->isInCollection())
     267        if(collectible != nullptr && collectible->isInCollection())
    268268            return;
    269269
    270270        // Getting clientId of the host this change of the pickup's pickedUp status concerns.
    271271        PickupCarrier* carrier = pickup->getCarrier();
    272         while(carrier->getCarrierParent() != NULL)
     272        while(carrier->getCarrierParent() != nullptr)
    273273            carrier = carrier->getCarrierParent();
    274274        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    275         if(pawn == NULL)
     275        if(pawn == nullptr)
    276276            return;
    277277        PlayerInfo* info = pawn->getFormerPlayer();
    278         if(info == NULL)
     278        if(info == nullptr)
    279279            return;
    280280        unsigned int clientId = info->getClientID();
     
    399399                return;
    400400            Pickupable* pickupable = this->pickups_.find(pickup)->second;
    401             if(pickupable != NULL)
     401            if(pickupable != nullptr)
    402402                pickupable->drop();
    403403        }
     
    442442                return;
    443443            Pickupable* pickupable = this->pickups_.find(pickup)->second;
    444             if(pickupable != NULL)
     444            if(pickupable != nullptr)
    445445                pickupable->setUsed(use);
    446446        }
  • code/branches/cpp11_v3/src/modules/pickup/PickupManager.h

    r10624 r11054  
    117117            PickupRepresentation* getRepresentation(const std::string& name); // tolua_export
    118118
    119             virtual void pickupChangedUsed(Pickupable* pickup, bool used); //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input used state.
     119            virtual void pickupChangedUsed(Pickupable* pickup, bool used) override; //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input used state.
    120120            static void pickupChangedUsedNetwork(uint32_t pickup, bool inUse, bool usable, bool unusable); //!< Helper method to react to the change in the used status of a Pickupable.
    121             virtual void pickupChangedPickedUp(Pickupable* pickup, bool pickedUp); //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input pickedUp state.
     121            virtual void pickupChangedPickedUp(Pickupable* pickup, bool pickedUp) override; //!< Is called by the PickupListener to notify the PickupManager, that the input Pickupable has transited to the input pickedUp state.
    122122            static void pickupChangedPickedUpNetwork(uint32_t pickup, bool usable, uint32_t representationObjectId, const std::string& representationName, bool pickedUp); //!< Helper method to react to the change in the pickedUp status of a Pickupable.
    123123
     
    161161            std::map<uint32_t, PickupInventoryContainer*>::iterator pickupsIterator_; //!< An iterator pointing to the current Pickupable in pickupsList_.
    162162
    163             std::map<uint32_t, WeakPtr<Pickupable> > pickups_; //!< Map linking a number identifying a Pickupable to a weak pointer of a Pickupable.
     163            std::map<uint32_t, WeakPtr<Pickupable>> pickups_; //!< Map linking a number identifying a Pickupable to a weak pointer of a Pickupable.
    164164            std::map<Pickupable*, uint32_t> indexes_;//!< Map linking Pickupable to the number identifying it.
    165165
  • code/branches/cpp11_v3/src/modules/pickup/PickupRepresentation.cc

    r11052 r11054  
    5252        This is primarily for use of the PickupManager in creating a default PickupRepresentation.
    5353    */
    54     PickupRepresentation::PickupRepresentation() : BaseObject(NULL), Synchronisable(NULL), spawnerRepresentation_(NULL)
     54    PickupRepresentation::PickupRepresentation() : BaseObject(nullptr), Synchronisable(nullptr), spawnerRepresentation_(nullptr)
    5555    {
    5656        RegisterObject(PickupRepresentation);
     
    6464        Default Constructor. Registers the object and initializes its member variables.
    6565    */
    66     PickupRepresentation::PickupRepresentation(Context* context) : BaseObject(context), Synchronisable(context), spawnerRepresentation_(NULL)
     66    PickupRepresentation::PickupRepresentation(Context* context) : BaseObject(context), Synchronisable(context), spawnerRepresentation_(nullptr)
    6767    {
    6868        RegisterObject(PickupRepresentation);
     
    7878    PickupRepresentation::~PickupRepresentation()
    7979    {
    80         if(this->spawnerRepresentation_ != NULL)
     80        if(this->spawnerRepresentation_ != nullptr)
    8181            this->spawnerRepresentation_->destroy();
    8282
     
    135135    StaticEntity* PickupRepresentation::createSpawnerRepresentation(PickupSpawner* spawner)
    136136    {
    137         if(this->spawnerRepresentation_ == NULL)
     137        if(this->spawnerRepresentation_ == nullptr)
    138138        {
    139139            orxout(verbose, context::pickups) << "PickupRepresentation: No spawner representation found." << endl;
     
    149149        this->spawnerRepresentation_->setVisible(true);
    150150        StaticEntity* temp = this->spawnerRepresentation_;
    151         this->spawnerRepresentation_ = NULL;
     151        this->spawnerRepresentation_ = nullptr;
    152152
    153153        return temp;
     
    164164    {
    165165        this->spawnerRepresentation_ = representation;
    166         if(this->spawnerRepresentation_ != NULL)
     166        if(this->spawnerRepresentation_ != nullptr)
    167167            this->spawnerRepresentation_->setVisible(false);
    168168    }
  • code/branches/cpp11_v3/src/modules/pickup/PickupRepresentation.h

    r9667 r11054  
    9898            virtual ~PickupRepresentation(); //!< Destructor.
    9999
    100             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a PickupRepresentation object through XML.
     100            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a PickupRepresentation object through XML.
    101101
    102102            /**
     
    119119            @brief Get the StaticEntity that defines how the PickupSpawner of the Pickupable represented by this PickupRepresentation looks like.
    120120            @param index The index.
    121             @return Returns (for index = 0) a pointer to the StaticEntity. For index > 0 it returns NULL.
     121            @return Returns (for index = 0) a pointer to the StaticEntity. For index > 0 it returns nullptr.
    122122            */
    123123            inline const StaticEntity* getSpawnerRepresentationIndex(unsigned int index) const
    124                 { if(index == 0) return this->spawnerRepresentation_; return NULL; }
     124                { if(index == 0) return this->spawnerRepresentation_; return nullptr; }
    125125            /**
    126126            @brief Get the name of the image representing the pickup in the PickupInventory.
     
    129129            inline const std::string& getInventoryRepresentation(void) const { return this->inventoryRepresentation_; } // tolua_export
    130130
    131             virtual void changedName();
     131            virtual void changedName() override;
    132132
    133133            StaticEntity* createSpawnerRepresentation(PickupSpawner* spawner); //!< Create a spawnerRepresentation for a specific PickupSpawner.
  • code/branches/cpp11_v3/src/modules/pickup/PickupSpawner.cc

    r10624 r11054  
    5555        Pointer to the object which created this item.
    5656    */
    57     PickupSpawner::PickupSpawner(Context* context) : StaticEntity(context), pickup_(NULL), representation_(NULL), pickupTemplate_(NULL)
     57    PickupSpawner::PickupSpawner(Context* context) : StaticEntity(context), pickup_(nullptr), representation_(nullptr), pickupTemplate_(nullptr)
    5858    {
    5959        RegisterObject(PickupSpawner);
     
    7474        this->selfDestruct_ = false;
    7575
    76         this->setPickupable(NULL);
     76        this->setPickupable(nullptr);
    7777    }
    7878
     
    8383    PickupSpawner::~PickupSpawner()
    8484    {
    85         if(this->isInitialized() && this->selfDestruct_ && this->pickup_ != NULL)
     85        if(this->isInitialized() && this->selfDestruct_ && this->pickup_ != nullptr)
    8686            this->pickup_->destroy();
    8787    }
     
    158158
    159159            // Iterate trough all Pawns.
    160             for(ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
     160            for(Pawn* pawn : ObjectList<Pawn>())
    161161            {
    162                 if(spawner == NULL) // Stop if the PickupSpawner has been deleted (e.g. because it has run out of pickups to distribute).
     162                if(spawner == nullptr) // Stop if the PickupSpawner has been deleted (e.g. because it has run out of pickups to distribute).
    163163                    break;
    164164
    165                 Vector3 distance = it->getWorldPosition() - this->getWorldPosition();
    166                 PickupCarrier* carrier = static_cast<PickupCarrier*>(*it);
     165                Vector3 distance = pawn->getWorldPosition() - this->getWorldPosition();
     166                PickupCarrier* carrier = static_cast<PickupCarrier*>(pawn);
    167167                // If a PickupCarrier, that fits the target-range of the Pickupable spawned by this PickupSpawner, is in trigger-distance and the carrier is not blocked.
    168                 if(distance.length() < this->triggerDistance_ && carrier != NULL && this->blocked_.find(carrier) == this->blocked_.end())
     168                if(distance.length() < this->triggerDistance_ && carrier != nullptr && this->blocked_.find(carrier) == this->blocked_.end())
    169169                {
    170170                    if(carrier->isTarget(this->pickup_))
    171                         this->trigger(*it);
     171                        this->trigger(pawn);
    172172                }
    173173            }
     
    195195        pickedUp = false; // To avoid compiler warning.
    196196
    197         this->setPickupable(NULL);
     197        this->setPickupable(nullptr);
    198198        this->decrementSpawnsRemaining();
    199199    }
     
    282282        {
    283283            orxout(internal_error, context::pickups) << "Massive Error: PickupSpawner still alive until having spawned last item." << endl;
    284             return NULL;
    285         }
    286 
    287         if (this->pickupTemplate_ != NULL)
     284            return nullptr;
     285        }
     286
     287        if (this->pickupTemplate_ != nullptr)
    288288        {
    289289            Identifier* identifier = this->pickupTemplate_->getBaseclassIdentifier();
    290             if (identifier != NULL)
     290            if (identifier != nullptr)
    291291            {
    292292                Pickupable* pickup = orxonox_cast<Pickupable*>(identifier->fabricate(this->getContext()));
     
    298298        }
    299299
    300         return NULL;
     300        return nullptr;
    301301    }
    302302
     
    309309    void PickupSpawner::setPickupable(Pickupable* pickup)
    310310    {
    311         if (this->representation_ != NULL)
     311        if (this->representation_ != nullptr)
    312312        {
    313313            this->representation_->destroy();
    314             this->representation_ = NULL;
    315         }
    316 
    317         if (pickup != NULL)
    318         {
    319             if (this->pickup_ != NULL)
     314            this->representation_ = nullptr;
     315        }
     316
     317        if (pickup != nullptr)
     318        {
     319            if (this->pickup_ != nullptr)
    320320                this->pickup_->destroy();
    321321
  • code/branches/cpp11_v3/src/modules/pickup/PickupSpawner.h

    r9667 r11054  
    8282            static PickupSpawner* createDroppedPickup(Context* context, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance = 10.0);
    8383
    84             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);  //!< Method for creating a PickupSpawner through XML.
    85             virtual void tick(float dt); //!< Tick, checks if any Pawn is close enough to trigger.
     84            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;  //!< Method for creating a PickupSpawner through XML.
     85            virtual void tick(float dt) override; //!< Tick, checks if any Pawn is close enough to trigger.
    8686
    8787            /**
  • code/branches/cpp11_v3/src/modules/pickup/items/DamageBoostPickup.cc

    r9667 r11054  
    106106
    107107        SpaceShip* ship = this->carrierToSpaceShipHelper();
    108         if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
     108        if(ship == nullptr) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
    109109            this->Pickupable::destroy();
    110110
     
    152152        Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
    153153    @return
    154         A pointer to the SpaceShip, or NULL if the conversion failed.
     154        A pointer to the SpaceShip, or nullptr if the conversion failed.
    155155    */
    156156    SpaceShip* DamageBoostPickup::carrierToSpaceShipHelper(void)
     
    159159        SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier);
    160160
    161         if(ship == NULL)
     161        if(ship == nullptr)
    162162        {
    163163            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in DamageBoostPickup." << endl;
  • code/branches/cpp11_v3/src/modules/pickup/items/DronePickup.cc

    r9667 r11054  
    122122
    123123                Pawn* pawn = this->carrierToPawnHelper();
    124                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     124                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    125125                    this->Pickupable::destroy();
    126126
     
    131131                Controller* controller = drone->getController();
    132132                DroneController* droneController = orxonox_cast<DroneController*>(controller);
    133                 if(droneController != NULL)
     133                if(droneController != nullptr)
    134134                {
    135135                    droneController->setOwner(pawn);
     
    156156        Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    157157    @return
    158         A pointer to the Pawn, or NULL if the conversion failed.
     158        A pointer to the Pawn, or nullptr if the conversion failed.
    159159    */
    160160    Pawn* DronePickup::carrierToPawnHelper(void)
     
    163163        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    164164
    165         if(pawn == NULL)
     165        if(pawn == nullptr)
    166166        {
    167167            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in DronePickup." << endl;
  • code/branches/cpp11_v3/src/modules/pickup/items/HealthPickup.cc

    r9667 r11054  
    114114        {
    115115            Pawn* pawn = this->carrierToPawnHelper();
    116             if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     116            if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    117117                this->Pickupable::destroy();
    118118
     
    168168            {
    169169                Pawn* pawn = this->carrierToPawnHelper();
    170                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     170                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    171171                    this->Pickupable::destroy();
    172172
     
    206206                Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    207207
    208                 if(pawn == NULL)
     208                if(pawn == nullptr)
    209209                {
    210210                    orxout(internal_error, context::pickups) << "Something went horribly wrong in Health Pickup. PickupCarrier is '" << carrier->getIdentifier()->getName() << "' instead of Pawn." << endl;
     
    233233        Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    234234    @return
    235         A pointer to the Pawn, or NULL if the conversion failed.
     235        A pointer to the Pawn, or nullptr if the conversion failed.
    236236    */
    237237    Pawn* HealthPickup::carrierToPawnHelper(void)
     
    240240        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    241241
    242         if(pawn == NULL)
     242        if(pawn == nullptr)
    243243            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in HealthPickup." << endl;
    244244
  • code/branches/cpp11_v3/src/modules/pickup/items/InvisiblePickup.cc

    r9667 r11054  
    139139    {
    140140        Pawn* pawn = this->carrierToPawnHelper();
    141         if(pawn == NULL)
     141        if(pawn == nullptr)
    142142            return false;
    143143
     
    163163        Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    164164    @return
    165         A pointer to the Pawn, or NULL if the conversion failed.
     165        A pointer to the Pawn, or nullptr if the conversion failed.
    166166    */
    167167    Pawn* InvisiblePickup::carrierToPawnHelper(void)
     
    170170        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    171171
    172         if(pawn == NULL)
     172        if(pawn == nullptr)
    173173        {
    174174            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in InvisiblePickup." << endl;
  • code/branches/cpp11_v3/src/modules/pickup/items/MetaPickup.cc

    r9667 r11054  
    107107        {
    108108            PickupCarrier* carrier = this->getCarrier();
    109             if(this->getMetaType() != pickupMetaType::none && carrier != NULL)
     109            if(this->getMetaType() != pickupMetaType::none && carrier != nullptr)
    110110            {
    111111                // If the metaType is destroyCarrier, then the PickupCarrier is destroyed.
     
    118118                std::set<Pickupable*> pickups = carrier->getPickups();
    119119                // Iterate over all Pickupables of the PickupCarrier.
    120                 for(std::set<Pickupable*>::iterator it = pickups.begin(); it != pickups.end(); it++)
     120                for(Pickupable* pickup : pickups)
    121121                {
    122                     Pickupable* pickup = (*it);
    123                     if(pickup == NULL || pickup == this)
     122                    if(pickup == nullptr || pickup == this)
    124123                        continue;
    125124
  • code/branches/cpp11_v3/src/modules/pickup/items/ShieldPickup.cc

    r9667 r11054  
    9999
    100100        Pawn* pawn = this->carrierToPawnHelper();
    101         if(pawn == NULL)
     101        if(pawn == nullptr)
    102102            this->Pickupable::destroy();
    103103
     
    143143    Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
    144144    @return
    145     A pointer to the Pawn, or NULL if the conversion failed.
     145    A pointer to the Pawn, or nullptr if the conversion failed.
    146146    */
    147147    Pawn* ShieldPickup::carrierToPawnHelper(void)
     
    150150        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
    151151
    152         if(pawn == NULL)
     152        if(pawn == nullptr)
    153153        {
    154154            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in ShieldPickup." << endl;
  • code/branches/cpp11_v3/src/modules/pickup/items/ShrinkPickup.cc

    r10624 r11054  
    146146        {
    147147            Pawn* pawn = this->carrierToPawnHelper();
    148             if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     148            if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    149149            {
    150150                this->Pickupable::destroy();
     
    173173                //TODO: Deploy particle effect.
    174174                Pawn* pawn = this->carrierToPawnHelper();
    175                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     175                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    176176                    return;
    177177
     
    182182
    183183                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
    184                 const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
     184                const std::list<StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions();
    185185                int size = cameraPositions.size();
    186186                for(int index = 0; index < size; index++)
    187187                {
    188188                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
    189                     if(cameraPos == NULL)
     189                    if(cameraPos == nullptr)
    190190                        continue;
    191191                    cameraPos->setPosition(cameraPos->getPosition()/factor);
     
    201201                //TODO: Deploy particle effect.
    202202                Pawn* pawn = this->carrierToPawnHelper();
    203                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     203                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    204204                    return;
    205205
     
    208208
    209209                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
    210                 const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
     210                const std::list<StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions();
    211211                int size = cameraPositions.size();
    212212                for(int index = 0; index < size; index++)
    213213                {
    214214                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
    215                     if(cameraPos == NULL)
     215                    if(cameraPos == nullptr)
    216216                        continue;
    217217                    cameraPos->setPosition(cameraPos->getPosition()/this->shrinkFactor_);
     
    237237            {
    238238                Pawn* pawn = this->carrierToPawnHelper();
    239                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     239                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    240240                {
    241241                    this->Pickupable::destroy();
     
    263263
    264264                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
    265                 const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
     265                const std::list<StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions();
    266266                int size = cameraPositions.size();
    267267                for(int index = 0; index < size; index++)
    268268                {
    269269                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
    270                     if(cameraPos == NULL)
     270                    if(cameraPos == nullptr)
    271271                        continue;
    272272                    cameraPos->setPosition(cameraPos->getPosition()/factor);
     
    277277            {
    278278                Pawn* pawn = this->carrierToPawnHelper();
    279                 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
     279                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    280280                    this->Pickupable::destroy();
    281281
     
    304304
    305305                // Iterate over all camera positions and inversely move the camera to create a shrinking sensation.
    306                 const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();
     306                const std::list<StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions();
    307307                int size = cameraPositions.size();
    308308                for(int index = 0; index < size; index++)
    309309                {
    310310                    CameraPosition* cameraPos = pawn->getCameraPosition(index);
    311                     if(cameraPos == NULL)
     311                    if(cameraPos == nullptr)
    312312                        continue;
    313313                    cameraPos->setPosition(cameraPos->getPosition()/factor);
  • code/branches/cpp11_v3/src/modules/pickup/items/SpeedPickup.cc

    r9667 r11054  
    9999
    100100        SpaceShip* ship = this->carrierToSpaceShipHelper();
    101         if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
     101        if(ship == nullptr) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
    102102            this->Pickupable::destroy();
    103103
     
    143143        Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
    144144    @return
    145         A pointer to the SpaceShip, or NULL if the conversion failed.
     145        A pointer to the SpaceShip, or nullptr if the conversion failed.
    146146    */
    147147    SpaceShip* SpeedPickup::carrierToSpaceShipHelper(void)
     
    150150        SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier);
    151151
    152         if(ship == NULL)
     152        if(ship == nullptr)
    153153        {
    154154            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in SpeedPickup." << endl;
  • code/branches/cpp11_v3/src/modules/pong/Pong.cc

    r9939 r11054  
    6464        RegisterObject(Pong);
    6565
    66         this->center_ = 0;
    67         this->ball_ = 0;
    68         this->bat_[0] = 0;
    69         this->bat_[1] = 0;
     66        this->center_ = nullptr;
     67        this->ball_ = nullptr;
     68        this->bat_[0] = nullptr;
     69        this->bat_[1] = nullptr;
    7070
    7171        this->setHUDTemplate("PongHUD");
     
    103103    void Pong::cleanup()
    104104    {
    105         if (this->ball_ != NULL) // Destroy the ball, if present.
     105        if (this->ball_ != nullptr) // Destroy the ball, if present.
    106106        {
    107107            this->ball_->destroy();
    108             this->ball_ = 0;
     108            this->ball_ = nullptr;
    109109        }
    110110
     
    112112        for (size_t i = 0; i < 2; ++i)
    113113        {
    114             if (this->bat_[0] != NULL)
     114            if (this->bat_[0] != nullptr)
    115115            {
    116116                this->bat_[0]->destroy();
    117                 this->bat_[0] = 0;
     117                this->bat_[0] = nullptr;
    118118            }
    119119        }
     
    127127    void Pong::start()
    128128    {
    129         if (this->center_ != NULL) // There needs to be a PongCenterpoint, i.e. the area the game takes place.
    130         {
    131             if (this->ball_ == NULL) // If there is no ball, create a new ball.
     129        if (this->center_ != nullptr) // There needs to be a PongCenterpoint, i.e. the area the game takes place.
     130        {
     131            if (this->ball_ == nullptr) // If there is no ball, create a new ball.
    132132            {
    133133                this->ball_ = new PongBall(this->center_->getContext());
     
    145145
    146146            // If one of the bats is missing, create it. Apply the template for the bats as specified in the centerpoint.
    147             for (size_t i = 0; i < 2; ++i)
     147            for (WeakPtr<orxonox::PongBat>& bat : this->bat_)
    148148            {
    149                 if (this->bat_[i] == NULL)
     149                if (bat == nullptr)
    150150                {
    151                     this->bat_[i] = new PongBat(this->center_->getContext());
    152                     this->bat_[i]->addTemplate(this->center_->getBattemplate());
     151                    bat = new PongBat(this->center_->getContext());
     152                    bat->addTemplate(this->center_->getBattemplate());
    153153                }
    154154            }
     
    211211    {
    212212        // first spawn human players to assign always the left bat to the player in singleplayer
    213         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
    214             if (it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
    215                 this->spawnPlayer(it->first);
     213        for (const auto& mapEntry : this->players_)
     214            if (mapEntry.first->isHumanPlayer() && (mapEntry.first->isReadyToSpawn() || this->bForceSpawn_))
     215                this->spawnPlayer(mapEntry.first);
    216216        // now spawn bots
    217         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
    218             if (!it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
    219                 this->spawnPlayer(it->first);
     217        for (const auto& mapEntry : this->players_)
     218            if (!mapEntry.first->isHumanPlayer() && (mapEntry.first->isReadyToSpawn() || this->bForceSpawn_))
     219                this->spawnPlayer(mapEntry.first);
    220220    }
    221221
     
    231231
    232232        // If the first (left) bat has no player.
    233         if (this->bat_[0]->getPlayer() == NULL)
     233        if (this->bat_[0]->getPlayer() == nullptr)
    234234        {
    235235            player->startControl(this->bat_[0]);
     
    237237        }
    238238        // If the second (right) bat has no player.
    239         else if (this->bat_[1]->getPlayer() == NULL)
     239        else if (this->bat_[1]->getPlayer() == nullptr)
    240240        {
    241241            player->startControl(this->bat_[1]);
     
    247247
    248248        // If the player is an AI, it receives a pointer to the ball.
    249         if (player->getController() != NULL && player->getController()->isA(Class(PongAI)))
     249        if (player->getController() != nullptr && player->getController()->isA(Class(PongAI)))
    250250        {
    251251            PongAI* ai = orxonox_cast<PongAI*>(player->getController());
     
    262262        Deathmatch::playerScored(player, score);
    263263
    264         if (this->center_ != NULL) // If there is a centerpoint.
     264        if (this->center_ != nullptr) // If there is a centerpoint.
    265265        {
    266266            // Fire an event for the player that has scored, to be able to react to it in the level, e.g. by displaying fireworks.
     
    271271
    272272            // Also announce, that the player has scored.
    273             if (player != NULL)
     273            if (player != nullptr)
    274274                this->gtinfo_->sendAnnounceMessage(player->getName() + " scored");
    275275        }
    276276
    277277        // If there is a ball present, reset its position, velocity and acceleration.
    278         if (this->ball_ != NULL)
     278        if (this->ball_ != nullptr)
    279279        {
    280280            this->ball_->setPosition(Vector3::ZERO);
     
    285285
    286286        // If there are bats reset them to the middle position.
    287         if (this->bat_[0] != NULL && this->bat_[1] != NULL)
     287        if (this->bat_[0] != nullptr && this->bat_[1] != nullptr)
    288288        {
    289289            this->bat_[0]->setPosition(-this->center_->getFieldDimension().x / 2, 0, 0);
     
    292292
    293293        // If a player gets enough points, he won the game -> end of game
    294         PlayerInfo* winningPlayer = NULL;
     294        PlayerInfo* winningPlayer = nullptr;
    295295        if (this->getLeftPlayer() && this->getScore(this->getLeftPlayer()) >= scoreLimit_)
    296296            winningPlayer = this->getLeftPlayer();
     
    314314    void Pong::startBall()
    315315    {
    316         if (this->ball_ != NULL && this->center_ != NULL)
     316        if (this->ball_ != nullptr && this->center_ != nullptr)
    317317            this->ball_->setSpeed(this->center_->getBallSpeed());
    318318    }
     
    322322        Get the left player.
    323323    @return
    324         Returns a pointer to the player playing on the left. If there is no left player, NULL is returned.
     324        Returns a pointer to the player playing on the left. If there is no left player, nullptr is returned.
    325325    */
    326326    PlayerInfo* Pong::getLeftPlayer() const
    327327    {
    328         if (this->bat_ != NULL && this->bat_[0] != NULL)
     328        if (this->bat_ != nullptr && this->bat_[0] != nullptr)
    329329            return this->bat_[0]->getPlayer();
    330330        else
    331             return 0;
     331            return nullptr;
    332332    }
    333333
     
    336336        Get the right player.
    337337    @return
    338         Returns a pointer to the player playing on the right. If there is no right player, NULL is returned.
     338        Returns a pointer to the player playing on the right. If there is no right player, nullptr is returned.
    339339    */
    340340    PlayerInfo* Pong::getRightPlayer() const
    341341    {
    342         if (this->bat_ != NULL && this->bat_[1] != NULL)
     342        if (this->bat_ != nullptr && this->bat_[1] != nullptr)
    343343            return this->bat_[1]->getPlayer();
    344344        else
    345             return 0;
     345            return nullptr;
    346346    }
    347347}
  • code/branches/cpp11_v3/src/modules/pong/Pong.h

    r9667 r11054  
    6868            virtual ~Pong(); //!< Destructor. Cleans up, if initialized.
    6969
    70             virtual void start(); //!< Starts the Pong minigame.
    71             virtual void end(); ///!< Ends the Pong minigame.
     70            virtual void start() override; //!< Starts the Pong minigame.
     71            virtual void end() override; ///!< Ends the Pong minigame.
    7272
    73             virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
     73            virtual void spawnPlayer(PlayerInfo* player) override; //!< Spawns the input player.
    7474
    75             virtual void playerScored(PlayerInfo* player, int score = 1); //!< Is called when the player scored.
     75            virtual void playerScored(PlayerInfo* player, int score = 1) override; //!< Is called when the player scored.
    7676
    7777            /**
     
    8787
    8888        protected:
    89             virtual void spawnPlayersIfRequested(); //!< Spawns players, and fills the rest up with bots.
     89            virtual void spawnPlayersIfRequested() override; //!< Spawns players, and fills the rest up with bots.
    9090
    9191            void startBall(); //!< Starts the ball with some default speed.
  • code/branches/cpp11_v3/src/modules/pong/PongAI.cc

    r11018 r11054  
    5757        RegisterObject(PongAI);
    5858
    59         this->ball_ = 0;
     59        this->ball_ = nullptr;
    6060        this->ballDirection_ = Vector2::ZERO;
    6161        this->ballEndPosition_ = 0;
     
    7777    PongAI::~PongAI()
    7878    {
    79         for (std::list<std::pair<Timer*, char> >::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it)
    80             delete it->first;
     79        for (std::pair<Timer*, char>& pair : this->reactionTimers_)
     80            delete pair.first;
    8181    }
    8282
     
    101101    {
    102102        // If either the ball, or the controllable entity (i.e. the bat) don't exist (or aren't set).
    103         if (this->ball_  == NULL || this->getControllableEntity() == NULL)
     103        if (this->ball_  == nullptr || this->getControllableEntity() == nullptr)
    104104            return;
    105105
     
    362362            // Add a new Timer
    363363            Timer* timer = new Timer(delay, false, createExecutor(createFunctor(&PongAI::delayedMove, this)));
    364             this->reactionTimers_.push_back(std::pair<Timer*, char>(timer, direction));
     364            this->reactionTimers_.emplace_back(timer, direction);
    365365        }
    366366        else
  • code/branches/cpp11_v3/src/modules/pong/PongAI.h

    r9667 r11054  
    6666            void setConfigValues();
    6767
    68             virtual void tick(float dt); //!< Implements the behavior of the PongAI (i.e. its intelligence).
     68            virtual void tick(float dt) override; //!< Implements the behavior of the PongAI (i.e. its intelligence).
    6969
    7070            /**
     
    8989            float strength_; //!< The strength of the AI. Ranging from 0 to 1.
    9090
    91             std::list<std::pair<Timer*, char> > reactionTimers_; //!< A list of reaction timers and the directions that take effect when their timer expires.
     91            std::list<std::pair<Timer*, char>> reactionTimers_; //!< A list of reaction timers and the directions that take effect when their timer expires.
    9292            char movement_; //!< The planned movement.
    9393            char oldMove_; //!< The previous movement.
  • code/branches/cpp11_v3/src/modules/pong/PongBall.cc

    r9945 r11054  
    6161        this->speed_ = 0;
    6262        this->accelerationFactor_ = 1.0f;
    63         this->bat_ = 0;
     63        this->bat_ = nullptr;
    6464        this->bDeleteBats_ = false;
    6565        this->batID_ = new unsigned int[2];
     
    8282             else
    8383             {
    84                  this->defScoreSound_ = 0;
    85                  this->defBatSound_ = 0;
    86                  this->defBoundarySound_ = 0;
     84                 this->defScoreSound_ = nullptr;
     85                 this->defBatSound_ = nullptr;
     86                 this->defBoundarySound_ = nullptr;
    8787             }
    8888    }
     
    163163            float distance = 0;
    164164
    165             if (this->bat_ != NULL) // If there are bats.
     165            if (this->bat_ != nullptr) // If there are bats.
    166166            {
    167167                // If the right boundary has been crossed.
    168                 if (position.x > this->fieldWidth_ / 2 && this->bat_[1] != NULL)
     168                if (position.x > this->fieldWidth_ / 2 && this->bat_[1] != nullptr)
    169169                {
    170170                    // Calculate the distance (in z-direction) between the ball and the center of the bat, weighted by half of the effective length of the bat (with additional 10%)
     
    195195                }
    196196                // If the left boundary has been crossed.
    197                 else if (position.x < -this->fieldWidth_ / 2 && this->bat_[0] != NULL)
     197                else if (position.x < -this->fieldWidth_ / 2 && this->bat_[0] != nullptr)
    198198                {
    199199                    // Calculate the distance (in z-direction) between the ball and the center of the bat, weighted by half of the effective length of the bat (with additional 10%)
     
    285285    {
    286286        // Make space for the bats, if they don't exist, yet.
    287         if (this->bat_ == NULL)
     287        if (this->bat_ == nullptr)
    288288        {
    289289            this->bat_ = new WeakPtr<PongBat>[2];
  • code/branches/cpp11_v3/src/modules/pong/PongBall.h

    r9939 r11054  
    6363            virtual ~PongBall();
    6464
    65             virtual void tick(float dt);
     65            virtual void tick(float dt) override;
    6666
    67             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     67            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    6868
    6969            /**
  • code/branches/cpp11_v3/src/modules/pong/PongBat.h

    r9667 r11054  
    6060            virtual ~PongBat() {}
    6161
    62             virtual void tick(float dt);
     62            virtual void tick(float dt) override;
    6363
    64             virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    65             virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
     64            virtual void moveFrontBack(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
     65            virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
    6666
    67             virtual void changedPlayer(); //!< Is called when the player changed.
     67            virtual void changedPlayer() override; //!< Is called when the player changed.
    6868
    6969            /**
  • code/branches/cpp11_v3/src/modules/pong/PongCenterpoint.cc

    r10624 r11054  
    8484    void PongCenterpoint::checkGametype()
    8585    {
    86         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Pong)))
     86        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Pong)))
    8787        {
    8888            Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype());
  • code/branches/cpp11_v3/src/modules/pong/PongCenterpoint.h

    r10624 r11054  
    124124            virtual ~PongCenterpoint() {}
    125125
    126             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a PongCenterpoint through XML.
     126            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a PongCenterpoint through XML.
    127127
    128128            /**
  • code/branches/cpp11_v3/src/modules/pong/PongScore.cc

    r10624 r11054  
    5555        RegisterObject(PongScore);
    5656
    57         this->owner_ = 0;
     57        this->owner_ = nullptr;
    5858
    5959        this->bShowName_ = false;
     
    9797
    9898        // If the owner is set. The owner being a Pong game.
    99         if (this->owner_ != NULL)
     99        if (this->owner_ != nullptr)
    100100        {
    101101            if (!this->owner_->hasEnded())
     
    113113
    114114            // Save the name and score of each player as a string.
    115             if (player1_ != NULL)
     115            if (player1_ != nullptr)
    116116            {
    117117                name1 = player1_->getName();
    118118                score1 = multi_cast<std::string>(this->owner_->getScore(player1_));
    119119            }
    120             if (player2_ != NULL)
     120            if (player2_ != nullptr)
    121121            {
    122122                name2 = player2_->getName();
     
    128128            if (this->bShowLeftPlayer_)
    129129            {
    130                 if (this->bShowName_ && this->bShowScore_ && player1_ != NULL)
     130                if (this->bShowName_ && this->bShowScore_ && player1_ != nullptr)
    131131                    output1 = name1 + " - " + score1;
    132132                else if (this->bShowScore_)
     
    139139            if (this->bShowRightPlayer_)
    140140            {
    141                 if (this->bShowName_ && this->bShowScore_ && player2_ != NULL)
     141                if (this->bShowName_ && this->bShowScore_ && player2_ != nullptr)
    142142                    output2 = score2 + " - " + name2;
    143143                else if (this->bShowScore_)
     
    163163    @brief
    164164        Is called when the owner changes.
    165         Sets the owner to NULL, if it is not a pointer to a Pong game.
     165        Sets the owner to nullptr, if it is not a pointer to a Pong game.
    166166    */
    167167    void PongScore::changedOwner()
     
    169169        SUPER(PongScore, changedOwner);
    170170
    171         if (this->getOwner() != NULL && this->getOwner()->getGametype())
     171        if (this->getOwner() != nullptr && this->getOwner()->getGametype())
    172172            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype());
    173173        else
    174             this->owner_ = 0;
     174            this->owner_ = nullptr;
    175175    }
    176176}
  • code/branches/cpp11_v3/src/modules/pong/PongScore.h

    r9939 r11054  
    6060            virtual ~PongScore();
    6161
    62             virtual void tick(float dt); //!< Creates and sets the caption to be displayed by the PongScore.
    63             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    64             virtual void changedOwner(); //!< Is called when the owner changes.
     62            virtual void tick(float dt) override; //!< Creates and sets the caption to be displayed by the PongScore.
     63            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     64            virtual void changedOwner() override; //!< Is called when the owner changes.
    6565
    6666            /**
  • code/branches/cpp11_v3/src/modules/portals/PortalEndPoint.cc

    r11022 r11054  
    4848    std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
    4949
    50     PortalEndPoint::PortalEndPoint(Context* context) : StaticEntity(context), RadarViewable(this, static_cast<WorldEntity*>(this)), id_(0), trigger_(NULL), reenterDelay_(0)
     50    PortalEndPoint::PortalEndPoint(Context* context) : StaticEntity(context), RadarViewable(this, static_cast<WorldEntity*>(this)), id_(0), trigger_(nullptr), reenterDelay_(0)
    5151    {
    5252        RegisterObject(PortalEndPoint);
     
    7272    {
    7373        if (this->isInitialized()) {
    74             if (this->trigger_ != NULL)
     74            if (this->trigger_ != nullptr)
    7575                this->trigger_->destroy();
    7676
    77             if (this->portalSound_ != NULL)
     77            if (this->portalSound_ != nullptr)
    7878                this->portalSound_->destroy();
    7979        }
     
    112112
    113113        MultiTriggerContainer * cont = orxonox_cast<MultiTriggerContainer *>(trigger);
    114         if(cont == 0)
     114        if(cont == nullptr)
    115115            return true;
    116116
    117117        DistanceMultiTrigger * originatingTrigger = orxonox_cast<DistanceMultiTrigger *>(cont->getOriginator());
    118         if(originatingTrigger == 0)
     118        if(originatingTrigger == nullptr)
    119119        {
    120120            return true;
     
    122122
    123123        MobileEntity * entity = orxonox_cast<MobileEntity *>(cont->getData());
    124         if(entity == 0)
     124        if(entity == nullptr)
    125125            return true;
    126126
  • code/branches/cpp11_v3/src/modules/portals/PortalEndPoint.h

    r9667 r11054  
    6363            virtual ~PortalEndPoint();
    6464
    65             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    66             virtual void changedActivity(void);
     65            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     66            virtual void changedActivity(void) override;
    6767
    6868            inline void setTarget(const std::string & target)                 //!< add types which are allowed to activate the PortalEndPoint
    6969                { this->trigger_->addTarget(target); }
    7070
    71             void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
     71            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    7272            static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint
    7373            inline void setReenterDelay(unsigned int seconds)
  • code/branches/cpp11_v3/src/modules/portals/PortalLink.cc

    r9667 r11054  
    4040    std::map<PortalEndPoint *, PortalEndPoint *> PortalLink::links_s;
    4141
    42     PortalLink::PortalLink(Context* context) : BaseObject(context), fromID_(0), toID_(0), from_(0), to_(0)
     42    PortalLink::PortalLink(Context* context) : BaseObject(context), fromID_(0), toID_(0), from_(nullptr), to_(nullptr)
    4343    {
    4444        RegisterObject(PortalLink);
     
    6767    void PortalLink::use(MobileEntity* entity, PortalEndPoint * entrance)
    6868    {
    69         if(entrance == 0)
     69        if(entrance == nullptr)
    7070            return;
    7171
  • code/branches/cpp11_v3/src/modules/portals/PortalLink.h

    r9667 r11054  
    5656            PortalLink(Context* context);
    5757            virtual ~PortalLink();
    58             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     58            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5959
    6060            inline void setFromID(unsigned int from)    //!< set the ID of the PortalEndPoint which should act as the entrance of this link
  • code/branches/cpp11_v3/src/modules/questsystem/GlobalQuest.cc

    r9667 r11054  
    9494
    9595        // Iterate through all players possessing this Quest.
    96         for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
    97             QuestEffect::invokeEffects(*it, this->getFailEffectList());
     96        for(PlayerInfo* questPlayer : players_)
     97            QuestEffect::invokeEffects(questPlayer, this->getFailEffectList());
    9898
    9999        return true;
     
    119119
    120120        // Iterate through all players possessing the Quest.
    121         for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
    122             QuestEffect::invokeEffects(*it, this->getCompleteEffectList());
     121        for(PlayerInfo* questPlayer : players_)
     122            QuestEffect::invokeEffects(questPlayer, this->getCompleteEffectList());
    123123
    124124        Quest::complete(player);
     
    138138    bool GlobalQuest::isStartable(const PlayerInfo* player) const
    139139    {
    140         if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player)))
     140        if(!(this->getParentQuest() == nullptr || this->getParentQuest()->isActive(player)))
    141141            return false;
    142142
     
    198198        The status to be set.
    199199    @return
    200         Returns false if player is NULL.
     200        Returns false if player is nullptr.
    201201    */
    202202    bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
     
    242242    {
    243243        int i = index;
    244         for (std::list<QuestEffect*>::const_iterator effect = this->rewards_.begin(); effect != this->rewards_.end(); ++effect)
     244        for (QuestEffect* reward : this->rewards_)
    245245        {
    246246            if(i == 0)
    247                return *effect;
     247               return reward;
    248248
    249249            i--;
    250250        }
    251         return NULL;
     251        return nullptr;
    252252    }
    253253
  • code/branches/cpp11_v3/src/modules/questsystem/GlobalQuest.h

    r9667 r11054  
    9393            virtual ~GlobalQuest();
    9494
    95             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a GlobalQuest object through XML.
     95            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a GlobalQuest object through XML.
    9696
    97             virtual bool fail(PlayerInfo* player); //!< Fails the Quest.
    98             virtual bool complete(PlayerInfo* player); //!< Completes the Quest.
     97            virtual bool fail(PlayerInfo* player) override; //!< Fails the Quest.
     98            virtual bool complete(PlayerInfo* player) override; //!< Completes the Quest.
    9999
    100100        protected:
    101             virtual bool isStartable(const PlayerInfo* player) const; //!< Checks whether the Quest can be started.
    102             virtual bool isFailable(const PlayerInfo* player) const; //!< Checks whether the Quest can be failed.
    103             virtual bool isCompletable(const PlayerInfo* player) const; //!< Checks whether the Quest can be completed.
     101            virtual bool isStartable(const PlayerInfo* player) const override; //!< Checks whether the Quest can be started.
     102            virtual bool isFailable(const PlayerInfo* player) const override; //!< Checks whether the Quest can be failed.
     103            virtual bool isCompletable(const PlayerInfo* player) const override; //!< Checks whether the Quest can be completed.
    104104
    105             virtual QuestStatus::Value getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
     105            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const override; //!< Returns the status of the Quest for a specific player.
    106106
    107             virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status); //!< Sets the status for a specific player.
     107            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status) override; //!< Sets the status for a specific player.
    108108
    109109        private:
  • code/branches/cpp11_v3/src/modules/questsystem/LocalQuest.cc

    r9667 r11054  
    128128    bool LocalQuest::isStartable(const PlayerInfo* player) const
    129129    {
    130         if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player)))
     130        if(!(this->getParentQuest() == nullptr || this->getParentQuest()->isActive(player)))
    131131            return false;
    132132
     
    188188        The status to be set.
    189189    @return
    190         Returns false if player is NULL.
     190        Returns false if player is nullptr.
    191191    */
    192192    bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
  • code/branches/cpp11_v3/src/modules/questsystem/LocalQuest.h

    r9667 r11054  
    8787            virtual ~LocalQuest();
    8888
    89             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a LocalQuest object through XML.
     89            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a LocalQuest object through XML.
    9090
    91             virtual bool fail(PlayerInfo* player); //!< Fails the Quest.
    92             virtual bool complete(PlayerInfo* player); //!< Completes the Quest.
     91            virtual bool fail(PlayerInfo* player) override; //!< Fails the Quest.
     92            virtual bool complete(PlayerInfo* player) override; //!< Completes the Quest.
    9393
    9494        protected:
    95             virtual bool isStartable(const PlayerInfo* player) const; //!< Checks whether the Quest can be started.
    96             virtual bool isFailable(const PlayerInfo* player) const; //!< Checks whether the Quest can be failed.
    97             virtual bool isCompletable(const PlayerInfo* player) const; //!< Checks whether the Quest can be completed.
     95            virtual bool isStartable(const PlayerInfo* player) const override; //!< Checks whether the Quest can be started.
     96            virtual bool isFailable(const PlayerInfo* player) const override; //!< Checks whether the Quest can be failed.
     97            virtual bool isCompletable(const PlayerInfo* player) const override; //!< Checks whether the Quest can be completed.
    9898
    99             virtual QuestStatus::Value getStatus(const PlayerInfo* player) const; //!< Returns the status of the Quest for a specific player.
    100             virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status); //!< Sets the status for a specific player.
     99            virtual QuestStatus::Value getStatus(const PlayerInfo* player) const override; //!< Returns the status of the Quest for a specific player.
     100            virtual bool setStatus(PlayerInfo* player, const QuestStatus::Value & status) override; //!< Sets the status for a specific player.
    101101
    102102        private:
  • code/branches/cpp11_v3/src/modules/questsystem/Quest.cc

    r10624 r11054  
    5555        RegisterObject(Quest);
    5656
    57         this->parentQuest_ = NULL;
     57        this->parentQuest_ = nullptr;
    5858    }
    5959
     
    183183        The index.
    184184    @return
    185         Returns a pointer to the sub-quest at the given index. NULL if there is no element at the given index.
     185        Returns a pointer to the sub-quest at the given index. nullptr if there is no element at the given index.
    186186    */
    187187    const Quest* Quest::getSubQuest(unsigned int index) const
     
    190190
    191191        // Iterate through all subquests.
    192         for (std::list<Quest*>::const_iterator subQuest = this->subQuests_.begin(); subQuest != this->subQuests_.end(); ++subQuest)
     192        for (Quest* quest : this->subQuests_)
    193193        {
    194194            if(i == 0) // We're counting down...
    195                return *subQuest;
     195               return quest;
    196196
    197197            i--;
    198198        }
    199199
    200         return NULL; // If the index is greater than the number of elements in the list.
     200        return nullptr; // If the index is greater than the number of elements in the list.
    201201    }
    202202
     
    207207        The index.
    208208    @return
    209         Returns a pointer to the QuestHint at the given index. NULL if there is no element at the given index.
     209        Returns a pointer to the QuestHint at the given index. nullptr if there is no element at the given index.
    210210    */
    211211    const QuestHint* Quest::getHint(unsigned int index) const
     
    214214
    215215        // Iterate through all QuestHints.
    216         for (std::list<QuestHint*>::const_iterator hint = this->hints_.begin(); hint != this->hints_.end(); ++hint)
     216        for (QuestHint* hint : this->hints_)
    217217        {
    218218            if(i == 0) // We're counting down...
    219                return *hint;
     219               return hint;
    220220
    221221            i--;
    222222        }
    223         return NULL; // If the index is greater than the number of elements in the list.
     223        return nullptr; // If the index is greater than the number of elements in the list.
    224224    }
    225225
     
    230230        The index.
    231231    @return
    232         Returns a pointer to the fail QuestEffect at the given index. NULL if there is no element at the given index.
     232        Returns a pointer to the fail QuestEffect at the given index. nullptr if there is no element at the given index.
    233233    */
    234234    const QuestEffect* Quest::getFailEffect(unsigned int index) const
     
    237237
    238238        // Iterate through all fail QuestEffects.
    239         for (std::list<QuestEffect*>::const_iterator effect = this->failEffects_.begin(); effect != this->failEffects_.end(); ++effect)
     239        for (QuestEffect* effect : this->failEffects_)
    240240        {
    241241            if(i == 0) // We're counting down...
    242                return *effect;
     242               return effect;
    243243
    244244            i--;
    245245        }
    246         return NULL; // If the index is greater than the number of elements in the list.
     246        return nullptr; // If the index is greater than the number of elements in the list.
    247247    }
    248248
     
    253253        The index.
    254254    @return
    255         Returns a pointer to the complete QuestEffect at the given index. NULL if there is no element at the given index.
     255        Returns a pointer to the complete QuestEffect at the given index. nullptr if there is no element at the given index.
    256256    */
    257257    const QuestEffect* Quest::getCompleteEffect(unsigned int index) const
     
    260260
    261261        // Iterate through all complete QuestEffects.
    262         for (std::list<QuestEffect*>::const_iterator effect = this->completeEffects_.begin(); effect != this->completeEffects_.end(); ++effect)
     262        for (QuestEffect* effect : this->completeEffects_)
    263263        {
    264264            if(i == 0) // We're counting down...
    265                return *effect;
     265               return effect;
    266266
    267267            i--;
    268268        }
    269         return NULL; // If the index is greater than the number of elements in the list.
     269        return nullptr; // If the index is greater than the number of elements in the list.
    270270    }
    271271
     
    280280    bool Quest::isInactive(const PlayerInfo* player) const
    281281    {
    282         if(player == NULL)
     282        if(player == nullptr)
    283283            return true;
    284284        return this->getStatus(player) == QuestStatus::Inactive;
     
    295295    bool Quest::isActive(const PlayerInfo* player) const
    296296    {
    297         if(player == NULL)
     297        if(player == nullptr)
    298298            return false;
    299299        return this->getStatus(player) == QuestStatus::Active;
     
    310310    bool Quest::isFailed(const PlayerInfo* player) const
    311311    {
    312         if(player == NULL)
     312        if(player == nullptr)
    313313            return false;
    314314        return this->getStatus(player) == QuestStatus::Failed;
     
    325325    bool Quest::isCompleted(const PlayerInfo* player) const
    326326    {
    327         if(player == NULL)
     327        if(player == nullptr)
    328328            return false;
    329329        return this->getStatus(player) == QuestStatus::Completed;
  • code/branches/cpp11_v3/src/modules/questsystem/Quest.h

    r9667 r11054  
    8585            virtual ~Quest();
    8686
    87             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Quest object through XML.
     87            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a Quest object through XML.
    8888
    8989            /**
  • code/branches/cpp11_v3/src/modules/questsystem/QuestDescription.h

    r9667 r11054  
    6767            virtual ~QuestDescription();
    6868
    69             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestDescription object through XML.
     69            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a QuestDescription object through XML.
    7070
    7171// tolua_begin
  • code/branches/cpp11_v3/src/modules/questsystem/QuestEffect.cc

    r10624 r11054  
    7474        orxout(verbose, context::quests) << "Invoking QuestEffects on player: " << player << " ."  << endl;
    7575
    76         for (std::list<QuestEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
    77             temp = temp && (*effect)->invoke(player);
     76        for (QuestEffect* effect : effects)
     77            temp = temp && effect->invoke(player);
    7878
    7979        return temp;
  • code/branches/cpp11_v3/src/modules/questsystem/QuestEffectBeacon.cc

    r9667 r11054  
    113113
    114114        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
    115         PlayerInfo* player = NULL;
     115        PlayerInfo* player = nullptr;
    116116
    117117        // If the trigger is a PlayerTrigger.
    118         if(pTrigger != NULL)
     118        if(pTrigger != nullptr)
    119119        {
    120120            if(!pTrigger->isForPlayer())  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
     
    126126            return false;
    127127
    128         if(player == NULL)
     128        if(player == nullptr)
    129129        {
    130130            orxout(verbose, context::quests) << "The QuestEffectBeacon was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << endl;
     
    236236    {
    237237        int i = index;
    238         for (std::list<QuestEffect*>::const_iterator effect = this->effects_.begin(); effect != this->effects_.end(); ++effect)
     238        for (QuestEffect* effect : this->effects_)
    239239        {
    240240            if(i == 0)
    241                return *effect;
     241               return effect;
    242242
    243243            i--;
    244244        }
    245         return NULL;
     245        return nullptr;
    246246    }
    247247
  • code/branches/cpp11_v3/src/modules/questsystem/QuestEffectBeacon.h

    r9667 r11054  
    9696            virtual ~QuestEffectBeacon();
    9797
    98             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestEffectBeacon object through XML.
    99             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
     98            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a QuestEffectBeacon object through XML.
     99            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    100100
    101101            bool execute(bool bTriggered, BaseObject* trigger); //!< Executes the QuestEffects of the QuestEffectBeacon.
  • code/branches/cpp11_v3/src/modules/questsystem/QuestHint.cc

    r9667 r11054  
    8888    bool QuestHint::isActive(const PlayerInfo* player) const
    8989    {
    90         if(player == NULL) // If the player is NULL, the Quest obviously can't be active.
     90        if(player == nullptr) // If the player is nullptr, the Quest obviously can't be active.
    9191            return false;
    9292
  • code/branches/cpp11_v3/src/modules/questsystem/QuestHint.h

    r9667 r11054  
    8585            virtual ~QuestHint();
    8686
    87             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestHint object through XML.
     87            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a QuestHint object through XML.
    8888
    8989            bool isActive(const PlayerInfo* player) const; //!< Returns true if the QuestHint is active for the input player.
  • code/branches/cpp11_v3/src/modules/questsystem/QuestItem.h

    r9667 r11054  
    6363            virtual ~QuestItem();
    6464
    65             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestItem object through XML.
     65            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a QuestItem object through XML.
    6666
    6767            /**
  • code/branches/cpp11_v3/src/modules/questsystem/QuestListener.cc

    r9667 r11054  
    5959
    6060        this->mode_ = QuestListenerMode::All;
    61         this->quest_ = NULL;
     61        this->quest_ = nullptr;
    6262    }
    6363
     
    8181        XMLPortParam(QuestListener, "mode", setMode, getMode, xmlelement, mode);
    8282
    83         if(this->quest_ != NULL)
     83        if(this->quest_ != nullptr)
    8484            this->quest_->addListener(this); // Adds the QuestListener to the Quests list of listeners.
    8585
     
    9797    /* static */ void QuestListener::advertiseStatusChange(std::list<QuestListener*> & listeners, const std::string & status)
    9898    {
    99         for (std::list<QuestListener*>::iterator it = listeners.begin(); it != listeners.end(); ++it) // Iterate through all QuestListeners
    100         {
    101             QuestListener* listener = *it;
     99        for (QuestListener* listener : listeners) // Iterate through all QuestListeners
     100        {
    102101            if(listener->getMode() == status || listener->getMode() == QuestListener::ALL) // Check whether the status change affects the give QuestListener.
    103102                listener->execute();
     
    117116        this->quest_ = QuestManager::getInstance().findQuest(id); // Find the Quest corresponding to the given questId.
    118117
    119         if(this->quest_ == NULL) // If there is no such Quest.
     118        if(this->quest_ == nullptr) // If there is no such Quest.
    120119        {
    121120            ThrowException(Argument, "This is bad! The QuestListener has not found a Quest with a corresponding id..");
  • code/branches/cpp11_v3/src/modules/questsystem/QuestListener.h

    r9667 r11054  
    9090            virtual ~QuestListener();
    9191
    92             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestListener object through XML.
     92            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a QuestListener object through XML.
    9393
    9494            static void advertiseStatusChange(std::list<QuestListener*> & listeners, const std::string & status); //!< Makes all QuestListener in the list aware that a certain status change has occured.
  • code/branches/cpp11_v3/src/modules/questsystem/QuestManager.cc

    r10624 r11054  
    9393    bool QuestManager::registerQuest(Quest* quest)
    9494    {
    95         if(quest == NULL)
    96         {
    97             orxout(internal_error, context::quests) << "Quest pointer is NULL." << endl;
     95        if(quest == nullptr)
     96        {
     97            orxout(internal_error, context::quests) << "Quest pointer is nullptr." << endl;
    9898            return false;
    9999        }
     
    135135    bool QuestManager::registerHint(QuestHint* hint)
    136136    {
    137         if(hint == NULL)
    138         {
    139             orxout(internal_error, context::quests) << "Quest pointer is NULL." << endl;
     137        if(hint == nullptr)
     138        {
     139            orxout(internal_error, context::quests) << "Quest pointer is nullptr." << endl;
    140140            return false;
    141141        }
     
    173173    @return
    174174        Returns a pointer to the Quest with the input id.
    175         Returns NULL if there is no Quest with the given questId.
     175        Returns nullptr if there is no Quest with the given questId.
    176176    @throws
    177177        Throws an exception if the given questId is invalid.
     
    188188        else
    189189        {
    190            quest = NULL;
     190           quest = nullptr;
    191191           orxout(internal_warning, context::quests) << "The quest with id {" << questId << "} is nowhere to be found." << endl;
    192192        }
     
    202202    @return
    203203        Returns a pointer to the QuestHint with the input id.
    204         Returns NULL if there is no QuestHint with the given hintId.
     204        Returns nullptr if there is no QuestHint with the given hintId.
    205205    @throws
    206206        Throws an exception if the given hintId is invalid.
     
    217217        else
    218218        {
    219            hint = NULL;
     219           hint = nullptr;
    220220           orxout(internal_warning, context::quests) << "The hint with id {" << hintId << "} is nowhere to be found." << endl;
    221221        }
     
    235235    {
    236236        int numQuests = 0;
    237         for(std::map<std::string, Quest*>::iterator it = this->questMap_.begin(); it != this->questMap_.end(); it++)
    238         {
    239             if(it->second->getParentQuest() == NULL && !it->second->isInactive(player))
     237        for(const auto& mapEntry : this->questMap_)
     238        {
     239            if(mapEntry.second->getParentQuest() == nullptr && !mapEntry.second->isInactive(player))
    240240                numQuests++;
    241241        }
     
    255255    Quest* QuestManager::getRootQuest(PlayerInfo* player, int index)
    256256    {
    257         for(std::map<std::string, Quest*>::iterator it = this->questMap_.begin(); it != this->questMap_.end(); it++)
    258         {
    259             if(it->second->getParentQuest() == NULL && !it->second->isInactive(player) && index-- == 0)
    260                 return it->second;
    261         }
    262         return NULL;
     257        for(const auto& mapEntry : this->questMap_)
     258        {
     259            if(mapEntry.second->getParentQuest() == nullptr && !mapEntry.second->isInactive(player) && index-- == 0)
     260                return mapEntry.second;
     261        }
     262        return nullptr;
    263263    }
    264264
     
    275275    int QuestManager::getNumSubQuests(Quest* quest, PlayerInfo* player)
    276276    {
    277         if(quest == NULL)
     277        if(quest == nullptr)
    278278            return this->getNumRootQuests(player);
    279279
    280280        std::list<Quest*> quests = quest->getSubQuestList();
    281281        int numQuests = 0;
    282         for(std::list<Quest*>::iterator it = quests.begin(); it != quests.end(); it++)
    283         {
    284             if(!(*it)->isInactive(player))
     282        for(Quest* subquest : quests)
     283        {
     284            if(!subquest->isInactive(player))
    285285                numQuests++;
    286286        }
     
    300300    Quest* QuestManager::getSubQuest(Quest* quest, PlayerInfo* player, int index)
    301301    {
    302         if(quest == NULL)
     302        if(quest == nullptr)
    303303            return this->getRootQuest(player, index);
    304304
    305305        std::list<Quest*> quests = quest->getSubQuestList();
    306         for(std::list<Quest*>::iterator it = quests.begin(); it != quests.end(); it++)
    307         {
    308             if(!(*it)->isInactive(player) && index-- == 0)
    309                 return *it;
    310         }
    311         return NULL;
     306        for(Quest* subquest : quests)
     307        {
     308            if(!subquest->isInactive(player) && index-- == 0)
     309                return quest;
     310        }
     311        return nullptr;
    312312    }
    313313
     
    326326        std::list<QuestHint*> hints = quest->getHintsList();
    327327        int numHints = 0;
    328         for(std::list<QuestHint*>::iterator it = hints.begin(); it != hints.end(); it++)
    329         {
    330             if((*it)->isActive(player))
     328        for(QuestHint* hint : hints)
     329        {
     330            if(hint->isActive(player))
    331331                numHints++;
    332332        }
     
    349349    {
    350350        std::list<QuestHint*> hints = quest->getHintsList();
    351         for(std::list<QuestHint*>::iterator it = hints.begin(); it != hints.end(); it++)
    352         {
    353             if((*it)->isActive(player) && index-- == 0)
    354                 return *it;
    355         }
    356         return NULL;
     351        for(QuestHint* hint : hints)
     352        {
     353            if(hint->isActive(player) && index-- == 0)
     354                return hint;
     355        }
     356        return nullptr;
    357357    }
    358358
     
    367367    Quest* QuestManager::getParentQuest(Quest* quest)
    368368    {
    369         OrxAssert(quest, "The input Quest is NULL.");
     369        OrxAssert(quest, "The input Quest is nullptr.");
    370370        return quest->getParentQuest();
    371371    }
     
    381381    QuestDescription* QuestManager::getDescription(Quest* item)
    382382    {
    383         OrxAssert(item, "The input Quest is NULL.");
     383        OrxAssert(item, "The input Quest is nullptr.");
    384384        return item->getDescription();
    385385    }
     
    395395    QuestDescription* QuestManager::getDescription(QuestHint* item)
    396396    {
    397         OrxAssert(item, "The input QuestHint is NULL.");
     397        OrxAssert(item, "The input QuestHint is nullptr.");
    398398        return item->getDescription();
    399399    }
     
    409409    const std::string QuestManager::getId(Quest* item) const
    410410    {
    411         OrxAssert(item, "The input Quest is NULL.");
     411        OrxAssert(item, "The input Quest is nullptr.");
    412412        return item->getId();
    413413    }
     
    423423    const std::string QuestManager::getId(QuestHint* item) const
    424424    {
    425         OrxAssert(item, "The input QuestHint is NULL.");
     425        OrxAssert(item, "The input QuestHint is nullptr.");
    426426        return item->getId();
    427427    }
     
    440440    {
    441441        PlayerInfo* player = GUIManager::getInstance().getPlayer(guiName);
    442         if(player == NULL)
     442        if(player == nullptr)
    443443        {
    444444            orxout(internal_error, context::quests) << "GUIOverlay with name '" << guiName << "' has no player." << endl;
    445             return NULL;
     445            return nullptr;
    446446        }
    447447
  • code/branches/cpp11_v3/src/modules/questsystem/effects/AddQuest.cc

    r9667 r11054  
    9090        {
    9191            Quest* quest = QuestManager::getInstance().findQuest(this->getQuestId());
    92             if(quest == NULL || !quest->start(player))
     92            if(quest == nullptr || !quest->start(player))
    9393               return false;
    9494        }
  • code/branches/cpp11_v3/src/modules/questsystem/effects/AddQuest.h

    r9667 r11054  
    6262        virtual ~AddQuest();
    6363
    64         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddQuest object through XML.
     64        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a AddQuest object through XML.
    6565
    66         virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
     66        virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect.
    6767
    6868    };
  • code/branches/cpp11_v3/src/modules/questsystem/effects/AddQuestHint.cc

    r9667 r11054  
    113113        {
    114114            QuestHint* hint = QuestManager::getInstance().findHint(this->hintId_);
    115             if(hint == NULL || !hint->setActive(player))
     115            if(hint == nullptr || !hint->setActive(player))
    116116                return false;
    117117        }
  • code/branches/cpp11_v3/src/modules/questsystem/effects/AddQuestHint.h

    r9667 r11054  
    6464            virtual ~AddQuestHint();
    6565
    66             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddQuestHint object through XML.
     66            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a AddQuestHint object through XML.
    6767
    68             virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
     68            virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect.
    6969
    7070        private:
  • code/branches/cpp11_v3/src/modules/questsystem/effects/AddReward.cc

    r9667 r11054  
    8484    {
    8585        int i = index;
    86         for (std::list<Rewardable*>::const_iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward)
     86        for (Rewardable* reward : this->rewards_)
    8787        {
    8888            if(i == 0)
    89                return *reward;
     89               return reward;
    9090            i--;
    9191        }
    92         return NULL;
     92        return nullptr;
    9393    }
    9494
     
    106106
    107107        bool temp = true;
    108         for ( std::list<Rewardable*>::iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward )
    109             temp = temp && (*reward)->reward(player);
     108        for (Rewardable* reward : this->rewards_)
     109            temp = temp && reward->reward(player);
    110110
    111111        orxout(verbose, context::quests) << "Rewardable successfully added to player." << player << " ." << endl;
  • code/branches/cpp11_v3/src/modules/questsystem/effects/AddReward.h

    r9667 r11054  
    6868            virtual ~AddReward();
    6969
    70             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddReward object through XML.
     70            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a AddReward object through XML.
    7171
    72             virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
     72            virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect.
    7373
    7474        private:
  • code/branches/cpp11_v3/src/modules/questsystem/effects/ChangeQuestStatus.h

    r9667 r11054  
    5959            virtual ~ChangeQuestStatus();
    6060
    61             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a ChangeQuestStatus object through XML.
     61            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a ChangeQuestStatus object through XML.
    6262
    6363            virtual bool invoke(PlayerInfo* player) = 0; //!< Invokes the QuestEffect.
  • code/branches/cpp11_v3/src/modules/questsystem/effects/CompleteQuest.cc

    r9667 r11054  
    9292        {
    9393            quest = QuestManager::getInstance().findQuest(this->getQuestId());
    94             if(quest == NULL || !quest->complete(player))
     94            if(quest == nullptr || !quest->complete(player))
    9595               return false;
    9696        }
  • code/branches/cpp11_v3/src/modules/questsystem/effects/CompleteQuest.h

    r9667 r11054  
    6262            virtual ~CompleteQuest();
    6363
    64             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a CompleteQuest object through XML.
     64            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a CompleteQuest object through XML.
    6565
    66             virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
     66            virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect.
    6767
    6868    };
  • code/branches/cpp11_v3/src/modules/questsystem/effects/FailQuest.cc

    r9667 r11054  
    9191        {
    9292            quest = QuestManager::getInstance().findQuest(this->getQuestId());
    93             if(quest == NULL || !quest->fail(player))
     93            if(quest == nullptr || !quest->fail(player))
    9494               return false;
    9595        }
  • code/branches/cpp11_v3/src/modules/questsystem/effects/FailQuest.h

    r9667 r11054  
    6262            virtual ~FailQuest();
    6363
    64             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a FailQuest object through XML.
     64            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a FailQuest object through XML.
    6565
    66             virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
     66            virtual bool invoke(PlayerInfo* player) override; //!< Invokes the QuestEffect.
    6767
    6868    };
  • code/branches/cpp11_v3/src/modules/tetris/Tetris.cc

    r10624 r11054  
    6666        RegisterObject(Tetris);
    6767
    68         this->activeBrick_ = 0;
     68        this->activeBrick_ = nullptr;
    6969
    7070        // Pre-set the timer, but don't start it yet.
     
    7272        this->starttimer_.stopTimer();
    7373
    74         this->player_ = NULL;
     74        this->player_ = nullptr;
    7575        this->setHUDTemplate("TetrisHUD");
    76         this->futureBrick_ = 0;
     76        this->futureBrick_ = nullptr;
    7777    }
    7878
     
    9696        {
    9797            this->activeBrick_->destroy();
    98             this->activeBrick_ = 0;
     98            this->activeBrick_ = nullptr;
    9999        }
    100100        if (this->futureBrick_)
    101101        {
    102102            this->futureBrick_->destroy();
    103             this->futureBrick_ = 0;
    104         }
    105 
    106         for (std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
    107             (*it)->destroy();
     103            this->futureBrick_ = nullptr;
     104        }
     105
     106        for (TetrisStone* stone : this->stones_)
     107            stone->destroy();
    108108        this->stones_.clear();
    109109    }
     
    113113        SUPER(Tetris, tick, dt);
    114114
    115         if((this->activeBrick_ != NULL)&&(!this->hasEnded()))
     115        if((this->activeBrick_ != nullptr)&&(!this->hasEnded()))
    116116        {
    117117            if(!this->isValidBrickPosition(this->activeBrick_))
     
    136136            return false;
    137137
    138         for(std::list<StrongPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
    139         {
    140             const Vector3& currentStonePosition = (*it)->getPosition(); //!< Saves the position of the currentStone
     138        for(TetrisStone* someStone : this->stones_)
     139        {
     140            const Vector3& currentStonePosition = someStone->getPosition(); //!< Saves the position of the currentStone
    141141
    142142            if((position.x == currentStonePosition.x) && abs(position.y-currentStonePosition.y) < this->center_->getStoneSize())
     
    192192
    193193        // check for collisions with all stones
    194         for(std::list<StrongPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
     194        for(TetrisStone* someStone : this->stones_)
    195195        {
    196196            //Vector3 currentStonePosition = rotateVector((*it)->getPosition(), this->activeBrick_->getRotationCount());
    197             const Vector3& currentStonePosition = (*it)->getPosition(); //!< Saves the position of the currentStone
     197            const Vector3& currentStonePosition = someStone->getPosition(); //!< Saves the position of the currentStone
    198198
    199199            //filter out cases where the falling stone is already below a steady stone
     
    290290    void Tetris::start()
    291291    {
    292         if (this->center_ != NULL) // There needs to be a TetrisCenterpoint, i.e. the area the game takes place.
     292        if (this->center_ != nullptr) // There needs to be a TetrisCenterpoint, i.e. the area the game takes place.
    293293        {
    294294            // Create the first brick.
     
    323323    {
    324324        this->activeBrick_->setVelocity(Vector3::ZERO);
    325         if(this->activeBrick_ != NULL)
     325        if(this->activeBrick_ != nullptr)
    326326        {
    327327            this->player_->stopControl();
     
    341341    {
    342342        // Spawn a human player.
    343         for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
    344             if (it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
    345                 this->spawnPlayer(it->first);
     343        for (const auto& mapEntry : this->players_)
     344            if (mapEntry.first->isHumanPlayer() && (mapEntry.first->isReadyToSpawn() || this->bForceSpawn_))
     345                this->spawnPlayer(mapEntry.first);
    346346    }
    347347   
     
    351351        if(player && player->isHumanPlayer())
    352352        {
    353             if(this->activeBrick_ != NULL)
     353            if(this->activeBrick_ != nullptr)
    354354            {
    355355                this->player_->stopControl();
     
    370370        assert(player);
    371371
    372         if(this->player_ == NULL)
     372        if(this->player_ == nullptr)
    373373        {
    374374            this->player_ = player;
     
    381381    void Tetris::startBrick(void)
    382382    {
    383         if(this->player_ == NULL)
     383        if(this->player_ == nullptr)
    384384            return;
    385385
    386386        unsigned int cameraIndex = 0;
    387         if(this->activeBrick_ != NULL)
     387        if(this->activeBrick_ != nullptr)
    388388        {
    389389            // Get camera settings
     
    396396        // Make the last brick to be created the active brick.
    397397        this->activeBrick_ = this->futureBrick_;
    398         this->futureBrick_ = 0;
     398        this->futureBrick_ = nullptr;
    399399
    400400        // set its position
     
    437437        Get the player.
    438438    @return
    439         Returns a pointer to the player. If there is no player, NULL is returned.
     439        Returns a pointer to the player. If there is no player, nullptr is returned.
    440440    */
    441441    PlayerInfo* Tetris::getPlayer(void) const
     
    469469        {
    470470            stonesPerRow = 0;
    471             for(std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); )
    472             {
    473                 std::list<StrongPtr<TetrisStone> >::iterator it_temp = it++;
     471            for(std::list<StrongPtr<TetrisStone>>::iterator it = this->stones_.begin(); it != this->stones_.end(); )
     472            {
     473                std::list<StrongPtr<TetrisStone>>::iterator it_temp = it++;
    474474                correctPosition = static_cast<unsigned int>(((*it_temp)->getPosition().y - 5)/this->center_->getStoneSize());
    475475                if(correctPosition == row)
     
    491491    void Tetris::clearRow(unsigned int row)
    492492    {// clear the full row
    493         for(std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); )
     493        for(std::list<StrongPtr<TetrisStone>>::iterator it = this->stones_.begin(); it != this->stones_.end(); )
    494494        {
    495495            if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) == row)
     
    502502        }
    503503      // adjust height of stones above the deleted row //TODO: check if this could be a source of a bug.
    504         for(std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)
    505         {
    506             if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) > row)
    507                 (*it)->setPosition((*it)->getPosition()-Vector3(0,10,0));
     504        for(TetrisStone* stone : this->stones_)
     505        {
     506            if(static_cast<unsigned int>((stone->getPosition().y - 5)/this->center_->getStoneSize()) > row)
     507                stone->setPosition(stone->getPosition()-Vector3(0,10,0));
    508508        }
    509509
  • code/branches/cpp11_v3/src/modules/tetris/Tetris.h

    r10624 r11054  
    5858            virtual ~Tetris(); //!< Destructor. Cleans up, if initialized.
    5959
    60             virtual void start(void); //!< Starts the Tetris minigame.
    61             virtual void end(void); ///!< Ends the Tetris minigame.
     60            virtual void start(void) override; //!< Starts the Tetris minigame.
     61            virtual void end(void) override; ///!< Ends the Tetris minigame.
    6262
    63             virtual void tick(float dt);
     63            virtual void tick(float dt) override;
    6464
    65             virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
    66             virtual bool playerLeft(PlayerInfo* player);
     65            virtual void spawnPlayer(PlayerInfo* player) override; //!< Spawns the input player.
     66            virtual bool playerLeft(PlayerInfo* player) override;
    6767
    6868            void setCenterpoint(TetrisCenterpoint* center);
     
    7777
    7878        protected:
    79             virtual void spawnPlayersIfRequested(); //!< Spawns player.
     79            virtual void spawnPlayersIfRequested() override; //!< Spawns player.
    8080
    8181
     
    9393
    9494            WeakPtr<TetrisCenterpoint> center_; //!< The playing field.
    95             std::list<StrongPtr<TetrisStone> > stones_; //!< A list of all stones in play.
     95            std::list<StrongPtr<TetrisStone>> stones_; //!< A list of all stones in play.
    9696            WeakPtr<TetrisBrick> activeBrick_;
    9797            WeakPtr<TetrisBrick> futureBrick_;
  • code/branches/cpp11_v3/src/modules/tetris/TetrisBrick.cc

    r10624 r11054  
    8181            this->attach(stone);
    8282            this->formBrick(stone, i);
    83             if(this->tetris_ != NULL)
     83            if(this->tetris_ != nullptr)
    8484            {
    8585                stone->setGame(this->tetris_);
    86                 if(this->tetris_->getCenterpoint() != NULL)
     86                if(this->tetris_->getCenterpoint() != nullptr)
    8787                    stone->addTemplate(this->tetris_->getCenterpoint()->getStoneTemplate());
    8888                else
    89                     orxout()<< "tetris_->getCenterpoint == NULL in TetrisBrick.cc"<< endl;
     89                    orxout()<< "tetris_->getCenterpoint == nullptr in TetrisBrick.cc"<< endl;
    9090            }
    9191            else
    92                 orxout()<< "tetris_ == NULL in TetrisBrick.cc"<< endl;
     92                orxout()<< "tetris_ == nullptr in TetrisBrick.cc"<< endl;
    9393        }
    9494    }
     
    161161        if(i < this->brickStones_.size())
    162162            return this->brickStones_[i];
    163         else return NULL;
     163        else return nullptr;
    164164    }
    165165
     
    167167    Tetris* TetrisBrick::getTetris()
    168168    {
    169         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
     169        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Tetris)))
    170170        {
    171171            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
    172172            return tetrisGametype;
    173173        }
    174         return NULL;
     174        return nullptr;
    175175    }
    176176
     
    239239    {
    240240        assert(this->tetris_);
    241         for(unsigned int i = 0; i < this->brickStones_.size(); i++)
    242         {
    243             this->brickStones_[i]->detachFromParent();
    244             this->brickStones_[i]->attachToParent(center);
    245             this->brickStones_[i]->setPosition(this->getPosition()+this->tetris_->rotateVector(this->brickStones_[i]->getPosition(),this->rotationCount_ ));
     241        for(TetrisStone* stone : this->brickStones_)
     242        {
     243            stone->detachFromParent();
     244            stone->attachToParent(center);
     245            stone->setPosition(this->getPosition()+this->tetris_->rotateVector(stone->getPosition(),this->rotationCount_ ));
    246246        }
    247247        this->brickStones_.clear();
  • code/branches/cpp11_v3/src/modules/tetris/TetrisBrick.h

    r10262 r11054  
    5757            virtual ~TetrisBrick() {}
    5858
    59             virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    60             virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    61             virtual void changedPlayer(); //!< Is called when the player changed.
     59            virtual void moveFrontBack(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
     60            virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
     61            virtual void changedPlayer() override; //!< Is called when the player changed.
    6262
    6363            bool isValidMove(const Vector3& position, bool isRotation);
  • code/branches/cpp11_v3/src/modules/tetris/TetrisCenterpoint.cc

    r10624 r11054  
    8484    void TetrisCenterpoint::checkGametype()
    8585    {
    86         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
     86        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Tetris)))
    8787        {
    8888            Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
  • code/branches/cpp11_v3/src/modules/tetris/TetrisCenterpoint.h

    r10624 r11054  
    6262            virtual ~TetrisCenterpoint() {}
    6363
    64             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a TetrisCenterpoint through XML.
     64            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a TetrisCenterpoint through XML.
    6565
    6666            /**
  • code/branches/cpp11_v3/src/modules/tetris/TetrisScore.cc

    r10624 r11054  
    5656        RegisterObject(TetrisScore);
    5757
    58         this->owner_ = 0;
    59         this->player_ = NULL;
     58        this->owner_ = nullptr;
     59        this->player_ = nullptr;
    6060    }
    6161
     
    8989
    9090        // If the owner is set. The owner being a Tetris game.
    91         if (this->owner_ != NULL)
     91        if (this->owner_ != nullptr)
    9292        {
    9393            std::string score("0");
     
    101101            {
    102102                // Save the name and score of each player as a string.
    103                 if (player_ != NULL)
     103                if (player_ != nullptr)
    104104                    score = multi_cast<std::string>(this->owner_->getScore(player_));
    105105            }
     
    111111    @brief
    112112        Is called when the owner changes.
    113         Sets the owner to NULL, if it is not a pointer to a Tetris game.
     113        Sets the owner to nullptr, if it is not a pointer to a Tetris game.
    114114    */
    115115    void TetrisScore::changedOwner()
     
    117117        SUPER(TetrisScore, changedOwner);
    118118
    119         if (this->getOwner() != NULL && this->getOwner()->getGametype())
     119        if (this->getOwner() != nullptr && this->getOwner()->getGametype())
    120120            this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype());
    121121        else
    122             this->owner_ = 0;
     122            this->owner_ = nullptr;
    123123    }
    124124}
  • code/branches/cpp11_v3/src/modules/tetris/TetrisScore.h

    r10262 r11054  
    6060            virtual ~TetrisScore();
    6161
    62             virtual void tick(float dt); //!< Creates and sets the caption to be displayed by the TetrisScore.
    63             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    64             virtual void changedOwner(); //!< Is called when the owner changes.
     62            virtual void tick(float dt) override; //!< Creates and sets the caption to be displayed by the TetrisScore.
     63            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     64            virtual void changedOwner() override; //!< Is called when the owner changes.
    6565
    6666        private:
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefense.cc

    r10727 r11054  
    9090        RegisterObject(TowerDefense);
    9191
    92         selecter = NULL;
    93         this->player_ = NULL;       
     92        selecter = nullptr;
     93        this->player_ = nullptr;
    9494        this->setHUDTemplate("TowerDefenseHUD");
    9595        this->waveNumber_ = 0;
     
    117117    void TowerDefense::start()
    118118    {       
    119         if (center_ != NULL) // There needs to be a TowerDefenseCenterpoint, i.e. the area the game takes place.
    120         {
    121             if (selecter == NULL)
     119        if (center_ != nullptr) // There needs to be a TowerDefenseCenterpoint, i.e. the area the game takes place.
     120        {
     121            if (selecter == nullptr)
    122122            {
    123123                selecter = new TowerDefenseSelecter(this->center_->getContext());               
     
    176176        WaypointController* controller = (WaypointController*)(en1->getXMLController());
    177177
    178         if (controller != NULL && waypoints_.size() > 1)
     178        if (controller != nullptr && waypoints_.size() > 1)
    179179        {
    180180            en1->setPosition(waypoints_.at(0)->getPosition() + offset_);
     
    183183            en1->lookAt(waypoints_.at(1)->getPosition() + offset_);
    184184
    185             for (unsigned int i = 0; i < waypoints_.size(); ++ i)
     185            for (TowerDefenseField* field : waypoints_)
    186186            {
    187187                orxonox::WeakPtr<MovableEntity> waypoint = new MovableEntity(this->center_->getContext());
    188                 waypoint->setPosition(waypoints_.at(i)->getPosition() + offset_);
     188                waypoint->setPosition(field->getPosition() + offset_);
    189189                controller->addWaypoint(waypoint);
    190190            }
     
    208208        player_ = player;
    209209
    210         if (selecter->getPlayer() == NULL)
     210        if (selecter->getPlayer() == nullptr)
    211211        {
    212212            player_->startControl(selecter);
     
    219219        Get the player.
    220220    @return
    221         Returns a pointer to the player. If there is no player, NULL is returned.
     221        Returns a pointer to the player. If there is no player, nullptr is returned.
    222222    */
    223223    PlayerInfo* TowerDefense::getPlayer(void) const
     
    265265        SUPER(TowerDefense, tick, dt);
    266266
    267         if (hasStarted() == false || player_ == NULL)
     267        if (hasStarted() == false || player_ == nullptr)
    268268        {
    269269            return;
     
    273273
    274274        //build/upgrade tower at selecter position
    275         if (selecter != NULL && selecter->buildTower_ == true)
     275        if (selecter != nullptr && selecter->buildTower_ == true)
    276276        {
    277277            selecter->buildTower_ = false;
     
    287287        }
    288288       
    289         for (std::list<WeakPtr<TowerDefenseEnemy> >::iterator it = enemies_.begin(); it != enemies_.end(); )
    290         {
    291             if (*it == NULL)
     289        for (std::list<WeakPtr<TowerDefenseEnemy>>::iterator it = enemies_.begin(); it != enemies_.end(); )
     290        {
     291            if (*it == nullptr)
    292292            {
    293293                // the enemy was destroyed by a tower - remove it from the list
     
    365365        TDCoordinate* thisCoord = &startCoord;
    366366        TDCoordinate* nextCoord;
    367         while ((nextCoord = getNextStreetCoord(thisCoord)) != NULL)
     367        while ((nextCoord = getNextStreetCoord(thisCoord)) != nullptr)
    368368        {
    369369            waypoints_.push_back(fields_[nextCoord->GetX()][nextCoord->GetY()]);           
     
    381381        if (thisField->getType() != STREET && thisField->getType() != START)
    382382        {
    383             return NULL;
     383            return nullptr;
    384384        }
    385385
     
    406406        }
    407407
    408         return NULL;
     408        return nullptr;
    409409    }
    410410}
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefense.h

    r10629 r11054  
    5353        virtual ~TowerDefense();       
    5454        void addTowerDefenseEnemy(int templatenr);
    55         virtual void start(); //<! The function is called when the gametype starts
    56         virtual void end();
    57         virtual void tick(float dt);
    58         virtual void spawnPlayer(PlayerInfo* player);
     55        virtual void start() override; //<! The function is called when the gametype starts
     56        virtual void end() override;
     57        virtual void tick(float dt) override;
     58        virtual void spawnPlayer(PlayerInfo* player) override;
    5959        PlayerInfo* getPlayer(void) const;
    6060        int getCredit(){ return this->credit_; }
     
    8787        int waveNumber_;
    8888        int lifes_;
    89         std::list<orxonox::WeakPtr<TowerDefenseEnemy> > enemies_;
     89        std::list<orxonox::WeakPtr<TowerDefenseEnemy>> enemies_;
    9090        TowerDefenseField* fields_[16][16];
    91         std::vector<orxonox::WeakPtr<TowerDefenseField> > waypoints_;
     91        std::vector<orxonox::WeakPtr<TowerDefenseField>> waypoints_;
    9292        Vector3 endpoint_;
    9393        Vector3 offset_;       
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseCenterpoint.cc

    r10629 r11054  
    9292    void TowerDefenseCenterpoint::checkGametype()
    9393    {
    94         if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
     94        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(TowerDefense)))
    9595        {
    9696            // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseCenterpoint.h

    r10629 r11054  
    5252            virtual ~TowerDefenseCenterpoint() {}
    5353
    54             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     54            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5555
    5656            /**
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseEnemy.cc

    r10629 r11054  
    4747    WeakPtr<TowerDefense> TowerDefenseEnemy::getGame()
    4848    {
    49         if (game == NULL)
     49        if (game == nullptr)
    5050        {
    51             for (ObjectList<TowerDefense>::iterator it = ObjectList<TowerDefense>::begin(); it != ObjectList<TowerDefense>::end(); ++it)
    52                 game = *it;
     51            for (TowerDefense* towerDefense : ObjectList<TowerDefense>())
     52                game = towerDefense;
    5353        }
    5454        return game;
    5555    }
    5656
    57     void TowerDefenseEnemy::damage(float damage, float healthdamage, float shielddamage, Pawn* originator)
     57    void TowerDefenseEnemy::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
    5858    {
    5959        Pawn::damage(damage, healthdamage, shielddamage, originator);
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseEnemy.h

    r10629 r11054  
    3737        //health gibt es unter: health_
    3838
    39         virtual void tick(float dt);
    40         virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator);
     39        virtual void tick(float dt) override;
     40        virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs) override;
    4141
    4242    private:
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseField.cc

    r11052 r11054  
    4949        RegisterObject(TowerDefenseField);
    5050
    51         tower_ = NULL;
     51        tower_ = nullptr;
    5252        type_ = FREE;
    53         center_ = NULL;
     53        center_ = nullptr;
    5454        upgrade_ = 0;
    5555        setPosition(0,0,0);                           
     
    119119    bool TowerDefenseField::canUpgrade()
    120120    {
    121         if (tower_ != NULL && upgrade_ < 5)
     121        if (tower_ != nullptr && upgrade_ < 5)
    122122        {
    123123            return true;
     
    129129    void TowerDefenseField::setAngle(int newAngle)
    130130    {
    131         if (modelGround_ != NULL)
     131        if (modelGround_ != nullptr)
    132132        {
    133133            switch (newAngle)
     
    152152        }
    153153
    154         if (modelObject_ != NULL)
     154        if (modelObject_ != nullptr)
    155155        {
    156156            switch (newAngle)
     
    185185    {           
    186186        modelGround_->setMeshSource("TD_F1.mesh");
    187         tower_ = NULL;
     187        tower_ = nullptr;
    188188        type_ = FREE;
    189189        setUpgrade(0);
     
    194194    {     
    195195        modelGround_->setMeshSource("TD_S5.mesh");
    196         tower_ = NULL;
     196        tower_ = nullptr;
    197197        type_ = START;
    198198        setUpgrade(0);
     
    204204    {     
    205205        modelGround_->setMeshSource("TD_S4.mesh");
    206         tower_ = NULL;
     206        tower_ = nullptr;
    207207        type_ = END;
    208208        setUpgrade(0);
     
    213213    {     
    214214        modelGround_->setMeshSource("TD_S1.mesh");
    215         tower_ = NULL;
     215        tower_ = nullptr;
    216216        type_ = STREET;
    217217        setUpgrade(0);
     
    222222    {     
    223223        modelGround_->setMeshSource("TD_S2.mesh");
    224         tower_ = NULL;
     224        tower_ = nullptr;
    225225        type_ = STREET;
    226226        setUpgrade(0);
     
    231231    {   
    232232        modelGround_->setMeshSource("TD_S3.mesh");
    233         tower_ = NULL;
     233        tower_ = nullptr;
    234234        type_ = STREET;
    235235        setUpgrade(0);
     
    241241        modelGround_->setMeshSource("TD_F1.mesh");
    242242        modelObject_->setMeshSource("TD_O1.mesh");
    243         tower_ = NULL;
     243        tower_ = nullptr;
    244244        type_ = OBSTACLE;
    245245        setUpgrade(0);
     
    249249    void TowerDefenseField::createTower(int upgrade)
    250250    {       
    251         if (tower_ == NULL)
     251        if (tower_ == nullptr)
    252252        {
    253253            modelGround_->setMeshSource("TD_F1.mesh");
     
    256256            type_ = TOWER;
    257257            setUpgrade(upgrade);
    258             if (upgrade_ > 0 && modelObject_ != NULL)
     258            if (upgrade_ > 0 && modelObject_ != nullptr)
    259259            {
    260260                switch (upgrade_)
     
    287287    void TowerDefenseField::destroyTower()
    288288    {
    289         if (tower_ != NULL)
     289        if (tower_ != nullptr)
    290290        {
    291291            tower_->destroy();
    292             tower_ = NULL;
     292            tower_ = nullptr;
    293293        }
    294294    }
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseField.h

    r11052 r11054  
    6262            TowerDefenseField(Context* context);
    6363            virtual ~TowerDefenseField() {}
    64             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     64            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    6565            const bool isFree() const
    6666                { return type_==FREE; }
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseHUDController.cc

    r10629 r11054  
    3939    {
    4040        RegisterObject(TowerDefenseHUDController);
    41         this->td = 0;
     41        this->td = nullptr;
    4242    }
    4343
     
    8989                    else
    9090                    {
    91                         this->td = 0;
     91                        this->td = nullptr;
    9292                    }
    9393                }
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseHUDController.h

    r10258 r11054  
    5353
    5454
    55         virtual void tick(float dt);
    56         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    57         virtual void changedOwner();
     55        virtual void tick(float dt) override;
     56        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     57        virtual void changedOwner() override;
    5858        void setShowlives(bool temp)
    5959            { this->showlives = temp; }
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseSelecter.h

    r10629 r11054  
    4141            TowerDefenseSelecter(Context* context); //!< Constructor. Registers and initializes the object.
    4242            virtual ~TowerDefenseSelecter();
    43             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);         
    44             virtual void tick(float dt);           
    45             virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    46             virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    47             virtual void rotateYaw(const Vector2& value);
    48             virtual void rotatePitch(const Vector2& value);
    49             virtual void rotateRoll(const Vector2& value);
     43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;         
     44            virtual void tick(float dt) override;           
     45            virtual void moveFrontBack(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
     46            virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
     47            virtual void rotateYaw(const Vector2& value) override;
     48            virtual void rotatePitch(const Vector2& value) override;
     49            virtual void rotateRoll(const Vector2& value) override;
    5050            void fire(unsigned int firemode);
    51             virtual void fired(unsigned int firemode);
    52             virtual void boost(bool bBoost);
     51            virtual void fired(unsigned int firemode) override;
     52            virtual void boost(bool bBoost) override;
    5353            virtual void setSelectedPosition(TDCoordinate* newPos);
    5454            virtual void setSelectedPosition(int x, int y);
  • code/branches/cpp11_v3/src/modules/towerdefense/TowerDefenseTower.cc

    r11052 r11054  
    2525    {
    2626        RegisterObject(TowerDefenseTower);
    27         game_ =NULL;
     27        game_ =nullptr;
    2828        this->setCollisionType(WorldEntity::None);
    2929        upgrade = 1;
  • code/branches/cpp11_v3/src/modules/weapons/IceGunFreezer.cc

    r11052 r11054  
    101101
    102102        // Check if the freezer is attached to a parent and check if the parent is a SpaceShip
    103         if (parent != NULL && parent->isA(Class(SpaceShip)))
     103        if (parent != nullptr && parent->isA(Class(SpaceShip)))
    104104        {
    105105            freezedSpaceShip_ = orxonox_cast<SpaceShip*>(parent);
     
    118118    void IceGunFreezer::stopFreezing()
    119119    {
    120         if (freezedSpaceShip_ != NULL && freezeFactor_ != 0.0)
     120        if (freezedSpaceShip_ != nullptr && freezeFactor_ != 0.0)
    121121        {
    122122            freezedSpaceShip_->addSpeedFactor(1/freezeFactor_);
  • code/branches/cpp11_v3/src/modules/weapons/IceGunFreezer.h

    r11052 r11054  
    5555            IceGunFreezer(Context* context);
    5656            virtual ~IceGunFreezer();
    57             virtual void tick(float dt);
     57            virtual void tick(float dt) override;
    5858            virtual void startFreezing();
    5959            virtual void stopFreezing();
  • code/branches/cpp11_v3/src/modules/weapons/RocketController.cc

    r10258 r11054  
    3838#include "projectiles/SimpleRocket.h"
    3939#include "weaponmodes/SimpleRocketFire.h"
     40#include "core/CoreIncludes.h"
    4041
    4142namespace orxonox
  • code/branches/cpp11_v3/src/modules/weapons/RocketController.h

    r9667 r11054  
    5555            virtual ~RocketController();
    5656
    57             virtual void tick(float dt);
     57            virtual void tick(float dt) override;
    5858            /**
    5959            @brief Get the rocket that is controlled by this controller.
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/BasicProjectile.cc

    r11052 r11054  
    8888                                    // The projectile is destroyed by its tick()-function (in the following tick).
    8989
    90             Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is NULL
     90            Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is nullptr
    9191
    9292            WorldEntity* entity = orxonox_cast<WorldEntity*>(this);
     
    146146    bool BasicProjectile::isObjectRelatedToShooter(WorldEntity* otherObject)
    147147    {
    148         for (WorldEntity* shooter = this->getShooter(); shooter != NULL; shooter = shooter->getParent())
     148        for (WorldEntity* shooter = this->getShooter(); shooter != nullptr; shooter = shooter->getParent())
    149149            if (otherObject == shooter)
    150150                return true;
    151         for (WorldEntity* object = otherObject; object != NULL; object = object->getParent())
     151        for (WorldEntity* object = otherObject; object != nullptr; object = object->getParent())
    152152            if (otherObject == this->getShooter())
    153153                return true;
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/BillboardProjectile.h

    r10629 r11054  
    6161            virtual void setMaterial(const std::string& material);
    6262            virtual const std::string& getMaterial();
    63             virtual void changedVisibility();
     63            virtual void changedVisibility() override;
    6464
    6565        private:
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/GravityBomb.h

    r10622 r11054  
    4141            GravityBomb(Context* context);
    4242            virtual ~GravityBomb();
    43             virtual void tick(float dt);
     43            virtual void tick(float dt) override;
    4444
    45             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
     45            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
    4646            void detonate();
    4747        private:
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/GravityBombField.cc

    r11052 r11054  
    125125
    126126            //Check if any pawn is inside the shockwave and hit it with dammage proportional to the distance between explosion centre and pawn. Make sure, the same pawn is damaged only once.
    127             for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
     127            for (Pawn* pawn : ObjectList<Pawn>())
    128128            {
    129                 Vector3 distanceVector = it->getWorldPosition()-this->getWorldPosition();
     129                Vector3 distanceVector = pawn->getWorldPosition()-this->getWorldPosition();
    130130                 //orxout(debug_output) << "Found Pawn:" << it->getWorldPosition() << endl;
    131131                if(distanceVector.length()< forceSphereRadius_)
    132132                {
    133133                    //orxout(debug_output) << "Force sphere radius is: " << forceSphereRadius_ << " Distance to Pawn is: " << distanceVector.length();
    134                     if (std::find(victimsAlreadyDamaged_.begin(),victimsAlreadyDamaged_.end(),*it) == victimsAlreadyDamaged_.end())
     134                    if (std::find(victimsAlreadyDamaged_.begin(),victimsAlreadyDamaged_.end(),pawn) == victimsAlreadyDamaged_.end())
    135135                    {
    136136                        //orxout(debug_output) << "Found Pawn to damage: " << it->getWorldPosition() << endl;
    137137                        float damage = FORCE_FIELD_EXPLOSION_DAMMAGE*(1-distanceVector.length()/EXPLOSION_RADIUS);
    138138                        //orxout(debug_output) << "Damage: " << damage << endl;
    139                         it->hit(shooter_, it->getWorldPosition(), NULL, damage, 0,0);
    140                         victimsAlreadyDamaged_.push_back(*it);
     139                        pawn->hit(shooter_, pawn->getWorldPosition(), nullptr, damage, 0,0);
     140                        victimsAlreadyDamaged_.push_back(pawn);
    141141                    }
    142142                }
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/GravityBombField.h

    r10622 r11054  
    3939    GravityBombField(Context* context);
    4040    virtual ~GravityBombField();
    41     virtual void tick(float dt);
     41    virtual void tick(float dt) override;
    4242    virtual void destroy();
    4343
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/IceGunProjectile.h

    r11052 r11054  
    6262
    6363        protected:
    64             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
     64            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
    6565            static const float particleDestructionDelay_;
    6666        private:
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/LightningGunProjectile.h

    r9667 r11054  
    5858            virtual ~LightningGunProjectile() {}
    5959
    60             virtual void setMaterial(const std::string& material);
     60            virtual void setMaterial(const std::string& material) override;
    6161
    6262        private:
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/MineProjectile.cc

    r11052 r11054  
    217217            {
    218218                // Damage all pawns within the damage radius
    219                 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
     219                for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>().begin(); it; ++it)
    220220                {
    221221                    Vector3 distanceVector = it->getWorldPosition()-this->getWorldPosition();
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/ParticleProjectile.cc

    r10624 r11054  
    5858        }
    5959        else
    60             this->particles_ = 0;
     60            this->particles_ = nullptr;
    6161    }
    6262
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/ParticleProjectile.h

    r9667 r11054  
    5353            ParticleProjectile(Context* context);
    5454            virtual ~ParticleProjectile();
    55             virtual void changedVisibility();
     55            virtual void changedVisibility() override;
    5656
    5757        private:
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/Projectile.cc

    r10629 r11054  
    9494    void Projectile::setCollisionShapeRadius(float radius)
    9595    {
    96         if (collisionShape_ != NULL && radius > 0)
     96        if (collisionShape_ != nullptr && radius > 0)
    9797        {
    9898            collisionShape_->setRadius(radius);
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/Projectile.h

    r11052 r11054  
    6464            void setConfigValues();
    6565
    66             virtual void tick(float dt);
    67             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
     66            virtual void tick(float dt) override;
     67            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
    6868
    6969        protected:
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/Rocket.cc

    r11052 r11054  
    117117        else
    118118        {
    119             this->defSndWpnEngine_ = 0;
    120             this->defSndWpnLaunch_ = 0;
     119            this->defSndWpnEngine_ = nullptr;
     120            this->defSndWpnLaunch_ = nullptr;
    121121        }
    122122
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/Rocket.h

    r11052 r11054  
    6262            virtual ~Rocket();
    6363
    64             virtual void tick(float dt); //!< Defines which actions the Rocket has to take in each tick.
     64            virtual void tick(float dt) override; //!< Defines which actions the Rocket has to take in each tick.
    6565
    66             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
    67             virtual void destroyObject(void);
     66            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
     67            virtual void destroyObject(void) override;
    6868            void destructionEffect();
    6969
    70             virtual void moveFrontBack(const Vector2& value) {}
    71             virtual void moveRightLeft(const Vector2& value) {}
    72             virtual void moveUpDown(const Vector2& value) {}
     70            virtual void moveFrontBack(const Vector2& value) override {}
     71            virtual void moveRightLeft(const Vector2& value) override {}
     72            virtual void moveUpDown(const Vector2& value) override {}
    7373
    74             virtual void rotateYaw(const Vector2& value);
    75             virtual void rotatePitch(const Vector2& value);
    76             virtual void rotateRoll(const Vector2& value);
     74            virtual void rotateYaw(const Vector2& value) override;
     75            virtual void rotatePitch(const Vector2& value) override;
     76            virtual void rotateRoll(const Vector2& value) override;
    7777
    7878            /**
     
    114114                { this->rotateRoll(Vector2(value, 0)); }
    115115
    116             virtual void setShooter(Pawn* shooter);
     116            virtual void setShooter(Pawn* shooter) override;
    117117
    118             virtual void fired(unsigned int firemode);
     118            virtual void fired(unsigned int firemode) override;
    119119
    120120            /**
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/RocketOld.cc

    r10622 r11054  
    117117        else
    118118        {
    119             this->defSndWpnEngine_ = 0;
    120             this->defSndWpnLaunch_ = 0;
     119            this->defSndWpnEngine_ = nullptr;
     120            this->defSndWpnLaunch_ = nullptr;
    121121        }
    122122
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/RocketOld.h

    r10622 r11054  
    6262            virtual ~RocketOld();
    6363
    64             virtual void tick(float dt); //!< Defines which actions the RocketOld has to take in each tick.
     64            virtual void tick(float dt) override; //!< Defines which actions the RocketOld has to take in each tick.
    6565
    66             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
    67             virtual void destroyObject(void);
     66            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
     67            virtual void destroyObject(void) override;
    6868            void destructionEffect();
    6969
    70             virtual void moveFrontBack(const Vector2& value) {}
    71             virtual void moveRightLeft(const Vector2& value) {}
    72             virtual void moveUpDown(const Vector2& value) {}
     70            virtual void moveFrontBack(const Vector2& value) override {}
     71            virtual void moveRightLeft(const Vector2& value) override {}
     72            virtual void moveUpDown(const Vector2& value) override {}
    7373
    74             virtual void rotateYaw(const Vector2& value);
    75             virtual void rotatePitch(const Vector2& value);
    76             virtual void rotateRoll(const Vector2& value);
     74            virtual void rotateYaw(const Vector2& value) override;
     75            virtual void rotatePitch(const Vector2& value) override;
     76            virtual void rotateRoll(const Vector2& value) override;
    7777
    7878            /**
     
    114114                { this->rotateRoll(Vector2(value, 0)); }
    115115
    116             virtual void setShooter(Pawn* shooter);
     116            virtual void setShooter(Pawn* shooter) override;
    117117
    118             virtual void fired(unsigned int firemode);
     118            virtual void fired(unsigned int firemode) override;
    119119
    120120        private:
  • code/branches/cpp11_v3/src/modules/weapons/projectiles/SimpleRocket.h

    r10216 r11054  
    6262            SimpleRocket(Context* context);
    6363            virtual ~SimpleRocket();
    64             virtual void tick(float dt);
     64            virtual void tick(float dt) override;
    6565
    66             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
     66            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
    6767
    6868            void disableFire(); //!< Method to disable the fire and stop all acceleration
    6969
    70             virtual void moveFrontBack(const Vector2& value){}
    71             virtual void moveRightLeft(const Vector2& value){}
    72             virtual void moveUpDown(const Vector2& value){}
     70            virtual void moveFrontBack(const Vector2& value) override{}
     71            virtual void moveRightLeft(const Vector2& value) override{}
     72            virtual void moveUpDown(const Vector2& value) override{}
    7373
    74             virtual void rotateYaw(const Vector2& value);
    75             virtual void rotatePitch(const Vector2& value);
    76             virtual void rotateRoll(const Vector2& value);
     74            virtual void rotateYaw(const Vector2& value) override;
     75            virtual void rotatePitch(const Vector2& value) override;
     76            virtual void rotateRoll(const Vector2& value) override;
    7777            void setDestroy();
    7878
     
    115115                { this->rotateRoll(Vector2(value, 0)); }
    116116
    117             virtual void setShooter(Pawn* shooter);
     117            virtual void setShooter(Pawn* shooter) override;
    118118
    119119            inline bool hasFuel() const
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/EnergyDrink.h

    r9667 r11054  
    5757            virtual ~EnergyDrink() {}
    5858
    59             virtual void fire();
    60             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     59            virtual void fire() override;
     60            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    6161
    6262        private:
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/FusionFire.h

    r9667 r11054  
    5454            virtual ~FusionFire() {}
    5555
    56             virtual void fire();
     56            virtual void fire() override;
    5757
    5858        private:
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/GravityBombFire.h

    r10622 r11054  
    3434            virtual ~GravityBombFire();
    3535
    36             virtual void fire();
     36            virtual void fire() override;
    3737
    3838        private:
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/HsW01.h

    r9945 r11054  
    5656            virtual ~HsW01();
    5757
    58             virtual void fire();
    59             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     58            virtual void fire() override;
     59            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    6060
    6161        protected:
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/IceGun.h

    r11052 r11054  
    5454            virtual ~IceGun();
    5555
    56             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    57             virtual void fire();
     56            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     57            virtual void fire() override;
    5858           
    5959            inline void setFreezeTime(float freezeTime)
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/LaserFire.h

    r9667 r11054  
    5454            virtual ~LaserFire() {}
    5555
    56             virtual void fire();
     56            virtual void fire() override;
    5757
    5858        private:
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/LightningGun.h

    r9667 r11054  
    5454            virtual ~LightningGun();
    5555
    56             virtual void fire();
     56            virtual void fire() override;
    5757
    5858       private:
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/RocketFire.h

    r11052 r11054  
    5454            virtual ~RocketFire();
    5555
    56             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     56            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    5757
    58             virtual void fire();
     58            virtual void fire() override;
    5959            inline void setFuel(float fuel)
    6060                { this->fuel_ = fuel; }
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/RocketFireOld.h

    r10622 r11054  
    5454            virtual ~RocketFireOld();
    5555
    56             virtual void fire();
     56            virtual void fire() override;
    5757
    5858        private:
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/SimpleRocketFire.h

    r9667 r11054  
    5353            virtual ~SimpleRocketFire();
    5454            void deactivateFire();
    55             virtual void fire();
     55            virtual void fire() override;
    5656
    5757        private:
  • code/branches/cpp11_v3/src/modules/weapons/weaponmodes/SplitGun.h

    r11052 r11054  
    5454            virtual ~SplitGun();
    5555
    56             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    57             virtual void fire();
     56            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
     57            virtual void fire() override;
    5858
    5959            inline void setNumberOfSplits(int numberOfSplits)
Note: See TracChangeset for help on using the changeset viewer.