Index: code/branches/presentation2012merge/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/gametypes/SpaceRaceManager.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/gametypes/SpaceRaceManager.cc	(revision 9272)
@@ -149,5 +149,5 @@
             }
             else
-			{
+            {
                 // adjust the radarvisibility
                 gametype->newCheckpointReached(newCheckpoint, player);
Index: code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc	(revision 9272)
@@ -70,6 +70,6 @@
     void DamageBoostPickup::initialize(void)
     {
-    	this->duration_ = 0.0f;
-    	this->damageMultiplier_ = 1.0f; //The default damage multiplier.
+        this->duration_ = 0.0f;
+        this->damageMultiplier_ = 1.0f; //The default damage multiplier.
         //Defines who is allowed to pick up the pickup.
         this->addTarget(ClassIdentifier<SpaceShip>::getIdentifier());
@@ -130,5 +130,5 @@
         SpaceShip* ship = this->carrierToSpaceShipHelper();
         if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
-           	this->Pickupable::destroy();
+            this->Pickupable::destroy();
 
 
Index: code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h
===================================================================
--- code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h	(revision 9272)
@@ -57,5 +57,5 @@
             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
 
-    	    /**
+            /**
             @brief Get the time the DamagePickup lasts.
             @return Returns the time in seconds the DamagePickup lasts.
@@ -95,5 +95,5 @@
 
             Timer durationTimer_; //!< Timer.
-	    float duration_; //! Duration of damage boost.
+            float duration_; //! Duration of damage boost.
 
     };
Index: code/branches/presentation2012merge/src/modules/towerdefense/CMakeLists.txt
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/CMakeLists.txt	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/CMakeLists.txt	(revision 9272)
@@ -5,5 +5,5 @@
   TowerDefenseHUDController.cc
   TowerDefensePlayerStats.cc
-  
+
 )
 
@@ -13,5 +13,5 @@
   LINK_LIBRARIES
     orxonox
-	overlays
+    overlays
   SOURCE_FILES ${TOWERDEFENSE_SRC_FILES}
 )
Index: code/branches/presentation2012merge/src/modules/towerdefense/TDEnemy.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TDEnemy.h	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TDEnemy.h	(revision 9272)
@@ -13,7 +13,7 @@
 
 private:
-	float health;
-	float speed;
-	float armour;
+    float health;
+    float speed;
+    float armour;
 
 
Index: code/branches/presentation2012merge/src/modules/towerdefense/Tower.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/Tower.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/Tower.cc	(revision 9272)
@@ -17,9 +17,9 @@
 {
     CreateFactory(Tower);
-	
+
     /**
-	 @brief
-	 Constructor. Registers and initializes the object.
-	 */
+    @brief
+        Constructor. Registers and initializes the object.
+    */
     Tower::Tower(BaseObject* creator) : Pawn(creator)
     {
@@ -34,32 +34,32 @@
         this->delay_ = false;
         this->delayTimer_.setTimer(0.2f, false, createExecutor(createFunctor(&TetrisStone::enableMovement, this)));
-		*/
+        */
     }
-	
-	void Tower::setOrientation(const Quaternion& orientation)
-	{
-		static int ori;
-		orxout() << "orientation " << ++ori << endl;
-	}
-	
-	void Tower::rotateYaw(const Vector2& value)
-	{
-		static int yaw;
-		orxout() << "rotateYaw " << ++yaw << endl;
-	}
-	
-	void Tower::rotatePitch(const Vector2& value)
-	{
-		static int pitch;
-		orxout() << "rotatePitch " << ++pitch << endl;
-	}
-	
-	void Tower::rotateRoll(const Vector2& value)
-	{
-		static int roll;
-		orxout() << "rotateRoll" << ++roll << endl;
-	}
-		
-	// This function is called whenever a player presses the up or the down key.
+
+    void Tower::setOrientation(const Quaternion& orientation)
+    {
+        static int ori;
+        orxout() << "orientation " << ++ori << endl;
+    }
+
+    void Tower::rotateYaw(const Vector2& value)
+    {
+        static int yaw;
+        orxout() << "rotateYaw " << ++yaw << endl;
+    }
+
+    void Tower::rotatePitch(const Vector2& value)
+    {
+        static int pitch;
+        orxout() << "rotatePitch " << ++pitch << endl;
+    }
+
+    void Tower::rotateRoll(const Vector2& value)
+    {
+        static int roll;
+        orxout() << "rotateRoll" << ++roll << endl;
+    }
+
+    // This function is called whenever a player presses the up or the down key.
     // You have to implement what happens when the up or the down key is pressed.
     // value.x < 0 means: down key is pressed.
@@ -75,27 +75,27 @@
 
     /**
-	 @brief
-	 Overloaded the function to rotate the stone.
-	 @param value
-	 A vector whose first component is the angle by which to rotate.
-	 */
-		 /*
+    @brief
+        Overloaded the function to rotate the stone.
+    @param value
+        A vector whose first component is the angle by which to rotate.
+    */
+    /*
     void Tower::moveFrontBack(const Vector2& value)
     {
         //orxout() << "frontBack.x: " << value.x << endl;
     }
-	*/
-	
+    */
+
     /**
-	 @brief
-	 Overloaded the function to steer the stone right and left
-	 @param value
-	 A vector whose first component is the direction in which we want to steer the stone.
-	 */
-		 /*
+    @brief
+        Overloaded the function to steer the stone right and left
+    @param value
+        A vector whose first component is the direction in which we want to steer the stone.
+    */
+    /*
     void Tower::moveRightLeft(const Vector2& value)
     {
-		//orxout() << "rightLeft.x: " << value.x << endl;
-		
+        //orxout() << "rightLeft.x: " << value.x << endl;
+
         if(!this->delay_)
         {
@@ -104,10 +104,10 @@
             if(!this->tetris_->isValidMove(this, newPos))
                 return;
-			
+
             this->setPosition(newPos);
             this->delay_ = true;
             this->delayTimer_.startTimer();
-		}
+        }
     }
-	*/
+    */
 }
Index: code/branches/presentation2012merge/src/modules/towerdefense/Tower.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/Tower.h	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/Tower.h	(revision 9272)
@@ -10,5 +10,5 @@
 @brief
 See TowerDefenseReadme.txt for Information.
-    
+
 @ingroup TowerDefense
 */
@@ -20,5 +20,5 @@
 #include "towerdefense/TowerDefensePrereqs.h"
 #include "worldentities/pawns/SpaceShip.h"
-	
+
 
 namespace orxonox
@@ -26,24 +26,24 @@
     class _TowerDefenseExport Tower : public Pawn
     {
-	public:
-		Tower(BaseObject* creator);
-		virtual ~Tower() {};
-		
-		// Maybe later override these to move towers with cursor keys
-		/*
-		virtual void moveFrontBack(const Vector2& value);
-		virtual void moveRightLeft(const Vector2& value);
-		*/
-		
-		// Overriding these to stop towers from spasing out
-		void setOrientation(const Quaternion& orientation);
+    public:
+        Tower(BaseObject* creator);
+        virtual ~Tower() {};
+
+        // Maybe later override these to move towers with cursor keys
+        /*
+        virtual void moveFrontBack(const Vector2& value);
+        virtual void moveRightLeft(const Vector2& value);
+        */
+
+        // Overriding these to stop towers from spasing out
+        void setOrientation(const Quaternion& orientation);
         virtual void rotateYaw(const Vector2& value);
         virtual void rotatePitch(const Vector2& value);
         virtual void rotateRoll(const Vector2& value);
-		
-		void setGame(TowerDefense* towerdefense)
-		{ assert(towerdefense); game_ = towerdefense; }
-	private:
-		TowerDefense* game_;
+
+        void setGame(TowerDefense* towerdefense)
+        { assert(towerdefense); game_ = towerdefense; }
+    private:
+        TowerDefense* game_;
     };
 }
Index: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.cc	(revision 9272)
@@ -82,8 +82,8 @@
 #include "worldentities/pawns/SpaceShip.h"
 #include "controllers/WaypointController.h"
-	 
+
 #include "graphics/Model.h"
 #include "infos/PlayerInfo.h"
-	 
+
 #include "chat/ChatManager.h"
 
@@ -94,20 +94,20 @@
 {
     CreateUnloadableFactory(TowerDefense);
-	
-	TowerDefense::TowerDefense(BaseObject* creator) : Deathmatch(creator)
+
+    TowerDefense::TowerDefense(BaseObject* creator) : Deathmatch(creator)
     {
         RegisterObject(TowerDefense);
-		
+
         this->setHUDTemplate("TowerDefenseHUD");
 
-		this->stats_ = new TowerDefensePlayerStats();
-
-		/* Temporary hack to allow the player to add towers */
-		this->dedicatedAddTower_ = createConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) );
-    }
-	
+        this->stats_ = new TowerDefensePlayerStats();
+
+        /* Temporary hack to allow the player to add towers */
+        this->dedicatedAddTower_ = createConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) );
+    }
+
     TowerDefense::~TowerDefense()
     {
-		/* Part of a temporary hack to allow the player to add towers */
+        /* Part of a temporary hack to allow the player to add towers */
         if (this->isInitialized())
         {
@@ -116,193 +116,192 @@
         }
     }
-	
-	void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint)
-	{
-		orxout() << "Centerpoint now setting..." << endl;
-		this->center_ = centerpoint;
-		orxout() << "Centerpoint now set..." << endl;
-	}
-	
+
+    void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint)
+    {
+        orxout() << "Centerpoint now setting..." << endl;
+        this->center_ = centerpoint;
+        orxout() << "Centerpoint now set..." << endl;
+    }
+
     void TowerDefense::start()
     {
         Deathmatch::start();
-		
-		const int kInitialTowerCount = 3;
-		Coordinate initialTowerCoordinates[kInitialTowerCount] = {{3,2}, {8,5}, {12,10}};
-		
-		for (int i = 0; i < kInitialTowerCount; i++)
-		{
-			Coordinate coordinate = initialTowerCoordinates[i];
-			addTower(coordinate.x, coordinate.y);
-		}
-		
-		ChatManager::message("Use the console command addTower x y to add towers");
-
-		//TODO: let the player control his controllable entity && TODO: create a new ControllableEntity for the player
-	}
-	
-	void TowerDefense::end()
-	{
-		Deathmatch::end();
-	 
-		ChatManager::message("Match is over");
-	}
-	
-	void TowerDefense::addTower(int x, int y)
-	{
-		const TowerCost towerCost = TDDefaultTowerCost;
-		
-		if (!this->hasEnoughCreditForTower(towerCost))
-		{
-			orxout() << "not enough credit: " << (this->stats_->getCredit()) << " available, " << TDDefaultTowerCost << " needed.";
-			return;
-		}
-		
-		if (this->towerExists(x,y))
-		{
-			orxout() << "tower exists!!" << endl;
-			return;
-		}		
-		
-		/*
-		unsigned int width = this->center_->getWidth();
-		unsigned int height = this->center_->getHeight();
-		*/
-		
-		int tileScale = (int) this->center_->getTileScale();
-			
-		if (x > 15 || y > 15 || x < 0 || y < 0)
-		{
-			//Hard coded: TODO: let this depend on the centerpoint's height, width and fieldsize (fieldsize doesn't exist yet)
-			orxout() << "Can not add Tower: x and y should be between 0 and 15" << endl;
-			return;
-		}
-		
-		orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl;
-		
-		// Add tower to coordinatesStack
-		Coordinate newTowerCoordinates = {x, y};
-		addedTowersCoordinates_.push_back(newTowerCoordinates);
-		
-		// Reduce credit
-		this->stats_->buyTower(towerCost);
-		
-		// Create tower
-		Tower* newTower = new Tower(this->center_);
-		newTower->addTemplate(this->center_->getTowerTemplate());
-
-		newTower->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75);
-		newTower->setGame(this);
-	}
-	
-	bool TowerDefense::hasEnoughCreditForTower(TowerCost towerCost)
-	{
-		return ((this->stats_->getCredit()) >= towerCost);
-	}
-	
-	bool TowerDefense::towerExists(int x, int y)
-	{
-		for(std::vector<Coordinate>::iterator it = addedTowersCoordinates_.begin(); it != addedTowersCoordinates_.end(); ++it) 
-		{
-			Coordinate currentCoordinates = (Coordinate) (*it);
-			if (currentCoordinates.x == x && currentCoordinates.y == y)
-				return true;
-		}
-		
-		return false;
-	}
-	
-	
-	void TowerDefense::tick(float dt)
+
+        const int kInitialTowerCount = 3;
+        Coordinate initialTowerCoordinates[kInitialTowerCount] = {{3,2}, {8,5}, {12,10}};
+
+        for (int i = 0; i < kInitialTowerCount; i++)
+        {
+            Coordinate coordinate = initialTowerCoordinates[i];
+            addTower(coordinate.x, coordinate.y);
+        }
+
+        ChatManager::message("Use the console command addTower x y to add towers");
+
+        //TODO: let the player control his controllable entity && TODO: create a new ControllableEntity for the player
+    }
+
+    void TowerDefense::end()
+    {
+        Deathmatch::end();
+
+        ChatManager::message("Match is over");
+    }
+
+    void TowerDefense::addTower(int x, int y)
+    {
+        const TowerCost towerCost = TDDefaultTowerCost;
+
+        if (!this->hasEnoughCreditForTower(towerCost))
+        {
+            orxout() << "not enough credit: " << (this->stats_->getCredit()) << " available, " << TDDefaultTowerCost << " needed.";
+            return;
+        }
+
+        if (this->towerExists(x,y))
+        {
+            orxout() << "tower exists!!" << endl;
+            return;
+        }
+
+        /*
+        unsigned int width = this->center_->getWidth();
+        unsigned int height = this->center_->getHeight();
+        */
+
+        int tileScale = (int) this->center_->getTileScale();
+
+        if (x > 15 || y > 15 || x < 0 || y < 0)
+        {
+            //Hard coded: TODO: let this depend on the centerpoint's height, width and fieldsize (fieldsize doesn't exist yet)
+            orxout() << "Can not add Tower: x and y should be between 0 and 15" << endl;
+            return;
+        }
+
+        orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl;
+
+        // Add tower to coordinatesStack
+        Coordinate newTowerCoordinates = {x, y};
+        addedTowersCoordinates_.push_back(newTowerCoordinates);
+
+        // Reduce credit
+        this->stats_->buyTower(towerCost);
+
+        // Create tower
+        Tower* newTower = new Tower(this->center_);
+        newTower->addTemplate(this->center_->getTowerTemplate());
+
+        newTower->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75);
+        newTower->setGame(this);
+    }
+
+    bool TowerDefense::hasEnoughCreditForTower(TowerCost towerCost)
+    {
+        return ((this->stats_->getCredit()) >= towerCost);
+    }
+
+    bool TowerDefense::towerExists(int x, int y)
+    {
+        for(std::vector<Coordinate>::iterator it = addedTowersCoordinates_.begin(); it != addedTowersCoordinates_.end(); ++it)
+        {
+            Coordinate currentCoordinates = (Coordinate) (*it);
+            if (currentCoordinates.x == x && currentCoordinates.y == y)
+                return true;
+        }
+
+        return false;
+    }
+
+
+    void TowerDefense::tick(float dt)
     {
         SUPER(TowerDefense, tick, dt);
     }
-	
-	// Function to test if we can add waypoints using code only. Doesn't work yet
-	
-	// THE PROBLEM: WaypointController's getControllableEntity() returns null, so it won't track. How do we get the controlableEntity to NOT BE NULL???
-	/*
-	void TowerDefense::addWaypointsAndFirstEnemy()
-	{
-		SpaceShip *newShip = new SpaceShip(this->center_);
-		newShip->addTemplate("spaceshipassff");
-		
-		WaypointController *newController = new WaypointController(newShip);
-		newController->setAccuracy(3);
-		
-		Model *wayPoint1 = new Model(newController);
-		wayPoint1->setMeshSource("crate.mesh");	
-		wayPoint1->setPosition(7,-7,5);
-		wayPoint1->setScale(0.2);
-			
-		Model *wayPoint2 = new Model(newController);
-		wayPoint2->setMeshSource("crate.mesh");
-		wayPoint2->setPosition(7,7,5);
-		wayPoint2->setScale(0.2);
-			
-		newController->addWaypoint(wayPoint1);
-		newController->addWaypoint(wayPoint2);
-			
-		// The following line causes the game to crash
-
-		newShip->setController(newController);
-//		newController -> getPlayer() -> startControl(newShip);
-		newShip->setPosition(-7,-7,5);
-		newShip->setScale(0.1);
-		//newShip->addSpeed(1);
-		
-		
-		
-//		this->center_->attach(newShip);
-	}
-	*/
-	/*
-	 void TowerDefense::playerEntered(PlayerInfo* player)
-	 {
-	 Deathmatch::playerEntered(player);
-	 
-	 const std::string& message = player->getName() + " entered the game";
-	 ChatManager::message(message);
-	 }
-	 
-	 bool TowerDefense::playerLeft(PlayerInfo* player)
-	 {
-	 bool valid_player = Deathmatch::playerLeft(player);
-	 
-	 if (valid_player)
-	 {
-	 const std::string& message = player->getName() + " left the game";
-	 ChatManager::message(message);
-	 }
-	 
-	 return valid_player;
-	 }
-	 
-	 
-	 void TowerDefense::pawnKilled(Pawn* victim, Pawn* killer)
-	 {
-	 if (victim && victim->getPlayer())
-	 {
-	 std::string message;
-	 if (killer)
-	 {
-	 if (killer->getPlayer())
-	 message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();
-	 else
-	 message = victim->getPlayer()->getName() + " was killed";
-	 }
-	 else
-	 message = victim->getPlayer()->getName() + " died";
-	 
-	 ChatManager::message(message);
-	 }
-	 
-	 Deathmatch::pawnKilled(victim, killer);
-	 }
-	 
-	 void TowerDefense::playerScored(PlayerInfo* player)
-	 {
-	 Gametype::playerScored(player);
-	 
-	 }*/
+
+    // Function to test if we can add waypoints using code only. Doesn't work yet
+
+    // THE PROBLEM: WaypointController's getControllableEntity() returns null, so it won't track. How do we get the controlableEntity to NOT BE NULL???
+    /*
+    void TowerDefense::addWaypointsAndFirstEnemy()
+    {
+        SpaceShip *newShip = new SpaceShip(this->center_);
+        newShip->addTemplate("spaceshipassff");
+
+        WaypointController *newController = new WaypointController(newShip);
+        newController->setAccuracy(3);
+
+        Model *wayPoint1 = new Model(newController);
+        wayPoint1->setMeshSource("crate.mesh");
+        wayPoint1->setPosition(7,-7,5);
+        wayPoint1->setScale(0.2);
+
+        Model *wayPoint2 = new Model(newController);
+        wayPoint2->setMeshSource("crate.mesh");
+        wayPoint2->setPosition(7,7,5);
+        wayPoint2->setScale(0.2);
+
+        newController->addWaypoint(wayPoint1);
+        newController->addWaypoint(wayPoint2);
+
+        // The following line causes the game to crash
+
+        newShip->setController(newController);
+//        newController -> getPlayer() -> startControl(newShip);
+        newShip->setPosition(-7,-7,5);
+        newShip->setScale(0.1);
+        //newShip->addSpeed(1);
+
+
+
+//      this->center_->attach(newShip);
+    }
+    */
+    /*
+    void TowerDefense::playerEntered(PlayerInfo* player)
+    {
+        Deathmatch::playerEntered(player);
+
+        const std::string& message = player->getName() + " entered the game";
+        ChatManager::message(message);
+    }
+
+    bool TowerDefense::playerLeft(PlayerInfo* player)
+    {
+        bool valid_player = Deathmatch::playerLeft(player);
+
+        if (valid_player)
+        {
+            const std::string& message = player->getName() + " left the game";
+            ChatManager::message(message);
+        }
+
+        return valid_player;
+    }
+
+
+    void TowerDefense::pawnKilled(Pawn* victim, Pawn* killer)
+    {
+        if (victim && victim->getPlayer())
+        {
+            std::string message;
+            if (killer)
+            {
+                if (killer->getPlayer())
+                    message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();
+                else
+                    message = victim->getPlayer()->getName() + " was killed";
+            }
+            else
+                message = victim->getPlayer()->getName() + " died";
+
+            ChatManager::message(message);
+        }
+
+        Deathmatch::pawnKilled(victim, killer);
+    }
+
+    void TowerDefense::playerScored(PlayerInfo* player)
+    {
+        Gametype::playerScored(player);
+    }*/
 }
Index: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.h	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.h	(revision 9272)
@@ -26,12 +26,12 @@
  *
  */
-	 
+
  /**
-	 @brief
-	 GameType class for TowerDefense. See TowerDefenseReadme.txt for Information.
-	 
-	 @ingroup TowerDefense
+    @brief
+        GameType class for TowerDefense. See TowerDefenseReadme.txt for Information.
+
+    @ingroup TowerDefense
  */
-	 
+
 
 #ifndef _TowerDefense_H__
@@ -40,57 +40,57 @@
 #include "towerdefense/TowerDefensePrereqs.h"
 #include "gametypes/Deathmatch.h"
-		 
+
  #include "TowerDefensePlayerStats.h"
-		 
+
 namespace orxonox
 {
-	class _TowerDefenseExport TowerDefense : public Deathmatch
+    class _TowerDefenseExport TowerDefense : public Deathmatch
     {
-	public:
-		TowerDefense(BaseObject* creator);
-		virtual ~TowerDefense();
-		
-		virtual void start(); //<! The function is called when the gametype starts
-		virtual void end();
-		virtual void tick(float dt);
-		//virtual void playerEntered(PlayerInfo* player);
-		//virtual bool playerLeft(PlayerInfo* player);
-		
-		//virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
-		//virtual void playerScored(PlayerInfo* player);
-		
-		
-		/*	Called by TowerDefenseCenterpoint upon game start 
-			The centerpoint is used to create towers
-		*/
-		void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
-		
-		/* Adds a tower at x, y in the playfield */
-		void addTower(int x, int y);
-		
-		/* Part of a temporary hack to allow the player to add towers */
-		ConsoleCommand* dedicatedAddTower_;
-		
-		//TODO: void spawnNewWave()
-	    //TODO: create a timer which regularly calls the spawnNewWave function  (time driven)
-		//      or spawn a new wave when the old wave has been killed           (event driven)
+    public:
+        TowerDefense(BaseObject* creator);
+        virtual ~TowerDefense();
+
+        virtual void start(); //<! The function is called when the gametype starts
+        virtual void end();
+        virtual void tick(float dt);
+        //virtual void playerEntered(PlayerInfo* player);
+        //virtual bool playerLeft(PlayerInfo* player);
+
+        //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
+        //virtual void playerScored(PlayerInfo* player);
 
 
-	private:
-		TowerDefenseCenterpoint *center_;
-		
-		/* handles stats */
-		TowerDefensePlayerStats *stats_;
-		bool hasEnoughCreditForTower(TowerCost towerCost);
-	
-		bool towerExists(int x, int y);
-		
-		typedef struct {
-			int x;
-			int y;
-		} Coordinate; 
-		
-		std::vector<Coordinate> addedTowersCoordinates_;
-		std::vector<Tower*> towers_;
+        /*  Called by TowerDefenseCenterpoint upon game start
+            The centerpoint is used to create towers
+        */
+        void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
+
+        /* Adds a tower at x, y in the playfield */
+        void addTower(int x, int y);
+
+        /* Part of a temporary hack to allow the player to add towers */
+        ConsoleCommand* dedicatedAddTower_;
+
+        //TODO: void spawnNewWave()
+        //TODO: create a timer which regularly calls the spawnNewWave function  (time driven)
+        //      or spawn a new wave when the old wave has been killed           (event driven)
+
+
+    private:
+        TowerDefenseCenterpoint *center_;
+
+        /* handles stats */
+        TowerDefensePlayerStats *stats_;
+        bool hasEnoughCreditForTower(TowerCost towerCost);
+
+        bool towerExists(int x, int y);
+
+        typedef struct {
+            int x;
+            int y;
+        } Coordinate;
+
+        std::vector<Coordinate> addedTowersCoordinates_;
+        std::vector<Tower*> towers_;
     };
 }
Index: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc	(revision 9272)
@@ -50,12 +50,12 @@
     {
         RegisterObject(TowerDefenseCenterpoint);
- 
- 	   	this->width_ = 15;
+
+        this->width_ = 15;
         this->height_ = 15;
         this->towerTemplate_ = "";
-        
+
         //this->setCollisionType(Static);
 
-		this->checkGametype();
+        this->checkGametype();
 
     }
@@ -71,7 +71,7 @@
         XMLPortParam(TowerDefenseCenterpoint, "width", setWidth, getWidth, xmlelement, mode);
         XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, getHeight, xmlelement, mode);
-		XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode);
+        XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode);
         XMLPortParam(TowerDefenseCenterpoint, "towerTemplate", setTowerTemplate, getTowerTemplate, xmlelement, mode);
-		
+
         //TODO: add XMLPortObject(TowerDefenseCenterpoint, WorldEntity, "waypoints", addWaypoint, getWaypoint,  xmlelement, mode);
         // This was copied and shightly modified from WaypointController.cc ; there are no getters and setters and no membervariable yet
@@ -100,7 +100,7 @@
     void TowerDefenseCenterpoint::checkGametype()
     {
-		if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
+        if (this->getGametype() != NULL && 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
+            // 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
             TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get());
             towerDefenseGametype->setCenterpoint(this);
Index: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.h	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.h	(revision 9272)
@@ -54,5 +54,5 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
             virtual void changedGametype();
-            
+
             /**
             @brief The width and hight in number of tiles. Default is 15 for both.
@@ -60,23 +60,23 @@
             void setWidth(unsigned int width)
                 { this->width_ = width; }
-            
-			unsigned int getWidth(void) const
+
+            unsigned int getWidth(void) const
                 { return this->width_; }
-                
+
             void setHeight(unsigned int height)
                 { this->height_ = height; }
-            
-			unsigned int getHeight(void) const
+
+            unsigned int getHeight(void) const
                 { return this->height_; }
-			
-			/**
-			@brief How to convert to world coordinates, e.g. that 0,15 is not at -8,-8 but at -80,-80 (if scale would be 10)
-			*/
-			void setTileScale(unsigned int tileScale)
-				{ this->tileScale_ = tileScale; }
-			
-			unsigned int getTileScale(void) const
-				{ return this->tileScale_; }
-                
+
+            /**
+                @brief How to convert to world coordinates, e.g. that 0,15 is not at -8,-8 but at -80,-80 (if scale would be 10)
+            */
+            void setTileScale(unsigned int tileScale)
+                { this->tileScale_ = tileScale; }
+
+            unsigned int getTileScale(void) const
+                { return this->tileScale_; }
+
             /**
             @brief Set the template for the towers.
@@ -85,15 +85,15 @@
             void setTowerTemplate(const std::string& templateName)
                 { this->towerTemplate_ = templateName; }
-            
-			const std::string& getTowerTemplate(void) const
+
+            const std::string& getTowerTemplate(void) const
                 { return this->towerTemplate_; }
 
         private:
             void checkGametype();
-            
+
             unsigned int width_;
             unsigned int height_;
-			unsigned int tileScale_;
-			
+            unsigned int tileScale_;
+
             std::string towerTemplate_;
     };
Index: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.cc	(revision 9272)
@@ -25,5 +25,5 @@
  *      ...
  */
- 
+
 #include "TowerDefenseHUDController.h"
 
@@ -35,36 +35,36 @@
 namespace orxonox
 {
-	CreateFactory(TowerDefenseHUDController);
-	
+    CreateFactory(TowerDefenseHUDController);
+
     TowerDefenseHUDController::TowerDefenseHUDController(BaseObject* creator) : OverlayText(creator)
-	{
-		RegisterObject(TowerDefenseHUDController);
-	}
-	
-	TowerDefenseHUDController::~TowerDefenseHUDController()
-	{
-		
-	}
+    {
+        RegisterObject(TowerDefenseHUDController);
+    }
+
+    TowerDefenseHUDController::~TowerDefenseHUDController()
+    {
+
+    }
 
     void TowerDefenseHUDController::tick(float dt)
-	{
-		SUPER(TowerDefenseHUDController, tick, dt);
-	}
-	
+    {
+        SUPER(TowerDefenseHUDController, tick, dt);
+    }
+
     void TowerDefenseHUDController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-	{
-		SUPER(TowerDefenseHUDController, XMLPort, xmlelement, mode);
-	}
-	
+    {
+        SUPER(TowerDefenseHUDController, XMLPort, xmlelement, mode);
+    }
+
     void TowerDefenseHUDController::changedOwner()
     {
         SUPER(TowerDefenseHUDController, changedOwner);
-		/*
+        /*
         if (this->getOwner() != NULL && this->getOwner()->getGametype())
             this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype().get());
         else
             this->owner_ = 0;
-			*/
+        */
     }
-	
+
 }
Index: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.h	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.h	(revision 9272)
@@ -26,12 +26,12 @@
  *
  */
-	 
+
  /**
-	 @brief
-	 This subclass of OverlayText is used to display the stats of the player in the HUD
-	 
-	 @ingroup TowerDefense
+    @brief
+        This subclass of OverlayText is used to display the stats of the player in the HUD
+
+    @ingroup TowerDefense
  */
-	 
+
 
 #ifndef _TowerDefenseHUDController_H__
@@ -48,11 +48,11 @@
     class _TowerDefenseExport TowerDefenseHUDController : public OverlayText, public Tickable
     {
-	public:
-		TowerDefenseHUDController(BaseObject* creator);
+    public:
+        TowerDefenseHUDController(BaseObject* creator);
         virtual ~TowerDefenseHUDController();
 
         virtual void tick(float dt);
         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-		virtual void changedOwner();
+        virtual void changedOwner();
     };
 }
Index: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.cc	(revision 9272)
@@ -25,20 +25,20 @@
  *      ...
  */
- 
+
 #include "TowerDefensePlayerStats.h"
 
 namespace orxonox
 {
-	const int kDefaultCredit = 200;
-	
+    const int kDefaultCredit = 200;
+
     TowerDefensePlayerStats::TowerDefensePlayerStats()
-	{
-		this->credit_ = kDefaultCredit;
-		this->waveNumber_ = 0;
-	}
-	/*
-	TowerDefensePlayerStats::~TowerDefensePlayerStats()
-	{
-	}
-	*/		
+    {
+        this->credit_ = kDefaultCredit;
+        this->waveNumber_ = 0;
+    }
+    /*
+    TowerDefensePlayerStats::~TowerDefensePlayerStats()
+    {
+    }
+    */
 }
Index: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.h	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.h	(revision 9272)
@@ -26,12 +26,12 @@
  *
  */
-	 
+
  /**
-	 @brief
-	 This manages the stats of the player. It is used by 'TowerDefense', the gametype
-	
-	 @ingroup TowerDefense
+    @brief
+        This manages the stats of the player. It is used by 'TowerDefense', the gametype
+
+    @ingroup TowerDefense
  */
-	 
+
 
 #ifndef _TowerDefensePlayerStats_H__
@@ -42,33 +42,33 @@
 namespace orxonox
 {
-	typedef enum _TowerCosts {
-		// Set to 0 for debug...
-		TDDefaultTowerCost = 0
-	} TowerCost;
-	
+    typedef enum _TowerCosts {
+        // Set to 0 for debug...
+        TDDefaultTowerCost = 0
+    } TowerCost;
+
     class _TowerDefenseExport TowerDefensePlayerStats
     {
-	public:
-		TowerDefensePlayerStats();
-		
-		inline int getCredit()
-			{ return credit_; }
-		
-		inline void setCredit(int credit)
-			{ credit_ = credit; }
-		
-		inline void buyTower(TowerCost cost)
-			{ credit_ -= cost;}
-		
-		inline int getWaveNumber()
-			{ return waveNumber_; }
-		
-		inline void didLoadNextWave()
-			{ waveNumber_++; }
-		
-	private:
-		int credit_;
-		int waveNumber_;
-		//int baseHealth_;
+    public:
+        TowerDefensePlayerStats();
+
+        inline int getCredit()
+            { return credit_; }
+
+        inline void setCredit(int credit)
+            { credit_ = credit; }
+
+        inline void buyTower(TowerCost cost)
+            { credit_ -= cost;}
+
+        inline int getWaveNumber()
+            { return waveNumber_; }
+
+        inline void didLoadNextWave()
+            { waveNumber_++; }
+
+    private:
+        int credit_;
+        int waveNumber_;
+        //int baseHealth_;
     };
 }
Index: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePrereqs.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePrereqs.h	(revision 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePrereqs.h	(revision 9272)
@@ -66,8 +66,8 @@
 {
     class TowerDefense;
-	class Tower;
+    class Tower;
     class TowerDefenseCenterpoint;
-	class TowerDefenseHUDController;
-	class TowerDefensePlayerStats;
+    class TowerDefenseHUDController;
+    class TowerDefensePlayerStats;
 }
 
Index: code/branches/presentation2012merge/src/orxonox/LevelInfo.h
===================================================================
--- code/branches/presentation2012merge/src/orxonox/LevelInfo.h	(revision 9271)
+++ code/branches/presentation2012merge/src/orxonox/LevelInfo.h	(revision 9272)
@@ -24,5 +24,5 @@
  *   Co-authors:
  *      ...
- *   
+ *
  */
 
@@ -79,5 +79,5 @@
             */
             inline const std::string& getName(void) const { return this->name_; } // tolua_export
-        
+
             /**
             @brief Set the screenshot of the Level.
@@ -117,5 +117,5 @@
             */
             inline bool hasTag(const std::string& tag) const { return this->tags_.find(tag) != this->tags_.end(); } // tolua_export
- 
+
             void setShips(const std::string& ships); //!< Set the starting ship models of the level
             bool addShip(const std::string& ship, bool update = true); //!< Add a model to shipselection
@@ -125,5 +125,5 @@
             */
             inline const std::string& getShips(void) const
-                { return this->startingShipsString_; }    
+                { return this->startingShipsString_; }
             /**
             @brief Get whether the Level allows a specific starting ship model
@@ -131,5 +131,5 @@
             @return Returns true if the Level allows the input ship model
             */
-            inline bool hasShip(const std::string& ship) const { return this->ships_.find(ship) != this->ships_.end(); } // tolua_export        
+            inline bool hasShip(const std::string& ship) const { return this->ships_.find(ship) != this->ships_.end(); } // tolua_export
             /**
             @brief Get the XML-filename of the Level.
@@ -138,5 +138,5 @@
 
             inline const std::string& getXMLFilename(void) const { return this->xmlfilename_; } // tolua_export
-	    inline void selectShip (const std::string& ship) { this->changeShip(ship); } // tolua_export
+            inline void selectShip (const std::string& ship) { this->changeShip(ship); } // tolua_export
 
 
@@ -153,30 +153,30 @@
         private:
 
-	    inline void changeShip (const std::string& model) {
-	        static std::string shipSelectionTag = "shipselection";
-        	//HACK: Read Level XML File, find "shipselection", replace with ship model
-        	std::string levelPath = "../levels/";
-        	levelPath.append(this->getXMLFilename());
-        	std::string tempPath = "../levels/";
-        	tempPath.append("_temp.oxw");
-        	orxout(user_status) << levelPath << endl;
-        	orxout(user_status) << tempPath << endl;
-        	std::ifstream myLevel (levelPath.c_str());
-			std::ofstream tempLevel (tempPath.c_str());
-			while(!myLevel.eof())
-			{
-				std::string buff;
-				std::getline(myLevel, buff);
-				std::string pawndesignString = "pawndesign=";
-				size_t found = buff.find(pawndesignString.append(shipSelectionTag)); 
-				if (found!= std::string::npos) 
-					buff = buff.substr(0, found + 11) + model + buff.substr(found+11+shipSelectionTag.length(), std::string::npos);
-				tempLevel.write(buff.c_str(), buff.length());
-				tempLevel << std::endl;
-			}
-			myLevel.close();
-			tempLevel.close();
-			orxout(user_status) << "done" << endl;
-	    } 
+            inline void changeShip (const std::string& model) {
+                static std::string shipSelectionTag = "shipselection";
+                //HACK: Read Level XML File, find "shipselection", replace with ship model
+                std::string levelPath = "../levels/";
+                levelPath.append(this->getXMLFilename());
+                std::string tempPath = "../levels/";
+                tempPath.append("_temp.oxw");
+                orxout(user_status) << levelPath << endl;
+                orxout(user_status) << tempPath << endl;
+                std::ifstream myLevel (levelPath.c_str());
+                std::ofstream tempLevel (tempPath.c_str());
+                while(!myLevel.eof())
+                {
+                    std::string buff;
+                    std::getline(myLevel, buff);
+                    std::string pawndesignString = "pawndesign=";
+                    size_t found = buff.find(pawndesignString.append(shipSelectionTag));
+                    if (found!= std::string::npos)
+                        buff = buff.substr(0, found + 11) + model + buff.substr(found+11+shipSelectionTag.length(), std::string::npos);
+                    tempLevel.write(buff.c_str(), buff.length());
+                    tempLevel << std::endl;
+                }
+                myLevel.close();
+                tempLevel.close();
+                orxout(user_status) << "done" << endl;
+            }
             void tagsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
             void shipsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
@@ -199,5 +199,5 @@
             std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with.
             std::set<std::string> ships_; //!< The set of starting ship models the Level allows.
-            std::string startingShipsString_; //!< The comma-seperated string of all the allowed ship models for the shipselection.            
+            std::string startingShipsString_; //!< The comma-seperated string of all the allowed ship models for the shipselection.
     }; // tolua_export
 
@@ -210,5 +210,5 @@
         - @b screenshot The screenshot of the level.
         - @b tags A comma-seperated string of tags. Allowed tags are: <em>test</em>, <em>singleplayer</em>, <em>multiplayer</em>, <em>showcase</em>, <em>tutorial</em>, <em>presentation</em>, <em>shipselection</em>.
-        - @b (optional) startingships The comma-seperated string of starting ship models 
+        - @b (optional) startingships The comma-seperated string of starting ship models
         An example would be:
         @code
@@ -224,6 +224,6 @@
     @author
         Damian 'Mozork' Frick
-	@edit
-		Matthias Hutter
+    @edit
+        Matthias Hutter
     @ingroup Orxonox
     */
@@ -235,5 +235,5 @@
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a LevelInfo object through XML.
-        
+
             /**
             @brief Set the screenshot of the Level.
@@ -283,5 +283,5 @@
             */
             inline const std::string& getShips(void) const
-                { return this->LevelInfoItem::getShips(); }              
+                { return this->LevelInfoItem::getShips(); }
             LevelInfoItem* copy(void); //!< Copies the contents of this LevelInfo object to a new LevelInfoItem object.
     };
@@ -302,5 +302,5 @@
             }
     };
-    
+
 } // tolua_export
 
Index: code/branches/presentation2012merge/src/orxonox/ShipManager.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/ShipManager.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/orxonox/ShipManager.cc	(revision 9272)
@@ -22,5 +22,5 @@
  *   Author:
  *      Matthias Hutter
- *   
+ *
  */
 
@@ -28,5 +28,5 @@
     @file ShipManager.cc
     @brief Work-in Progress: Implementation of the ShipManager singleton.
-    	   Should make SpaceShip info available to lua handlers.
+           Should make SpaceShip info available to lua handlers.
 */
 
@@ -72,5 +72,5 @@
     }
 
-   
+
     /**
     @brief
@@ -132,18 +132,18 @@
     void ShipManager::compileAvailableShipList()
     {
-		/*
-		// We only want to load as little as possible
-		ClassTreeMask mask;
-		    mask.exclude(Class(BaseObject));
-		    mask.include(Class(SpaceShip));
-		SpaceShip* info = NULL;
-		XMLFile file = XMLFile(ship);
-		Loader::load(&file, mask, false, true);
-		for(ObjectList<SpaceShip>::iterator item = ObjectList<SpaceShip>::begin(); item != ObjectList<SpaceShip>::end(); ++item)
-		        if(item->getXMLFilename() == *it)
-		            info = item->copy();
-		Loader::unload(&file);
-		*/
-    
+        /*
+        // We only want to load as little as possible
+        ClassTreeMask mask;
+            mask.exclude(Class(BaseObject));
+            mask.include(Class(SpaceShip));
+        SpaceShip* info = NULL;
+        XMLFile file = XMLFile(ship);
+        Loader::load(&file, mask, false, true);
+        for(ObjectList<SpaceShip>::iterator item = ObjectList<SpaceShip>::begin(); item != ObjectList<SpaceShip>::end(); ++item)
+                if(item->getXMLFilename() == *it)
+                    info = item->copy();
+        Loader::unload(&file);
+        */
+
         // Get all files matching the level criteria
         Ogre::StringVectorPtr levels = Resource::findResourceNames("*.oxw");
Index: code/branches/presentation2012merge/src/orxonox/controllers/FormationController.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/controllers/FormationController.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/orxonox/controllers/FormationController.cc	(revision 9272)
@@ -50,25 +50,25 @@
 {
 
-  SetConsoleCommand("FormationController", "formationflight",  &FormationController::formationflight);
-  SetConsoleCommand("FormationController", "masteraction",     &FormationController::masteraction);
-  SetConsoleCommand("FormationController", "followme",         &FormationController::followme);
-  SetConsoleCommand("FormationController", "passivebehaviour", &FormationController::passivebehaviour);
-  SetConsoleCommand("FormationController", "formationsize",    &FormationController::formationsize);
-
-
-
-
-  static const unsigned int STANDARD_MAX_FORMATION_SIZE = 9;
-  static const int RADIUS_TO_SEARCH_FOR_MASTERS = 5000;
-  static const float FORMATION_LENGTH =  110;
-  static const float FORMATION_WIDTH =  110;
-  static const int FREEDOM_COUNT = 4; //seconds the slaves in a formation will be set free when master attacks an enemy
-  static const float SPEED_MASTER = 0.6f;
-  static const float ROTATEFACTOR_MASTER = 0.2f;
-  static const float SPEED_FREE = 0.8f;
-  static const float ROTATEFACTOR_FREE = 0.8f;
-
-  FormationController::FormationController(BaseObject* creator) : Controller(creator)
-  {
+    SetConsoleCommand("FormationController", "formationflight",  &FormationController::formationflight);
+    SetConsoleCommand("FormationController", "masteraction",     &FormationController::masteraction);
+    SetConsoleCommand("FormationController", "followme",         &FormationController::followme);
+    SetConsoleCommand("FormationController", "passivebehaviour", &FormationController::passivebehaviour);
+    SetConsoleCommand("FormationController", "formationsize",    &FormationController::formationsize);
+
+
+
+
+    static const unsigned int STANDARD_MAX_FORMATION_SIZE = 9;
+    static const int RADIUS_TO_SEARCH_FOR_MASTERS = 5000;
+    static const float FORMATION_LENGTH =  110;
+    static const float FORMATION_WIDTH =  110;
+    static const int FREEDOM_COUNT = 4; //seconds the slaves in a formation will be set free when master attacks an enemy
+    static const float SPEED_MASTER = 0.6f;
+    static const float ROTATEFACTOR_MASTER = 0.2f;
+    static const float SPEED_FREE = 0.8f;
+    static const float ROTATEFACTOR_FREE = 0.8f;
+
+    FormationController::FormationController(BaseObject* creator) : Controller(creator)
+    {
         RegisterObject(FormationController);
 
@@ -91,9 +91,9 @@
         this->team_=-1;
         this->target_.setCallback(createFunctor(&FormationController::targetDied, this));
-  }
-
-  FormationController::~FormationController()
-  {
-    if (this->isInitialized())
+    }
+
+    FormationController::~FormationController()
+    {
+        if (this->isInitialized())
         {
             this->removeFromFormation();
@@ -123,7 +123,7 @@
             }
         }
-  }
-
-  void FormationController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    }
+
+    void FormationController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
         SUPER(FormationController, XMLPort, xmlelement, mode);
@@ -137,9 +137,9 @@
 
 
-  /**
+    /**
         @brief Activates / deactivates formationflight behaviour
         @param form activate formflight if form is true
     */
-  void FormationController::formationflight(const bool form)
+    void FormationController::formationflight(const bool form)
     {
         for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
@@ -168,5 +168,5 @@
     }
 
-  /**
+    /**
         @brief Get all masters to do a "specific master action"
         @param action which action to perform (integer, so it can be called with a console command (tmp solution))
@@ -198,5 +198,5 @@
     }
 
-  /**
+    /**
         @brief Sets shooting behaviour of pawns.
         @param passive if true, bots won't shoot.
@@ -225,5 +225,5 @@
     }
 
-  /**
+    /**
         @brief Sets maximal formation size
         @param size maximal formation size.
@@ -282,11 +282,11 @@
         Vector2 coord = get2DViewcoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
         float distance = (target - this->getControllableEntity()->getPosition()).length();
-		if(coord.x < 0.0001 && coord.y < 0.0001)
-		{
-			// if the ship reaches a direction very close to the direct one, set it to the direct one
-			Vector3 v_temp = this->getControllableEntity()->getPosition();
-			Quaternion quat = v_temp.getRotationTo(target);
-			this->getControllableEntity()->rotate(quat);
-		}
+        if(coord.x < 0.0001 && coord.y < 0.0001)
+        {
+            // if the ship reaches a direction very close to the direct one, set it to the direct one
+            Vector3 v_temp = this->getControllableEntity()->getPosition();
+            Quaternion quat = v_temp.getRotationTo(target);
+            this->getControllableEntity()->rotate(quat);
+        }
 
         if(this->state_ == FREE)
@@ -324,42 +324,42 @@
 
         if(this->state_ == SLAVE)
-		{
-
-			this->getControllableEntity()->rotateYaw(-2.0f * ROTATEFACTOR_MASTER * coord.x * 2);
-			this->getControllableEntity()->rotatePitch(2.0f * ROTATEFACTOR_MASTER * coord.y * 2);
-
-			if (distance < 300)
-			{
-				if (bHasTargetOrientation_)
-				{
-					copyTargetOrientation();
-				}
-				if (distance < 100)
-				{ //linear speed reduction
-					this->getControllableEntity()->moveFrontBack(distance/100.0f*0.4f*SPEED_MASTER);
-
-				} else this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER);
-
-			} else {
-				this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER + distance/300.0f);
-			}
-		}
+        {
+
+            this->getControllableEntity()->rotateYaw(-2.0f * ROTATEFACTOR_MASTER * coord.x * 2);
+            this->getControllableEntity()->rotatePitch(2.0f * ROTATEFACTOR_MASTER * coord.y * 2);
+
+            if (distance < 300)
+            {
+                if (bHasTargetOrientation_)
+                {
+                    copyTargetOrientation();
+                }
+                if (distance < 100)
+                { //linear speed reduction
+                    this->getControllableEntity()->moveFrontBack(distance/100.0f*0.4f*SPEED_MASTER);
+                }
+                else
+                    this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER);
+            }
+            else
+                this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER + distance/300.0f);
+        }
 
         if (distance < 10)
         {
             this->positionReached();
-	    bHasTargetOrientation_=false;
-        }
-    }
-
-
-
-  void FormationController::moveToTargetPosition()
+            bHasTargetOrientation_=false;
+        }
+    }
+
+
+
+    void FormationController::moveToTargetPosition()
     {
         this->moveToPosition(this->targetPosition_);
     }
 
-  //copy the Roll orientation of given Quaternion.
-  void FormationController::copyOrientation(const Quaternion& orient)
+    //copy the Roll orientation of given Quaternion.
+    void FormationController::copyOrientation(const Quaternion& orient)
     {
         //roll angle difference in radian
@@ -379,5 +379,5 @@
 
 
-   /**
+    /**
         @brief Unregisters a slave from its master. Initiated by a slave.
     */
@@ -469,9 +469,9 @@
         }
     }
- /**
+
+    /**
         @brief Commands the slaves of a master into a formation. Sufficiently fast not to be called within tick. Initiated by a master.
     */
-
-void FormationController::commandSlaves()
+    void FormationController::commandSlaves()
     {
         if(this->state_ != MASTER) return;
@@ -487,9 +487,9 @@
         }
         else
-	// formation:
+        // formation:
         {
             dest += 1.0f*orient*WorldEntity::BACK;
             Vector3 pos = Vector3::ZERO;
-	         bool left=true;
+            bool left=true;
             int i = 1;
 
@@ -689,9 +689,10 @@
 
         if (specificMasterActionHoldCount_ == 0)
-         {
+        {
             this->specificMasterAction_ = NONE;
             this->searchNewTarget();
-         }
-        else specificMasterActionHoldCount_--;
+        }
+        else
+            specificMasterActionHoldCount_--;
     }
 
@@ -717,10 +718,10 @@
     void FormationController::turn180()
     {
-            Vector2 coord = get2DViewdirection(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, this->targetPosition_);
-
-            this->getControllableEntity()->rotateYaw(-2.0f * sgn(coord.x) * coord.x*coord.x);
-            this->getControllableEntity()->rotatePitch(2.0f * sgn(coord.y) * coord.y*coord.y);
-
-            this->getControllableEntity()->moveFrontBack(SPEED_MASTER);
+        Vector2 coord = get2DViewdirection(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, this->targetPosition_);
+
+        this->getControllableEntity()->rotateYaw(-2.0f * sgn(coord.x) * coord.x*coord.x);
+        this->getControllableEntity()->rotatePitch(2.0f * sgn(coord.y) * coord.y*coord.y);
+
+        this->getControllableEntity()->moveFrontBack(SPEED_MASTER);
     }
 
@@ -740,6 +741,6 @@
     void FormationController::spin()
     {
-            this->moveToTargetPosition();
-            this->getControllableEntity()->rotateRoll(0.8f);
+        this->moveToTargetPosition();
+        this->getControllableEntity()->rotateRoll(0.8f);
     }
 
@@ -779,24 +780,19 @@
         if((humanPawn != NULL) && (allMasters.size() != 0))
         {
-                float posHuman = humanPawn->getPosition().length();
-                float distance = 0.0f;
-                float minDistance = FLT_MAX;
-                int index = 0;
-                int i = 0;
-
-                for(std::vector<FormationController*>::iterator it = allMasters.begin(); it != allMasters.end(); it++, i++)
-                    {
-                        if (!FormationController::sameTeam((*it)->getControllableEntity(), humanPawn, (*it)->getGametype())) continue;
-                        distance = posHuman - (*it)->getControllableEntity()->getPosition().length();
-                        if(distance < minDistance) index = i;
-                    }
-                allMasters[index]->followInit(humanPawn);
-            }
-
-    }
-
-
-
-
+            float posHuman = humanPawn->getPosition().length();
+            float distance = 0.0f;
+            float minDistance = FLT_MAX;
+            int index = 0;
+            int i = 0;
+
+            for(std::vector<FormationController*>::iterator it = allMasters.begin(); it != allMasters.end(); it++, i++)
+            {
+                if (!FormationController::sameTeam((*it)->getControllableEntity(), humanPawn, (*it)->getGametype())) continue;
+                distance = posHuman - (*it)->getControllableEntity()->getPosition().length();
+                if(distance < minDistance) index = i;
+            }
+            allMasters[index]->followInit(humanPawn);
+        }
+    }
 
     /**
@@ -820,5 +816,5 @@
     }
 
-   /**
+    /**
         @brief Master begins to follow a randomly chosen human player of the same team. Is a "specific master action".
     */
@@ -848,5 +844,5 @@
 
 
-  /**
+    /**
         @brief Master follows target with adjusted speed. Called within tick.
     */
@@ -860,5 +856,5 @@
 
 
-  void FormationController::setTargetPosition(const Vector3& target)
+    void FormationController::setTargetPosition(const Vector3& target)
     {
         this->targetPosition_ = target;
@@ -924,5 +920,5 @@
     }
 
-  void FormationController::forgetTarget()
+    void FormationController::forgetTarget()
     {
         this->target_ = 0;
@@ -930,5 +926,5 @@
     }
 
-   void FormationController::targetDied()
+    void FormationController::targetDied()
     {
         this->forgetTarget();
@@ -936,5 +932,5 @@
     }
 
-  bool FormationController::sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)
+    bool FormationController::sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)
     {
         if (entity1 == entity2)
Index: code/branches/presentation2012merge/src/orxonox/gametypes/Mission.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/gametypes/Mission.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/orxonox/gametypes/Mission.cc	(revision 9272)
@@ -63,5 +63,5 @@
         {
             this->missionAccomplished_ = false;
-	    this->end();
+            this->end();
         }
     }
@@ -78,9 +78,9 @@
     {
         Gametype::end();
-	/*if (this->missionAccomplished_) 
+        /*if (this->missionAccomplished_)
             this->gtinfo_->sendAnnounceMessage("Mission accomplished!");
-	else
+        else
             this->gtinfo_->sendAnnounceMessage("Mission failed!");
-	 * */
+        */
     }
 
Index: code/branches/presentation2012merge/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/infos/PlayerInfo.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/orxonox/infos/PlayerInfo.cc	(revision 9272)
@@ -173,5 +173,5 @@
         this->changedControllableEntity();
 
-		RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
+        RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
         if (radarviewable != NULL)
             radarviewable->setRadarName(this->getName());
Index: code/branches/presentation2012merge/src/orxonox/interfaces/RadarViewable.h
===================================================================
--- code/branches/presentation2012merge/src/orxonox/interfaces/RadarViewable.h	(revision 9271)
+++ code/branches/presentation2012merge/src/orxonox/interfaces/RadarViewable.h	(revision 9272)
@@ -61,14 +61,14 @@
         virtual ~RadarViewable();
 
-		virtual void setRadarName(const std::string& name)
-			{
-				if (this->radarName_ != name)
-				{
-					this->radarName_ = name;
-					this->settingsChanged();
-				}
-			}
-		const std::string& getRadarName() const
-			{ return this->radarName_; }
+        virtual void setRadarName(const std::string& name)
+            {
+                if (this->radarName_ != name)
+                {
+                    this->radarName_ = name;
+                    this->settingsChanged();
+                }
+            }
+        const std::string& getRadarName() const
+            { return this->radarName_; }
 
         inline void setRadarObjectCamouflage(float camouflage)
@@ -163,5 +163,5 @@
         ColourValue radarObjectColour_;
         float scale_;
-		std::string radarName_;
+        std::string radarName_;
     };
 }
Index: code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.cc	(revision 9272)
@@ -87,5 +87,5 @@
         this->setPriority( Priority::VeryHigh );
         this->registerVariables();
-	this->team_ = -1;
+        this->team_ = -1;
     }
 
Index: code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.h
===================================================================
--- code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.h	(revision 9271)
+++ code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.h	(revision 9272)
@@ -164,8 +164,8 @@
             void setTargetInternal( uint32_t targetID );
 
-	    inline void setTeam(int team)
-	        { this->team_ = team; }
-	    inline int getTeam() const
-	        { return this->team_; }
+            inline void setTeam(int team)
+                { this->team_ = team; }
+            inline int getTeam() const
+                { return this->team_; }
 
         protected:
@@ -243,5 +243,5 @@
             WeakPtr<WorldEntity> target_;
 
-	    int team_ ; //<! teamnumber
+            int team_ ; //<! teamnumber
     };
 }
Index: code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.cc	(revision 9272)
@@ -232,11 +232,11 @@
     {
         //Applies multiplier given by the DamageBoost Pickup.
-    	Pawn *test = dynamic_cast<Pawn *>(originator);
-    	if( test != NULL )
-    	{
-    	  damage *= originator->getDamageMultiplier();
-    	}
-
-    	if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
+        Pawn *test = dynamic_cast<Pawn *>(originator);
+        if( test != NULL )
+        {
+            damage *= originator->getDamageMultiplier();
+        }
+
+        if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
         {
             if (shielddamage >= this->getShieldHealth())
Index: code/branches/presentation2012merge/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 9271)
+++ code/branches/presentation2012merge/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 9272)
@@ -133,5 +133,5 @@
     {
         SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
-        
+
         SetConfigValueExternal(bEnableMotionBlur_, "GraphicsSettings", "enableMotionBlur", true)
             .description("Enable or disable the motion blur effect when moving very fast")
@@ -503,6 +503,6 @@
     void SpaceShip::resetCamera()
     {
-	if(this->hasLocalController() && this->hasHumanController())
-	{
+        if(this->hasLocalController() && this->hasHumanController())
+        {
             Camera *camera = this->getCamera();
             if (camera == 0)
@@ -514,5 +514,5 @@
             camera->setPosition(this->cameraOriginalPosition_);
             camera->setOrientation(this->cameraOriginalOrientation_);
-	}
+        }
     }
 
