Index: code/branches/towerdefenseFS15/src/modules/objects/Turret.cc
===================================================================
--- code/branches/towerdefenseFS15/src/modules/objects/Turret.cc	(revision 10335)
+++ code/branches/towerdefenseFS15/src/modules/objects/Turret.cc	(revision 10340)
@@ -223,4 +223,5 @@
         XMLPortParam(Turret, "maxYaw", setMaxYaw, getMaxYaw, xmlelement, mode);
         XMLPortParam(Turret, "maxPitch", setMaxPitch, getMaxPitch, xmlelement, mode);
+        XMLPortParam(Turret, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);
     }
 
Index: code/branches/towerdefenseFS15/src/modules/objects/Turret.h
===================================================================
--- code/branches/towerdefenseFS15/src/modules/objects/Turret.h	(revision 10335)
+++ code/branches/towerdefenseFS15/src/modules/objects/Turret.h	(revision 10340)
@@ -102,4 +102,10 @@
                 { return this->maxYaw_; }
 
+            inline void setRotationThrust(float rotationthrust)
+            	{ this->rotationThrust_ = rotationthrust; }
+
+            inline float getRotationThrust()
+            	{ return this->rotationThrust_; }
+
         protected:
             Vector3 startDir_; //!< The initial facing direction, in local coordinates.
Index: code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.cc	(revision 10335)
+++ code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.cc	(revision 10340)
@@ -102,4 +102,6 @@
         }*/
 
+
+
         this->setHUDTemplate("TowerDefenseHUD");
 
@@ -136,19 +138,23 @@
         for (int i=0; i < 16 ; i++){
             for (int j = 0; j< 16 ; j++){
-                towermatrix[i][j] = false;
-            }
-        }
+                towerModelMatrix[i][j] = NULL;
+                towerTurretMatrix[i][j] = NULL;
+            }
+        }
+
+        Model* dummyModel = new Model(this->center_->getContext());
 
         //the path of the spacehips has to be blocked, so that no towers can be build there
         for (int k=0; k<3; k++)
-            towermatrix[1][k]=true;
+            towerModelMatrix[1][k]=dummyModel;
         for (int l=1; l<11; l++)
-            towermatrix[l][3]=true;
+        	towerModelMatrix[l][3]=dummyModel;
         for (int m=3; m<12; m++)
-            towermatrix[10][m]=true;
+        	towerModelMatrix[10][m]=dummyModel;
         for (int n=10; n<14; n++)
-            towermatrix[n][11]=true;
+        	towerModelMatrix[n][11]=dummyModel;
         for (int o=13; o<16; o++)
-            towermatrix[13][o]=true;
+        	towerModelMatrix[13][o]=dummyModel;
+
 
         //set initial credits, lifes and WaveNumber
@@ -158,10 +164,10 @@
         time=0.0;
 
+        /*
         //adds initial towers
-        /*
         for (int i=0; i <7; i++){
             addTower(i+3,4);
         }
-        */
+		*/
     }
 
@@ -216,5 +222,5 @@
     //not working yet
     void TowerDefense::upgradeTower(int x,int y)
-    {/*
+    {
         const int upgradeCost = 20;
 
@@ -225,5 +231,8 @@
         }
 
-        if (towermatrix [x][y] == NULL)
+
+        Model* dummyModel2 = new Model(this->center_->getContext());
+
+        if (towerModelMatrix [x][y] == NULL || (towerModelMatrix [x][y])->getMeshSource() == dummyModel2->getMeshSource())
         {
             orxout() << "no tower on this position" << endl;
@@ -233,6 +242,7 @@
         else
         {
-            (towermatrix [x][y])->upgradeTower();
-        }*/
+            (towerTurretMatrix [x][y])->upgradeTower();
+            this->buyTower(upgradeCost);
+        }
     }
 
@@ -251,5 +261,5 @@
         }
 
-        if (towermatrix [x][y]==true)
+        if (towerModelMatrix [x][y]!=NULL)
         {
             orxout() << "not possible to put tower here!!" << endl;
@@ -273,7 +283,5 @@
         orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl;
 
-       //Reduce credit
-        this->buyTower(towerCost);
-        towermatrix [x][y]=true;
+
 
         //Create Model
@@ -290,4 +298,9 @@
         towernew->setGame(this);
         towernew->setTeam(1);
+
+        //Reduce credit
+         this->buyTower(towerCost);
+         towerModelMatrix [x][y]= newtowermodel;
+         towerTurretMatrix [x][y]= towernew;
     }
 
@@ -325,5 +338,5 @@
             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
+                //destroys enemys at the end of the path and reduces the life by 1. no credits gifted
 
                 Vector3 ship = TowerDefenseEnemyvector.at(i)->getRVWorldPosition();
Index: code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.h
===================================================================
--- code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.h	(revision 10335)
+++ code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.h	(revision 10340)
@@ -53,5 +53,6 @@
 
         std::vector<orxonox::WeakPtr<TowerDefenseEnemy> > TowerDefenseEnemyvector;
-        bool towermatrix[16][16];
+        Model* towerModelMatrix[16][16];
+        TowerDefenseTower* towerTurretMatrix[16][16];
         void addTowerDefenseEnemy(std::vector<TDCoordinate*> path, int templatenr);
         virtual void start(); //<! The function is called when the gametype starts
Index: code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseEnemy.cc
===================================================================
--- code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 10335)
+++ code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 10340)
@@ -35,5 +35,9 @@
     //add credit if enemy is destroyed
     TowerDefenseEnemy::~TowerDefenseEnemy(){
-        //this->td->addCredit(1);
+
+    	if (this->isInitialized())
+    	{
+    		getGame()->addCredit(1);
+    	}
     }
 
@@ -64,8 +68,12 @@
         if (getGame() && once_ == false && getHealth() <= 0)
         {
+        	orxout() << "damagefunctionIF" << endl;
             getGame()->addCredit(1);
             once_ = true;
         }
+        orxout() << "damagefunction" << endl;
+
     }
+
 /*
     void TowerDefenseEnemy::popWaypoint()
Index: code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseTower.cc
===================================================================
--- code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseTower.cc	(revision 10335)
+++ code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseTower.cc	(revision 10340)
@@ -66,6 +66,6 @@
             float reloadrate = getReloadRate();
             float reloadwaittime = getReloadWaitTime();
-            this->setDamageMultiplier(5000);
-
+            this->setDamageMultiplier((upgrade+1)*2);
+            this->setRotationThrust(2*this->getRotationThrust());
             reloadrate = 0.5f*reloadrate;
             reloadwaittime = 0.5f*reloadwaittime;
