Index: code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.cc
===================================================================
--- code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.cc	(revision 10154)
+++ code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.cc	(revision 10166)
@@ -46,6 +46,6 @@
         this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
         this->center_ = 0;
-        /*
-        this->setHUDTemplate("DodgeRaceHUD"); // !!!!!!!!!!!!!!!	change later*/
+
+        this->setHUDTemplate("DodgeRaceHUD");
     }
 
@@ -53,5 +53,5 @@
     {
         bEndGame = false;
-        lives = 3;
+        lives = 1;
         level = 1;
         point = 0;
@@ -59,5 +59,5 @@
         multiplier = 1;
         b_combo = false;
-        counter = 0;
+        counter = 5000;
         pattern = 1;
         lastPosition = 0;
@@ -95,6 +95,8 @@
 			counter = counter + (currentPosition - lastPosition);
 			lastPosition = currentPosition;
-
-			for(int i=0; i< cubeList.size();i++)
+			point = currentPosition;
+			getPlayer()->speed = 830 - (point / 1000);
+
+			for(uint i=0; i < cubeList.size();i++)
 			{
 				if(cubeList.at(i)->getPosition().x < currentPosition-3000)
@@ -108,5 +110,4 @@
 			{
 				counter = 0;
-
 				for(int i = 0; i<6; i++)
 				{
@@ -147,36 +148,9 @@
         return player;
     }
-/*
-    void DodgeRace::spawnEnemy()
-    {
-        if (getPlayer() == NULL)
-            return;
-
-        for (int i = 0; i < (3*log10(static_cast<double>(level)) + 1); i++)
-        {
-            WeakPtr<DodgeRaceEnemy> newPawn;
-            if (rand() % 42/(1 + level*level) == 0)
-            {
-                newPawn = new DodgeRaceEnemyShooter(this->center_->getContext());
-                newPawn->addTemplate("enemyinvadershooter");
-            }
-            else
-            {
-                newPawn = new DodgeRaceEnemy(this->center_->getContext());
-                newPawn->addTemplate("enemyinvader");
-            }
-            newPawn->setPlayer(player);
-            newPawn->level = level;
-            // spawn enemy at random points in front of player.
-            newPawn->setPosition(player->getPosition() + Vector3(500.f + 100 * i, 0, float(rand())/RAND_MAX * 400 - 200));
-        }
-    }
-*/
+
     void DodgeRace::costLife()
     {
-    	orxout() << "CostLife" << endl;
-    	endGameTimer.setTimer(3.0f, false, createExecutor(createFunctor(&DodgeRace::end, this)));
-
-        multiplier = 1;
+    	//endGameTimer.setTimer(8.0f, false, createExecutor(createFunctor(&DodgeRace::end, this)));
+    	lives = 0;
     };
 
@@ -193,25 +167,49 @@
     void DodgeRace::start()
     {
-    	orxout() << "start function called." << endl;
+    	orxout() << "start" << endl;
         init();
+		for(uint i=0; i< cubeList.size();i++)
+		{
+			cubeList.at(i)->destroy();
+			cubeList.erase(cubeList.begin()+i);
+
+		}
+        cubeList.clear();
+        // Set variable to temporarily force the player to spawn.
+        this->bForceSpawn_ = false;
+
+        if (this->center_ == NULL)  // abandon mission!
+        {
+            orxout(internal_error) << "DodgeRace: No Centerpoint specified." << endl;
+            GSLevel::startMainMenu();
+            return;
+        }
+        // Call start for the parent class.
+        Deathmatch::start();
+    }
+
+	void DodgeRace::playerPreSpawn(PlayerInfo* player)
+	{
+		if(lives <= 0)
+		{
+			this->end();
+		}
+
+		// Reset all the cubes
+		/*
+		orxout() << "prespawn" << endl;
+		init();
 		for(int i=0; i< cubeList.size();i++)
 		{
 			cubeList.at(i)->destroy();
 			cubeList.erase(cubeList.begin()+i);
-
 		}
-        cubeList.clear();
-        // Set variable to temporarily force the player to spawn.
-        this->bForceSpawn_ = true;
-
-        if (this->center_ == NULL)  // abandon mission!
-        {
-            orxout(internal_error) << "DodgeRace: No Centerpoint specified." << endl;
-            GSLevel::startMainMenu();
-            return;
-        }
-        // Call start for the parent class.
-        Deathmatch::start();
-    }
+		cubeList.clear();
+        lives = 1;
+        point = 0;
+        lastPosition = 0;
+        */
+	}
+
     void DodgeRace::addPoints(int numPoints)
     {
Index: code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.h
===================================================================
--- code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.h	(revision 10154)
+++ code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.h	(revision 10166)
@@ -77,4 +77,6 @@
             virtual void tick(float dt);
 
+            virtual void playerPreSpawn(PlayerInfo* player);
+
             void levelUp();
 
Index: code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceHUDinfo.cc
===================================================================
--- code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceHUDinfo.cc	(revision 10154)
+++ code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceHUDinfo.cc	(revision 10166)
@@ -41,18 +41,12 @@
 
         this->DodgeRaceGame = 0;
-        this->bShowLives_ = false;
-        this->bShowLevel_ = false;
-        this->bShowPoints_ = false;
-        this->bShowMultiplier_ = false;
+        this->bShowPoints_ = true;
     }
-/*
+
     void DodgeRaceHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
         SUPER(DodgeRaceHUDinfo, XMLPort, xmlelement, mode);
 
-        XMLPortParam(DodgeRaceHUDinfo, "showlives",     setShowLives,     getShowLives,     xmlelement, mode).defaultValues(false);
-        XMLPortParam(DodgeRaceHUDinfo, "showPoints",     setShowPoints,     getShowPoints,     xmlelement, mode).defaultValues(false);
-        XMLPortParam(DodgeRaceHUDinfo, "showLevel",     setShowLevel,     getShowLevel,     xmlelement, mode).defaultValues(false);
-        XMLPortParam(DodgeRaceHUDinfo, "showMultiplier",     setShowMultiplier,     getShowMultiplier,     xmlelement, mode).defaultValues(false);
+        XMLPortParam(DodgeRaceHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);
     }
 
@@ -61,63 +55,23 @@
         SUPER(DodgeRaceHUDinfo, tick, dt);
 
-        if (this->DodgeRaceGame)
-        {
-            if (this->bShowLives_)
-            {
-                const std::string& lives = multi_cast<std::string>(this->DodgeRaceGame->getLives());
-                this->setCaption(lives);
-            }
-            else if(this->bShowLevel_)
-            {
-                const std::string& Level = multi_cast<std::string>(this->DodgeRaceGame->getLevel());
-                if (this->DodgeRaceGame->lives <= 0)
-                {
-                    setPosition(Vector2(0.1, 0.65));
-                    this->setCaption("Game ends in 30 seconds.\nPress (e)xit / (q)uit to go to the main menu.\nTo restart fly out of the screen!");
-                    setTextSize(0.05);
-                    this->DodgeRaceGame->bEndGame = true;
-                }
-                else if (this->DodgeRaceGame->bShowLevel)
-                {
-                    setTextSize(0.1);
-                    setPosition(Vector2(0.3, 0.55));
-                    std::stringstream sstm;
-                    sstm << "Level " << Level;
-                    this->setCaption(sstm.str()); // + level
-                }
-                else
-                {
-                    setTextSize(0.04);
-                    setPosition(Vector2(0.14, 0.055));
-                    this->setCaption(Level);
-                }
-            }
-            else if(this->bShowPoints_)
-            {
-                const std::string& points = multi_cast<std::string>(this->DodgeRaceGame->getPoints());
-                if (this->DodgeRaceGame->lives <= 0)
-                {
-                    setTextSize(0.2);
-                    setPosition(Vector2(0.1, 0.25));
-                    this->setCaption("Final score:\n" + points);
-                    this->setColour(ColourValue(1, 0, 0, 1));
-                }
-                else
-                {
-                    setTextSize(0.04);
-                    setPosition(Vector2(0.14, 0.1));
-                    this->setColour(ColourValue(1, 1, 1, 1));
-                    this->setCaption(points);
-                }
-            }
-            else if(this->bShowMultiplier_)
-            {
-                int mult = this->DodgeRaceGame->getMultiplier();
-                const std::string& Multiplier = "X " + multi_cast<std::string>(mult);
-                this->setCaption(Multiplier);
-                this->setColour(ColourValue(1, 0, 0, clamp(float(mult * 0.1), 0.0f, 1.0f)));
-                this->setTextSize(clamp(float(mult * 0.1), 0.0f, 1.0f) * 0.01f + 0.04f);
-            }
-        }
+
+		if(this->bShowPoints_)
+		{
+			const std::string& points = multi_cast<std::string>(this->DodgeRaceGame->getPoints());
+			if (this->DodgeRaceGame->lives <= 0)
+			{
+				setTextSize(0.2);
+				setPosition(Vector2(0.1, 0.02));
+				this->setCaption("Final score:\n" + points);
+				this->setColour(ColourValue(1, 0, 0, 1));
+			}
+			else
+			{
+				setTextSize(0.04);
+				setPosition(Vector2(0.14, 0.02));
+				this->setColour(ColourValue(1, 1, 1, 1));
+				this->setCaption(points);
+			}
+		}
     }
 
@@ -134,4 +88,4 @@
             this->DodgeRaceGame = 0;
         }
-    }*/
+    }
 }
Index: code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceHUDinfo.h
===================================================================
--- code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceHUDinfo.h	(revision 10154)
+++ code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceHUDinfo.h	(revision 10166)
@@ -44,17 +44,7 @@
             DodgeRaceHUDinfo(Context* context);
 
-         //   virtual void tick(float dt);
-           // virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            //virtual void changedOwner();
-
-            inline void setShowLives(bool value)
-                { this->bShowLives_ = value; }
-            inline bool getShowLives() const
-                { return this->bShowLives_; }
-
-            inline void setShowLevel(bool value)
-                { this->bShowLevel_ = value; }
-            inline bool getShowLevel() const
-                { return this->bShowLevel_; }
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
 
             inline void setShowPoints(bool value)
@@ -63,16 +53,8 @@
                 { return this->bShowPoints_; }
 
-            inline void setShowMultiplier(bool value)
-                { this->bShowMultiplier_ = value; }
-            inline bool getShowMultiplier() const
-                { return this->bShowMultiplier_; }
-
 
         private:
             DodgeRace* DodgeRaceGame;
-            bool bShowLives_;
-            bool bShowLevel_;
             bool bShowPoints_;
-            bool bShowMultiplier_;
     };
 }
Index: code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.cc
===================================================================
--- code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.cc	(revision 10154)
+++ code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.cc	(revision 10166)
@@ -42,5 +42,5 @@
         RegisterObject(DodgeRaceShip);
 
-        speed = 800;
+        speed = 830;
         isFireing = false;
         damping = 10;
@@ -68,5 +68,5 @@
         {
             float dist_y = velocity.y * dt;
-            float dist_x = velocity.x * dt;
+            //float dist_x = velocity.x * dt;
             if(dist_y + posforeward > -42*3 && dist_y + posforeward < 42*6)
                 posforeward += dist_y;
@@ -75,5 +75,5 @@
                 velocity.y = 0;
                 // restart if game ended
-                /*
+/*
                 if (getGame())
                     if (getGame()->bEndGame)
@@ -83,18 +83,6 @@
                     }*/
             }
-            /*
-            if (pos.z + dist_x > 42*2.5 || pos.z + dist_x < -42*3)
-            {
-            	velocity.x = 0;
-            }
-            */
+
             pos += Vector3(1000 + velocity.y, 0, velocity.x) * dt;
-        }
-
-        // shoot!
-        if (isFireing)
-        {
-        	//pos += Vector3(900, 0, 0) * dt;
-            //ControllableEntity::fire(0);
         }
 
@@ -150,16 +138,9 @@
     void DodgeRaceShip::boost(bool bBoost)
     {
-        //isFireing = bBoost;
+        //getGame()->bEndGame = bBoost;
     }
 
     inline bool DodgeRaceShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
     {
-    	/*
-        if (otherObject != NULL && lastEntity != otherObject)
-        {
-        	lastEntity = otherObject;
-        	removeHealth(20);
-        }
-		*/
 
     	removeHealth(100);
