Index: code/trunk/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefense.cc	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefense.cc	(revision 11071)
@@ -90,6 +90,6 @@
         RegisterObject(TowerDefense);
 
-        selecter = NULL;
-        this->player_ = NULL;        
+        selecter = nullptr;
+        this->player_ = nullptr;
         this->setHUDTemplate("TowerDefenseHUD");
         this->waveNumber_ = 0;
@@ -117,7 +117,7 @@
     void TowerDefense::start()
     {        
-        if (center_ != NULL) // There needs to be a TowerDefenseCenterpoint, i.e. the area the game takes place.
-        {
-            if (selecter == NULL)
+        if (center_ != nullptr) // There needs to be a TowerDefenseCenterpoint, i.e. the area the game takes place.
+        {
+            if (selecter == nullptr)
             {
                 selecter = new TowerDefenseSelecter(this->center_->getContext());                
@@ -176,5 +176,5 @@
         WaypointController* controller = (WaypointController*)(en1->getXMLController());
 
-        if (controller != NULL && waypoints_.size() > 1)
+        if (controller != nullptr && waypoints_.size() > 1)
         {
             en1->setPosition(waypoints_.at(0)->getPosition() + offset_);
@@ -183,8 +183,8 @@
             en1->lookAt(waypoints_.at(1)->getPosition() + offset_);
 
-            for (unsigned int i = 0; i < waypoints_.size(); ++ i)
+            for (TowerDefenseField* field : waypoints_)
             {
                 orxonox::WeakPtr<MovableEntity> waypoint = new MovableEntity(this->center_->getContext());
-                waypoint->setPosition(waypoints_.at(i)->getPosition() + offset_);
+                waypoint->setPosition(field->getPosition() + offset_);
                 controller->addWaypoint(waypoint);
             }
@@ -208,5 +208,5 @@
         player_ = player;
 
-        if (selecter->getPlayer() == NULL)
+        if (selecter->getPlayer() == nullptr)
         {
             player_->startControl(selecter);
@@ -219,5 +219,5 @@
         Get the player.
     @return
-        Returns a pointer to the player. If there is no player, NULL is returned.
+        Returns a pointer to the player. If there is no player, nullptr is returned.
     */
     PlayerInfo* TowerDefense::getPlayer(void) const
@@ -265,5 +265,5 @@
         SUPER(TowerDefense, tick, dt);
 
-        if (hasStarted() == false || player_ == NULL)
+        if (hasStarted() == false || player_ == nullptr)
         {
             return;
@@ -273,5 +273,5 @@
 
         //build/upgrade tower at selecter position
-        if (selecter != NULL && selecter->buildTower_ == true)
+        if (selecter != nullptr && selecter->buildTower_ == true)
         {
             selecter->buildTower_ = false;
@@ -287,7 +287,7 @@
         }
         
-        for (std::list<WeakPtr<TowerDefenseEnemy> >::iterator it = enemies_.begin(); it != enemies_.end(); )
-        {
-            if (*it == NULL)
+        for (std::list<WeakPtr<TowerDefenseEnemy>>::iterator it = enemies_.begin(); it != enemies_.end(); )
+        {
+            if (*it == nullptr)
             {
                 // the enemy was destroyed by a tower - remove it from the list
@@ -355,5 +355,5 @@
                 fields_[i][j]->create(fields.at(pos), fields.at(pos+1));
                 pos += 2;
-                if (fields_[i][j]->getType() == START)
+                if (fields_[i][j]->getType() == TowerDefenseFieldType::START)
                 {
                     startCoord.Set(i,j);
@@ -365,5 +365,5 @@
         TDCoordinate* thisCoord = &startCoord;
         TDCoordinate* nextCoord;
-        while ((nextCoord = getNextStreetCoord(thisCoord)) != NULL)
+        while ((nextCoord = getNextStreetCoord(thisCoord)) != nullptr)
         {
             waypoints_.push_back(fields_[nextCoord->GetX()][nextCoord->GetY()]);            
@@ -379,7 +379,7 @@
         TDCoordinate* nextCoord = new TDCoordinate(0,0);
 
-        if (thisField->getType() != STREET && thisField->getType() != START)
-        {
-            return NULL;
+        if (thisField->getType() != TowerDefenseFieldType::STREET && thisField->getType() != TowerDefenseFieldType::START)
+        {
+            return nullptr;
         }
 
@@ -406,5 +406,5 @@
         }
 
-        return NULL;
+        return nullptr;
     }
 }
Index: code/trunk/src/modules/towerdefense/TowerDefense.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefense.h	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefense.h	(revision 11071)
@@ -53,8 +53,8 @@
         virtual ~TowerDefense();        
         void addTowerDefenseEnemy(int templatenr);
-        virtual void start(); //<! The function is called when the gametype starts
-        virtual void end();
-        virtual void tick(float dt);
-        virtual void spawnPlayer(PlayerInfo* player);
+        virtual void start() override; //<! The function is called when the gametype starts
+        virtual void end() override;
+        virtual void tick(float dt) override;
+        virtual void spawnPlayer(PlayerInfo* player) override;
         PlayerInfo* getPlayer(void) const;
         int getCredit(){ return this->credit_; }
@@ -87,7 +87,7 @@
         int waveNumber_;
         int lifes_;
-        std::list<orxonox::WeakPtr<TowerDefenseEnemy> > enemies_;
+        std::list<orxonox::WeakPtr<TowerDefenseEnemy>> enemies_;
         TowerDefenseField* fields_[16][16];
-        std::vector<orxonox::WeakPtr<TowerDefenseField> > waypoints_;
+        std::vector<orxonox::WeakPtr<TowerDefenseField>> waypoints_;
         Vector3 endpoint_;
         Vector3 offset_;        
Index: code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc	(revision 11071)
@@ -92,5 +92,5 @@
     void TowerDefenseCenterpoint::checkGametype()
     {
-        if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
+        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(TowerDefense)))
         {
             // 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
Index: code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h	(revision 11071)
@@ -52,5 +52,5 @@
             virtual ~TowerDefenseCenterpoint() {}
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
 
             /**
Index: code/trunk/src/modules/towerdefense/TowerDefenseEnemy.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 11071)
@@ -27,5 +27,5 @@
         RegisterObject(TowerDefenseEnemy);
 
-        this->setCollisionType(WorldEntity::Dynamic);
+        this->setCollisionType(WorldEntity::CollisionType::Dynamic);
         //needed to keep track of the PlayerStats coded in TowerDefense.h
         this->td = orxonox_cast<TowerDefense*>(this->getGametype());
@@ -38,22 +38,15 @@
     }
 
-    void TowerDefenseEnemy::tick(float dt)
-    {   
-        //orxout() << "TDE tick1" << endl;
-        SUPER(TowerDefenseEnemy, tick, dt);
-        //orxout() << "TDE tick2" << endl;
-    }
-
     WeakPtr<TowerDefense> TowerDefenseEnemy::getGame()
     {
-        if (game == NULL)
+        if (game == nullptr)
         {
-            for (ObjectList<TowerDefense>::iterator it = ObjectList<TowerDefense>::begin(); it != ObjectList<TowerDefense>::end(); ++it)
-                game = *it;
+            for (TowerDefense* towerDefense : ObjectList<TowerDefense>())
+                game = towerDefense;
         }
         return game;
     }
 
-    void TowerDefenseEnemy::damage(float damage, float healthdamage, float shielddamage, Pawn* originator)
+    void TowerDefenseEnemy::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
     {
         Pawn::damage(damage, healthdamage, shielddamage, originator);
Index: code/trunk/src/modules/towerdefense/TowerDefenseEnemy.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseEnemy.h	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseEnemy.h	(revision 11071)
@@ -37,6 +37,5 @@
         //health gibt es unter: health_
 
-        virtual void tick(float dt);
-        virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator);
+        virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs) override;
 
     private:
Index: code/trunk/src/modules/towerdefense/TowerDefenseField.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseField.cc	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseField.cc	(revision 11071)
@@ -49,7 +49,7 @@
         RegisterObject(TowerDefenseField);
 
-        tower_ = NULL;
-        type_ = FREE;
-        center_ = NULL;
+        tower_ = nullptr;
+        type_ = TowerDefenseFieldType::FREE;
+        center_ = nullptr;
         upgrade_ = 0;
         setPosition(0,0,0);                            
@@ -119,5 +119,5 @@
     bool TowerDefenseField::canUpgrade()
     {
-        if (tower_ != NULL && upgrade_ < 5)
+        if (tower_ != nullptr && upgrade_ < 5)
         {
             return true;
@@ -129,5 +129,5 @@
     void TowerDefenseField::setAngle(int newAngle)
     {
-        if (modelGround_ != NULL)
+        if (modelGround_ != nullptr)
         {
             switch (newAngle)
@@ -152,5 +152,5 @@
         }
 
-        if (modelObject_ != NULL)
+        if (modelObject_ != nullptr)
         {
             switch (newAngle)
@@ -185,6 +185,6 @@
     {            
         modelGround_->setMeshSource("TD_F1.mesh");
-        tower_ = NULL;
-        type_ = FREE;
+        tower_ = nullptr;
+        type_ = TowerDefenseFieldType::FREE;
         setUpgrade(0);
         setAngle(orientation);
@@ -194,6 +194,6 @@
     {      
         modelGround_->setMeshSource("TD_S5.mesh");
-        tower_ = NULL;
-        type_ = START;
+        tower_ = nullptr;
+        type_ = TowerDefenseFieldType::START;
         setUpgrade(0);
         setAngle(orientation);    
@@ -204,6 +204,6 @@
     {     
         modelGround_->setMeshSource("TD_S4.mesh");
-        tower_ = NULL;
-        type_ = END;
+        tower_ = nullptr;
+        type_ = TowerDefenseFieldType::END;
         setUpgrade(0);
         setAngle(orientation);
@@ -213,6 +213,6 @@
     {      
         modelGround_->setMeshSource("TD_S1.mesh");
-        tower_ = NULL;
-        type_ = STREET;
+        tower_ = nullptr;
+        type_ = TowerDefenseFieldType::STREET;
         setUpgrade(0);
         setAngle(orientation);
@@ -222,6 +222,6 @@
     {     
         modelGround_->setMeshSource("TD_S2.mesh");
-        tower_ = NULL;
-        type_ = STREET;
+        tower_ = nullptr;
+        type_ = TowerDefenseFieldType::STREET;
         setUpgrade(0);
         setAngle(orientation);
@@ -231,6 +231,6 @@
     {    
         modelGround_->setMeshSource("TD_S3.mesh");
-        tower_ = NULL;
-        type_ = STREET;
+        tower_ = nullptr;
+        type_ = TowerDefenseFieldType::STREET;
         setUpgrade(0);
         setAngle(orientation);
@@ -241,6 +241,6 @@
         modelGround_->setMeshSource("TD_F1.mesh");
         modelObject_->setMeshSource("TD_O1.mesh");
-        tower_ = NULL;
-        type_ = OBSTACLE;
+        tower_ = nullptr;
+        type_ = TowerDefenseFieldType::OBSTACLE;
         setUpgrade(0);
         setAngle(orientation);
@@ -249,12 +249,12 @@
     void TowerDefenseField::createTower(int upgrade)
     {        
-        if (tower_ == NULL)
+        if (tower_ == nullptr)
         {
             modelGround_->setMeshSource("TD_F1.mesh");
             tower_ = new TowerDefenseTower(center_->getContext());
             attach(tower_);
-            type_ = TOWER;
+            type_ = TowerDefenseFieldType::TOWER;
             setUpgrade(upgrade);
-            if (upgrade_ > 0 && modelObject_ != NULL)
+            if (upgrade_ > 0 && modelObject_ != nullptr)
             {
                 switch (upgrade_)
@@ -287,8 +287,8 @@
     void TowerDefenseField::destroyTower()
     {
-        if (tower_ != NULL)
+        if (tower_ != nullptr)
         {
             tower_->destroy();
-            tower_ = NULL;
+            tower_ = nullptr;
         }
     }
Index: code/trunk/src/modules/towerdefense/TowerDefenseField.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseField.h	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseField.h	(revision 11071)
@@ -46,5 +46,5 @@
 namespace orxonox
 {
-    enum TowerDefenseFieldType
+    enum class TowerDefenseFieldType
     { 
         FREE,
@@ -62,7 +62,7 @@
             TowerDefenseField(Context* context);
             virtual ~TowerDefenseField() {}
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
             const bool isFree() const
-                { return type_==FREE; }
+                { return type_==TowerDefenseFieldType::FREE; }
             virtual void create(char object, char param);
             virtual void setCenterpoint(TowerDefenseCenterpoint* center);
Index: code/trunk/src/modules/towerdefense/TowerDefenseHUDController.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseHUDController.cc	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseHUDController.cc	(revision 11071)
@@ -39,5 +39,5 @@
     {
         RegisterObject(TowerDefenseHUDController);
-        this->td = 0;
+        this->td = nullptr;
     }
 
@@ -89,5 +89,5 @@
                     else
                     {
-                        this->td = 0;
+                        this->td = nullptr;
                     }
                 }
Index: code/trunk/src/modules/towerdefense/TowerDefenseHUDController.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseHUDController.h	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseHUDController.h	(revision 11071)
@@ -53,7 +53,7 @@
 
 
-        virtual void tick(float dt);
-        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-        virtual void changedOwner();
+        virtual void tick(float dt) override;
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+        virtual void changedOwner() override;
         void setShowlives(bool temp)
             { this->showlives = temp; }
Index: code/trunk/src/modules/towerdefense/TowerDefenseSelecter.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseSelecter.cc	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseSelecter.cc	(revision 11071)
@@ -35,5 +35,4 @@
 
 #include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
 #include "graphics/Model.h"
 
@@ -59,9 +58,4 @@
     {
 
-    }
-
-    void TowerDefenseSelecter::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(TowerDefenseSelecter, XMLPort, xmlelement, mode);
     }
 
Index: code/trunk/src/modules/towerdefense/TowerDefenseSelecter.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseSelecter.h	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseSelecter.h	(revision 11071)
@@ -41,14 +41,13 @@
             TowerDefenseSelecter(Context* context); //!< Constructor. Registers and initializes the object.
             virtual ~TowerDefenseSelecter();
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);         
-            virtual void tick(float dt);            
-            virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
-            virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
-            virtual void rotateYaw(const Vector2& value);
-            virtual void rotatePitch(const Vector2& value);
-            virtual void rotateRoll(const Vector2& value);
+            virtual void tick(float dt) override;            
+            virtual void moveFrontBack(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
+            virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
+            virtual void rotateYaw(const Vector2& value) override;
+            virtual void rotatePitch(const Vector2& value) override;
+            virtual void rotateRoll(const Vector2& value) override;
             void fire(unsigned int firemode);
-            virtual void fired(unsigned int firemode);
-            virtual void boost(bool bBoost);
+            virtual void fired(unsigned int firemode) override;
+            virtual void boost(bool bBoost) override;
             virtual void setSelectedPosition(TDCoordinate* newPos);
             virtual void setSelectedPosition(int x, int y);
Index: code/trunk/src/modules/towerdefense/TowerDefenseTower.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseTower.cc	(revision 11052)
+++ code/trunk/src/modules/towerdefense/TowerDefenseTower.cc	(revision 11071)
@@ -25,6 +25,6 @@
     {
         RegisterObject(TowerDefenseTower);
-        game_ =NULL;
-        this->setCollisionType(WorldEntity::None);
+        game_ =nullptr;
+        this->setCollisionType(WorldEntity::CollisionType::None);
         upgrade = 1;
 
