Index: code/branches/spacerace/data/levels/spaceRace.oxw
===================================================================
--- code/branches/spacerace/data/levels/spaceRace.oxw	(revision 8551)
+++ code/branches/spacerace/data/levels/spaceRace.oxw	(revision 8552)
@@ -51,5 +51,5 @@
     
     <!-- ------------------CheckPoints----------------- -->
-    <RaceCheckPoint name=checkpoint1 position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale=1 distance=40 checkpointindex=0 islast=false>
+    <RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false">
     <attached>
       <Model mass="50" scale="50" mesh="checkPoint.mesh" />
@@ -63,5 +63,5 @@
     </RaceCheckPoint>
 
-    <RaceCheckPoint name=checkpoint2 position="0,-900,2300" collisionType="static" scale=1 distance=40 checkpointindex=1 islast=false>
+    <RaceCheckPoint name="checkpoint2" position="0,-900,2300" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false">
     <attached>
       <Model mass="50" scale="50" mesh="checkPoint.mesh" />
@@ -84,5 +84,5 @@
     </RaceCheckPoint>
 
-    <RaceCheckPoint name=checkpoint3 position="0,700,2700" direction="0,0,1" collisionType="static" scale=1 distance=40 checkpointindex=2 islast=false>
+    <RaceCheckPoint name="checkpoint3" position="0,700,2700" direction="0,0,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false">
     <attached>
       <Model mass="50" scale="50" mesh="checkPoint.mesh" />
@@ -105,5 +105,5 @@
     </RaceCheckPoint>
 
-    <RaceCheckPoint name=checkpoint4 position="0,2100,2300" direction="0,1,1" collisionType="static" scale=1 distance=40 checkpointindex=3 islast=false>
+    <RaceCheckPoint name="checkpoint4" position="0,2100,2300" direction="0,1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="false">
    <attached>
       <Model mass="50" scale="50" mesh="checkPoint.mesh" />
@@ -126,5 +126,5 @@
     </RaceCheckPoint>
 
-    <RaceCheckPoint name=checkpoint5 position="0,2200,500" direction="0,1,0" collisionType="static" scale=1 distance=40 checkpointindex=4 islast=false>
+    <RaceCheckPoint name="checkpoint5" position="0,2200,500" direction="0,1,0" collisionType="static" scale="1" distance="40" checkpointindex="4" islast="false">
     <attached>
       <Model mass="50" scale="50" mesh="checkPoint.mesh" />
@@ -147,5 +147,5 @@
     </RaceCheckPoint>
 
-    <RaceCheckPoint name=checkpoint6 position="0,1500,-800" direction="0,1,-1" collisionType="static" scale=1 distance=40 checkpointindex=5 islast=false>
+    <RaceCheckPoint name="checkpoint6" position="0,1500,-800" direction="0,1,-1" collisionType="static" scale="1" distance="40" checkpointindex="5" islast="false">
     <attached>
       <Model mass="50" scale="50" mesh="checkPoint.mesh" />
@@ -168,5 +168,5 @@
     </RaceCheckPoint>
 
-    <RaceCheckPoint name=checkpoint7 position="0,200,-1900" collisionType="static" scale=1 distance=40 checkpointindex=6 islast=false>
+    <RaceCheckPoint name="checkpoint7" position="0,200,-1900" collisionType="static" scale="1" distance="40" checkpointindex="6" islast="false">
     <attached>
       <Model mass="50" scale="50" mesh="checkPoint.mesh" />
@@ -189,5 +189,5 @@
     </RaceCheckPoint>
 
-    <RaceCheckPoint name=checkpoint8 position="0,-700,-1400" direction="0,-1,-1" collisionType="static" scale=1 distance=40 checkpointindex=7 islast=false>
+    <RaceCheckPoint name="checkpoint8" position="0,-700,-1400" direction="0,-1,-1" collisionType="static" scale="1" distance="40" checkpointindex="7" islast="false">
     <attached>
       <Model mass="50" scale="50" mesh="checkPoint.mesh" />
@@ -210,5 +210,5 @@
     </RaceCheckPoint>
 
-    <RaceCheckPoint name=checkpoint9 position="0,-1300,-800" collisionType="static" scale=1 distance=40 checkpointindex=8 islast=false>
+    <RaceCheckPoint name="checkpoint9" position="0,-1300,-800" collisionType="static" scale="1" distance="40" checkpointindex="8" islast="false">
     <attached>
       <Model mass="50" scale="50" mesh="checkPoint.mesh" />
@@ -230,5 +230,5 @@
     </RaceCheckPoint>
 
-    <RaceCheckPoint name=checkpoint10 position="0,-2100,0" collisionType="static" scale=1 distance=40 checkpointindex=9 islast=true>
+    <RaceCheckPoint name="checkpoint10" position="0,-2100,0" collisionType="static" scale="1" distance="40" checkpointindex="9" islast="true" timelimit="150">
     <attached>
       <Model mass="50" scale="50" mesh="checkPoint.mesh" />
Index: code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.cc
===================================================================
--- code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.cc	(revision 8551)
+++ code/branches/spacerace/src/modules/gametypes/RaceCheckPoint.cc	(revision 8552)
@@ -45,5 +45,5 @@
 	this->bCheckpointIndex_ = 0;
 	this->bIsLast_ = false;
-	this->bTimeLimit_=0;
+	this->bTimeLimit_ = 0;
 	
 	this->setRadarObjectColour(ColourValue::Red);
@@ -63,4 +63,12 @@
 	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();
+	  }
+	}
     }
 
Index: code/branches/spacerace/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/spacerace/src/modules/gametypes/SpaceRace.cc	(revision 8551)
+++ code/branches/spacerace/src/modules/gametypes/SpaceRace.cc	(revision 8552)
@@ -43,4 +43,5 @@
 	RegisterObject(SpaceRace);
 	this->checkpointsReached_ = 0;
+	this->bTimeIsUp_ = false;
 	this->numberOfBots_ = 0;
     }
@@ -53,18 +54,25 @@
     void SpaceRace::end()
     {
-	Gametype::end();
-	this->clock_->capture();
-	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.";
-        COUT(0) << message << std::endl;
-	const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
-        Host::Broadcast(message);
-	float time = this->clock_->getSecondsPrecise();
-	this->scores_.insert(time);
-	std::set<float>::iterator it;
-	for (it=this->scores_.begin(); it!=this->scores_.end(); it++)
+      	Gametype::end();
+	this->stopTimer();
+	if (this->bTimeIsUp_) {
+	    COUT(0) << "Time is up" << std::endl;
+	    const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage("Time is up");
+	}
+	else {
+	    this->clock_->capture();
+	    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.";
+	    COUT(0) << message << std::endl;
+	    const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+	    Host::Broadcast(message);
+	    float time = this->clock_->getSecondsPrecise();
+	    this->scores_.insert(time);
+	    std::set<float>::iterator it;
+	    for (it=this->scores_.begin(); it!=this->scores_.end(); it++)
 	    COUT(0) <<  multi_cast<std::string>(*it) << std::endl;
+	}
     }
 
@@ -73,4 +81,5 @@
 	Gametype::start();
 	
+	this->startTimer();
 	clock_= new Clock();
 	std::string message("The match has started! Reach the check points as quick as possible!");
Index: code/branches/spacerace/src/modules/gametypes/SpaceRace.h
===================================================================
--- code/branches/spacerace/src/modules/gametypes/SpaceRace.h	(revision 8551)
+++ code/branches/spacerace/src/modules/gametypes/SpaceRace.h	(revision 8552)
@@ -77,4 +77,6 @@
 	    inline int getCheckpointsReached()
 		{ return this->checkpointsReached_; }
+	    inline void timeIsUp()
+		{ this->bTimeIsUp_ = true;}
 	    
 	protected:
@@ -82,7 +84,7 @@
 	private:
 	    int checkpointsReached_;
+	    std::set<float> scores_;
 	    Clock *clock_;
-	    std::set<float> scores_;
-	    
+	    bool bTimeIsUp_;
     };
 }
