Index: code/trunk/src/modules/gametypes/RaceCheckPoint.cc
===================================================================
--- code/trunk/src/modules/gametypes/RaceCheckPoint.cc	(revision 9972)
+++ code/trunk/src/modules/gametypes/RaceCheckPoint.cc	(revision 9973)
@@ -105,10 +105,10 @@
         this->nextCheckpoints_.clear();
 
-        if (checkpoints.x > -1)
-        this->nextCheckpoints_.insert(static_cast<int>(checkpoints.x + 0.5)); // the red number has the type double and for the cast (to int) is added 0.5 so that the cast works correctly
-        if (checkpoints.y > -1)
-        this->nextCheckpoints_.insert(static_cast<int>(checkpoints.y + 0.5));
-        if (checkpoints.z > -1)
-        this->nextCheckpoints_.insert(static_cast<int>(checkpoints.z + 0.5));
+        if (checkpoints.x > -0.5)
+            this->nextCheckpoints_.insert(static_cast<int>(checkpoints.x + 0.5)); // the red number has the type double and for the cast (to int) is added 0.5 so that the cast works correctly
+        if (checkpoints.y > -0.5)
+            this->nextCheckpoints_.insert(static_cast<int>(checkpoints.y + 0.5));
+        if (checkpoints.z > -0.5)
+            this->nextCheckpoints_.insert(static_cast<int>(checkpoints.z + 0.5));
     }
 
@@ -146,12 +146,13 @@
     {
         Vector3 checkpoints(-1,-1,-1); int count=0;
-        for (std::set<int>::iterator it= nextCheckpoints_.begin();it!=nextCheckpoints_.end(); it++ ){
+        for (std::set<int>::iterator it= nextCheckpoints_.begin();it!=nextCheckpoints_.end(); it++ )
+        {
             switch (count)
-                        {
-                            case 0: checkpoints.x = static_cast<Ogre::Real>(*it); break;
-                            case 1: checkpoints.y = static_cast<Ogre::Real>(*it); break;
-                            case 2: checkpoints.z = static_cast<Ogre::Real>(*it); break;
-                        }
-                        ++count;
+            {
+                case 0: checkpoints.x = static_cast<Ogre::Real>(*it); break;
+                case 1: checkpoints.y = static_cast<Ogre::Real>(*it); break;
+                case 2: checkpoints.z = static_cast<Ogre::Real>(*it); break;
+            }
+            ++count;
         }
         return checkpoints;
Index: code/trunk/src/modules/gametypes/SpaceRaceController.cc
===================================================================
--- code/trunk/src/modules/gametypes/SpaceRaceController.cc	(revision 9972)
+++ code/trunk/src/modules/gametypes/SpaceRaceController.cc	(revision 9973)
@@ -55,8 +55,10 @@
         ArtificialController(context)
     {
-        RegisterObject(SpaceRaceController)
-;        std::vector<RaceCheckPoint*> checkpoints;
+        RegisterObject(SpaceRaceController);
+        std::vector<RaceCheckPoint*> checkpoints;
 
         virtualCheckPointIndex = -2;
+        if (ObjectList<SpaceRaceManager>::size() != 1)
+            orxout(internal_warning) << "Expected 1 instance of SpaceRaceManager but found " << ObjectList<SpaceRaceManager>::size() << endl;
         for (ObjectList<SpaceRaceManager>::iterator it = ObjectList<SpaceRaceManager>::begin(); it != ObjectList<SpaceRaceManager>::end(); ++it)
         {
@@ -122,5 +124,5 @@
         }//ausgabe
         orxout()<<"es gibt: "<<checkpoints_.size()<<"checkpoints"<<endl;*/
-        staticRacePoints_ = findStaticCheckpoints(checkpoints);
+        staticRacePoints_ = findStaticCheckpoints(nextRaceCheckpoint_, checkpoints);
         // initialisation of currentRaceCheckpoint_
         currentRaceCheckpoint_ = NULL;
@@ -149,5 +151,5 @@
      * returns a vector of static Point (checkpoints the spaceship has to reach)
      */
-    std::vector<RaceCheckPoint*> SpaceRaceController::findStaticCheckpoints(const std::vector<RaceCheckPoint*>& allCheckpoints)
+    std::vector<RaceCheckPoint*> SpaceRaceController::findStaticCheckpoints(RaceCheckPoint* currentCheckpoint, const std::vector<RaceCheckPoint*>& allCheckpoints)
     {
         std::map<RaceCheckPoint*, int> zaehler; // counts how many times the checkpoint was reached (for simulation)
@@ -156,14 +158,12 @@
             zaehler.insert(std::pair<RaceCheckPoint*, int>(allCheckpoints[i],0));
         }
-        int maxWays = rekSimulationCheckpointsReached(zaehler.begin()->first, zaehler);
+        int maxWays = rekSimulationCheckpointsReached(currentCheckpoint, zaehler);
 
         std::vector<RaceCheckPoint*> returnVec;
-        returnVec.clear();
         for (std::map<RaceCheckPoint*, int>::iterator iter = zaehler.begin(); iter != zaehler.end(); iter++)
         {
             if (iter->second == maxWays)
             {
-                //returnVec.insert(allCheckpoints[1]);
-                returnVec.insert(returnVec.end(), iter->first);
+                returnVec.push_back(iter->first);
             }
         }
@@ -189,12 +189,13 @@
             for (std::set<int>::iterator it = currentCheckpoint->getNextCheckpoints().begin(); it!= currentCheckpoint->getNextCheckpoints().end(); ++it)
             {
-                if(currentCheckpoint == findCheckpoint(*it))
+                if (currentCheckpoint == findCheckpoint(*it))
                 {
                     //orxout() << currentCheckpoint->getCheckpointIndex()<<endl;
                     continue;
                 }
-                if(findCheckpoint(*it) == NULL)
-                    {orxout()<<"Problematic Point: "<<(*it)<<endl;}
-                numberOfWays += rekSimulationCheckpointsReached(findCheckpoint(*it), zaehler);
+                if (findCheckpoint(*it) == NULL)
+                    orxout(internal_warning) << "Problematic Point: " << (*it) << endl;
+                else
+                    numberOfWays += rekSimulationCheckpointsReached(findCheckpoint(*it), zaehler);
             }
             zaehler[currentCheckpoint] += numberOfWays;
Index: code/trunk/src/modules/gametypes/SpaceRaceController.h
===================================================================
--- code/trunk/src/modules/gametypes/SpaceRaceController.h	(revision 9972)
+++ code/trunk/src/modules/gametypes/SpaceRaceController.h	(revision 9973)
@@ -50,5 +50,5 @@
             RaceCheckPoint* nextPointFind(RaceCheckPoint*);
             RaceCheckPoint* adjustNextPoint();
-            std::vector<RaceCheckPoint*> findStaticCheckpoints(const std::vector<RaceCheckPoint*>&);
+            std::vector<RaceCheckPoint*> findStaticCheckpoints(RaceCheckPoint*, const std::vector<RaceCheckPoint*>&);
             std::vector<RaceCheckPoint*> staticCheckpoints();
             int rekSimulationCheckpointsReached(RaceCheckPoint*, std::map<RaceCheckPoint*, int>&);
