Index: code/trunk/src/modules/gametypes/SpaceRaceController.cc
===================================================================
--- code/trunk/src/modules/gametypes/SpaceRaceController.cc	(revision 11071)
+++ code/trunk/src/modules/gametypes/SpaceRaceController.cc	(revision 11083)
@@ -397,9 +397,9 @@
     bool SpaceRaceController::vergleicheQuader(const Vector3& pointToPoint, const Vector3& groesse)
     {
-        if(abs(pointToPoint.x) < groesse.x)
+        if(std::abs(pointToPoint.x) < groesse.x)
             return true;
-        if(abs(pointToPoint.y) < groesse.y)
+        if(std::abs(pointToPoint.y) < groesse.y)
             return true;
-        if(abs(pointToPoint.z) < groesse.z)
+        if(std::abs(pointToPoint.z) < groesse.z)
             return true;
         return false;
Index: code/trunk/src/modules/hover/TimeHUD.cc
===================================================================
--- code/trunk/src/modules/hover/TimeHUD.cc	(revision 11071)
+++ code/trunk/src/modules/hover/TimeHUD.cc	(revision 11083)
@@ -82,7 +82,7 @@
         {
             this->setCaption(getTimeString(this->time_));
+            if (this->hoverGame_->getNumberOfFlags() == 0)
+                setRunning(false);
         }
-        if(this->hoverGame_->getNumberOfFlags() == 0)
-            setRunning(false);
         
     }
Index: code/trunk/src/modules/invader/Invader.cc
===================================================================
--- code/trunk/src/modules/invader/Invader.cc	(revision 11071)
+++ code/trunk/src/modules/invader/Invader.cc	(revision 11083)
@@ -129,5 +129,5 @@
                 newPawn->addTemplate("enemyinvader");
             }
-            newPawn->setPlayer(player);
+            newPawn->setInvaderPlayer(player);
             newPawn->level = level;
             // spawn enemy at random points in front of player.
Index: code/trunk/src/modules/invader/InvaderEnemy.cc
===================================================================
--- code/trunk/src/modules/invader/InvaderEnemy.cc	(revision 11071)
+++ code/trunk/src/modules/invader/InvaderEnemy.cc	(revision 11083)
@@ -58,5 +58,5 @@
         if (player != nullptr)
         {
-            float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * (player->getPosition().z - getPosition().z);
+            float newZ = 2/(pow(std::abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * (player->getPosition().z - getPosition().z);
             setVelocity(Vector3(1000.f - level * 100 , 0, newZ));
         }
Index: code/trunk/src/modules/invader/InvaderEnemy.h
===================================================================
--- code/trunk/src/modules/invader/InvaderEnemy.h	(revision 11071)
+++ code/trunk/src/modules/invader/InvaderEnemy.h	(revision 11083)
@@ -49,5 +49,5 @@
             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
             virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs) override;
-            virtual void setPlayer(InvaderShip* player){this->player = player;}
+            virtual void setInvaderPlayer(InvaderShip* player){this->player = player;}
 
             int level;
Index: code/trunk/src/modules/invader/InvaderEnemyShooter.cc
===================================================================
--- code/trunk/src/modules/invader/InvaderEnemyShooter.cc	(revision 11071)
+++ code/trunk/src/modules/invader/InvaderEnemyShooter.cc	(revision 11083)
@@ -63,6 +63,6 @@
             float distPlayer = player->getPosition().z - getPosition().z;
             // orxout() << "i'm different!" << endl;
-            float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * distPlayer;
-            setVelocity(Vector3(950 - abs(distPlayer), 0, newZ));
+            float newZ = 2/(pow(std::abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * distPlayer;
+            setVelocity(Vector3(950 - std::abs(distPlayer), 0, newZ));
         }
         Pawn::tick(dt);
Index: code/trunk/src/modules/objects/ForceField.cc
===================================================================
--- code/trunk/src/modules/objects/ForceField.cc	(revision 11071)
+++ code/trunk/src/modules/objects/ForceField.cc	(revision 11083)
@@ -63,5 +63,5 @@
         //Standard Values
         this->setDirection(Vector3::ZERO);
-        this->setVelocity(100);
+        this->setFieldVelocity(100);
         this->setDiameter(500);
         this->setMassDiameter(0);   //! We allow point-masses
@@ -88,5 +88,5 @@
         SUPER(ForceField, XMLPort, xmlelement, mode);
 
-        XMLPortParam(ForceField, "velocity", setVelocity, getVelocity, xmlelement, mode).defaultValues(100);
+        XMLPortParam(ForceField, "velocity", setFieldVelocity, getFieldVelocity, xmlelement, mode).defaultValues(100);
         XMLPortParam(ForceField, "diameter", setDiameter, getDiameter, xmlelement, mode).defaultValues(500);
         XMLPortParam(ForceField, "massDiameter", setMassDiameter, getMassDiameter, xmlelement, mode).defaultValues(0);
Index: code/trunk/src/modules/objects/ForceField.h
===================================================================
--- code/trunk/src/modules/objects/ForceField.h	(revision 11071)
+++ code/trunk/src/modules/objects/ForceField.h	(revision 11083)
@@ -98,5 +98,5 @@
             @param vel The velocity to be set.
             */
-            inline void setVelocity(float vel)
+            inline void setFieldVelocity(float vel)
                 { this->velocity_ = vel; }
             /**
@@ -104,5 +104,5 @@
             @return Returns the velocity of the ForceField.
             */
-            inline float getVelocity()
+            inline float getFieldVelocity()
                 { return this->velocity_; }
 
Index: code/trunk/src/modules/objects/SpaceBoundaries.cc
===================================================================
--- code/trunk/src/modules/objects/SpaceBoundaries.cc	(revision 11071)
+++ code/trunk/src/modules/objects/SpaceBoundaries.cc	(revision 11083)
@@ -221,5 +221,5 @@
                     }
                 }
-                if(/* humanItem &&*/ abs(this->maxDistance_ - distance) < this->showDistance_ )
+                if(/* humanItem &&*/ std::abs(this->maxDistance_ - distance) < this->showDistance_ )
                 {
                     this->displayBoundaries(currentPawn, 1.0f - fabs(this->maxDistance_ - distance) / this->showDistance_); // Show the boundary
Index: code/trunk/src/modules/objects/triggers/DistanceTrigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/DistanceTrigger.h	(revision 11071)
+++ code/trunk/src/modules/objects/triggers/DistanceTrigger.h	(revision 11083)
@@ -97,5 +97,5 @@
             virtual ~DistanceTrigger();
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); // Method for creating a DistanceTrigger object through XML.
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; // Method for creating a DistanceTrigger object through XML.
 
             void addTarget(const std::string& targets); // Add some target to the DistanceTrigger.
Index: code/trunk/src/modules/objects/triggers/EventTrigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/EventTrigger.h	(revision 11071)
+++ code/trunk/src/modules/objects/triggers/EventTrigger.h	(revision 11083)
@@ -73,5 +73,5 @@
             virtual ~EventTrigger();
 
-            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); // Creates an event port.
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override; // Creates an event port.
 
             /**
Index: code/trunk/src/modules/overlays/hud/ChatOverlay.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/ChatOverlay.cc	(revision 11071)
+++ code/trunk/src/modules/overlays/hud/ChatOverlay.cc	(revision 11083)
@@ -73,5 +73,5 @@
         Timer* timer = new Timer();
         this->timers_.insert(timer); // store the timer in a set to destroy it in the destructor
-        const ExecutorPtr& executor = createExecutor(createFunctor(&ChatOverlay::dropMessage, this));
+        const ExecutorPtr executor = createExecutor(createFunctor(&ChatOverlay::dropMessage, this));
         executor->setDefaultValues(timer);
         timer->setTimer(this->displayTime_, false, executor, true);
Index: code/trunk/src/modules/pickup/items/ShrinkPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/ShrinkPickup.cc	(revision 11071)
+++ code/trunk/src/modules/pickup/items/ShrinkPickup.cc	(revision 11083)
@@ -277,6 +277,9 @@
             {
                 Pawn* pawn = this->carrierToPawnHelper();
-                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+                if (pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+                {
                     this->Pickupable::destroy();
+                    return;
+                }
 
                 this->timeRemainig_ -= dt;
Index: code/trunk/src/modules/pong/Pong.cc
===================================================================
--- code/trunk/src/modules/pong/Pong.cc	(revision 11071)
+++ code/trunk/src/modules/pong/Pong.cc	(revision 11083)
@@ -326,5 +326,5 @@
     PlayerInfo* Pong::getLeftPlayer() const
     {
-        if (this->bat_ != nullptr && this->bat_[0] != nullptr)
+        if (this->bat_[0] != nullptr)
             return this->bat_[0]->getPlayer();
         else
@@ -340,5 +340,5 @@
     PlayerInfo* Pong::getRightPlayer() const
     {
-        if (this->bat_ != nullptr && this->bat_[1] != nullptr)
+        if (this->bat_[1] != nullptr)
             return this->bat_[1]->getPlayer();
         else
Index: code/trunk/src/modules/questsystem/QuestListener.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestListener.cc	(revision 11071)
+++ code/trunk/src/modules/questsystem/QuestListener.cc	(revision 11083)
@@ -81,8 +81,13 @@
         XMLPortParam(QuestListener, "mode", setMode, getMode, xmlelement, mode);
 
-        if(this->quest_ != nullptr)
+        std::string questid;
+
+        if (this->quest_ != nullptr)
+        {
             this->quest_->addListener(this); // Adds the QuestListener to the Quests list of listeners.
-
-        orxout(verbose, context::quests) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getMode() << "'." << endl;
+            questid = this->quest_->getId();
+        }
+
+        orxout(verbose, context::quests) << "QuestListener created for quest: {" << questid << "} with mode '" << this->getMode() << "'." << endl;
     }
 
Index: code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.h
===================================================================
--- code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.h	(revision 11071)
+++ code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.h	(revision 11083)
@@ -61,6 +61,4 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a ChangeQuestStatus object through XML.
 
-            virtual bool invoke(PlayerInfo* player) = 0; //!< Invokes the QuestEffect.
-
         protected:
             /**
Index: code/trunk/src/modules/tetris/Tetris.cc
===================================================================
--- code/trunk/src/modules/tetris/Tetris.cc	(revision 11071)
+++ code/trunk/src/modules/tetris/Tetris.cc	(revision 11083)
@@ -140,5 +140,5 @@
             const Vector3& currentStonePosition = someStone->getPosition(); //!< Saves the position of the currentStone
 
-            if((position.x == currentStonePosition.x) && abs(position.y-currentStonePosition.y) < this->center_->getStoneSize())
+            if((position.x == currentStonePosition.x) && std::abs(position.y-currentStonePosition.y) < this->center_->getStoneSize())
                 return false;
         }
@@ -222,7 +222,7 @@
         if(position.y < this->center_->getStoneSize()/2.0f) //!< If the stone has reached the bottom of the level
         {
-            float baseOffset = abs(stone->getPosition().y);
+            float baseOffset = std::abs(stone->getPosition().y);
             if (this->activeBrick_->getRotationCount() == 1 || this->activeBrick_->getRotationCount() == 3)
-                baseOffset = abs(stone->getPosition().x);
+                baseOffset = std::abs(stone->getPosition().x);
             float yOffset = baseOffset + this->center_->getStoneSize()/2.0f;//calculate offset
             if(yOffset < 0) //catch brake-throughs
Index: code/trunk/src/modules/tetris/TetrisBrick.cc
===================================================================
--- code/trunk/src/modules/tetris/TetrisBrick.cc	(revision 11071)
+++ code/trunk/src/modules/tetris/TetrisBrick.cc	(revision 11083)
@@ -213,5 +213,5 @@
         {
             const Vector3& position = this->getPosition();
-            Vector3 newPos = Vector3(position.x+value.x/abs(value.x)*this->size_, position.y, position.z);
+            Vector3 newPos = Vector3(position.x+value.x/std::abs(value.x)*this->size_, position.y, position.z);
             if(!this->isValidMove(newPos))
                 return;
Index: code/trunk/src/modules/tetris/TetrisStone.cc
===================================================================
--- code/trunk/src/modules/tetris/TetrisStone.cc	(revision 11071)
+++ code/trunk/src/modules/tetris/TetrisStone.cc	(revision 11083)
@@ -92,5 +92,5 @@
         {
             const Vector3& position = this->getPosition();
-            Vector3 newPos = Vector3(position.x+value.x/abs(value.x)*this->size_, position.y, position.z);
+            Vector3 newPos = Vector3(position.x+value.x/std::abs(value.x)*this->size_, position.y, position.z);
             if(!this->tetris_->isValidMove(this, newPos))
                 return;
Index: code/trunk/src/modules/towerdefense/TDCoordinate.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TDCoordinate.cc	(revision 11071)
+++ code/trunk/src/modules/towerdefense/TDCoordinate.cc	(revision 11083)
@@ -66,10 +66,10 @@
         float tileScale = 100;
 
-        Vector3 *coord = new Vector3();
-        coord->x= (_x-8) * tileScale;
-        coord->y= (_y-8) * tileScale;
-        coord->z=0;
+        Vector3 coord;
+        coord.x= (_x-8) * tileScale;
+        coord.y= (_y-8) * tileScale;
+        coord.z=0;
 
-        return *coord;
+        return coord;
     }
 }
Index: code/trunk/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefense.cc	(revision 11071)
+++ code/trunk/src/modules/towerdefense/TowerDefense.cc	(revision 11083)
@@ -377,5 +377,4 @@
     {        
         TowerDefenseField* thisField = fields_[thisCoord->GetX()][thisCoord->GetY()];
-        TDCoordinate* nextCoord = new TDCoordinate(0,0);
 
         if (thisField->getType() != TowerDefenseFieldType::STREET && thisField->getType() != TowerDefenseFieldType::START)
@@ -384,4 +383,6 @@
         }
 
+        TDCoordinate* nextCoord = new TDCoordinate(0, 0);
+
         if (thisField->getAngle() == 0)
         {
@@ -406,4 +407,5 @@
         }
 
+        delete nextCoord;
         return nullptr;
     }
Index: code/trunk/src/modules/weapons/projectiles/GravityBombField.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/GravityBombField.cc	(revision 11071)
+++ code/trunk/src/modules/weapons/projectiles/GravityBombField.cc	(revision 11083)
@@ -34,5 +34,5 @@
         fieldExploded_ = false;
 
-        setVelocity(FORCE_SPHERE_START_STRENGTH);
+        setFieldVelocity(FORCE_SPHERE_START_STRENGTH);
         setDiameter(2*FORCE_SPHERE_START_RADIUS);
         setMode(modeSphere_s);
@@ -158,5 +158,5 @@
         
         setDiameter(forceSphereRadius_*2);
-        setVelocity(forceStrength_);
+        setFieldVelocity(forceStrength_);
         if(lifetime_>0) particleSphere_->setScale(forceSphereRadius_/FORCE_SPHERE_START_RADIUS);
         bombModel_->setScale(modelScaling_);
