Index: /code/branches/surfaceraceHS14/data/levels/DodgeRace.oxw
===================================================================
--- /code/branches/surfaceraceHS14/data/levels/DodgeRace.oxw	(revision 10151)
+++ /code/branches/surfaceraceHS14/data/levels/DodgeRace.oxw	(revision 10152)
@@ -26,5 +26,5 @@
 
   <Scene
-    ambientlight = "2.0, 2.0, 2.0"
+    ambientlight = "1.0, 1.0, 1.0"
     skybox       = "Orxonox/skyBoxClouds"
     negativeWorldRange = "-100000, -100000, -100000"
@@ -46,30 +46,8 @@
 
     <DodgeRaceCenterPoint name=invadercenter />
-    
-    
-  <StaticEntity position="1500,40,50" direction="0,0,0"   scale="1" collisionType=static mass=0 friction=0.01 >
+  
+  <StaticEntity position="0,-50,0" direction="0,0,0"   scale="1" collisionType=static mass=1 friction=0.01 >
       <attached>
-        <Model position="0,0,0" mesh="blackcube.mesh" scale3D="50,50,50" />
-      </attached>
-
-      <collisionShapes>
-        <BoxCollisionShape position="0,0,0" halfExtents="50,50,50" />
-      </collisionShapes>
-
-  </StaticEntity>
-  <StaticEntity position="4500,50,-30" direction="0,0,0"   scale="1" collisionType=static mass=1 friction=0.01 >
-      <attached>
-        <Model position="0,0,0" mesh="blackcube.mesh" scale3D="50,40,50" />
-      </attached>
-
-      <collisionShapes>
-        <BoxCollisionShape position="0,0,0" halfExtents="50,50,50" />
-      </collisionShapes>
-
-  </StaticEntity>
-  
-  <StaticEntity position="0,-10,0" direction="0,0,0"   scale="1" collisionType=static mass=1 friction=0.01 >
-      <attached>
-        <Model position="0,0,0" mesh="CubeGround.mesh" scale3D="100000,2,100000" />
+        <Model position="0,0,0" mesh="plane.mesh" scale3D="100000,0,100000" />
       </attached>
 
Index: /code/branches/surfaceraceHS14/data/levels/templates/DodgeRacePattern.oxt
===================================================================
--- /code/branches/surfaceraceHS14/data/levels/templates/DodgeRacePattern.oxt	(revision 10151)
+++ /code/branches/surfaceraceHS14/data/levels/templates/DodgeRacePattern.oxt	(revision 10152)
@@ -1,35 +1,61 @@
-<Template name=DodgeRaceCube02>
+<Template name=DodgeRaceCube01>
   
-	<StaticEntity position="0,0,0" direction="0,0,0"   scale="1" collisionType=static mass=1 friction=0.01 >
+	<DodgeRaceCube position="0,0,0" direction="0,0,0"   scale="1" collisionType=dynamic mass=1 friction=0.01 >
       <attached>
-        <Model position="0,0,0" 	mesh="blackcube.mesh" 		scale3D="600,50,50" />
-		<Model position="0,0,950" 	mesh="blackcube.mesh" 		scale3D="600,50,50" />
-		<Model position="800,0,50" 	mesh="blackcube.mesh" 		scale3D="100,50,100" />
-		<Model position="800,0,850"	mesh="blackcube.mesh" 		scale3D="100,50,100" />
-		<Model position="850,0,250"	mesh="blackcube.mesh" 		scale3D="50,40,100" />
-		<Model position="850,0,450"	mesh="blackcube.mesh" 		scale3D="50,40,100" />
-		<Model position="850,0,650"	mesh="blackcube.mesh" 		scale3D="50,40,100" />
+        <Model position="700,0,50" 		mesh="CuboidBody.mesh" 		scale3D="300,50,50" 	/>
+		<Model position="700,0,1150" 	mesh="CuboidBody.mesh" 		scale3D="300,50,50" 	/>
+		<Model position="1200,0,200" 	mesh="CuboidBody.mesh" 		scale3D="100,50,100" 	/>
+		<Model position="1200,0,1000"	mesh="CuboidBody.mesh" 		scale3D="100,50,100" 	/>
+		<Model position="1250,-10,430"	mesh="CuboidBody.mesh" 		scale3D="50,40,30" 		/>
+		<Model position="1250,-10,600"	mesh="CuboidBody.mesh" 		scale3D="50,40,30" 		/>
+		<Model position="1250,-10,770"	mesh="CuboidBody.mesh" 		scale3D="50,40,30" 		/>
+		<Model position="1650,0,350"	mesh="CuboidBody.mesh" 		scale3D="50,50,150" 	/>
+		<Model position="1650,0,850"	mesh="CuboidBody.mesh" 		scale3D="50,50,150" 	/>
+		<Model position="2100,0,150" 	mesh="CuboidBody.mesh" 		scale3D="100,50,150" 	/>
+		<Model position="2100,0,1050"	mesh="CuboidBody.mesh" 		scale3D="100,50,150" 	/>
+		<Model position="2150,0,600"	mesh="CuboidBody.mesh"		scale3D="50,50,100"		/>
       </attached>
 
       <collisionShapes>
-        <BoxCollisionShape position="0,0,0" halfExtents="1,1,1" />
+		<BoxCollisionShape position="700,0,50" 		 		halfExtents="300,50,50" 	/>
+		<BoxCollisionShape position="700,0,1150" 	 		halfExtents="300,50,50" 	/>
+		<BoxCollisionShape position="1200,0,200" 	 		halfExtents="100,50,100" 	/>
+		<BoxCollisionShape position="1200,0,1000"	 		halfExtents="100,50,100" 	/>
+		<BoxCollisionShape position="1250,-10,430"	 		halfExtents="50,40,30" 		/>
+		<BoxCollisionShape position="1250,-10,600"	 		halfExtents="50,40,30" 		/>
+		<BoxCollisionShape position="1250,-10,770"	 		halfExtents="50,40,30" 		/>
+		<BoxCollisionShape position="1650,0,350"	 		halfExtents="50,50,150" 	/>
+		<BoxCollisionShape position="1650,0,850"	 		halfExtents="50,50,150" 	/>
+		<BoxCollisionShape position="2100,0,150" 	 		halfExtents="100,50,150" 	/>
+		<BoxCollisionShape position="2100,0,1050"	 		halfExtents="100,50,150" 	/>
+		<BoxCollisionShape position="2150,0,600"			halfExtents="50,50,100"		/>
       </collisionShapes>
-	</StaticEntity>
+	</DodgeRaceCube>
 
 </Template>
 
-<Template name=DodgeRaceCube01>
+<Template name=DodgeRaceCube02>
   
-	<StaticEntity position="0,0,0" direction="0,0,0"   scale="1" collisionType=static mass=1 friction=0.01 >
+	<DodgeRaceCube position="0,0,0" direction="0,0,0"   scale="1" collisionType=dynamic mass=1 friction=0.01 >
       <attached>
-        <Model position="0,0,0" 	mesh="blackcube.mesh" 		scale3D="50,50,100" />
-		<Model position="50,0,150" 	mesh="blackcube.mesh" 		scale3D="50,50,50" />
-		<Model position="40,0,-155" 	mesh="blackcube.mesh" 		scale3D="50,50,50" />
+		<Model position="450,0,300" 	mesh="CuboidBody.mesh" 		scale3D="50,50,300" 	/>
+		<Model position="950,0,850" 	mesh="CuboidBody.mesh" 		scale3D="50,50,350" 	/>
+		<Model position="1350,0,200" 	mesh="CuboidBody.mesh" 		scale3D="50,50,200" 	/>
+		<Model position="1350,0,700"	mesh="CuboidBody.mesh" 		scale3D="50,50,100" 	/>
+		<Model position="1750,0,350"	mesh="CuboidBody.mesh" 		scale3D="50,50,350" 	/>
+		<Model position="2000,0,1000"	mesh="CuboidBody.mesh" 		scale3D="100,50,100" 	/>
+		<Model position="1650,0,1150"	mesh="CuboidBody.mesh" 		scale3D="450,50,50" 	/>
       </attached>
 
       <collisionShapes>
-        <BoxCollisionShape position="0,1000,0" halfExtents="1,1,1" />
+		<BoxCollisionShape position="450,0,300" 		 		halfExtents="50,50,300" 	/>
+		<BoxCollisionShape position="950,0,850" 	 		halfExtents="50,50,350" 	/>
+		<BoxCollisionShape position="1350,0,200" 	 		halfExtents="50,50,200" 	/>
+		<BoxCollisionShape position="1350,0,700"		 		halfExtents="50,50,100" 	/>
+		<BoxCollisionShape position="1750,0,350"	 		halfExtents="50,50,350" 	/>
+		<BoxCollisionShape position="2000,0,1000"	 		halfExtents="100,50,100" 	/>
+		<BoxCollisionShape position="1650,0,1150"	 		halfExtents="450,50,50" 	/>
       </collisionShapes>
-	</StaticEntity>
+	</DodgeRaceCube>
 
 </Template>
Index: /code/branches/surfaceraceHS14/src/modules/dodgerace2/CMakeLists.txt
===================================================================
--- /code/branches/surfaceraceHS14/src/modules/dodgerace2/CMakeLists.txt	(revision 10151)
+++ /code/branches/surfaceraceHS14/src/modules/dodgerace2/CMakeLists.txt	(revision 10152)
@@ -3,4 +3,5 @@
 DodgeRaceCenterPoint.cc
 DodgeRaceShip.cc
+DodgeRaceCube.cc
 DodgeRaceHUDinfo.cc
 )
Index: /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.cc
===================================================================
--- /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.cc	(revision 10151)
+++ /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.cc	(revision 10152)
@@ -34,4 +34,5 @@
 #include "DodgeRace.h"
 #include "DodgeRaceShip.h" // Necessary for getPlayer function. Do NOT include this in Header!
+#include "DodgeRaceCube.h"
 
 namespace orxonox
@@ -59,4 +60,5 @@
         b_combo = false;
         counter = 0;
+        pattern = 1;
         lastPosition = 0;
         // spawn enemy every 3.5 seconds
@@ -94,14 +96,40 @@
 			lastPosition = currentPosition;
 
-			if(counter >= 5000)
+			for(int i=0; i< cubeList.size();i++)
+			{
+				if(cubeList.at(i)->getPosition().x < currentPosition-3000)
+				{
+					cubeList.at(i)->destroy();
+					cubeList.erase(cubeList.begin()+i);
+				}
+			}
+
+			if(counter >= 3000)
 			{
 				counter = 0;
 
-				WeakPtr<StaticEntity> stentity = new StaticEntity(this->center_->getContext()); //this->center_->getContext()
-				stentity->addTemplate("DodgeRaceCube01");
-
-				stentity->setPosition(getPlayer()->getWorldPosition() + Vector3(5000, 0, 0));
-				//stentity->setScale3D(50,50,50);
+				for(int i = 0; i<6; i++)
+				{
+					WeakPtr<DodgeRaceCube> cube = new DodgeRaceCube(this->center_->getContext());
+					cubeList.push_back(cube);
+					switch(pattern)
+					{
+					case 1: cube->addTemplate("DodgeRaceCube01");
+					break;
+					case 2:	cube->addTemplate("DodgeRaceCube02");
+					break;
+
+					}
+
+					cube->setPosition(getPlayer()->getWorldPosition() + Vector3(5000, 0, -3600 + (i*1200)));
+					//stEntity->setScale3D(50,50,50);
+				}
+
+
+				pattern %= 2;
+				pattern ++;
+
 			}
+
     	}
     	SUPER(DodgeRace, tick, dt);
@@ -166,5 +194,13 @@
     void DodgeRace::start()
     {
+    	orxout() << "start function called." << 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;
Index: /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.h
===================================================================
--- /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.h	(revision 10151)
+++ /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.h	(revision 10152)
@@ -51,4 +51,5 @@
 #include "gamestates/GSLevel.h"
 #include "chat/ChatManager.h"
+#include <vector>
 
 // ! HACK
@@ -96,4 +97,5 @@
             int multiplier;
             int counter;
+            int pattern;
             int currentPosition;
             int lastPosition;
@@ -102,4 +104,5 @@
             WeakPtr<DodgeRaceShip> getPlayer();
             WeakPtr<DodgeRaceShip> player;
+            std::vector<DodgeRaceCube*> cubeList;
             void toggleShowLevel(){bShowLevel = !bShowLevel;}
             void addPoints(int numPoints);
Index: /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceCube.cc
===================================================================
--- /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceCube.cc	(revision 10152)
+++ /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceCube.cc	(revision 10152)
@@ -0,0 +1,46 @@
+/*   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Samuel Riedel
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file DodgeRace.cc
+    @brief Implementation of the DodgeRace class.
+*/
+
+#include "DodgeRaceCube.h"
+#include "DodgeRace.h"
+
+namespace orxonox
+{
+	RegisterClass(DodgeRaceCube);
+
+	DodgeRaceCube::DodgeRaceCube(Context* context) : MovableEntity(context)
+	{
+		RegisterObject(DodgeRaceCube);
+	}
+
+
+}
Index: /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceCube.h
===================================================================
--- /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceCube.h	(revision 10152)
+++ /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceCube.h	(revision 10152)
@@ -0,0 +1,54 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Samuel Riedel
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file DodgeRace.h
+    @brief Gametype.
+    @ingroup DodgeRace
+*/
+
+#ifndef _DodgeRaceCube_H__
+#define _DodgeRaceCube_H__
+
+#include "dodgerace2/DodgeRacePrereqs.h"
+
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _DodgeRaceExport DodgeRaceCube : public MovableEntity
+    {
+       public:
+            DodgeRaceCube(Context* context);
+
+       private:
+    };
+}
+
+#endif /* _DodgeRaceCube_H__ */
Index: /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRacePrereqs.h
===================================================================
--- /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRacePrereqs.h	(revision 10151)
+++ /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRacePrereqs.h	(revision 10152)
@@ -71,4 +71,5 @@
     class DodgeRaceCenterPoint;
     class DodgeRaceShip;
+    class DodgeRaceCube;
     //class DodgeRaceEnemy;
     //class DodgeRaceEnemyShooter;
Index: /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.cc
===================================================================
--- /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.cc	(revision 10151)
+++ /code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.cc	(revision 10152)
@@ -75,4 +75,5 @@
                 velocity.y = 0;
                 // restart if game ended
+                /*
                 if (getGame())
                     if (getGame()->bEndGame)
@@ -80,5 +81,5 @@
                         getGame()->start();
                         return;
-                    }
+                    }*/
             }
             /*
