Index: code/branches/PresentationFS18/src/libraries/tools/Timer.cc
===================================================================
--- code/branches/PresentationFS18/src/libraries/tools/Timer.cc	(revision 12014)
+++ code/branches/PresentationFS18/src/libraries/tools/Timer.cc	(revision 12015)
@@ -199,4 +199,5 @@
         executor->getFunctor()->setSafeMode(true);
     }
+
 
     /**
Index: code/branches/PresentationFS18/src/libraries/tools/Timer.h
===================================================================
--- code/branches/PresentationFS18/src/libraries/tools/Timer.h	(revision 12014)
+++ code/branches/PresentationFS18/src/libraries/tools/Timer.h	(revision 12015)
@@ -113,4 +113,5 @@
             void run();
 
+
             /// Re-starts the timer: The executor will be called after @a interval seconds.
             inline void startTimer()
Index: code/branches/PresentationFS18/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/PresentationFS18/src/modules/gametypes/SpaceRace.cc	(revision 12014)
+++ code/branches/PresentationFS18/src/modules/gametypes/SpaceRace.cc	(revision 12015)
@@ -69,5 +69,7 @@
 #include "SpaceRaceBot.h"
 #include "items/Engine.h"
-#include <vector>
+#include <vector> 
+#include <iostream>
+#include <string>
 
 
@@ -83,6 +85,6 @@
         this->cantMove_ = false;
         this->bTimeIsUp_ = false;
-
         this->numberOfBots_ = 5; // quick fix: don't allow default-bots to enter the race 
+        this->bLost =false;
         //we fixed the number of bots in order to have the same starting position all the time ! 
     }
@@ -101,5 +103,5 @@
         startpos[4] =-40;
         startpos[5] =100;
-        
+         
         startpos[6] =100;
         startpos[7] =-40;
@@ -117,4 +119,5 @@
 
         this->spawnPlayersIfRequested();
+        this->countdown_mode=true;
         this->cantMove_ = true;
         //players are unable to move while countdown is running
@@ -122,4 +125,5 @@
         {
             engine->setActive(false);
+            engine->addSpeedMultiply(1.7);
         }
 
@@ -138,28 +142,62 @@
         }
 
-        std::string message("Use headphones to hear the countdown!");
-        this->getGametypeInfo()->sendAnnounceMessage(message);
-        ChatManager::message(message);
-
-        //after 11 seconds , countdownFinished function is called to activate bots` engines
-        Timer* countdownTimer = new Timer();
-        countdownTimer->setTimer(11, false, createExecutor(createFunctor(&SpaceRace::countdownFinished, this)));
-    }
-
-
-
+        std::string message("Use headphones to hear the countdown! Press W for forward acceleration, press W+space for boost!");
+
+        this->getGametypeInfo()->sendAnnounceMessage(message);
+        ChatManager::message(message);
+        
+
+
+        
+    }
+
+    // Counter in the beginning of the game
+    void SpaceRace::tick(float dt) {
+        SUPER(SpaceRace, tick, dt);
+        
+        //countdown_mode is set true,when spawnIfRequested is called
+        if (countdown_mode) {
+            //10 seconds will be counted
+            this->time_passed -= dt;
+
+            //orxout() << "time: " <<(int) time_passed << "s" << endl;
+
+            std::string message=std::to_string((int)time_passed);
+            this->getGametypeInfo()->sendAnnounceMessage(message);
+            if (time_passed <= 1) {
+
+                this->countdownFinished();
+                this->countdown_mode = false;
+            }
+        }
+
+    }
+        
+    void SpaceRace::startmessage(int second){
+
+        std::string message=std::to_string(second);
+        this->getGametypeInfo()->sendAnnounceMessage(message);
+        ChatManager::message(message);
+        
+        
+
+    }
 
     void SpaceRace::end()
     {
+        
         this->clock_.capture();
         int s = this->clock_.getSeconds();
         int ms = static_cast<int>(this->clock_.getMilliseconds() - 1000*s);
         std::string message;
-
         if (this->bTimeIsUp_)
         {
-            message = multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds !!\n"
-                        + "You lose!";
-        }
+            message =  "TIME IS UP! YOU LOOSE!";
+        }
+       else if(this->bLost){
+            message = "YOU LOOSE!";
+
+       }        
+       
         else
         {
@@ -167,6 +205,8 @@
                         + "." + multi_cast<std::string>(ms) + " seconds.";
         }
+        
         if (!this->hasEnded())
         {
+
             this->getGametypeInfo()->sendAnnounceMessage(message);
             ChatManager::message(message);
@@ -183,10 +223,15 @@
         int ms = this->clock_.getMilliseconds() % 1000;
 
-       
-    
-        const std::string& message = player->getName() + " reached the checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1) 
+
+        std::string message(player->getName() + " reached the checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1) 
+        + " after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.");
+
+        this->getGametypeInfo()->sendAnnounceMessage(message);
+        ChatManager::message(message);
+      /*  const std::string& message = player->getName() + " reached the checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1) 
         + "after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.";
         this->getGametypeInfo()->sendAnnounceMessage(message);
-        ChatManager::message(message);
+        ChatManager::message(message);*/
+        
 
     }
@@ -195,11 +240,16 @@
     {
 
-        std::string message("RACE STARTED ");
-        this->getGametypeInfo()->sendAnnounceMessage(message);
-        ChatManager::message(message);
+        std::string message("RACE STARTED");
+        this->getGametypeInfo()->sendAnnounceMessage(message);
+        ChatManager::message(message);
+        
 
 
         for (Engine* engine : ObjectList<Engine>())
             engine->setActive(true);
+
+        std::string message2("Press W for forward acceleration, press W+space for boost!");
+        this->getGametypeInfo()->sendAnnounceMessage(message2);
+        ChatManager::message(message2);
     }
 
Index: code/branches/PresentationFS18/src/modules/gametypes/SpaceRace.h
===================================================================
--- code/branches/PresentationFS18/src/modules/gametypes/SpaceRace.h	(revision 12014)
+++ code/branches/PresentationFS18/src/modules/gametypes/SpaceRace.h	(revision 12015)
@@ -42,4 +42,5 @@
 #include "SpaceRaceManager.h"
 
+
 namespace orxonox
 {
@@ -54,5 +55,5 @@
 
         public:
-            SpaceRace(Context* context);
+            SpaceRace(Context* context);//, SpaceRace* parentRace);
             virtual ~SpaceRace() {}
 
@@ -60,5 +61,8 @@
             virtual void end() override;
             virtual void countdownFinished();
+            
             virtual void addBots(unsigned int amount) override; //<! overwrite function in order to bypass the addbots command.
+            virtual void tick(float dt) override;
+            virtual void startmessage(int second);
 
 
@@ -79,13 +83,18 @@
             inline Clock& getClock()
                 { return this->clock_; }
+            //inline void setParentRace(SpaceRace* parentRace) { this->parentRace = parentRace; }
 
             virtual bool allowPawnHit(Pawn* victim, Pawn* originator) override;
             virtual bool allowPawnDamage(Pawn* victim, Pawn* originator) override;
             virtual bool allowPawnDeath(Pawn* victim, Pawn* originator) override;
+            bool countdown_mode = false;
+            float time_passed = 11.0f;
+            
+            bool bLost=false;
 
         private:
             bool cantMove_;                                            ///< Helper variable, used to stall the engines before the race starts.
             std::map<PlayerInfo*, RaceCheckPoint*> checkpointReached_; ///< The number of the last check point reached by each player.
-            bool bTimeIsUp_;                                           ///< True if one of the check points is reached too late.
+            bool bTimeIsUp_;    ///< True if one of the check points is reached too late.
 
             Clock clock_; ///< The clock starts running at the beginning of the game. It is used to give the time at each check point, the give the time at the end of the game, and to stop the game if a check point is reached too late.
Index: code/branches/PresentationFS18/src/modules/gametypes/SpaceRaceController.cc
===================================================================
--- code/branches/PresentationFS18/src/modules/gametypes/SpaceRaceController.cc	(revision 12014)
+++ code/branches/PresentationFS18/src/modules/gametypes/SpaceRaceController.cc	(revision 12015)
@@ -20,5 +20,5 @@
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
- *  Created on: Oct 8, 2012
+ *  Created on: Oct 8, 2012findCheck
  *      Author: purgham
  */
@@ -30,4 +30,5 @@
 #include "collisionshapes/CollisionShape.h"
 #include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "SpaceRace.h"
 
 
@@ -38,4 +39,5 @@
     const int ADJUSTDISTANCE = 500;
     const int MINDISTANCE = 5;
+
     /*
      * Idea: Find static Point (checkpoints the spaceship has to reach)
@@ -45,4 +47,6 @@
     {
         RegisterObject(SpaceRaceController);
+        //this->parentRace = nullptr;
+
         std::vector<RaceCheckPoint*> checkpoints;
 
@@ -63,5 +67,5 @@
 
         int i;
-        for (i = -2; findCheckpoint(i) != nullptr; i--)
+        for (i = -2; findCheckpoint(i) != nullptr; i--)     // WIESO?
         {
             continue;
@@ -103,5 +107,13 @@
         return returnVec;
     }
-
+    void SpaceRaceController::endtheGame() const {
+        SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype());
+        assert(gametype)
+;        if (!gametype)
+        return;
+        gametype->bLost=true;
+        gametype->end();
+
+    }
     /*
      * called from 'findStaticCheckpoints'
@@ -122,13 +134,16 @@
             for (int checkpointIndex : currentCheckpoint->getNextCheckpoints())
             {
+                if (findCheckpoint(checkpointIndex) == nullptr){
+                    orxout(internal_warning) << "Problematic Point: " << checkpointIndex << endl;
+                }
                 if (currentCheckpoint == findCheckpoint(checkpointIndex))
                 {
-                    //orxout() << currentCheckpoint->getCheckpointIndex()<<endl;
+                    orxout() << currentCheckpoint->getCheckpointIndex()<<endl;
                     continue;
                 }
-                if (findCheckpoint(checkpointIndex) == nullptr)
-                    orxout(internal_warning) << "Problematic Point: " << checkpointIndex << endl;
+             
                 else
                     numberOfWays += rekSimulationCheckpointsReached(findCheckpoint(checkpointIndex), zaehler);
+
             }
             zaehler[currentCheckpoint] += numberOfWays;
@@ -162,4 +177,5 @@
         {
             RaceCheckPoint* nextRaceCheckPoint = findCheckpoint(checkpointIndex);
+
             float distance = recCalculateDistance(nextRaceCheckPoint, this->getControllableEntity()->getPosition());
 
@@ -168,8 +184,12 @@
                 minDistance = distance;
                 minNextRaceCheckPoint = nextRaceCheckPoint;
-            }
-
-        }
-
+
+            }
+            //There is a bug. If the user passes through the 19th checkpoint with the opponents, the game will end immediately
+            if(nextRaceCheckPoint->isLast())
+                endtheGame(); 
+
+        }
+        if(minNextRaceCheckPoint == nullptr) { orxout()<<"nullptr found @192 SpaceRaceController" << endl;}
         return minNextRaceCheckPoint;
     }
@@ -208,4 +228,6 @@
 
         {
+            if(nextRaceCheckpoint_ == nullptr) orxout()<<"nullptr found @218 SpaceRaceController" << endl;
+
             return nextRaceCheckpoint_;
         }
@@ -213,4 +235,6 @@
 
         {
+            if(nextRaceCheckpoint_ == nullptr) orxout()<<"nullptr found @223 SpaceRaceController" << endl;
+
             return nextRaceCheckpoint_;
         }
@@ -221,11 +245,28 @@
     }
 
+
+
+
+    
+
     RaceCheckPoint* SpaceRaceController::findCheckpoint(int index) const
     {
-        for (RaceCheckPoint* checkpoint : this->checkpoints_)
-            if (checkpoint->getCheckpointIndex() == index)
-                return checkpoint;
-        return nullptr;
-    }
+        RaceCheckPoint* res = nullptr;
+        for (RaceCheckPoint* checkpoint : this->checkpoints_){
+            //conclusion: index=20 is not 
+            if (checkpoint->getCheckpointIndex() == index){
+                //if(checkpoint == nullptr) orxout()<<"returned nullptr @line 234 SpaceRaceController"<<endl;
+                //orxout()<< "index of the checkpoint "<< index <<endl;
+                res = checkpoint;
+                return res;
+            }
+        }
+    /* if(index>2 )   
+        this->endtheGame();*/
+
+        return res;
+    }
+    
+
 
     /*RaceCheckPoint* SpaceRaceController::addVirtualCheckPoint( RaceCheckPoint* previousCheckpoint, int indexFollowingCheckPoint , const Vector3& virtualCheckPointPosition )
@@ -282,4 +323,6 @@
     void SpaceRaceController::tick(float dt)
     {
+        
+
         if (this->getControllableEntity() == nullptr || this->getControllableEntity()->getPlayer() == nullptr )
         {
@@ -312,4 +355,6 @@
         {
             nextRaceCheckpoint_ = adjustNextPoint();
+            if(nextRaceCheckpoint_ == nullptr) orxout()<<"nullptr found @327 SpaceRaceController" << endl;
+
             lastPositionSpaceship = this->getControllableEntity()->getPosition();
         }
@@ -325,11 +370,31 @@
         }
         //orxout(user_status) << "dt= " << dt << ";  distance= " << (lastPositionSpaceship-this->getControllableEntity()->getPosition()).length() <<std::endl;
-        lastPositionSpaceship = this->getControllableEntity()->getPosition();
-       
+        /*lastPositionSpaceship = this->getControllableEntity()->getPosition();
+        
+        SpaceRace obj=new SpaceRace();
+        obj.setParentRace(parentRace);
+        this->parentRace=obj.parentRace;*/
+        
         this->boostControl();
+
+        /*if(nextRaceCheckpoint_ == nullptr){
+            this->parentRace->bLost=true;
+            this->parentRace->end();
+        }*/
+        // if(nextRaceCheckpoint_ == nullptr ){
+        //    // if( nextRaceCheckpoint_->getCheckpointIndex()==19) 
+        //     orxout()<<"nullptr @351 Line"<<endl;
+        // }
+
+        
         this->moveToPosition(nextRaceCheckpoint_->getPosition());
+
         this->boostControl();
     }
 
+
+    /*void SpaceRaceController::setParentRace(parentRace){
+        this->parentRace=parentRace;
+    }*/
     // True if a coordinate of 'pointToPoint' is smaller then the corresponding coordinate of 'groesse'
     bool SpaceRaceController::vergleicheQuader(const Vector3& pointToPoint, const Vector3& groesse)
Index: code/branches/PresentationFS18/src/modules/gametypes/SpaceRaceController.h
===================================================================
--- code/branches/PresentationFS18/src/modules/gametypes/SpaceRaceController.h	(revision 12014)
+++ code/branches/PresentationFS18/src/modules/gametypes/SpaceRaceController.h	(revision 12015)
@@ -47,8 +47,9 @@
     {
         public:
-            SpaceRaceController(Context* context);
+            SpaceRaceController(Context* context);//, SpaceRace* parentRace);
             virtual ~SpaceRaceController();
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
             virtual void tick(float dt) override;
+            
 
         private:
@@ -57,4 +58,6 @@
             RaceCheckPoint* nextPointFind(RaceCheckPoint*);
             RaceCheckPoint* adjustNextPoint();
+            void endtheGame() const;
+
             std::vector<RaceCheckPoint*> findStaticCheckpoints(RaceCheckPoint*, const std::vector<RaceCheckPoint*>&);
             std::vector<RaceCheckPoint*> staticCheckpoints();
@@ -74,4 +77,5 @@
             Vector3 lastPositionSpaceship;
             int virtualCheckPointIndex;
+            //SpaceRace* parentRace;
     };
 
Index: code/branches/PresentationFS18/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/branches/PresentationFS18/src/modules/gametypes/SpaceRaceManager.cc	(revision 12014)
+++ code/branches/PresentationFS18/src/modules/gametypes/SpaceRaceManager.cc	(revision 12015)
@@ -113,7 +113,13 @@
     RaceCheckPoint* SpaceRaceManager::findCheckpoint(int index) const
     {
-        for (RaceCheckPoint* checkpoint : this->checkpoints_)
+        /*for (RaceCheckPoint* checkpoint : this->checkpoints_)
         if (checkpoint->getCheckpointIndex() == index)
         return checkpoint;
+        return nullptr;*/
+        for (RaceCheckPoint* checkpoint : this->checkpoints_){
+            if (checkpoint->getCheckpointIndex() == index)
+                return checkpoint;
+        }
+        orxout()<<"returned checkpoint @line 123 SpaceRaceManager"<<endl;
         return nullptr;
     }
Index: code/branches/PresentationFS18/src/orxonox/items/Engine.cc
===================================================================
--- code/branches/PresentationFS18/src/orxonox/items/Engine.cc	(revision 12014)
+++ code/branches/PresentationFS18/src/orxonox/items/Engine.cc	(revision 12015)
@@ -54,5 +54,5 @@
         this->relativePosition_ = Vector3::ZERO;
 
-        this->boostFactor_ = 1.5f;
+        this->boostFactor_ = 1.2f;
 
         this->maxSpeedFront_ = 0.0f;
@@ -61,5 +61,5 @@
         this->maxSpeedUpDown_ = 0.0f;
 
-        this->accelerationFront_ = 0.0f;
+        this->accelerationFront_ = 1.0f;
         this->accelerationBrake_ = 0.0f;
         this->accelerationBack_ = 0.0f;
@@ -68,5 +68,5 @@
 
         this->speedAdd_ = 0.0f;
-        this->speedMultiply_ = 1.0f;
+        this->speedMultiply_ = 1.0f;                       //////////////////////////////////////////
 
         this->setConfigValues();
Index: code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 12014)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 12015)
@@ -65,5 +65,5 @@
         this->boostPowerRate_ = 1.0f;
         this->boostRate_ = 5.0f;
-        this->boostCooldownDuration_ = 5.0f;
+        this->boostCooldownDuration_ = 10.0f;
 
         this->shakeFrequency_ = 15.0f;
Index: code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 12014)
+++ code/branches/PresentationFS18/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 12015)
@@ -103,5 +103,5 @@
             */
             virtual void moveFrontBack(const Vector2& value)
-                { this->steering_.z -= value.x; }
+                { this->steering_.z -= (0.6)*value.x; }
             /**
             @brief Move right or left.
@@ -109,5 +109,5 @@
             */
             virtual void moveRightLeft(const Vector2& value)
-                { this->steering_.x += value.x; }
+                { this->steering_.x += (0.6)*value.x; }
             /**
             @brief Move up or down.
@@ -115,5 +115,5 @@
             */
             virtual void moveUpDown(const Vector2& value)
-                { this->steering_.y += value.x; }
+                { this->steering_.y += (0.6)*value.x; }
 
             virtual void rotateYaw(const Vector2& value); // Rotate in yaw direction.
