Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TDCoordinate.cc
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TDCoordinate.cc	(revision 10245)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TDCoordinate.cc	(revision 10246)
@@ -24,6 +24,6 @@
     TDCoordinate::TDCoordinate(int x, int y)
     {
-    	this->x=x;
-    	this->y=y;
+        this->x=x;
+        this->y=y;
     }
 
@@ -31,12 +31,12 @@
     Vector3 TDCoordinate::get3dcoordinate()
     {
-    	float tileScale = 100;
+        float tileScale = 100;
 
-    	Vector3 *coord = new Vector3();
-    	coord->x= (x-8) * tileScale;
-    	coord->y= (y-8) * tileScale;
-    	coord->z=100;
+        Vector3 *coord = new Vector3();
+        coord->x= (x-8) * tileScale;
+        coord->y= (y-8) * tileScale;
+        coord->z=100;
 
-    	return *coord;
+        return *coord;
     }
 }
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TDCoordinate.h
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TDCoordinate.h	(revision 10245)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TDCoordinate.h	(revision 10246)
@@ -8,12 +8,13 @@
 #include "towerdefense/TowerDefensePrereqs.h"
 #include "worldentities/pawns/SpaceShip.h"
-namespace orxonox{
-
+namespace orxonox
+{
 
 //Class to save the Coordinates in a class instead of struct
 //Convert 2d coordinates to 3d in order to set waypoints
-class _TowerDefenseExport TDCoordinate: public OrxonoxClass {
-public:
-			int x;
+    class _TowerDefenseExport TDCoordinate : public OrxonoxClass
+    {
+        public:
+            int x;
             int y;
 
@@ -25,6 +26,5 @@
 
             TDCoordinate(int x, int y);
-        };
-
+    };
 
 }
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.cc	(revision 10245)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.cc	(revision 10246)
@@ -98,7 +98,7 @@
 /*
         for (int i=0; i < 16 ; i++){
-        	for (int j = 0; j< 16 ; j++){
-        		towermatrix[i][j] = NULL;
-        	}
+            for (int j = 0; j< 16 ; j++){
+                towermatrix[i][j] = NULL;
+            }
         }*/
 
@@ -109,5 +109,5 @@
         /* Temporary hack to allow the player to add towers and upgrade them */
         this->dedicatedAddTower_ = createConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) );
-	this->dedicatedUpgradeTower_ = createConsoleCommand( "upgradeTower", createExecutor( createFunctor(&TowerDefense::upgradeTower, this) ) );
+        this->dedicatedUpgradeTower_ = createConsoleCommand( "upgradeTower", createExecutor( createFunctor(&TowerDefense::upgradeTower, this) ) );
     }
 
@@ -136,21 +136,21 @@
 // Waypoints: [1,3] [10,3] [10,11] [13,11] -> add the points to a matrix so the player cant place towers on the path
         for (int i=0; i < 16 ; i++){
-        	for (int j = 0; j< 16 ; j++){
-        		towermatrix[i][j] = false;
-        	}
+            for (int j = 0; j< 16 ; j++){
+                towermatrix[i][j] = false;
+            }
         }
 
         for (int k=0; k<3; k++)
-        	towermatrix[1][k]=true;
+            towermatrix[1][k]=true;
         for (int l=1; l<11; l++)
-                towermatrix[l][3]=true;
+            towermatrix[l][3]=true;
         for (int m=3; m<12; m++)
-                towermatrix[10][m]=true;
+            towermatrix[10][m]=true;
         for (int n=10; n<14; n++)
-                towermatrix[n][11]=true;
+            towermatrix[n][11]=true;
         for (int o=13; o<16; o++)
-                towermatrix[13][o]=true;
-
-//set initial credits, lifes and WaveNumber
+            towermatrix[13][o]=true;
+
+        //set initial credits, lifes and WaveNumber
         this->setCredit(200);
         this->setLifes(50);
@@ -158,39 +158,40 @@
         time=0.0;
 
-//adds initial towers
-for (int i=0; i <7; i++){
-          addTower(i+3,4);
-    	}/*
-for (int j=0; j < 7; j++){
-          addTower(9,j+5);
+        //adds initial towers
+        for (int i=0; i <7; i++){
+            addTower(i+3,4);
+        }/*
+        for (int j=0; j < 7; j++){
+            addTower(9,j+5);
         }*/
-}
+    }
+
     // Generates a TowerDefenseEnemy. Uses Template "enemytowerdefense". Sets position at first waypoint of path.
-     void TowerDefense::addTowerDefenseEnemy(std::vector<TDCoordinate*> path, int templatenr){ 
-
-
-    	TowerDefenseEnemy* en1 = new TowerDefenseEnemy(this->center_->getContext());
+    void TowerDefense::addTowerDefenseEnemy(std::vector<TDCoordinate*> path, int templatenr){
+
+
+        TowerDefenseEnemy* en1 = new TowerDefenseEnemy(this->center_->getContext());
         
-	switch(templatenr) 
-	{ 
-	case 1 : 
-		en1->addTemplate("enemytowerdefense1"); 
-		en1->setScale(3); 
-	    en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
-
-		break; 
-	case 2 : 
-	 	en1->addTemplate("enemytowerdefense2");
- 		en1->setScale(2); 
-	    en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
-	  //  en1->setShieldHealth(en1->getShield() = this->getWaveNumber()*2))
-
-		break; 
-	case 3 : 
-	    en1->addTemplate("enemytowerdefense3");
-	    en1->setScale(1);
-	    en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
-	    break;
-	} 
+        switch(templatenr)
+        {
+        case 1 :
+            en1->addTemplate("enemytowerdefense1");
+            en1->setScale(3);
+            en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
+            break;
+
+        case 2 :
+            en1->addTemplate("enemytowerdefense2");
+            en1->setScale(2);
+            en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
+            //  en1->setShieldHealth(en1->getShield() = this->getWaveNumber()*2))
+            break;
+
+        case 3 :
+            en1->addTemplate("enemytowerdefense3");
+            en1->setScale(1);
+            en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
+            break;
+        }
 
         en1->getController();
@@ -199,12 +200,11 @@
 
         for(unsigned int i = 0; i < path.size(); ++i)
-        	{
-            	en1->addWaypoint((path.at(i)));
-        	}
+        {
+            en1->addWaypoint((path.at(i)));
+        }
     }
 
 
     void TowerDefense::end()
-
     {
 
@@ -217,5 +217,5 @@
     void TowerDefense::upgradeTower(int x,int y)
     {/*
-    	const int upgradeCost = 20;
+        const int upgradeCost = 20;
 
         if (!this->hasEnoughCreditForTower(upgradeCost))
@@ -233,5 +233,5 @@
         else
         {
-        	(towermatrix [x][y])->upgradeTower();
+            (towermatrix [x][y])->upgradeTower();
         }*/
     }
@@ -292,5 +292,5 @@
     bool TowerDefense::hasEnoughCreditForUpgrade()
     {
-    	return true;
+        return true;
     }
 
@@ -306,52 +306,52 @@
         if(time>1 && TowerDefenseEnemyvector.size() < 30)
         {
-        	//adds different types of enemys depending on the WaveNumber
-        	addTowerDefenseEnemy(path, this->getWaveNumber() % 3 +1 );
-        	time = time-1;
-        }
-
-		Vector3* endpoint = new Vector3(500, 700, 150);
-		//if ships are at the end they get destroyed
-		for(unsigned int i =0; i < TowerDefenseEnemyvector.size(); ++i)
-		{
-			if(TowerDefenseEnemyvector.at(i) != NULL && TowerDefenseEnemyvector.at(i)->isAlive())
-				{
-				//destroys enemys at the end of teh path and reduces the life by 1. no credits gifted
-
-					Vector3 ship = TowerDefenseEnemyvector.at(i)->getRVWorldPosition();
-					float distance = ship.distance(*endpoint);
-
-					if(distance <50){
-						TowerDefenseEnemyvector.at(i)->destroy();
-						this->reduceLifes(1);
-						this->buyTower(1);
-						if (this->getLifes()==0)
-								{
-								    this->end();
-								}
-					}
-				}
-			}
-			//goes thorugh vector to see if an enemy is still alive. if not next wave is launched
-			int count= 0;
-			for(unsigned int i =0; i < TowerDefenseEnemyvector.size(); ++i)
-			{
-				if(TowerDefenseEnemyvector.at(i)!= NULL)
-				{
-					++count;
-				}
-			}
-
-			if(count== 0)
-			{
-				time2 +=dt;
-				if(time2 > 10)
-				{
-					TowerDefenseEnemyvector.clear();
-					this->nextwave();
-					time=0;
-					time2=0;
-				}
-			}
+            //adds different types of enemys depending on the WaveNumber
+            addTowerDefenseEnemy(path, this->getWaveNumber() % 3 +1 );
+            time = time-1;
+        }
+
+        Vector3* endpoint = new Vector3(500, 700, 150);
+        //if ships are at the end they get destroyed
+        for(unsigned int i =0; i < TowerDefenseEnemyvector.size(); ++i)
+        {
+            if(TowerDefenseEnemyvector.at(i) != NULL && TowerDefenseEnemyvector.at(i)->isAlive())
+            {
+                //destroys enemys at the end of teh path and reduces the life by 1. no credits gifted
+
+                Vector3 ship = TowerDefenseEnemyvector.at(i)->getRVWorldPosition();
+                float distance = ship.distance(*endpoint);
+
+                if(distance <50){
+                    TowerDefenseEnemyvector.at(i)->destroy();
+                    this->reduceLifes(1);
+                    this->buyTower(1);
+                    if (this->getLifes()==0)
+                    {
+                        this->end();
+                    }
+                }
+            }
+        }
+        //goes thorugh vector to see if an enemy is still alive. if not next wave is launched
+        int count= 0;
+        for(unsigned int i =0; i < TowerDefenseEnemyvector.size(); ++i)
+        {
+            if(TowerDefenseEnemyvector.at(i)!= NULL)
+            {
+                ++count;
+            }
+        }
+
+        if(count== 0)
+        {
+            time2 +=dt;
+            if(time2 > 10)
+            {
+                TowerDefenseEnemyvector.clear();
+                this->nextwave();
+                time=0;
+                time2=0;
+            }
+        }
 
 
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.h
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.h	(revision 10245)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.h	(revision 10246)
@@ -61,14 +61,14 @@
         //virtual bool playerLeft(PlayerInfo* player);
         //Player Stats (set,get, reduce)
-        int getCredit(){	return this->credit_;	}
-        int getLifes(){		return this->lifes_;	}
-        int getWaveNumber(){	return this->waves_;	}
+        int getCredit(){ return this->credit_; }
+        int getLifes(){ return this->lifes_; }
+        int getWaveNumber(){ return this->waves_; }
         void setCredit(int credit){ credit_ = credit; }
         void setLifes(int lifes){ lifes_ = lifes; }
-        void setWaveNumber(int wavenumber){waves_=wavenumber;	}
+        void setWaveNumber(int wavenumber){ waves_=wavenumber; }
         void buyTower(int cost){ credit_ -= cost;}
-        void addCredit(int credit) {	credit_+=credit;	}
+        void addCredit(int credit) { credit_+=credit; }
         void nextwave(){ waves_++;}
-        int reduceLifes(int NumberofLifes){	return lifes_-=NumberofLifes;	}
+        int reduceLifes(int NumberofLifes){ return lifes_-=NumberofLifes; }
 
         //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.cc
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 10245)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 10246)
@@ -34,10 +34,10 @@
     //add credit if enemy is destroyed
     TowerDefenseEnemy::~TowerDefenseEnemy(){
-    		this->td->addCredit(1);
+        this->td->addCredit(1);
     }
 
     void TowerDefenseEnemy::addWaypoint(TDCoordinate* coord)
     {
-    	this->Waypointsvector_.push_back(coord);
+        this->Waypointsvector_.push_back(coord);
     }
 
@@ -51,17 +51,17 @@
     void TowerDefenseEnemy::popWaypoint()
     {
-    	if(Waypointsvector_.size()>0)
-    		Waypointsvector_.pop_back();
+        if(Waypointsvector_.size()>0)
+            Waypointsvector_.pop_back();
     }
 
     TDCoordinate TowerDefenseEnemy::peekWaypoint()
     {
-    	if(Waypointsvector_.size()<=0){
-    		TDCoordinate* coord = TDCoordinate(-1,-1);
-    		return coord;
-    	}else{
-        	return Waypointsvector_.at(Waypointsvector_.size()-1);
+        if(Waypointsvector_.size()<=0){
+            TDCoordinate* coord = TDCoordinate(-1,-1);
+            return coord;
+        }else{
+            return Waypointsvector_.at(Waypointsvector_.size()-1);
 
-    	}
+        }
 
 
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.h
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.h	(revision 10245)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.h	(revision 10246)
@@ -30,8 +30,8 @@
  *
  */
-	class _TowerDefenseExport TowerDefenseEnemy : public SpaceShip 
-	{
-	public:
-		TowerDefenseEnemy(Context* context);
+    class _TowerDefenseExport TowerDefenseEnemy : public SpaceShip
+    {
+    public:
+        TowerDefenseEnemy(Context* context);
         virtual ~TowerDefenseEnemy();
 
@@ -44,10 +44,10 @@
 
 
-	private:
+    private:
         TowerDefense* td;
         bool once_;
         std::vector<TDCoordinate*> Waypointsvector_;
 
-	};
+    };
 
 
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefensePlayerStats.h
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefensePlayerStats.h	(revision 10245)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefensePlayerStats.h	(revision 10246)
@@ -69,5 +69,5 @@
 
         inline int getLifes()
-        	{return lifes_;	}
+            {return lifes_; }
 
         inline void reduceLifes(int NumberofLifes)
@@ -75,5 +75,5 @@
 
         inline void upgradeTower(int upgradecost)
-        	{ credit_ -= upgradecost;}
+            { credit_ -= upgradecost;}
 
 
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseTower.cc
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseTower.cc	(revision 10245)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseTower.cc	(revision 10246)
@@ -63,25 +63,25 @@
 
     bool TowerDefenseTower::upgradeTower()
-       {
-       	if(upgrade < 3)
-       	{
-       		upgrade++;
-       		float reloadrate = getReloadRate();
-       		float reloadwaittime = getReloadWaitTime();
-       		this->setDamageMultiplier(5000);
+    {
+        if(upgrade < 3)
+        {
+            upgrade++;
+            float reloadrate = getReloadRate();
+            float reloadwaittime = getReloadWaitTime();
+            this->setDamageMultiplier(5000);
 
-       		reloadrate = 0.5f*reloadrate;
-       		reloadwaittime = 0.5f*reloadwaittime;
-       		setReloadRate(reloadrate);
-       		setReloadWaitTime(reloadwaittime);
-       		this->addTemplate("towerturret1");
-       	}
-       	else
-       	{
-       		orxout() << "Tower fully upgraded" << endl;
-       		return false;
-       	}
-       	return true;
-       }
+            reloadrate = 0.5f*reloadrate;
+            reloadwaittime = 0.5f*reloadwaittime;
+            setReloadRate(reloadrate);
+            setReloadWaitTime(reloadwaittime);
+            this->addTemplate("towerturret1");
+        }
+        else
+        {
+            orxout() << "Tower fully upgraded" << endl;
+            return false;
+        }
+        return true;
+    }
 
     // This function is called whenever a player presses the up or the down key.
