Index: code/branches/towerdefenseFabien/data/levels/towerDefense.oxw
===================================================================
--- code/branches/towerdefenseFabien/data/levels/towerDefense.oxw	(revision 10589)
+++ code/branches/towerdefenseFabien/data/levels/towerDefense.oxw	(revision 10591)
@@ -235,18 +235,18 @@
    explosionchunks        = 6
 
-   health            = 1
-   maxhealth         = 2
-   initialhealth     = 1
-
-   shieldhealth        = 30
-   initialshieldhealth = 30
-   maxshieldhealth     = 50
+   health            = 15
+   maxhealth         = 15
+   initialhealth     = 15
+
+   shieldhealth        = 15
+   initialshieldhealth = 15
+   maxshieldhealth     = 15
    shieldabsorption    = 0.8
    reloadrate          = 1
    reloadwaittime      = 1
 
-   primaryThrust     = 100
+   primaryThrust     = 1000
    auxilaryThrust    = 30
-   rotationThrust    = 50
+   rotationThrust    = 80
 
    lift = 1;
@@ -262,5 +262,5 @@
 
    collisionType     = "dynamic"
-   mass              = 100
+   mass              = 10
    linearDamping     = 0.7
    angularDamping    = 0.9999999
@@ -287,6 +287,5 @@
     </collisionShapes>
     <controller>
-      <WaypointController accuracy=60>
-      </WaypointController>
+       <WaypointController accuracy = 50/>
     </controller>
   </TowerDefenseEnemy>
@@ -301,11 +300,11 @@
    explosionchunks        = 6
 
-   health            = 100
-   maxhealth         = 200
-   initialhealth     = 100
-
-   shieldhealth        = 30
-   initialshieldhealth = 30
-   maxshieldhealth     = 50
+   health            = 30
+   maxhealth         = 30
+   initialhealth     = 30
+
+   shieldhealth        = 0
+   initialshieldhealth = 0
+   maxshieldhealth     = 0
    shieldabsorption    = 0.8
    reloadrate          = 1
@@ -314,5 +313,5 @@
    primaryThrust     = 100
    auxilaryThrust    = 30
-   rotationThrust    = 50
+   rotationThrust    = 80
 
    lift = 1;
@@ -338,8 +337,8 @@
       <Engine position=" 0, 0, 0" 
         boostfactor    = 2
-        speedfront     = 150
+        speedfront     = 100
         speedback      =  50
         speedleftright =  50
-        speedupdown    =  50         
+        speedupdown    =  50        
         accelerationfront     = 500
         accelerationbrake     = 500
@@ -359,9 +358,8 @@
       <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
-    </collisionShapes>
-    <controller>
-      <WaypointController accuracy=60>
-      </WaypointController>
-    </controller>    
+    </collisionShapes> 
+    <controller>
+       <WaypointController accuracy = 50/>
+    </controller>
   </TowerDefenseEnemy>
 </Template>
@@ -375,11 +373,11 @@
    explosionchunks        = 6
 
-   health            = 100
-   maxhealth         = 200
-   initialhealth     = 100
+   health            = 15
+   maxhealth         = 15
+   initialhealth     = 15
    
-   shieldhealth        = 30
-   initialshieldhealth = 30
-   maxshieldhealth     = 50
+   shieldhealth        = 5
+   initialshieldhealth = 5
+   maxshieldhealth     = 5
    shieldabsorption    = 0.8
    reloadrate          = 1
@@ -388,5 +386,5 @@
    primaryThrust     = 100
    auxilaryThrust    = 30
-   rotationThrust    = 50
+   rotationThrust    = 80
 
    lift = 1;
@@ -412,13 +410,13 @@
       <Engine position=" 0, 0, 0" 
         boostfactor    = 2
-        speedfront     = 150
-        speedback      =  50
-        speedleftright =  50
-        speedupdown    =  50         
+        speedfront     = 300
+        speedback      =  300
+        speedleftright =  300
+        speedupdown    =  300         
         accelerationfront     = 500
         accelerationbrake     = 500
-        accelerationback      =  125
-        accelerationleftright =  125
-        accelerationupdown    =  125
+        accelerationback      =  500
+        accelerationleftright =  500
+        accelerationupdown    =  500
       />
     </engines>
@@ -435,7 +433,6 @@
     </collisionShapes>
     <controller>
-      <WaypointController accuracy=60>
-      </WaypointController>
-    </controller>    
+       <WaypointController accuracy = 50/>
+    </controller>
   </TowerDefenseEnemy>
 </Template>
@@ -486,7 +483,7 @@
             F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
             F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
+            F1F1F1I2F1F1F1F1F1F1F1Y1Y1Y1F1F1
             F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
-            F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
-            F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
+            F1F1F1I2F1F1F1F1F1F1F1Y1Y1Y1F1F1
             F1F1F1R2I3I3I3I3L3F1F1F1F1F1F1F1
             F1F1F1F1F1F1F1F1I2F1F1F1F1F1F1F1
Index: code/branches/towerdefenseFabien/data/overlays/towerdefenseHUD.oxo
===================================================================
--- code/branches/towerdefenseFabien/data/overlays/towerdefenseHUD.oxo	(revision 10589)
+++ code/branches/towerdefenseFabien/data/overlays/towerdefenseHUD.oxo	(revision 10591)
@@ -1,10 +1,43 @@
 <Template name="TowerDefenseHUD">
+  <OverlayGroup name="TowerDefenseHUD" scale = "1, 1">
+    
+     <TowerDefenseHUDController
+     position  = "0.9, 0.10"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.05
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+        showlives = false
+        showcredits = true
+        showwaves = false
+    />
 
+    <TowerDefenseHUDController
+     position  = "0.9, 0.25"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.05
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+        showlives = true
+        showcredits = false
+        showwaves = false
+    />  
+      
+    <TowerDefenseHUDController
+     position  = "0.9, 0.40"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.05
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+        showlives = false
+        showcredits = false
+        showwaves = true
+    />      
 
-  <OverlayGroup name="TowerDefenseHUD" scale = "1, 1">
-  
-  
     <OverlayText
-     position  = "0.83, 0.05"
+     position  = "0.8, 0.1"
      pickpoint = "0.0, 0.0"
      font      = "ShareTechMono"
@@ -16,19 +49,6 @@
     />
     
-    
-     <TowerDefenseHUDController
-     position  = "0.88, 0.10"
-     pickpoint = "0.0, 0.0"
-     font      = "ShareTechMono"
-     textsize  = 0.05
-     colour    = "1.0, 1.0, 1.0, 1.0"
-     align     = "left"
-		showlives = false
-		showcredits = true
-		showwaves = false
-    />
-    
-        <OverlayText
-     position  = "0.83, 0.22"
+    <OverlayText
+     position  = "0.8, 0.25"
      pickpoint = "0.0, 0.0"
      font      = "ShareTechMono"
@@ -40,18 +60,6 @@
     />
     
-         <TowerDefenseHUDController
-     position  = "0.88, 0.27"
-     pickpoint = "0.0, 0.0"
-     font      = "ShareTechMono"
-     textsize  = 0.05
-     colour    = "1.0, 1.0, 1.0, 1.0"
-     align     = "left"
-		showlives = true
-		showcredits = false
-		showwaves = false
-    />
-    
-            <OverlayText
-     position  = "0.83, 0.39"
+    <OverlayText
+     position  = "0.8, 0.40"
      pickpoint = "0.0, 0.0"
      font      = "ShareTechMono"
@@ -63,18 +71,4 @@
     />
     
-         <TowerDefenseHUDController
-     position  = "0.88, 0.44"
-     pickpoint = "0.0, 0.0"
-     font      = "ShareTechMono"
-     textsize  = 0.05
-     colour    = "1.0, 1.0, 1.0, 1.0"
-     align     = "left"
-     	showlives = false
-		showcredits = false
-		showwaves = true
-
-    />
-    
-    
   </OverlayGroup>
 </Template>
Index: code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefense.cc	(revision 10589)
+++ code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefense.cc	(revision 10591)
@@ -87,10 +87,4 @@
 namespace orxonox
 {
-    static const std::string __CC_addTower_name  = "addTower";
-    static const std::string __CC_upgradeTower_name = "upgradeTower";
-
-    SetConsoleCommand("TowerDefense", __CC_addTower_name,  &TowerDefense::addTower ).addShortcut().defaultValues(1);
-    SetConsoleCommand("TowerDefense", __CC_upgradeTower_name, &TowerDefense::upgradeTower).addShortcut().defaultValues(0);
-
     RegisterUnloadableClass(TowerDefense);
 
@@ -102,23 +96,20 @@
         this->player_ = NULL;        
         this->setHUDTemplate("TowerDefenseHUD");
-        this->nextwaveTimer_.setTimer(10, false, createExecutor(createFunctor(&TowerDefense::nextwave, this)));
-        this->nextwaveTimer_.stopTimer();
-        this->waves_ = 0;
-        this->time = 0;
+        this->waveNumber_ = 0;
+        this->timeSinceLastSpawn_ = 0.0;
+        this->timeUntilNextWave_ = 0.0;
         this->credit_ = 0;
         this->lifes_ = 0;
+        this->waveSize_ = 0;
+        offset_ = Vector3(0,0,10);
 
         //this->stats_ = new TowerDefensePlayerStats();
-
-        ModifyConsoleCommand(__CC_addTower_name).setObject(this);
-        ModifyConsoleCommand(__CC_upgradeTower_name).setObject(this);
     }
 
     TowerDefense::~TowerDefense()
-    {        /* Part of a temporary hack to allow the player to add towers */
+    {
         if (this->isInitialized())
         {
-            ModifyConsoleCommand(__CC_addTower_name).setObject(NULL);
-            ModifyConsoleCommand(__CC_upgradeTower_name).setObject(NULL);
+
         }
     }
@@ -149,15 +140,13 @@
 
         createFields();
-
         TeamDeathmatch::start();
-
-        // Waypoints: [1,3] [10,3] [10,11] [13,11] -> add the points to a matrix so the player cant place towers on the path
-        
 
         //set initial credits, lifes and WaveNumber
         this->setCredit(1000);
-        this->setLifes(100);
+        this->setLifes(100);        
+        this->timeSinceLastSpawn_ = 0.0;
+        this->timeUntilNextWave_ = 5.0;
+        this->waveSize_ = 0;
         this->setWaveNumber(0);
-        time = 0.0;
     }
 
@@ -165,6 +154,4 @@
     void TowerDefense::addTowerDefenseEnemy(int templatenr)
     {
-        orxout() << "addTowerDefenseEnemy" << endl;
-
         TowerDefenseEnemy* en1 = new TowerDefenseEnemy(this->center_->getContext());
         
@@ -200,13 +187,13 @@
         if (controller != NULL && waypoints_.size() > 1)
         {
-            en1->setPosition(waypoints_.at(0)->getPosition());
+            en1->setPosition(waypoints_.at(0)->getPosition() + offset_);
             en1->setOrientation(Vector3(0,0,10), Degree(0));
             en1->setDirection(Vector3(0,1,0));
-            en1->lookAt(waypoints_.at(1)->getPosition());
+            en1->lookAt(waypoints_.at(1)->getPosition() + offset_);
 
             for (unsigned int i = 0; i < waypoints_.size(); ++ i)
             {
                 orxonox::WeakPtr<MovableEntity> waypoint = new MovableEntity(this->center_->getContext());
-                waypoint->setPosition(waypoints_.at(i)->getPosition());
+                waypoint->setPosition(waypoints_.at(i)->getPosition() + offset_);
                 controller->addWaypoint(waypoint);
             }
@@ -229,6 +216,4 @@
         assert(player);
         player_ = player;
-
-        orxout() << "spawnPlayer" << endl;
 
         if (selecter->getPlayer() == NULL)
@@ -287,7 +272,5 @@
     void TowerDefense::tick(float dt)
     {
-        //orxout() << "tick1" << endl;
         SUPER(TowerDefense, tick, dt);
-        //orxout() << "tick2" << endl;
 
         if (hasStarted() == false || player_ == NULL)
@@ -295,5 +278,6 @@
             return;
         }
-        time += dt;       
+        timeUntilNextWave_ -= dt;
+        timeSinceLastSpawn_ += dt;
 
         //build/upgrade tower at selecter position
@@ -311,13 +295,5 @@
             }            
         }
-
-        if (time >= 1.3 * enemies_.size() && enemies_.size() < 10)
-        {
-            //adds different types of enemys depending on the WaveNumber
-            addTowerDefenseEnemy(this->getWaveNumber() % 3 +1 );
-        }
-
-        //if ships are at the end they get destroyed
-
+        
         for (std::list<WeakPtr<TowerDefenseEnemy> >::iterator it = enemies_.begin(); it != enemies_.end(); )
         {
@@ -326,13 +302,13 @@
                 // the enemy was destroyed by a tower - remove it from the list
                 enemies_.erase(it++);
+                addCredit(1);
             }
             else
             {
-                //destroys enemys at the end of the path and reduces the life by 1. No credits gifted
+                //if ships are at the end they get destroyed
                 Vector3 ship = (*it)->getRVWorldPosition();
                 float distance = ship.distance(endpoint_);
-                if(distance < 50)
+                if(distance < 40)
                 {
-                    orxout() << "enemy deleted" << endl;
                     (*it)->destroy();
                     enemies_.erase(it++);
@@ -348,10 +324,24 @@
                 }
             }
-        }        
-
-        if (enemies_.size() == 0 && !this->nextwaveTimer_.isActive())
-        {
-            this->nextwaveTimer_.startTimer();
-        }
+        }  
+
+        // Add new enemy?
+        if (timeSinceLastSpawn_ >= 1.0 && waveSize_ > 0)
+        {
+            // Add new enemy
+            timeSinceLastSpawn_ -= 1.0;
+            -- waveSize_;
+            addTowerDefenseEnemy(this->getWaveNumber() % 3 + 1);
+        }
+        else if (timeUntilNextWave_ <= 0.0 && waveSize_ <= 0)
+        {
+            //New wave
+            ++ waveNumber_;
+            timeSinceLastSpawn_ = 0.0;
+
+            timeUntilNextWave_ = waveNumber_+10;
+            waveSize_ = waveNumber_+5;
+        }
+
     }
 
@@ -361,5 +351,4 @@
         TDCoordinate coord(0,0);
         TDCoordinate startCoord(0,0);
-
         std::string fields = center_->getFields();
         int pos = 0;
@@ -372,6 +361,6 @@
                 fields_[i][j]->setCenterpoint(center_);
                 center_->attach(fields_[i][j]);
-                fields_[i][j]->setPosition(coord.get3dcoordinate());                
-                fields_[i][j]->create(fields.at(pos), fields.at(pos+1));           
+                fields_[i][j]->setPosition(coord.get3dcoordinate()); 
+                fields_[i][j]->create(fields.at(pos), fields.at(pos+1));
                 pos += 2;
                 if (fields_[i][j]->getType() == START)
@@ -382,5 +371,4 @@
             }
         }
-
         //Place waypoints along the street for the waypoint controllers of the enemies
         TDCoordinate* thisCoord = &startCoord;
@@ -429,52 +417,3 @@
         return NULL;
     }
-
-    /*
-    void TowerDefense::playerEntered(PlayerInfo* player)
-    {
-        TeamDeathmatch::playerEntered(player);
-
-        const std::string& message = player->getName() + " entered the game";
-        ChatManager::message(message);
-    }
-
-    bool TowerDefense::playerLeft(PlayerInfo* player)
-    {
-        bool valid_player = TeamDeathmatch::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);
-        }
-
-        TeamDeathmatch::pawnKilled(victim, killer);
-    }
-
-    void TowerDefense::playerScored(PlayerInfo* player, int score)
-    {
-        Gametype::playerScored(player, score);
-    }*/
 }
Index: code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefense.h
===================================================================
--- code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefense.h	(revision 10589)
+++ code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefense.h	(revision 10591)
@@ -61,45 +61,35 @@
         void payCredit(int pay){ this->credit_ -= pay; }
         int getLifes(){ return this->lifes_; }
-        int getWaveNumber(){ return this->waves_; }
+        int getWaveNumber(){ return this->waveNumber_; }
+        void setWaveNumber(int wavenumber){ waveNumber_=wavenumber; }
         void setCredit(int credit){ credit_ = credit; }
-        void setLifes(int lifes){ lifes_ = lifes; }
-        void setWaveNumber(int wavenumber){ waves_=wavenumber; }
-        void buyTower(int cost){ credit_ -= cost;}
+        void setLifes(int lifes){ lifes_ = lifes; }        
+        void buyTower(int cost){ cost -= cost;}
         void addCredit(int credit) { credit_+=credit; }
-        void nextwave(){ enemies_.clear(); waves_++; time=0;}
         int reduceLifes(int NumberofLifes){ return lifes_-=NumberofLifes; }
         TowerDefenseField* getField(TDCoordinate* coord){ return fields_[coord->GetX()][coord->GetY()]; }
-        /*  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);
         void upgradeTower(int x, int y); 
         virtual TDCoordinate* getNextStreetCoord(TDCoordinate*);
-
-        //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
-        //virtual void playerScored(PlayerInfo* player, int score);
-
+        
         TowerDefenseSelecter* selecter;        
 
-        //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:
+        void createFields();
 
-    private:
         orxonox::WeakPtr<TowerDefenseCenterpoint> center_;
         PlayerInfo* player_;
-        float time;        
+        float timeSinceLastSpawn_;
+        float timeUntilNextWave_;
+        int waveSize_;
         int credit_;
-        int waves_;
+        int waveNumber_;
         int lifes_;
-        Timer nextwaveTimer_;
         std::list<orxonox::WeakPtr<TowerDefenseEnemy> > enemies_;
         TowerDefenseField* fields_[16][16];
         std::vector<orxonox::WeakPtr<TowerDefenseField> > waypoints_;
         Vector3 endpoint_;
-
-        void createFields();
+        Vector3 offset_;        
     };
 }
Index: code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseEnemy.cc
===================================================================
--- code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 10589)
+++ code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 10591)
@@ -35,5 +35,5 @@
     TowerDefenseEnemy::~TowerDefenseEnemy()
     {
-        orxout() << "TowerDefenseEnemy::~TowerDefenseEnemy" << endl;
+
     }
 
@@ -57,6 +57,6 @@
     void TowerDefenseEnemy::damage(float damage, float healthdamage, float shielddamage, Pawn* originator)
     {
-        orxout() << "TowerDefenseEnemy::damage" << endl;
         Pawn::damage(damage, healthdamage, shielddamage, originator);
+        
         if (getGame() && once_ == false && getHealth() <= 0)
         {
Index: code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseField.cc
===================================================================
--- code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseField.cc	(revision 10589)
+++ code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseField.cc	(revision 10591)
@@ -53,10 +53,14 @@
         center_ = NULL;
         upgrade_ = 0;
-        setPosition(0,0,0);        
-        model_ = new Model(getContext());
-        model_->setScale(25);
-        model_->pitch(Degree(90));
-        attach(model_);
-        setAngle(0); 
+        setPosition(0,0,0);                            
+        modelGround_ = new Model(getContext());
+        modelGround_->setScale(25);
+        modelGround_->pitch(Degree(90));
+        attach(modelGround_);
+        modelObject_ = new Model(getContext());
+        modelObject_->setScale(25);
+        modelObject_->pitch(Degree(90));
+        attach(modelObject_);
+        setAngle(0);
     }
 
@@ -125,28 +129,50 @@
     void TowerDefenseField::setAngle(int newAngle)
     {
-        if (model_ == NULL)
-        {
-            return;
-        }
-
-        switch (newAngle)
-        {
+        if (modelGround_ != NULL)
+        {
+            switch (newAngle)
+            {
             case 0:
-                model_->yaw(Degree(0));
+                modelGround_->yaw(Degree(0));
                 angle_ = 0;
                 break;
             case 1:
-                model_->yaw(Degree(90));
+                modelGround_->yaw(Degree(90));
                 angle_ = 1;
                 break;    
             case 2:
-                model_->yaw(Degree(180));
+                modelGround_->yaw(Degree(180));
                 angle_ = 2;
                 break;   
             case 3:
-                model_->yaw(Degree(270));
+                modelGround_->yaw(Degree(270));
                 angle_ = 3;
                 break;                                           
-        }
+            }
+        }
+
+        if (modelObject_ != NULL)
+        {
+            switch (newAngle)
+            {
+            case 0:
+                modelObject_->yaw(Degree(0));
+                angle_ = 0;
+                break;
+            case 1:
+                modelObject_->yaw(Degree(90));
+                angle_ = 1;
+                break;    
+            case 2:
+                modelObject_->yaw(Degree(180));
+                angle_ = 2;
+                break;   
+            case 3:
+                modelObject_->yaw(Degree(270));
+                angle_ = 3;
+                break;                                           
+            }
+        }
+        
     }
 
@@ -158,5 +184,5 @@
     void TowerDefenseField::createFree(int orientation)
     {            
-        model_->setMeshSource("TD_F1.mesh");
+        modelGround_->setMeshSource("TD_F1.mesh");
         tower_ = NULL;
         type_ = FREE;
@@ -167,5 +193,5 @@
     void TowerDefenseField::createStart(int orientation)
     {      
-        model_->setMeshSource("TD_S5.mesh");
+        modelGround_->setMeshSource("TD_S5.mesh");
         tower_ = NULL;
         type_ = START;
@@ -177,5 +203,5 @@
     void TowerDefenseField::createEnd(int orientation)
     {     
-        model_->setMeshSource("TD_S4.mesh");
+        modelGround_->setMeshSource("TD_S4.mesh");
         tower_ = NULL;
         type_ = END;
@@ -186,5 +212,5 @@
     void TowerDefenseField::createStraight(int orientation)
     {      
-        model_->setMeshSource("TD_S1.mesh");
+        modelGround_->setMeshSource("TD_S1.mesh");
         tower_ = NULL;
         type_ = STREET;
@@ -195,5 +221,5 @@
     void TowerDefenseField::createRCurve(int orientation)
     {     
-        model_->setMeshSource("TD_S2.mesh");
+        modelGround_->setMeshSource("TD_S2.mesh");
         tower_ = NULL;
         type_ = STREET;
@@ -204,5 +230,5 @@
     void TowerDefenseField::createLCurve(int orientation)
     {    
-        model_->setMeshSource("TD_S3.mesh");
+        modelGround_->setMeshSource("TD_S3.mesh");
         tower_ = NULL;
         type_ = STREET;
@@ -210,4 +236,14 @@
         setAngle(orientation);
     } 
+
+    void TowerDefenseField::createObstacle(int orientation)
+    {    
+        modelGround_->setMeshSource("TD_F1.mesh");
+        modelObject_->setMeshSource("TD_O1.mesh");
+        tower_ = NULL;
+        type_ = OBSTACLE;
+        setUpgrade(0);
+        setAngle(orientation);
+    }
 
     void TowerDefenseField::createTower(int upgrade)
@@ -215,30 +251,31 @@
         if (tower_ == NULL)
         {
+            modelGround_->setMeshSource("TD_F1.mesh");
             tower_ = new TowerDefenseTower(center_->getContext());
             attach(tower_);
             type_ = TOWER;
             setUpgrade(upgrade);
-            if (upgrade_ > 0 && model_ != NULL)
+            if (upgrade_ > 0 && modelObject_ != NULL)
             {
                 switch (upgrade_)
                 {
                     case 1:
-                        model_->setMeshSource("TD_T1.mesh");                    
+                        modelObject_->setMeshSource("TD_T1.mesh");                    
                         tower_->addTemplate(center_->getTower1Template());
                         break;
                     case 2:
-                        model_->setMeshSource("TD_T2.mesh");
+                        modelObject_->setMeshSource("TD_T2.mesh");
                         tower_->addTemplate(center_->getTower2Template());
                         break;
                     case 3:
-                        model_->setMeshSource("TD_T3.mesh");
+                        modelObject_->setMeshSource("TD_T3.mesh");
                         tower_->addTemplate(center_->getTower3Template());
                         break;
                     case 4:
-                        model_->setMeshSource("TD_T4.mesh");
+                        modelObject_->setMeshSource("TD_T4.mesh");
                         tower_->addTemplate(center_->getTower4Template());
                         break;
                     case 5:
-                        model_->setMeshSource("TD_T5.mesh");
+                        modelObject_->setMeshSource("TD_T5.mesh");
                         tower_->addTemplate(center_->getTower5Template());
                         break;
@@ -279,5 +316,8 @@
             case 'O':               
                 createEnd(paramInt);
-                break;    
+                break;
+            case 'Y':               
+                createObstacle(paramInt);
+                break;                 
             case 'T':                               
                 createTower(paramInt);               
Index: code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseField.h
===================================================================
--- code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseField.h	(revision 10589)
+++ code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseField.h	(revision 10591)
@@ -52,4 +52,5 @@
         START, 
         END,
+        OBSTACLE,
         TOWER
     };
@@ -77,6 +78,7 @@
             virtual void createLCurve(int orientation);
             virtual void createRCurve(int orientation);
+            virtual void createObstacle(int orientation);
             virtual void createTower(int upgrade);
-            virtual int getAngle();
+            virtual int getAngle();            
         private:
             virtual void setAngle(int newAngle);            
@@ -84,5 +86,6 @@
             int angle_;
             TowerDefenseFieldType type_;
-            Model* model_;
+            Model* modelGround_;
+            Model* modelObject_;
             TowerDefenseTower* tower_;
             TowerDefenseCenterpoint* center_;
Index: code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseHUDController.cc
===================================================================
--- code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseHUDController.cc	(revision 10589)
+++ code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefenseHUDController.cc	(revision 10591)
@@ -50,4 +50,5 @@
     {
         SUPER(TowerDefenseHUDController, tick, dt);
+
         const std::string& lifes = multi_cast<std::string>(this->td->getLifes());
         const std::string& credits = multi_cast<std::string>(this->td->getCredit());
@@ -55,11 +56,15 @@
 
         if(showlives == true)
-          this->setCaption(multi_cast<std::string>(lifes));
+        {
+            this->setCaption(multi_cast<std::string>(lifes));
+        }          
         else if(showcredits == true)
-          this->setCaption(multi_cast<std::string>(credits));
+        {
+            this->setCaption(multi_cast<std::string>(credits));
+        }          
         else if(showwaves == true)
-          this->setCaption(multi_cast<std::string>(wave));
-
-
+        {
+            this->setCaption(multi_cast<std::string>(wave));
+        }          
     }
 
