Index: code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc	(revision 8914)
+++ code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc	(revision 8915)
@@ -55,4 +55,10 @@
     RaceCheckPoint::~RaceCheckPoint()
     {
+    	 //if (this->isInitialized())
+        {
+            //for (size_t i = 0; i < this->nextcheckpoints_.size(); ++i)
+              //  this->nextcheckpoints_[i]->destroy();
+        }
+        nextcheckpoints_.clear();
     }
 
@@ -76,4 +82,5 @@
         XMLPortParam(RaceCheckPoint, "islast", setLast, getLast, xmlelement, mode).defaultValues(false);
         XMLPortParam(RaceCheckPoint, "timelimit", setTimelimit, getTimeLimit, xmlelement, mode).defaultValues(0);
+    //XMLPortParamTemplate(RaceCheckPoint, "nextcheckpoints", setNextcheckpoint, getNextcheckpoint, xmlelement, mode,std::vector<int>);
     }
 
Index: code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h	(revision 8914)
+++ code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h	(revision 8915)
@@ -57,8 +57,14 @@
             inline bool getLast()
                 { return this->bIsLast_; }
-            inline void setCheckpointIndex(int checkpointIndex)
+            
+	inline void setCheckpointIndex(int checkpointIndex)
                 { this->bCheckpointIndex_ = checkpointIndex; }
             inline int getCheckpointIndex()
                 { return this->bCheckpointIndex_; }
+
+	inline void setNextcheckpoint(std::vector<int> checkpoints)
+                { this->nextcheckpoints_ = checkpoints; }
+            inline std::vector<int> getNextcheckpoint()
+                { return this->nextcheckpoints_; }
             virtual void setTimelimit(float timeLimit);
             inline float getTimeLimit()
@@ -71,4 +77,6 @@
             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.
+
+	std::vector<int> nextcheckpoints_; //the indexes of the next check points
       
     };
Index: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc	(revision 8914)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc	(revision 8915)
@@ -135,11 +135,5 @@
     }
 
-	void SpaceRace::tick(float dt)
-	{SUPER(SpaceRace,tick,dt);
 	
-	
-		//if(const_cast<GametypeInfo*>(this->getGametypeInfo())->isStartCountdownRunning()){
-		//const_cast<GametypeInfo*>(this->getGametypeInfo())->start();}
-	}
 	
 
Index: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc	(revision 8914)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc	(revision 8915)
@@ -44,9 +44,29 @@
     {
         RegisterObject(SpaceRaceManager);
-        
-        
+                
     }
 
-   
+   SpaceRaceManager::~SpaceRaceManager()
+    {
+        if (this->isInitialized())
+        {
+            for (size_t i = 0; i < this->checkpoints_.size(); ++i)
+                this->checkpoints_[i]->destroy();
+        }
+    }
+    
+     void SpaceRaceManager::addCheckpoint(RaceCheckPoint* checkpoint)
+    {
+        this->checkpoints_.push_back(checkpoint);
+    }
+
+    RaceCheckPoint* SpaceRaceManager::getCheckpoint(unsigned int index) const
+    {
+        if (index < this->checkpoints_.size())
+            return this->checkpoints_[index];
+        else
+            return 0;
+    }
+    
      void SpaceRaceManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
Index: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h	(revision 8914)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h	(revision 8915)
@@ -55,13 +55,16 @@
         public:
             SpaceRaceManager(BaseObject* creator);
-            virtual ~SpaceRaceManager() {}
+            virtual ~SpaceRaceManager() ;
 
            void XMLPort(Element& xmlelement, XMLPort::Mode mode); 
 
-            
+            void addCheckpoint(RaceCheckPoint* checkpoint);
+            RaceCheckPoint* getCheckpoint(unsigned int index) const;
+
 	void tick(float dt);
         protected:
 		
         private:
+	std::vector<RaceCheckPoint*> checkpoints_;
  };
 }
