Index: code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.cc
===================================================================
--- code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.cc	(revision 8573)
+++ code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.cc	(revision 8616)
@@ -32,4 +32,5 @@
 #include "core/XMLPort.h"
 #include "SpaceRace.h"
+#include "util/Convert.h"
 
 namespace orxonox
@@ -47,6 +48,6 @@
 	this->bTimeLimit_ = 0;
 	
-	this->setRadarObjectColour(ColourValue::Red);
-        this->setRadarObjectShape(RadarViewable::Dot);
+	this->setRadarObjectColour(ColourValue::Blue);
+        this->setRadarObjectShape(RadarViewable::Triangle);
         this->setRadarVisibility(false);
     }
@@ -63,12 +64,4 @@
 	if (this->getCheckpointIndex() == gametype->getCheckpointsReached()) this->setRadarVisibility(true);
 	else  this->setRadarVisibility(false);
-	
-	if (this->bTimeLimit_ != 0 && gametype->getTimerIsActive()) {
-	  float time = gametype->getTime() - this->bTimeLimit_;
-	  if (time > 0) {
-	    gametype->timeIsUp();
-	    gametype->end();
-	  }
-	}
     }
 
@@ -92,5 +85,11 @@
 	    if (this->getCheckpointIndex() == gametype->getCheckpointsReached() && bIsTriggered)
 	    {
-		if (this->getLast())
+		gametype->clock_->capture();
+		float time = gametype->clock_->getSecondsPrecise();
+		if (this->bTimeLimit_!=0 && time > this->bTimeLimit_) {
+		  gametype->timeIsUp();
+		  gametype->end();
+		}
+		else if (this->getLast())
 		{
 		  gametype->end();
@@ -105,3 +104,19 @@
     }
     
+    void RaceCheckPoint::setTimelimit(float timeLimit)
+	    { 
+	      this->bTimeLimit_ = timeLimit;
+	      if (this->bTimeLimit_ != 0)
+	      {
+		  SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
+		  if (gametype)
+		  {
+		     const std::string& message =  "You have " + multi_cast<std::string>(this->bTimeLimit_)
+						   + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1) + "\n";
+		     COUT(0) << message;
+		     const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage(message);
+		  }
+	      }
+	    }
+    
 }
Index: code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.h
===================================================================
--- code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.h	(revision 8573)
+++ code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.h	(revision 8616)
@@ -38,4 +38,9 @@
 namespace orxonox
 {
+  /**
+  @brief
+  The RaceCheckPoint class enables the creation of a check point to use in a SpaceRace level.
+  !!! Don't forget to controll the indexes of your check points and to set one last check point!!!
+  */
     class _ObjectsExport RaceCheckPoint : public DistanceTrigger, public RadarViewable
     {
@@ -57,7 +62,6 @@
 	inline int getCheckpointIndex()
 	    { return this->bCheckpointIndex_; }
-	inline void setTimelimit(int timeLimit)
-	    { this->bTimeLimit_ = timeLimit;}
-	inline int getTimeLimit()
+	virtual void setTimelimit(float timeLimit);
+	inline float getTimeLimit()
 	    { return this->bTimeLimit_;}
 	inline const WorldEntity* getWorldEntity() const
@@ -65,7 +69,7 @@
 	
     private:
-	int bCheckpointIndex_;
-	bool bIsLast_;
-	int bTimeLimit_;
+	int bCheckpointIndex_; //The index of this check point. This value will be compared with the number of check points reached in the level. The check points must be indexed in ascending order beginning from zero and without any jumps between the indexes.
+	bool bIsLast_; //True if this check point is the last of the level. There can be only one last check point for each level and there must be a last check point in the level.
+	float bTimeLimit_; //The time limit (from the start of the level) to reach this check point. If the check point is reached after this time, the game ends and the player looses.
       
     };
Index: code/branches/spacerace/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/spacerace/src/modules/gametypes/SpaceRace.cc	(revision 8573)
+++ code/branches/spacerace/src/modules/gametypes/SpaceRace.cc	(revision 8616)
@@ -42,5 +42,5 @@
     {
 	RegisterObject(SpaceRace);
-	this->checkpointsReached_ = 0;
+	this->bCheckpointsReached_ = 0;
 	this->bTimeIsUp_ = false;
 	this->numberOfBots_ = 0;
@@ -55,8 +55,14 @@
     {
       	Gametype::end();
-	this->stopTimer();
 	if (this->bTimeIsUp_) {
-	    COUT(0) << "Time is up" << std::endl;
-	    const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage("Time is up");
+	    this->clock_->capture();
+	    int s = this->clock_->getSeconds();
+	    int ms = this->clock_->getMilliseconds()-1000*s;
+	    const std::string& message = multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds !!\n"
+					 + "You didn't reach the check point" + multi_cast<std::string>(this->bCheckpointsReached_+1)
+					 + " before the time limit. You loose!\n";
+	    COUT(0) << message;
+	    const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+	    Host::Broadcast(message);
 	}
 	else {
@@ -64,6 +70,6 @@
 	    int s = this->clock_->getSeconds();
 	    int ms = this->clock_->getMilliseconds()-1000*s;
-	    const std::string& message = "You have reached the last check point after "+ multi_cast<std::string>(s) +
-					  "." + multi_cast<std::string>(ms) + " seconds.";
+	    const std::string& message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s)
+					  + "." + multi_cast<std::string>(ms) + " seconds.\n";
 	    COUT(0) << message << std::endl;
 	    const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
@@ -81,5 +87,4 @@
 	Gametype::start();
 	
-	this->startTimer();
 	clock_= new Clock();
 	std::string message("The match has started! Reach the check points as quickly as possible!");
@@ -90,5 +95,5 @@
     void SpaceRace::newCheckpointReached()
     {
-      	this->checkpointsReached_++;
+      	this->bCheckpointsReached_++;
 	this->clock_->capture();
 	int s = this->clock_->getSeconds();
@@ -96,5 +101,5 @@
 	const std::string& message = "Checkpoint " + multi_cast<std::string>(this->getCheckpointsReached()) 
 				      + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
-				      + " seconds.";
+				      + " seconds.\n";
 	COUT(0) << message << std::endl;
 	const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
Index: code/branches/spacerace/src/modules/gametypes/SpaceRace.h
===================================================================
--- code/branches/spacerace/src/modules/gametypes/SpaceRace.h	(revision 8573)
+++ code/branches/spacerace/src/modules/gametypes/SpaceRace.h	(revision 8616)
@@ -40,24 +40,8 @@
 namespace orxonox
 {
-/*    class PlayerScore {
-	public:
-	    PlayerScore() {
-		this->name = "";
-		this->time =0;
-	    }
-	    PlayerScore(std::string name, float time) {
-		this->name_ = name;
-		this->time_ = time;
-	    }
-	    PlayerScore(float time) {
-		this->name_ = "Player";
-		this->time_ = time;
-	    }
-	
-	private:
-	    std::string name_;
-	    float time_;
-    };*/
-	
+  /**
+  @brief
+  The SpaceRace class enables the creation of a space race level, where the player has to reach check points in a given order.
+  */
     class _OrxonoxExport SpaceRace : public Gametype
     {
@@ -74,17 +58,16 @@
 	    
 	    inline void setCheckpointsReached(int n)
-		{ this->checkpointsReached_ = n;}
+		{ this->bCheckpointsReached_ = n;}
 	    inline int getCheckpointsReached()
-		{ return this->checkpointsReached_; }
+		{ return this->bCheckpointsReached_; }
 	    inline void timeIsUp()
 		{ this->bTimeIsUp_ = true;}
-	    
+	    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.
 	protected:
 	    
 	private:
-	    int checkpointsReached_;
-	    std::set<float> scores_;
-	    Clock *clock_;
-	    bool bTimeIsUp_;
+	    int bCheckpointsReached_; //The current number of check points reached by the player.
+	    std::set<float> scores_; //The times of the players are saved in a set.
+	    bool bTimeIsUp_; //True if one of the check points is reached too late.
     };
 }
