Index: code/trunk/data/gui/scripts/testscript.lua
===================================================================
--- code/trunk/data/gui/scripts/testscript.lua	(revision 10216)
+++ code/trunk/data/gui/scripts/testscript.lua	(revision 10216)
@@ -0,0 +1,92 @@
+-- Set some test variables
+xm = 1000 
+ym = 0
+zm = 0
+
+xl = -1000 
+yl = 3000 
+zl = -1000
+
+xr = 2000
+yr = 500
+zr = 2000
+
+d = 5
+Tabs = 0
+
+pi = 3.1415
+
+-- Get a local pointer to a scriptcontroller
+local ctrl = orxonox.ScriptController:getScriptController()
+
+-- If it worked, call its "movetoposition" function
+if ctrl ~= nil then
+  -- Move to the starting point at (xl+3000,yl,zl) while looking 
+  -- at xl,yl,zl over the time span of 3 seconds
+  ctrl:eventScheduler("mal", xl+3000,yl,zl, xl,yl,zl, 1, 0)
+
+  -- From there, perform a rotation around the harvester placed there
+  -- in 100 steps
+  dt = math.pi/100
+  for t = 0,math.pi,dt do
+    xt = math.cos(t)
+    yt = math.sin(t)
+
+    ctrl:eventScheduler("mal", xl+3000*xt, yl+3000*yt, zl, xl, yl, zl, dt, t+0.9)
+  end
+
+
+  -- Update absolute time
+  Tabs = math.pi + 0.9
+
+  
+
+  -- Move away again, still looking at the station
+  ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3, Tabs+0.4)
+
+
+
+  -- Update absolute time
+  Tabs = Tabs + 0.4 + 3
+
+  
+
+  
+
+  -- Transition the look from (xl,yl,zl) to (3500,0,0) in 3 seconds
+  ctrl:eventScheduler("chl", xl, yl, zl, xr, yr, zr, 2, Tabs+0.2)
+
+  Tabs = Tabs + 2 + 0.2
+
+   ctrl:eventScheduler("mal", xr + 600,yr,zr, xr,yr,zr, 4, Tabs+0)
+
+   Tabs = Tabs + 4 
+
+  for t = 0,math.pi,dt do
+    xt = math.cos(t)
+    zt = math.sin(t)
+
+    ctrl:eventScheduler("mal", xr+600*xt, yr, zr+600*zt, xr, yr, zr, dt, Tabs+t)
+  end
+
+  Tabs = Tabs + math.pi
+
+  ctrl:eventScheduler("chl", xr, yr, zr, xl, yl, zl, 3, Tabs+0.2)
+
+  Tabs = Tabs + 3 + 0.2
+
+  ctrl:eventScheduler("mal", xm,ym,zm, xl,yl,zl, 4, Tabs+2.5)
+
+
+end
+
+
+
+-- Output the newctrlid variable we set from the C++ code
+if newctrlid ~= nil then
+  orxonox.execute("orxout message test " .. newctrlid)
+end
+
+--orxonox.execute("setPause 1")
+
+
Index: code/trunk/data/levels/ModularShipsTest0.oxw
===================================================================
--- code/trunk/data/levels/ModularShipsTest0.oxw	(revision 10216)
+++ code/trunk/data/levels/ModularShipsTest0.oxw	(revision 10216)
@@ -0,0 +1,76 @@
+<LevelInfo
+ name = "Modular Ships - Test 0"
+ description = "A level to test the basic functions of modular spaceships using simple boxes."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff2.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipEscort.oxt")
+  include("templates/HeavyCruiser.oxt")
+  include("templates/ModularSpaceShipTest.oxt")
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+    
+    <ModularSpaceShip position="0,0,0" health="2000" maxhealth="4000" initialhealth="2000">
+      <templates>
+        <Template link=ModularSpaceShipTest />
+      </templates>
+    </ModularSpaceShip>
+    
+    <StaticEntity position="0,0,60" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+        <attached>
+            <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" />
+        </attached>
+        <collisionShapes>
+        </collisionShapes>
+    </StaticEntity>
+    
+        <StaticEntity position="0,60,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+        <attached>
+            <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" />
+        </attached>
+        <collisionShapes>
+        </collisionShapes>
+    </StaticEntity>
+    
+        <StaticEntity position="0,0,-60" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+        <attached>
+            <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" />
+        </attached>
+        <collisionShapes>
+        </collisionShapes>
+    </StaticEntity>
+    
+    <StaticEntity position="0,-60,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+        <attached>
+            <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" />
+        </attached>
+        <collisionShapes>
+        </collisionShapes>
+    </StaticEntity>
+    
+  </Scene>
+</Level>
+
Index: code/trunk/data/levels/ModularShipsTest1.oxw
===================================================================
--- code/trunk/data/levels/ModularShipsTest1.oxw	(revision 10216)
+++ code/trunk/data/levels/ModularShipsTest1.oxw	(revision 10216)
@@ -0,0 +1,109 @@
+<LevelInfo
+ name = "Modular Ships - Test 1"
+ description = "A level to test the implementation of HeavyCruiser as modular spaceship."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff2.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipEscort.oxt")
+  include("templates/HeavyCruiser.oxt")
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <!-- <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort /> -->
+    <SpawnPoint team=0 position="-500,0,0" lookat="0,0,0" spawnclass=ModularSpaceShip pawndesign=HeavyCruiser />
+    
+    <MovableEntity position="0,0,0" collisionType=dynamic scale=1 linearDamping=0.8 angularDamping=0  collisiondamage=0.005 enablecollisiondamage=true>
+    <attached> 
+        <Model position="0,0,0" mesh="cube.mesh" scale3D="40,40,40" /> 
+        <StaticEntity position="0,90,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached> 
+                <Model position="0,0,0" mesh="cube.mesh" scale3D="30,30,30" /> 
+            </attached> 
+            <collisionShapes> 
+                <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" /> 
+            </collisionShapes> 
+        </StaticEntity>
+    </attached> 
+    <collisionShapes> 
+        <BoxCollisionShape position="0,0,0" halfExtents="40,40,40" /> 
+    </collisionShapes> 
+    </MovableEntity>
+    
+    <Pawn health=1000 initialhealth=1000 maxhealth=1000 position="0,-100,-100" direction="0,0,0" collisionType=dynamic mass=1000 name=box radarname = "Pawn 0" >
+        <attached>
+            <Model position="0,0,0" mesh="crate.mesh" scale3D="6,6,6" />
+            <Model position="0,-60,0" mesh="cube.mesh" scale3D="30,30,30" />
+            <StaticEntity position="0,-120,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+                <attached> 
+                    <Model position="0,0,0" mesh="crate.mesh" scale3D="6,6,6" />
+                    <Model position="0,0,60" mesh="cube.mesh" scale3D="30,30,30" /> 
+                </attached> 
+                <collisionShapes> 
+                    <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" /> 
+                    <BoxCollisionShape position="0,0,60" halfExtents="30,30,30" /> 
+                </collisionShapes> 
+            </StaticEntity>
+            <StaticEntity position="0,-180,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+                <attached> 
+                    <Model position="0,0,0" mesh="crate.mesh" scale3D="6,6,6" />
+                    <Model position="0,-60,0" mesh="cube.mesh" scale3D="30,30,30" /> 
+                </attached> 
+                <collisionShapes> 
+                    <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" /> 
+                    <BoxCollisionShape position="0,-60,0" halfExtents="30,30,30" /> 
+                </collisionShapes> 
+            </StaticEntity>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
+            <BoxCollisionShape position="0,-60,0" halfExtents="30,30,30" />
+        </collisionShapes>
+    </Pawn>
+
+    <Pawn health=1000 initialhealth=1000 maxhealth=1000 position="0,-100,100" direction="0,0,0" collisionType=dynamic mass=1000 name=box radarname = "Pawn 1" >
+        <attached>
+            <Model position="0,0,0" mesh="crate.mesh" scale3D="6,6,6" />
+            <Model position="0,-60,0" mesh="cube.mesh" scale3D="30,30,30" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
+            <BoxCollisionShape position="0,-60,0" halfExtents="30,30,30" />
+        </collisionShapes>
+    </Pawn>
+    
+    <ModularSpaceShip position="0,-100,-200">
+      <templates>
+        <Template link=spaceshippirate />
+      </templates>
+    </ModularSpaceShip>
+    
+    <ModularSpaceShip position="0,-1000,-200" health="2000" maxhealth="4000" initialhealth="2000">
+      <templates>
+        <Template link=HeavyCruiser />
+      </templates>
+    </ModularSpaceShip>
+    
+  </Scene>
+</Level>
+
Index: code/trunk/data/levels/includes/weaponSettingsTurret.oxi
===================================================================
--- code/trunk/data/levels/includes/weaponSettingsTurret.oxi	(revision 10215)
+++ code/trunk/data/levels/includes/weaponSettingsTurret.oxi	(revision 10216)
@@ -11,11 +11,11 @@
         </links>
         <Weapon>
-          <attached>
-            <Model mesh="sphere.mesh" position="3,3,-2.2" scale=0.6 />
-          </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 3, 3,-2.2" />
-          <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 3,-3,-2.2" />
-          <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-3, 3,-2.2" />
-          <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-3,-3,-2.2" />
+          <!-- <attached>
+            <Model mesh="sphere.mesh" position="1.7,1.7,-24.5" scale=0.6 />
+          </attached> -->
+          <HsW01 mode=0 munitionpershot=0 delay=0 damage=1 material="Flares/point_lensflare" muzzleoffset="1.7, 1.7,-30" />
+          <HsW01 mode=0 munitionpershot=0 delay=0 damage=1 material="Flares/point_lensflare" muzzleoffset="1.7, -1.7,-30" />
+          <HsW01 mode=0 munitionpershot=0 delay=0 damage=1 material="Flares/point_lensflare" muzzleoffset="-1.7, 1.7,-30" />
+          <HsW01 mode=0 munitionpershot=0 delay=0 damage=1 material="Flares/point_lensflare" muzzleoffset="-1.7, -1.7,-30" />
         </Weapon>
       </WeaponPack>
Index: code/trunk/data/levels/jump.oxw
===================================================================
--- code/trunk/data/levels/jump.oxw	(revision 10216)
+++ code/trunk/data/levels/jump.oxw	(revision 10216)
@@ -0,0 +1,260 @@
+<LevelInfo
+ name = "Jump"
+ description = "Jump in space!"
+ tags = "minigame"
+ screenshot = "jump.png"
+/>
+
+<?lua
+  include("HUDTemplates3.oxo")  
+  include("jumpHUD.oxo")
+  include("stats.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<Template name=jumpfigurecameras defaults=0>
+  <JumpFigure>
+    <camerapositions>
+      <CameraPosition position="0,-150,0" absolute=true mouselook=false drag=false lookat="0,0,0"/>
+    </camerapositions>
+  </JumpFigure>
+</Template>
+
+<Template name=figureLeftHand defaults=0>
+  <Model position="4.0,0.0,5.0" mesh="JumpFigureLeftHand.mesh" scale=1>
+  </Model>
+</Template>
+
+<Template name=figureRightHand defaults=0>
+  <Model position="-4.0,0.0,5.0" mesh="JumpFigureRightHand.mesh" scale=1>
+  </Model>
+</Template>
+
+<Template name=jumpFigureTemplate>
+  <JumpFigure camerapositiontemplate=jumpfigurecameras mouseFactor="100.0" modelLefthand=figureLeftHand  modelRighthand=figureRightHand rocketPos=8.0 propellerPos=8.0 bootsPos=-5.2 jumpSpeed=250.0 handMinAngle=-20 handMaxAngle=75 handSpeed=250 rocketSpeed=250.0 propellerSpeed=150.0>
+    <attached>
+      <Model position="0,0,0" mesh="JumpFigure.mesh" scale=1 pitch=90/>
+    </attached>
+  </JumpFigure>
+</Template>
+
+<Template name=jumpProjectileTemplate>
+  <JumpProjectile>
+    <attached>
+      <Model mesh="JumpProjectile.mesh" scale=1  pitch=90/>
+      <ParticleEmitter scale=1 pitch=0 roll=0 position="0, 0, 0" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=0.0 />
+    </attached>
+  </JumpProjectile>
+</Template>
+
+<Template name=jumpPlatformStaticTemplate>
+  <JumpPlatformStatic height=3 width=19>
+    <attached>
+      <Model mesh="JumpPlatform01.mesh" scale=1  pitch=90/>
+      <Backlight scale=0.2 colour="0.9, 0.4, 0.0" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
+    </attached>
+  </JumpPlatformStatic>
+</Template>
+
+<Template name=jumpPlatformHMoveTemplate>
+  <JumpPlatformHMove height=3 width=19>
+    <attached>
+      <Model mesh="JumpPlatform02.mesh" scale=1  pitch=90/>
+      <Backlight scale=0.2 colour="0.1, 0.1, 1.0" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
+    </attached>
+  </JumpPlatformHMove>
+</Template>
+
+<Template name=jumpPlatformVMoveTemplate>
+  <JumpPlatformVMove height=3 width=19>
+    <attached>
+      <Model mesh="JumpPlatform03.mesh" scale=1  pitch=90/>
+      <Backlight scale=0.2 colour="1.0, 0.1, 1.0" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
+    </attached>
+  </JumpPlatformVMove>
+</Template>
+
+<Template name=jumpPlatformDisappearTemplate>
+  <JumpPlatformDisappear height=3 width=19>
+    <attached>
+      <Model mesh="JumpPlatform04.mesh" scale=1  pitch=90/>
+      <Backlight scale=0.2 colour="0.1, 1.0, 0.1" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
+    </attached>
+  </JumpPlatformDisappear>
+</Template>
+
+<Template name=jumpPlatformTimerTemplate>
+  <JumpPlatformTimer height=3 width=19 effectPath="Orxonox/BigExplosion1part2" effectStartTime="0.4">
+    <attached>
+      <Model mesh="JumpPlatform05.mesh" scale=1  pitch=90/>
+      <ParticleEmitter scaled3D="5.0, 1.0, 2.0" pitch=0 roll=0 position="-4, 0, -2.0" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=0.0 />
+      <ParticleEmitter scaled3D="5.0, 1.0, 2.0" pitch=0 roll=0 position="0, 0, -2.0" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=0.0 />
+      <ParticleEmitter scaled3D="5.0, 1.0, 2.0" pitch=0 roll=0 position="4, 0, -2.0" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=0.0 />      
+    </attached>
+  </JumpPlatformTimer>
+</Template>
+
+<Template name=jumpPlatformFakeTemplate>
+  <JumpPlatformFake height=3 width=19>
+    <attached>
+      <Model mesh="JumpPlatform06.mesh" scale=1  pitch=90/>
+      <ParticleEmitter scale3D="0.2,0.2,0.2" pitch=0 roll=0 position="0, 0, -2.5" source="Orxonox/sparks" lifetime=1.0 loop=1 startdelay=0.0 />
+    </attached>
+  </JumpPlatformFake>
+</Template>
+
+<Template name=jumpEnemy1Template>
+  <JumpEnemy height=13 width=35>
+    <attached>
+      <Model mesh="JumpEnemy1.mesh" scale=1  pitch=90/>
+      <FadingBillboard active=true scale=0.09 position="0, 0, 10" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <Backlight scale=0.33 name=bltest position="0, 0, -10" colour="0.6, 0.8, 0.75, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />            
+    </attached>
+  </JumpEnemy>
+</Template>
+
+<Template name=jumpEnemy2Template>
+  <JumpEnemy height=15 width=36>
+    <attached>
+      <Model mesh="JumpEnemy2.mesh" scale=1  pitch=90/>
+      <MovableEntity position="-16, 0, 2" rotationaxis="0, 1, 0" rotationrate=500 >
+        <attached>
+          <Model mesh="JumpEnemy2Wing.mesh" scale=1 pitch=90/>
+        </attached>
+      </MovableEntity>      
+      <MovableEntity position="16, 0, 2" rotationaxis="0, 1, 0" rotationrate=500 >
+        <attached>
+          <Model mesh="JumpEnemy2Wing.mesh" scale=1 pitch=90/>
+        </attached>
+      </MovableEntity> 
+      <ParticleEmitter scale3D="1.0,1.0,1.0" pitch=0 roll=0 position="-1, 0, -3" source="Orxonox/laser" lifetime=1.0 loop=1 startdelay=0.0 />
+    </attached>
+  </JumpEnemy>
+</Template>
+
+<Template name=jumpEnemy3Template>
+  <JumpEnemy height=18.5 width=14>
+    <attached>
+      <Model mesh="JumpEnemy3.mesh" scale=1  pitch=90/>
+      <Backlight scale3D="0.1, 0.1, 1.0" position="0, -11, -4" colour="1.0, 0.0, 0.9, 1.0" width=1 length=1 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1"/>
+      <Backlight scale3D="0.1, 0.1, 1.0" position="6.32, 5.5, -4" colour="1.0, 0.0, 0.9, 1.0" width=1 length=1 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1"/>
+      <Backlight scale3D="0.1, 0.1, 1.0" position="-6.32, 5.5, -4" colour="1.0, 0.0, 0.9, 1.0" width=1 length=1 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1"/>            
+    </attached>
+  </JumpEnemy>
+</Template>
+
+<Template name=jumpEnemy4Template>
+  <JumpEnemy height=12.5 width=36 rotationaxis="0, 0, 1" rotationrate=40 >
+    <attached>
+      <Model mesh="JumpEnemy4.mesh" scale=1  pitch=90/>
+    </attached>
+  </JumpEnemy>
+</Template>
+
+<Template name=jumpSpringTemplate>
+  <JumpSpring height=6 width=9.25>
+    <attached>
+      <Model mesh="JumpSpring.mesh" scale=1  rotationaxis="0, 0, 1" pitch=90 position="0.0, 0.0, 0.0"/>
+    </attached>
+  </JumpSpring>
+</Template>
+
+<Template name=jumpRocketTemplate>
+  <JumpRocket height=8.5 width=13.5>
+    <attached>
+      <Model mesh="JumpRocket.mesh" scale=1  pitch=90 position="0.0, 0.0, 1.0"/>
+    </attached>
+  </JumpRocket>
+</Template>
+
+<Template name=jumpPropellerTemplate>
+  <JumpPropeller height=4 width=15.5>
+    <attached>
+      <Model mesh="JumpPropeller.mesh" scale=1  pitch=90 position="0.0, 0.0, 1.0"/>
+    </attached>
+  </JumpPropeller>
+</Template>
+
+<Template name=jumpBootsTemplate>
+  <JumpBoots height=5.2 width=3.5>
+    <attached>
+      <Model mesh="JumpBoots.mesh" scale=1  pitch=90 position="0.0, 0.0, 1.0"/>
+    </attached>
+  </JumpBoots>
+</Template>
+
+<Template name=jumpShieldTemplate>
+  <JumpShield height=1.55 width=15.5>
+    <attached>
+      <Model mesh="JumpShield.mesh" scale=1 pitch=90 position="0.0, 0.0, 1.0"/>
+    </attached>
+  </JumpShield>
+</Template>
+
+<Level gametype = "Jump">
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <WorldAmbientSound source="Ganymede.ogg" looping="true" playOnLoad="true"/>
+  <JumpBot />
+
+  <Scene ambientlight="1.0, 1.0, 1.0" skybox="Orxonox/skyBoxBasic">
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+
+    <SpawnPoint position="991.729, -110.11, 435.404" orientation="0.534038, 0.563456, 0.212168, 0.593553" />
+
+    <MovableEntity>
+      <attached>
+        <JumpCenterpoint
+          name=jumpcenter
+          dimension="120,80"
+          sectionLength="150"
+          platformSpeed="20"
+          cameraOffset="10"
+
+          platformStaticTemplate=jumpPlatformStaticTemplate
+          platformHMoveTemplate=jumpPlatformHMoveTemplate
+          platformVMoveTemplate=jumpPlatformVMoveTemplate
+          platformDisappearTemplate=jumpPlatformDisappearTemplate
+          platformTimerTemplate=jumpPlatformTimerTemplate
+          platformFakeTemplate=jumpPlatformFakeTemplate          
+          figureTemplate=jumpFigureTemplate
+          projectileTemplate=jumpProjectileTemplate
+          springTemplate=jumpSpringTemplate
+          rocketTemplate=jumpRocketTemplate
+          propellerTemplate=jumpPropellerTemplate
+          bootsTemplate=jumpBootsTemplate
+          shieldTemplate=jumpShieldTemplate
+          enemy1Template=jumpEnemy1Template
+          enemy2Template=jumpEnemy2Template
+          enemy3Template=jumpEnemy3Template
+          enemy4Template=jumpEnemy4Template
+          >
+
+          <attached>
+
+            <Model position="0,0,-1000" mesh="JumpPlatform01.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpPlatform02.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpPlatform03.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpPlatform04.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpPlatform05.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpPlatform06.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpProjectile.mesh" scale="1" />            
+            <Model position="0,0,-1000" mesh="JumpEnemy1.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpEnemy2.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpEnemy2Wing.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpEnemy3.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpEnemy4.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpSpring.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpRocket.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpPropeller.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpShield.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="JumpBoots.mesh" scale="1" />
+          </attached>
+        </JumpCenterpoint>
+      </attached>
+    </MovableEntity>
+  </Scene>
+</Level>
Index: code/trunk/data/levels/levelTry.oxw
===================================================================
--- code/trunk/data/levels/levelTry.oxw	(revision 10216)
+++ code/trunk/data/levels/levelTry.oxw	(revision 10216)
@@ -0,0 +1,178 @@
+<!-- First levelFile of mkronig and samuezu. It was copied from dockingToASpaceStation.oxw and modified a little bit -->
+<LevelInfo
+ name = "levelTry"
+ description = "Docking into a spacestation."
+ tags = "showcase"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+  include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipEscort.oxt")
+  include("templates/bigship.oxt")
+  include("templates/spaceshipTurret.oxt")
+  include("templates/spaceshipCollateralDamage.oxt")
+  include("templates/FPS.oxt")
+?>
+
+<Level
+  gametype = Deathmatch
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+
+  <Scene
+    ambientlight = "0.5, 0.5, 0.5"
+    skybox       = "Orxonox/Starbox"
+    negativeWorldRange = "-100000, -100000, -100000"
+    positiveWorldRange = " 100000,  100000,  100000"
+    gravity      = "0,0,0"
+    hasPhysics   = true
+  >
+
+    <?lua
+      include("includes/pickups.oxi")
+    ?>
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0,1.0,1.0,0.5" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint team=0 position="3200,0,0" lookat="2800,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+
+    <!--
+    <StaticEntity position  = "2800,0,0" mass=10000 collisionType=static >
+      <attached>
+        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" />
+        <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
+        <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
+        <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" />
+        <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
+        <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
+        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" />
+        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
+        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
+        <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 />
+        <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" />
+        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
+        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
+        <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 />
+        <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
+        <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
+      </collisionShapes>
+    </StaticEntity>
+    -->
+
+
+    <Billboard position="2500,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=10 />
+    <DistanceTrigger position="2500,0,0" distance="200" target="Pawn"
+      beaconMode="exclude" targetname="bcnDestroyer" name="takeControl"
+    />
+
+    <StaticEntity position  = "2000,500,2000" mass=10000 collisionType=static >
+      <attached>
+        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=10 />
+      </attached>
+    </StaticEntity>
+
+    <StaticEntity position  = "-1000,3000,-1000" mass=10000 collisionType=static >
+      <attached>
+        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=80 />
+      </attached>
+    </StaticEntity>
+
+
+
+
+<!-- ControllerDirector waits for the event takeControl to attach a new Controller -->
+    <ControllerDirector position="0,0,0">
+        <events>
+            <takeControl>
+                <EventListener event="takeControl" />
+            </takeControl>
+        </events>
+    </ControllerDirector>
+
+<!-- FPS Player as destination of the dock -->
+<FpsPlayer template = "fps" radarname = "First Person Player" position = "0,-19900,0" >
+      <attached>
+        <DockingTarget name="spaceShip" />
+        <DistanceTriggerBeacon name="bcnDestroyer" />
+        <DockingTarget name="destroyer" />
+      </attached>
+</FpsPlayer>
+
+
+<!-- Cube as test SpaceStation
+
+The station can either be hidden outside of the skybox, within the hull of the space station if it is big enough or within a planet.
+Complex spacestations can be placed very far away from the spaceship so it is rendered at low resolution while the player uses the space ship.
+
+-->
+  <StaticEntity position="0,-20000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
+      <attached>
+        <Model position="0,0,0" mesh="crate.mesh" scale3D="80,80,5" />
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="400,400,25" />
+      </collisionShapes>
+  </StaticEntity>
+
+<!-- Homogenous gravitationfield to simulate local gravity (activating the normal gravity will affect the spaceship terribly) -->
+<ForceField position="0,-20000,0" mode="homogen" diameter="2000" forcedirection = "0,-500,0" />
+
+
+<!-- Some more stuff -->
+
+    <!-- triple large belt around the planet  -->
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
+    ?>
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
+    ?>
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
+    ?>
+
+    <Planet
+      position="15000,0,-1000"
+      scale="5000"
+      collisionType="dynamic"
+      linearDamping="0.8"
+      angularDamping="0"
+      mass="10000000"
+      pitch="0"
+      mesh="planets/ganymede.mesh"
+      atmosphere="atmosphere1"
+      rotationaxis="1,0,0"
+      rotationrate="1.0"
+      atmospheresize="80.0f"
+      imagesize="1024.0f"
+      collisiondamage = 2
+      enablecollisiondamage = true
+    >
+      <attached>
+        <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="5000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
+  </Scene>
+
+</Level>
+
Index: code/trunk/data/levels/michaelstestfile.lua
===================================================================
--- code/trunk/data/levels/michaelstestfile.lua	(revision 10216)
+++ code/trunk/data/levels/michaelstestfile.lua	(revision 10216)
@@ -0,0 +1,1 @@
+orxout("event: theme")
Index: code/trunk/data/levels/scriptController.oxw
===================================================================
--- code/trunk/data/levels/scriptController.oxw	(revision 10216)
+++ code/trunk/data/levels/scriptController.oxw	(revision 10216)
@@ -0,0 +1,198 @@
+<!-- First levelFile of mkronig and samuezu. It was copied from dockingToASpaceStation.oxw and modified a little bit -->
+<LevelInfo
+ name = "Fancy orxout tests"
+ description = "Docking into a spacestation."
+ tags = "showcase"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+  include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipEscort.oxt")
+  include("templates/bigship.oxt")
+  include("templates/spaceshipTurret.oxt")
+  include("templates/spaceshipCollateralDamage.oxt")
+  include("templates/FPS.oxt")
+?>
+
+<Level
+  gametype = Deathmatch
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+
+  <Scene
+    ambientlight = "0.5, 0.5, 0.5"
+    skybox       = "Orxonox/Starbox"
+    negativeWorldRange = "-100000, -100000, -100000"
+    positiveWorldRange = " 100000,  100000,  100000"
+    gravity      = "0,0,0"
+    hasPhysics   = true
+  >
+
+    <?lua
+      include("includes/pickups.oxi")
+    ?>
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0,1.0,1.0,0.5" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint team=0 position="3200,0,0" lookat="2800,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+
+    <StaticEntity position  = "2800,0,0" mass=10000 collisionType=static >
+      <attached>
+        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
+        <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
+        <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
+        <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
+        <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
+        <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
+        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
+        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
+        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
+        <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
+        <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
+        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
+        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
+        <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
+        <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
+        <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
+      </collisionShapes>
+    </StaticEntity>
+
+<!-- Docking  -->
+    <Dock position="2830,20,50" roll=0 yaw=0 >
+        <animations>
+            <MoveToDockingTarget target="destroyer" />
+        </animations>
+        <effects>
+            <DockToShip target="spaceShip" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="dockMe" />
+            </execute>
+
+	    <undocking>
+		<EventListener event="undockMe" />
+	    </undocking>
+	
+            <activity>
+                <EventListener event=notGameEnd />
+            </activity>
+        </events>
+        <attached>
+	<!-- Trigger for docking with billboard -->
+
+		<!-- removed -->
+
+	<!-- Trigger for undocking with billboard -->
+	    <!-- <Billboard position="-2630,-19970,150" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 /> -->
+	    <DistanceTrigger position="-2630,-19970,150" distance="50" target="Pawn"
+                beaconMode="identify" targetname="bcnDestroyer" name="undockMe"
+            />
+        </attached>
+    </Dock>
+
+    <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=100 />
+    <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
+      beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
+    />
+
+
+<!-- Object, which orxouts the message "hello Universe!". EVENT NOT WORKING  -->
+    <ScriptController position="0,0,0">
+        <events>
+            <party>
+                <EventListener event="dockMe" />
+            </party>
+
+        </events>
+
+    </ScriptController>
+
+
+<!-- FPS Player as destination of the dock -->
+<FpsPlayer template = "fps" radarname = "First Person Player" position = "0,-19900,0" >
+      <attached>
+        <DockingTarget name="spaceShip" />
+        <DistanceTriggerBeacon name="bcnDestroyer" />
+        <DockingTarget name="destroyer" />
+      </attached>
+</FpsPlayer>
+
+
+<!-- Cube as test SpaceStation
+
+The station can either be hidden outside of the skybox, within the hull of the space station if it is big enough or within a planet.
+Complex spacestations can be placed very far away from the spaceship so it is rendered at low resolution while the player uses the space ship.
+
+-->
+  <StaticEntity position="0,-20000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
+      <attached>
+        <Model position="0,0,0" mesh="crate.mesh" scale3D="80,80,5" />
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="400,400,25" />
+      </collisionShapes>
+  </StaticEntity>
+
+<!-- Homogenous gravitationfield to simulate local gravity (activating the normal gravity will affect the spaceship terribly) -->
+<ForceField position="0,-20000,0" mode="homogen" diameter="2000" forcedirection = "0,-500,0" />
+
+
+<!-- Some more stuff -->
+
+    <!-- triple large belt around the planet  -->
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
+    ?>
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
+    ?>
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
+    ?>
+
+    <Planet
+      position="15000,0,-1000"
+      scale="5000"
+      collisionType="dynamic"
+      linearDamping="0.8"
+      angularDamping="0"
+      mass="10000000"
+      pitch="0"
+      mesh="planets/ganymede.mesh"
+      atmosphere="atmosphere1"
+      rotationaxis="1,0,0"
+      rotationrate="1.0"
+      atmospheresize="80.0f"
+      imagesize="1024.0f"
+      collisiondamage = 2
+      enablecollisiondamage = true
+    >
+      <attached>
+        <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="5000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
+  </Scene>
+
+</Level>
+
Index: code/trunk/data/levels/templates/HeavyCruiser.oxt
===================================================================
--- code/trunk/data/levels/templates/HeavyCruiser.oxt	(revision 10215)
+++ code/trunk/data/levels/templates/HeavyCruiser.oxt	(revision 10216)
@@ -2,5 +2,7 @@
 
 <Template name=HeavyCruiser>
-  <SpaceShip
+  <ModularSpaceShip
+   name = HeavyCruiser
+   
    hudtemplate            = spaceshiphud
    camerapositiontemplate = heavycruisercameras
@@ -9,7 +11,7 @@
    explosionchunks        = 6
 
-   health            = 100
-   maxhealth         = 200
-   initialhealth     = 100
+   health            = 2000
+   maxhealth         = 4000
+   initialhealth     = 2000
 
    shieldhealth        = 100
@@ -41,29 +43,190 @@
   >
     <engines>
-      <MultiStateEngine position="85,0,0" template=HeavyCruiser_body_engine1 />
-      <MultiStateEngine position="-85,0,0" template=HeavyCruiser_body_engine1 />
+      <MultiStateEngine position="0,0,0" template=HeavyCruiser_body_engine1 />
 
       <MultiStateEngine position="-140,0,308" template=HeavyCruiser_sidearmL_engine1 />
       <MultiStateEngine position="140,0,308" template=HeavyCruiser_sidearmR_engine1 />
     </engines>
+    
+    <parts>
+        <ShipPart name="frontL" initialhealth="10" maxhealth="10" damageabsorption="0.5" explosionposition="-76,30,-330">
+            <destructionevents>
+                <PartDestructionEvent targetType="ship" targetParam="shieldhealth" operation="*" value="0.5"/>
+            </destructionevents>
+        </ShipPart>
+        <ShipPart name="frontR" initialhealth="10" maxhealth="10" damageabsorption="0.5" explosionposition="76,30,-330">
+            <destructionevents>
+                <PartDestructionEvent targetType="ship" targetParam="shieldhealth" operation="*" value="0.5"/>
+            </destructionevents>
+        </ShipPart>
+        <ShipPart name="partL" initialhealth="10" maxhealth="10" damageabsorption="0.5" explosionposition="-100,33,-200">
+            <destructionevents>
+                <PartDestructionEvent targetType="ship" targetParam="boostpowerrate" operation="-" value="0.5" message="One of your ship's generators was destroyed!"/>
+                <PartDestructionEvent targetType="engine" targetName="bodyengine" targetParam="speedfront" operation="-" value="50"/>
+                <PartDestructionEvent targetType="engine" targetName="bodyengine" targetParam="accelerationfront" operation="-" value="3"/>
+                <PartDestructionEvent targetType="engine" targetName="bodyengine" targetParam="boostfactor" operation="set" value="1"/>
+            </destructionevents>
+        </ShipPart>
+        <ShipPart name="partR" initialhealth="10" maxhealth="10" damageabsorption="0.5" explosionposition="100,33,-200">
+            <destructionevents>
+                <PartDestructionEvent targetType="ship" targetParam="boostpowerrate" operation="-" value="0.5" message="One of your ship's generators was destroyed!"/>
+                <PartDestructionEvent targetType="engine" targetName="bodyengine" targetParam="speedfront" operation="-" value="50"/>
+                <PartDestructionEvent targetType="engine" targetName="bodyengine" targetParam="accelerationfront" operation="-" value="3"/>
+                <PartDestructionEvent targetType="engine" targetName="bodyengine" targetParam="boostfactor" operation="set" value="1"/>
+            </destructionevents>
+        </ShipPart>
+        <ShipPart name="sidearmL" initialhealth="20" maxhealth="20" damageabsorption="0.2" explosionposition="-140,30,100">
+            <destructionevents>
+                <PartDestructionEvent targetType="engine" targetName="sidearmLengine" operation="destroy" message="The left auxiliary engine was destroyed!"/>
+                <PartDestructionEvent targetType="part" targetName="sidearmLfront" operation="destroy"/>
+                <PartDestructionEvent targetType="ship" targetParam="rotationthrust" operation="-" value="0.04" />
+            </destructionevents>
+        </ShipPart>
+        <ShipPart name="sidearmLfront" initialhealth="10" maxhealth="10" damageabsorption="0.5" explosionposition="-140,20,-50">
+            <destructionevents>
+                <PartDestructionEvent targetType="engine" targetName="sidearmLengine" targetParam="boostfactor" operation="set" value="1" message="The left auxiliary engine lost it's booster!"/>
+            </destructionevents>
+        </ShipPart>
+        <ShipPart name="sidearmR" initialhealth="20" maxhealth="20" damageabsorption="0.2" explosionposition="140,30,100">
+            <destructionevents>
+                <PartDestructionEvent targetType="engine" targetName="sidearmRengine" operation="destroy" message="The right auxiliary engine was destroyed!"/>
+                <PartDestructionEvent targetType="part" targetName="sidearmRfront" operation="destroy"/> 
+                <PartDestructionEvent targetType="ship" targetParam="rotationthrust" operation="-" value="0.04" />           
+            </destructionevents>
+        </ShipPart>
+        <ShipPart name="sidearmRfront" initialhealth="10" maxhealth="10" damageabsorption="0.5" explosionposition="140,20,-50">
+            <destructionevents>
+                <PartDestructionEvent targetType="engine" targetName="sidearmRengine" targetParam="boostfactor" operation="set" value="1" message="The right auxiliary engine lost it's booster!"/>
+            </destructionevents>
+        </ShipPart>
+    </parts>
+    
     <attached>
-
         <Model mesh="HeavyCruiser_body.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
-        <Model mesh="HeavyCruiser_frontL.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
-        <Model mesh="HeavyCruiser_frontR.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
-        <Model mesh="HeavyCruiser_partL.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
-        <Model mesh="HeavyCruiser_partR.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
-        <Model mesh="HeavyCruiser_sidearmL.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
-        <Model mesh="HeavyCruiser_sidearmLfront.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
-        <Model mesh="HeavyCruiser_sidearmR.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
-        <Model mesh="HeavyCruiser_sidearmRfront.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>       
-
-            <!-- bay1 lights -->
-        <BlinkingBillboard position="75,30,-416" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.05 frequency=0.3 phase=240 quadratic=1 />
-        <BlinkingBillboard position="-75,30,-416" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.05 frequency=0.3 phase=240 quadratic=1 />
-        <BlinkingBillboard position="74,30,-402" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.1 frequency=0.3 phase=120 quadratic=1 />
-        <BlinkingBillboard position="-74,30,-402" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.1 frequency=0.3 phase=120 quadratic=1 />
-        <BlinkingBillboard position="73,30,-388" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.15 frequency=0.3 phase=0 quadratic=1 />
-        <BlinkingBillboard position="-73,30,-388" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.15 frequency=0.3 phase=0 quadratic=1 />
+        
+        <StaticEntity name="frontL" position="0,0,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached> 
+                <Model mesh="HeavyCruiser_frontL.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
+                <BlinkingBillboard position="-75,30,-416" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.05 frequency=0.3 phase=240 quadratic=1 />
+                <BlinkingBillboard position="-74,30,-402" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.1 frequency=0.3 phase=120 quadratic=1 />
+                <BlinkingBillboard position="-73,30,-388" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.15 frequency=0.3 phase=0 quadratic=1 />
+            </attached> 
+            <collisionShapes> 
+                <BoxCollisionShape position="-80,33,-320" halfExtents="7,11,54" info="frontL"/>
+                <BoxCollisionShape position="-79,31,-399" halfExtents="3,6,26" info="frontL"/>
+            </collisionShapes> 
+        </StaticEntity>
+        
+        <StaticEntity name="frontR" position="0,0,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached> 
+                <Model mesh="HeavyCruiser_frontR.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
+                <BlinkingBillboard position="75,30,-416" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.05 frequency=0.3 phase=240 quadratic=1 />
+                <BlinkingBillboard position="74,30,-402" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.1 frequency=0.3 phase=120 quadratic=1 />
+                <BlinkingBillboard position="73,30,-388" material="Examples/Flare" colour="0.8, 0.8, 0, 0.1" amplitude=0.15 frequency=0.3 phase=0 quadratic=1 />
+            </attached> 
+            <collisionShapes> 
+                <BoxCollisionShape position="80,33,-320" halfExtents="7,11,54" info="frontR"/>
+                <BoxCollisionShape position="79,31,-399" halfExtents="3,6,26" info="frontR"/>
+            </collisionShapes> 
+        </StaticEntity>
+        
+        <StaticEntity name="partL" position="0,0,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached> 
+                <Model mesh="HeavyCruiser_partL.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
+            </attached> 
+            <collisionShapes> 
+                <BoxCollisionShape position="-94,33,-179" halfExtents="11,13,45" info="partL"/>
+                <BoxCollisionShape position="-96,33,-230" halfExtents="13,17,22" info="partL"/>
+            </collisionShapes> 
+        </StaticEntity>
+        
+        <StaticEntity name="partR" position="0,0,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached> 
+                <Model mesh="HeavyCruiser_partR.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
+            </attached> 
+            <collisionShapes> 
+                <BoxCollisionShape position="94,33,-179" halfExtents="11,13,45" info="partR"/>
+                <BoxCollisionShape position="96,33,-230" halfExtents="13,17,22" info="partR"/>
+            </collisionShapes> 
+        </StaticEntity>
+        
+                <StaticEntity name="sidearmL" position="0,0,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached> 
+                <Model mesh="HeavyCruiser_sidearmL.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
+            </attached> 
+            <collisionShapes> 
+                <BoxCollisionShape position="-109,47,87" halfExtents="29,8,26" info="sidearmL, upper connection"/>
+                <BoxCollisionShape position="-99,-1,79" roll="15" halfExtents="40,4,9" info="sidearmL, lower connection"/>
+                <BoxCollisionShape position="-145,21,115" roll="15" halfExtents="19,31,105" info="sidearmL, front"/>
+                <BoxCollisionShape position="-140,12,261" roll="15" halfExtents="22,41,43" info="sidearmL, back"/>
+                <BoxCollisionShape position="-145,25,5" roll="15" halfExtents="10,18,5" info="sidearmL, front break"/>
+                <BoxCollisionShape position="-133,-13,29" roll="15" halfExtents="12,6,17" info="sidearmL, bottom cylinder"/>
+                <BoxCollisionShape position="-165,-4,31" roll="15" halfExtents="7,21,13" info="sidearmL, box"/>
+                <BoxCollisionShape position="-153,59,96" roll="15" halfExtents="6,7,60" info="sidearmL, upper beam"/>
+                <BoxCollisionShape position="-143,57,119" roll="15" halfExtents="3,4,85" info="sidearmL, upper inner beam"/>
+                <BoxCollisionShape position="-142,53,212" pitch="21" yaw="5" roll="15" halfExtents="3,4,10" info="sidearmL, upper inner beam"/>
+                <BoxCollisionShape position="-160,52,119" roll="15" halfExtents="3,4,85" info="sidearmL, upper outer beam"/>
+                <BoxCollisionShape position="-159,48,212" pitch="21" yaw="5" roll="15" halfExtents="3,4,10" info="sidearmL, upper outer beam"/>
+                <BoxCollisionShape position="-152,54,34" pitch="-46" yaw="-14" roll="15" halfExtents="6,7,10" info="sidearmL, upper beam front"/>
+                <BoxCollisionShape position="-152,54,162" pitch="30" yaw="9" roll="15" halfExtents="6,7,12" info="sidearmL, upper beam back"/>
+                <BoxCollisionShape position="-168,21,119" roll="15" halfExtents="3,5,109" info="sidearmL, outer beam"/>
+                <BoxCollisionShape position="-134,-10,169" roll="15" halfExtents="6,4,55" info="sidearmL, lower beam front"/>
+                <BoxCollisionShape position="-131,-20,217" pitch="-20" roll="15" yaw="-5" halfExtents="6,12,3" info="sidearmL, lower beam middle"/>
+                <BoxCollisionShape position="-130,-29,233" roll="15" halfExtents="6,3,15" info="sidearmL, lower beam back"/>
+            </collisionShapes> 
+        </StaticEntity>
+        
+        <StaticEntity name="sidearmLfront" position="0,0,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached> 
+                <Model mesh="HeavyCruiser_sidearmLfront.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
+            </attached> 
+            <collisionShapes> 
+                <BoxCollisionShape position="-141,15,-53" roll="15" halfExtents="27,44,62" info="sidearmLfront"/>
+                <BoxCollisionShape position="-153,59,-30" roll="15" halfExtents="4,2,38" info="sidearmLfront, top"/>
+                <BoxCollisionShape position="-153,61,-41" roll="15" halfExtents="4,4,11" info="sidearmLfront, top"/>
+                <BoxCollisionShape position="-153,60,-65" roll="15" halfExtents="4,3,4" info="sidearmLfront, top"/>
+                <BoxCollisionShape position="-153,59,-41" roll="15" halfExtents="8,2,11" info="sidearmLfront, top"/>
+            </collisionShapes> 
+        </StaticEntity>
+        
+        <StaticEntity name="sidearmR" position="0,0,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached> 
+                <Model mesh="HeavyCruiser_sidearmR.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
+            </attached> 
+            <collisionShapes> 
+                <BoxCollisionShape position="109,47,87" halfExtents="29,8,26" info="sidearmR, upper connection"/>
+                <BoxCollisionShape position="99,-1,79" roll="-15" halfExtents="40,4,9" info="sidearmR, lower connection"/>
+                <BoxCollisionShape position="145,21,115" roll="-15" halfExtents="19,31,105" info="sidearmR, front"/>
+                <BoxCollisionShape position="140,12,261" roll="-15" halfExtents="22,41,43" info="sidearmR, back"/>
+                <BoxCollisionShape position="145,25,5" roll="-15" halfExtents="10,18,5" info="sidearmR, front break"/>
+                <BoxCollisionShape position="133,-13,29" roll="-15" halfExtents="12,6,17" info="sidearmR, bottom cylinder"/>
+                <BoxCollisionShape position="165,-4,31" roll="-15" halfExtents="7,21,13" info="sidearmR, box"/>
+                <BoxCollisionShape position="153,59,96" roll="-15" halfExtents="6,7,60" info="sidearmR, upper beam"/>
+                <BoxCollisionShape position="143,57,119" roll="-15" halfExtents="3,4,85" info="sidearmR, upper inner beam"/>
+                <BoxCollisionShape position="142,53,212" pitch="21" yaw="-5" roll="-15" halfExtents="3,4,10" info="sidearmR, upper inner beam"/>
+                <BoxCollisionShape position="160,52,119" roll="-15" halfExtents="3,4,85" info="sidearmR, upper outer beam"/>
+                <BoxCollisionShape position="159,48,212" pitch="21" yaw="-5" roll="-15" halfExtents="3,4,10" info="sidearmR, upper outer beam"/>
+                <BoxCollisionShape position="152,54,34" pitch="-46" yaw="14" roll="-15" halfExtents="6,7,10" info="sidearmR, upper beam front"/>
+                <BoxCollisionShape position="152,54,162" pitch="30" yaw="-9" roll="-15" halfExtents="6,7,12" info="sidearmR, upper beam back"/>
+                <BoxCollisionShape position="168,21,119" roll="-15" halfExtents="3,5,109" info="sidearmR, outer beam"/>
+                <BoxCollisionShape position="134,-10,169" roll="-15" halfExtents="6,4,55" info="sidearmR, lower beam front"/>
+                <BoxCollisionShape position="131,-20,217" pitch="-20" roll="-15" yaw="5" halfExtents="6,12,3" info="sidearmR, lower beam middle"/>
+                <BoxCollisionShape position="130,-29,233" roll="-15" halfExtents="6,3,15" info="sidearmR, lower beam back"/>
+            </collisionShapes> 
+        </StaticEntity>
+        
+        <StaticEntity name="sidearmRfront" position="0,0,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached> 
+                <Model mesh="HeavyCruiser_sidearmRfront.mesh" direction="-1,0,0" position="0,0,0" scale="40"/>
+            </attached> 
+            <collisionShapes> 
+                <BoxCollisionShape position="141,15,-53" roll="-15" halfExtents="27,44,62" info="sidearmRfront"/>
+                <BoxCollisionShape position="153,59,-30" roll="-15" halfExtents="4,2,38" info="sidearmRfront, top"/>
+                <BoxCollisionShape position="153,61,-41" roll="-15" halfExtents="4,4,11" info="sidearmRfront, top"/>
+                <BoxCollisionShape position="153,60,-65" roll="-15" halfExtents="4,3,4" info="sidearmRfront, top"/>
+                <BoxCollisionShape position="153,59,-41" roll="-15" halfExtents="8,2,11" info="sidearmRfront, top"/>
+            </collisionShapes> 
+        </StaticEntity>   
+
             <!-- front position lights -->
         <BlinkingBillboard position="67,-5,-240" material="Examples/Flare" colour="0, 0.7, 0, 0.1" amplitude=0.3 frequency=0.15 phase=0 quadratic=1 />
@@ -79,74 +242,4 @@
     </attached>
     <collisionShapes>
-        <BoxCollisionShape position="80,33,-320" halfExtents="7,11,54" info="frontR"/>
-        <BoxCollisionShape position="79,31,-399" halfExtents="3,6,26" info="frontR"/>
-
-
-        <BoxCollisionShape position="-80,33,-320" halfExtents="7,11,54" info="frontL"/>
-        <BoxCollisionShape position="-79,31,-399" halfExtents="3,6,26" info="frontL"/>
-
-
-        <BoxCollisionShape position="94,33,-179" halfExtents="11,13,45" info="partR"/>
-        <BoxCollisionShape position="96,33,-230" halfExtents="13,17,22" info="partR"/>
-
-
-        <BoxCollisionShape position="-94,33,-179" halfExtents="11,13,45" info="partL"/>
-        <BoxCollisionShape position="-96,33,-230" halfExtents="13,17,22" info="partL"/>
-
-
-        <BoxCollisionShape position="109,47,87" halfExtents="29,8,26" info="sidearmR, upper connection"/>
-        <BoxCollisionShape position="99,-1,79" roll="-15" halfExtents="40,4,9" info="sidearmR, lower connection"/>
-        <BoxCollisionShape position="145,21,115" roll="-15" halfExtents="19,31,105" info="sidearmR, front"/>
-        <BoxCollisionShape position="140,12,261" roll="-15" halfExtents="22,41,43" info="sidearmR, back"/>
-        <BoxCollisionShape position="145,25,5" roll="-15" halfExtents="10,18,5" info="sidearmR, front break"/>
-        <BoxCollisionShape position="133,-13,29" roll="-15" halfExtents="12,6,17" info="sidearmR, bottom cylinder"/>
-        <BoxCollisionShape position="165,-4,31" roll="-15" halfExtents="7,21,13" info="sidearmR, box"/>
-        <BoxCollisionShape position="153,59,96" roll="-15" halfExtents="6,7,60" info="sidearmR, upper beam"/>
-        <BoxCollisionShape position="143,57,119" roll="-15" halfExtents="3,4,85" info="sidearmR, upper inner beam"/>
-        <BoxCollisionShape position="142,53,212" pitch="21" yaw="-5" roll="-15" halfExtents="3,4,10" info="sidearmR, upper inner beam"/>
-        <BoxCollisionShape position="160,52,119" roll="-15" halfExtents="3,4,85" info="sidearmR, upper outer beam"/>
-        <BoxCollisionShape position="159,48,212" pitch="21" yaw="-5" roll="-15" halfExtents="3,4,10" info="sidearmR, upper outer beam"/>
-        <BoxCollisionShape position="152,54,34" pitch="-46" yaw="14" roll="-15" halfExtents="6,7,10" info="sidearmR, upper beam front"/>
-        <BoxCollisionShape position="152,54,162" pitch="30" yaw="-9" roll="-15" halfExtents="6,7,12" info="sidearmR, upper beam back"/>
-        <BoxCollisionShape position="168,21,119" roll="-15" halfExtents="3,5,109" info="sidearmR, outer beam"/>
-        <BoxCollisionShape position="134,-10,169" roll="-15" halfExtents="6,4,55" info="sidearmR, lower beam front"/>
-        <BoxCollisionShape position="131,-20,217" pitch="-20" roll="-15" yaw="5" halfExtents="6,12,3" info="sidearmR, lower beam middle"/>
-        <BoxCollisionShape position="130,-29,233" roll="-15" halfExtents="6,3,15" info="sidearmR, lower beam back"/>
-
-
-        <BoxCollisionShape position="141,15,-53" roll="-15" halfExtents="27,44,62" info="sidearmRfront"/>
-        <BoxCollisionShape position="153,59,-30" roll="-15" halfExtents="4,2,38" info="sidearmRfront, top"/>
-        <BoxCollisionShape position="153,61,-41" roll="-15" halfExtents="4,4,11" info="sidearmRfront, top"/>
-        <BoxCollisionShape position="153,60,-65" roll="-15" halfExtents="4,3,4" info="sidearmRfront, top"/>
-        <BoxCollisionShape position="153,59,-41" roll="-15" halfExtents="8,2,11" info="sidearmRfront, top"/>
-
-
-        <BoxCollisionShape position="-109,47,87" halfExtents="29,8,26" info="sidearmL, upper connection"/>
-        <BoxCollisionShape position="-99,-1,79" roll="15" halfExtents="40,4,9" info="sidearmL, lower connection"/>
-        <BoxCollisionShape position="-145,21,115" roll="15" halfExtents="19,31,105" info="sidearmL, front"/>
-        <BoxCollisionShape position="-140,12,261" roll="15" halfExtents="22,41,43" info="sidearmL, back"/>
-        <BoxCollisionShape position="-145,25,5" roll="15" halfExtents="10,18,5" info="sidearmL, front break"/>
-        <BoxCollisionShape position="-133,-13,29" roll="15" halfExtents="12,6,17" info="sidearmL, bottom cylinder"/>
-        <BoxCollisionShape position="-165,-4,31" roll="15" halfExtents="7,21,13" info="sidearmL, box"/>
-        <BoxCollisionShape position="-153,59,96" roll="15" halfExtents="6,7,60" info="sidearmL, upper beam"/>
-        <BoxCollisionShape position="-143,57,119" roll="15" halfExtents="3,4,85" info="sidearmL, upper inner beam"/>
-        <BoxCollisionShape position="-142,53,212" pitch="21" yaw="5" roll="15" halfExtents="3,4,10" info="sidearmL, upper inner beam"/>
-        <BoxCollisionShape position="-160,52,119" roll="15" halfExtents="3,4,85" info="sidearmL, upper outer beam"/>
-        <BoxCollisionShape position="-159,48,212" pitch="21" yaw="5" roll="15" halfExtents="3,4,10" info="sidearmL, upper outer beam"/>
-        <BoxCollisionShape position="-152,54,34" pitch="-46" yaw="-14" roll="15" halfExtents="6,7,10" info="sidearmL, upper beam front"/>
-        <BoxCollisionShape position="-152,54,162" pitch="30" yaw="9" roll="15" halfExtents="6,7,12" info="sidearmL, upper beam back"/>
-        <BoxCollisionShape position="-168,21,119" roll="15" halfExtents="3,5,109" info="sidearmL, outer beam"/>
-        <BoxCollisionShape position="-134,-10,169" roll="15" halfExtents="6,4,55" info="sidearmL, lower beam front"/>
-        <BoxCollisionShape position="-131,-20,217" pitch="-20" roll="15" yaw="-5" halfExtents="6,12,3" info="sidearmL, lower beam middle"/>
-        <BoxCollisionShape position="-130,-29,233" roll="15" halfExtents="6,3,15" info="sidearmL, lower beam back"/>
-
-
-        <BoxCollisionShape position="-141,15,-53" roll="15" halfExtents="27,44,62" info="sidearmLfront"/>
-        <BoxCollisionShape position="-153,59,-30" roll="15" halfExtents="4,2,38" info="sidearmLfront, top"/>
-        <BoxCollisionShape position="-153,61,-41" roll="15" halfExtents="4,4,11" info="sidearmLfront, top"/>
-        <BoxCollisionShape position="-153,60,-65" roll="15" halfExtents="4,3,4" info="sidearmLfront, top"/>
-        <BoxCollisionShape position="-153,59,-41" roll="15" halfExtents="8,2,11" info="sidearmLfront, top"/>
-
-
         <BoxCollisionShape position="60,35,-310" halfExtents="13,28,60" info="body, bay1, Rwall"/> 
         <BoxCollisionShape position="-60,35,-310" halfExtents="13,28,60" info="body, bay1, Lwall"/> 
@@ -293,5 +386,5 @@
   include("../includes/weaponSettingsHeavyCruiser.oxi")
 ?>
-  </SpaceShip>
+  </ModularSpaceShip>
 
 </Template>
@@ -318,4 +411,5 @@
 <Template name=HeavyCruiser_body_engine1 baseclass=MultiStateEngine>
   <MultiStateEngine
+   name		  = bodyengine
    boostfactor    = 2
 
@@ -412,4 +506,5 @@
 <Template name=HeavyCruiser_sidearmL_engine1 baseclass=MultiStateEngine>
   <MultiStateEngine
+   name		  = sidearmLengine
    boostfactor    = 2
 
@@ -461,4 +556,5 @@
 <Template name=HeavyCruiser_sidearmR_engine1 baseclass=MultiStateEngine>
   <MultiStateEngine
+   name		  = sidearmRengine
    boostfactor    = 2
 
Index: code/trunk/data/levels/templates/ModularSpaceShipTest.oxt
===================================================================
--- code/trunk/data/levels/templates/ModularSpaceShipTest.oxt	(revision 10216)
+++ code/trunk/data/levels/templates/ModularSpaceShipTest.oxt	(revision 10216)
@@ -0,0 +1,166 @@
+<Template name=ModularSpaceShipTest>
+  <ModularSpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipassffcameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 6
+
+   health            = 1000
+   maxhealth         = 2000
+   initialhealth     = 1000
+
+   shieldhealth        = 30
+   initialshieldhealth = 30
+   maxshieldhealth     = 50
+   shieldabsorption    = 0.8
+   reloadrate          = 1
+   reloadwaittime      = 1
+
+   primaryThrust     = 100
+   auxilaryThrust    = 30
+   rotationThrust    = 50
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 15
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 9
+
+   collisionType     = "dynamic"
+   mass              = 100
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+
+   explosionSound = "sounds/Explosion2.ogg"
+  >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipassffengine />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipassffengine />
+    </engines>
+    <attached>
+    
+        <Model position="0,0,0" mesh="crate.mesh" scale3D="6,6,6" />
+        
+        <StaticEntity name="one" position="0,60,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached>
+                <Model position="0,0,0" mesh="cube.mesh" scale3D="30,30,30" />
+            </attached>
+            <collisionShapes>
+                <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
+            </collisionShapes>
+        </StaticEntity>
+        
+        <StaticEntity name="two" position="0,0,62" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached>
+                <Model position="0,0,0" mesh="cube.mesh" scale3D="30,30,30" />
+            </attached>
+            <collisionShapes>
+                <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
+            </collisionShapes>
+        </StaticEntity>
+        
+        <StaticEntity name="two_2" position="0,0,124" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached>
+                <Model position="0,0,0" mesh="cube.mesh" scale3D="30,30,30" />
+            </attached>
+            <collisionShapes>
+                <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
+            </collisionShapes>
+        </StaticEntity>
+        
+        <StaticEntity name="three" position="0,-60,0" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached>
+                <Model position="0,0,0" mesh="cube.mesh" scale3D="30,30,30" />
+            </attached>
+            <collisionShapes>
+                <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
+            </collisionShapes>
+        </StaticEntity>
+        
+        <StaticEntity name="four" position="0,0,-59" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached>
+                <Model position="0,0,0" mesh="cube.mesh" scale3D="30,30,30" />
+            </attached>
+            <collisionShapes>
+                <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
+            </collisionShapes>
+        </StaticEntity>
+        
+        <StaticEntity name="four_2" position="0,0,-118" direction="0,0,0" collisionType=static mass=100 friction=0.01 >
+            <attached>
+                <Model position="0,0,0" mesh="cube.mesh" scale3D="30,30,30" />
+            </attached>
+            <collisionShapes>
+                <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
+            </collisionShapes>
+        </StaticEntity>
+
+    </attached>
+    
+    <parts>
+        <ShipPart name="one" initialhealth="20" damageabsorption="1" />
+        <ShipPart name="two" initialhealth="20" damageabsorption="1" />
+        <ShipPart name="two_2" initialhealth="20" damageabsorption="1" />
+        <ShipPart name="three" initialhealth="20" damageabsorption="1" />
+        <ShipPart name="four" initialhealth="20" damageabsorption="1" />
+        <ShipPart name="four_2" initialhealth="20" damageabsorption="1" />
+    </parts>
+    
+    <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
+    </collisionShapes>
+<?lua
+  include("../includes/weaponSettingsAssff.oxi")
+?>
+  </ModularSpaceShip>
+</Template>
+
+<Template name=spaceshipassffcameras defaults=0>
+  <ModularSpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,10, 40" drag=true mouselook=true />
+    </camerapositions>
+  </ModularSpaceShip>
+</Template>
+
+<Template name=spaceshipassffengine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2
+
+   speedfront     = 150
+   speedback      =  50
+   speedleftright =  50
+   speedupdown    =  50
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+   
+   accelerationfront     = 500
+   accelerationbrake     = 500
+   accelerationback      =  125
+   accelerationleftright =  125
+   accelerationupdown    =  125
+  >
+    <EffectContainer condition="idle">
+
+    </EffectContainer>
+    <EffectContainer condition="not idle">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or brake">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+
+    </EffectContainer>
+    <EffectContainer condition="boost">
+
+    </EffectContainer>
+  </MultiStateEngine>
+</Template>
Index: code/trunk/data/levels/templates/standardTurret.oxt
===================================================================
--- code/trunk/data/levels/templates/standardTurret.oxt	(revision 10216)
+++ code/trunk/data/levels/templates/standardTurret.oxt	(revision 10216)
@@ -0,0 +1,40 @@
+<Template name=standardturret>
+  <Turret>
+    <attached>
+      <Model position="0,0,0" mesh="turretSocketFront.mesh" scale3D="10,10,10" pitch=-90/>
+      <Model position="0,0,0" mesh="turretSocketIn.mesh" scale3D="10,10,10" pitch=-90/>
+      <Model position="0,0,0" mesh="turretSocketTop.mesh" scale3D="10,10,10" pitch=-90/>
+      <Model position="0,0,0" mesh="turretSocketLeft.mesh" scale3D="10,10,10" pitch=-90/>
+      <Model position="0,0,0" mesh="turretSocketRight.mesh" scale3D="10,10,10" pitch=-90/>
+
+      <Turret position="0,0,-10" mass=100 maxPitch=90 maxYaw=90 maxAttackRadius=2000 minAttackRadius=30>
+        <attached>
+          <Model position="0,0,0" pitch="-90" roll="0" mesh="turretHead.mesh" scale3D="10,10,10"/>
+        </attached>
+        <collisionShapes>
+          <SphereCollisionShape radius="10"   position = "0,0,0"/>
+        </collisionShapes>
+        <controller>
+          <TurretController/>
+        </controller>
+        <?lua
+          include("../includes/weaponSettingsTurret.oxi")
+        ?>
+      </Turret>
+    </attached>
+    
+    <controller>
+      <TeamTargetProxy/>
+    </controller>
+  </Turret>
+</Template>
+
+<Template name=spaceshipturretcameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,10, 40" drag=true mouselook=true />
+      <CameraPosition position="0,20, 80" drag=true mouselook=true />
+      <CameraPosition position="0,30,120" drag=true mouselook=true />
+    </camerapositions>
+  </SpaceShip>
+</Template>
Index: code/trunk/data/levels/turretTest.oxw
===================================================================
--- code/trunk/data/levels/turretTest.oxw	(revision 10215)
+++ code/trunk/data/levels/turretTest.oxw	(revision 10216)
@@ -3,5 +3,5 @@
 <LevelInfo
  name = "turret Test"
- description = "A level with a turret in it."
+ description = "A level to test turrets with."
  tags = "test"
  screenshot = "emptylevel.png"
@@ -16,6 +16,5 @@
 <?lua
   include("templates/spaceshipAssff.oxt")
-  include("templates/spaceshipPirate.oxt")
-  include("templates/spaceshipTurret.oxt")
+  include("templates/standardTurret.oxt")
 ?>
 
@@ -33,29 +32,24 @@
     <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
 
+<SpaceShip position = "0,0,800" collisionType="dynamic" team=10>
+  <controller>
+    <TeamTargetProxy team=10/>
+  </controller>
+  <attached>
+    <Model position="0,0,0" mesh="plane.mesh" scale3D="20,20,20" pitch=-90/>
 
-<StaticEntity position="0,0,0" yaw=0 pitch=0>
-    <attached>
-        <Model position="0,0,0" mesh="turretSocketFront.mesh" scale3D="10,10,10" />
-        <Model position="0,0,0" mesh="turretSocketIn.mesh" scale3D="10,10,10" />
-        <Model position="0,0,0" mesh="turretSocketTop.mesh" scale3D="10,10,10" />
-        <Model position="0,0,0" mesh="turretSocketLeft.mesh" scale3D="10,10,10" />
-        <Model position="0,0,0" mesh="turretSocketRight.mesh" scale3D="10,10,10" />
-    </attached>
-</StaticEntity>
+    <?lua for i = 1, 10, 1 do ?>
+      <Turret position="<?lua print(150-i*30) ?>,<?lua print(150-i*30) ?>,0" pitch="0" yaw="0" roll="0">
+        <templates>
+          <Template link=standardturret />
+        </templates>
+      </Turret>
+    <?lua end ?>
 
-
-
-<Turret position="0,10,0" pitch="90" yaw="0" roll="0">
-    <templates>
-        <Template link=spaceshipturret />
-    </templates>
-    <controller>
-        <WaypointPatrolController alertnessradius=100 team=10>
-        </WaypointPatrolController>
-     </controller>
-</Turret>
-
-
-
+  </attached>
+  <collisionShapes>
+    <BoxCollisionShape radius="10"   position="0,0,0" halfExtents="200, 200, 0"/>
+  </collisionShapes>
+</SpaceShip>
     
   </Scene>
Index: code/trunk/data/overlays/jumpHUD.oxo
===================================================================
--- code/trunk/data/overlays/jumpHUD.oxo	(revision 10216)
+++ code/trunk/data/overlays/jumpHUD.oxo	(revision 10216)
@@ -0,0 +1,27 @@
+<Template name="JumpHUD">
+  <OverlayGroup name="JumpHUD" scale = "1, 1">
+    <JumpScore
+     position  = "0.5, 0.05"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.06
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "center"
+     showScore = true
+     showMessages = false
+    />
+
+    <JumpScore
+     position  = "0.5, 0.5"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.2
+     colour    = "1.0, 0.0, 0.0, 1.0"
+     align     = "center"
+     gameOverText = "GAME OVER"
+     showScore = false
+     showMessages = true
+    />    
+
+  </OverlayGroup>
+</Template>
Index: code/trunk/src/modules/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/CMakeLists.txt	(revision 10215)
+++ code/trunk/src/modules/CMakeLists.txt	(revision 10216)
@@ -40,2 +40,3 @@
 ADD_SUBDIRECTORY(towerdefense)
 ADD_SUBDIRECTORY(invader)
+ADD_SUBDIRECTORY(jump)
Index: code/trunk/src/modules/invader/InvaderWeapon.cc
===================================================================
--- code/trunk/src/modules/invader/InvaderWeapon.cc	(revision 10215)
+++ code/trunk/src/modules/invader/InvaderWeapon.cc	(revision 10216)
@@ -57,5 +57,8 @@
     }
 
-    InvaderWeapon::~InvaderWeapon(){}
+    InvaderWeapon::~InvaderWeapon()
+    {
+
+    }
 
     void InvaderWeapon::shot()
Index: code/trunk/src/modules/jump/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/jump/CMakeLists.txt	(revision 10216)
+++ code/trunk/src/modules/jump/CMakeLists.txt	(revision 10216)
@@ -0,0 +1,33 @@
+SET_SOURCE_FILES(JUMP_SRC_FILES
+BUILD_UNIT JumpBuildUnit.cc
+  Jump.cc
+  JumpPlatform.cc
+  JumpPlatformStatic.cc
+  JumpPlatformHMove.cc
+  JumpPlatformVMove.cc
+  JumpPlatformDisappear.cc
+  JumpPlatformTimer.cc
+  JumpPlatformFake.cc
+  JumpProjectile.cc
+  JumpEnemy.cc
+  JumpFigure.cc
+  JumpItem.cc
+  JumpSpring.cc
+  JumpRocket.cc
+  JumpShield.cc
+  JumpPropeller.cc
+  JumpBoots.cc
+  JumpCenterpoint.cc
+  JumpScore.cc
+END_BUILD_UNIT
+)
+
+ORXONOX_ADD_LIBRARY(jump
+  MODULE
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+    weapons
+  SOURCE_FILES ${JUMP_SRC_FILES}
+)
Index: code/trunk/src/modules/jump/Jump.cc
===================================================================
--- code/trunk/src/modules/jump/Jump.cc	(revision 10216)
+++ code/trunk/src/modules/jump/Jump.cc	(revision 10216)
@@ -0,0 +1,1277 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file Jump.cc
+    @brief This is the gametype for the awesome minigame. Here the level is randomly created, the camera is shifted, ...
+*/
+
+#include "Jump.h"
+#include "core/CoreIncludes.h"
+#include "core/EventIncludes.h"
+#include "core/command/Executor.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "gamestates/GSLevel.h"
+#include "chat/ChatManager.h"
+#include "JumpCenterpoint.h"
+#include "JumpPlatform.h"
+#include "JumpPlatformStatic.h"
+#include "JumpPlatformHMove.h"
+#include "JumpPlatformVMove.h"
+#include "JumpPlatformDisappear.h"
+#include "JumpPlatformTimer.h"
+#include "JumpPlatformFake.h"
+#include "JumpProjectile.h"
+#include "JumpEnemy.h"
+#include "JumpFigure.h"
+#include "JumpItem.h"
+#include "JumpSpring.h"
+#include "JumpRocket.h"
+#include "JumpPropeller.h"
+#include "JumpBoots.h"
+#include "JumpShield.h"
+#include "infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    RegisterUnloadableClass(Jump);
+
+    Jump::Jump(Context* context) : Deathmatch(context)
+    {
+        RegisterObject(Jump);
+
+        center_ = 0;
+        figure_ = 0;
+        camera = 0;
+        setHUDTemplate("JumpHUD");
+
+        setConfigValues();
+    }
+
+    Jump::~Jump()
+    {
+        if (isInitialized())
+        {
+            cleanup();
+        }
+    }
+
+    void Jump::tick(float dt)
+    {
+        SUPER(Jump, tick, dt);
+
+        if (figure_ != NULL)
+        {
+            Vector3 figurePosition = figure_->getPosition();
+            Vector3 figureVelocity = figure_->getVelocity();
+
+            float boundary = totalScreenShift_+center_->getCameraOffset();
+
+            if (figurePosition.z > boundary)
+            {
+                screenShiftSinceLastUpdate_ += figurePosition.z - boundary;
+                totalScreenShift_ = figurePosition.z - center_->getCameraOffset();
+
+                // Create new platforms if needed
+                if (screenShiftSinceLastUpdate_ > center_->getSectionLength())
+                {
+                    if (sectionNumber_ > 2 && sectionNumber_%4 == 0 && rand()%2 == 0 && figure_->propellerActive_ == false && figure_->rocketActive_ == false && addAdventure(adventureNumber_) == true)
+                    {
+                        screenShiftSinceLastUpdate_ -= 2*center_->getSectionLength();
+                        ++ adventureNumber_;
+                    }
+                    else
+                    {
+                        screenShiftSinceLastUpdate_ -= center_->getSectionLength();
+                        addSection();
+                    }
+                }
+            }
+
+            if (figurePosition.z < totalScreenShift_ - center_->getFieldDimension().y + platformHeight_ && figureVelocity.z < 0)
+            {
+                figure_->dead_ = true;
+            }
+
+            if (figure_->fireSignal_ == true)
+            {
+                if (figure_->dead_ == true)
+                {
+                    end();
+                }
+                else
+                {
+                    figure_->fireSignal_ = false;
+                    addProjectile(figurePosition.x, figurePosition.z + figure_->getPropellerPos());
+                }
+            }
+
+
+            if (camera != NULL)
+            {
+                Vector3 cameraPosition = Vector3(0, totalScreenShift_, 0);
+                camera->setPosition(cameraPosition);
+            }
+            else
+            {
+                orxout() << "No camera found." << endl;
+            }
+        }
+
+        ObjectList<JumpPlatform>::iterator beginPlatform = ObjectList<JumpPlatform>::begin();
+        ObjectList<JumpPlatform>::iterator endPlatform = ObjectList<JumpPlatform>::end();
+        ObjectList<JumpPlatform>::iterator itPlatform = beginPlatform;
+        Vector3 platformPosition;
+
+        while (itPlatform != endPlatform)
+        {
+            platformPosition = itPlatform->getPosition();
+            if (platformPosition.z < totalScreenShift_ - center_->getFieldDimension().y)
+            {
+                ObjectList<JumpPlatform>::iterator temp = itPlatform;
+                ++ itPlatform;
+                center_->detach(*temp);
+                temp->destroy();
+            }
+            else
+            {
+                ++ itPlatform;
+            }
+        }
+
+        // Deleted deactivated platforms
+        ObjectList<JumpPlatformDisappear>::iterator beginDisappear = ObjectList<JumpPlatformDisappear>::begin();
+        ObjectList<JumpPlatformDisappear>::iterator endDisappear = ObjectList<JumpPlatformDisappear>::end();
+        ObjectList<JumpPlatformDisappear>::iterator itDisappear = beginDisappear;
+
+        while (itDisappear != endDisappear)
+        {
+            if (!itDisappear->isActive())
+            {
+                ObjectList<JumpPlatformDisappear>::iterator temp = itDisappear;
+                ++ itDisappear;
+                center_->detach(*temp);
+                temp->destroy();
+            }
+            else
+            {
+                ++ itDisappear;
+            }
+        }
+
+        ObjectList<JumpPlatformTimer>::iterator beginTimer = ObjectList<JumpPlatformTimer>::begin();
+        ObjectList<JumpPlatformTimer>::iterator endTimer = ObjectList<JumpPlatformTimer>::end();
+        ObjectList<JumpPlatformTimer>::iterator itTimer = beginTimer;
+
+        while (itTimer != endTimer)
+        {
+            if (!itTimer->isActive())
+            {
+                ObjectList<JumpPlatformTimer>::iterator temp = itTimer;
+                ++ itTimer;
+                center_->detach(*temp);
+                temp->destroy();
+            }
+            else
+            {
+                ++ itTimer;
+            }
+        }
+
+        ObjectList<JumpProjectile>::iterator beginProjectile = ObjectList<JumpProjectile>::begin();
+        ObjectList<JumpProjectile>::iterator endProjectile = ObjectList<JumpProjectile>::end();
+        ObjectList<JumpProjectile>::iterator itProjectile = beginProjectile;
+        Vector3 projectilePosition;
+
+        while (itProjectile != endProjectile)
+        {
+            projectilePosition = itProjectile->getPosition();
+            if (projectilePosition.z > totalScreenShift_ + 5*center_->getFieldDimension().y)
+            {
+                ObjectList<JumpProjectile>::iterator temp = itProjectile;
+                ++ itProjectile;
+                center_->detach(*temp);
+                temp->destroy();
+            }
+            else
+            {
+                ++ itProjectile;
+            }
+        }
+
+        ObjectList<JumpEnemy>::iterator beginEnemy = ObjectList<JumpEnemy>::begin();
+        ObjectList<JumpEnemy>::iterator endEnemy = ObjectList<JumpEnemy>::end();
+        ObjectList<JumpEnemy>::iterator itEnemy = beginEnemy;
+        Vector3 enemyPosition;
+
+        while (itEnemy != endEnemy)
+        {
+            enemyPosition = itEnemy->getPosition();
+            if (enemyPosition.z < totalScreenShift_ - center_->getFieldDimension().y || itEnemy->dead_ == true)
+            {
+                ObjectList<JumpEnemy>::iterator temp = itEnemy;
+                ++ itEnemy;
+                center_->detach(*temp);
+                temp->destroy();
+            }
+            else
+            {
+                ++ itEnemy;
+            }
+        }
+
+        ObjectList<JumpItem>::iterator beginItem = ObjectList<JumpItem>::begin();
+        ObjectList<JumpItem>::iterator endItem = ObjectList<JumpItem>::end();
+        ObjectList<JumpItem>::iterator itItem = beginItem;
+        Vector3 itemPosition;
+
+        while (itItem != endItem)
+        {
+            itemPosition = itItem->getPosition();
+
+            WorldEntity* parent = itItem->getParent();
+
+            if (itItem->attachedToFigure_ == false && itemPosition.z < totalScreenShift_ - center_->getFieldDimension().y && parent == center_)
+            {
+                ObjectList<JumpItem>::iterator temp = itItem;
+                ++ itItem;
+                center_->detach(*temp);
+                temp->destroy();
+            }
+            else
+            {
+                ++ itItem;
+            }
+        }
+    }
+
+    void Jump::cleanup()
+    {
+        camera = 0;
+    }
+
+    void Jump::start()
+    {
+        if (center_ != NULL) // There needs to be a JumpCenterpoint, i.e. the area the game takes place.
+        {
+            if (figure_ == NULL)
+            {
+                figure_ = new JumpFigure(center_->getContext());
+                figure_->addTemplate(center_->getFigureTemplate());
+                figure_->InitializeAnimation(center_->getContext());
+            }
+
+            center_->attach(figure_);
+            figure_->setPosition(0, 0, 0);
+            figure_->setFieldDimension(center_->getFieldDimension());
+        }
+        else // If no centerpoint was specified, an error is thrown and the level is exited.
+        {
+            orxout(internal_error) << "Jump: No Centerpoint specified." << endl;
+            GSLevel::startMainMenu();
+            return;
+        }
+
+        // Call start for the parent class.
+        Deathmatch::start();
+
+        if (figure_ != NULL)
+        {
+            camera = figure_->getCamera();
+        }
+
+        totalScreenShift_ = 0.0;
+        screenShiftSinceLastUpdate_ = 0.0;
+        sectionNumber_ = 0;
+        adventureNumber_ = 0;
+
+        addStartSection();
+        addSection();
+        addSection();
+    }
+
+    void Jump::end()
+    {
+        cleanup();
+        GSLevel::startMainMenu();
+
+        Deathmatch::end();
+    }
+
+    void Jump::spawnPlayer(PlayerInfo* player)
+    {
+        assert(player);
+
+        if (figure_->getPlayer() == NULL)
+        {
+            player->startControl(figure_);
+            players_[player].state_ = PlayerState::Alive;
+        }
+    }
+
+    PlayerInfo* Jump::getPlayer() const
+    {
+        if (this->figure_ != NULL)
+        {
+            return this->figure_->getPlayer();
+        }
+        else
+        {
+            return 0;
+        }
+    }
+
+    void Jump::addPlatform(JumpPlatform* newPlatform, std::string platformTemplate, float xPosition, float zPosition)
+    {
+        if (newPlatform != NULL && center_ != NULL)
+        {
+            newPlatform->addTemplate(platformTemplate);
+            newPlatform->setPosition(Vector3(xPosition, 0.0, zPosition));
+            newPlatform->setFigure(this->figure_);
+            center_->attach(newPlatform);
+        }
+    }
+
+    JumpPlatformStatic* Jump::addPlatformStatic(float xPosition, float zPosition)
+    {
+        JumpPlatformStatic* newPlatform = new JumpPlatformStatic(center_->getContext());
+        addPlatform(newPlatform, center_->getPlatformStaticTemplate(), xPosition, zPosition);
+
+        return newPlatform;
+    }
+
+    JumpPlatformHMove* Jump::addPlatformHMove(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float speed)
+    {
+        JumpPlatformHMove* newPlatform = new JumpPlatformHMove(center_->getContext());
+        newPlatform->setProperties(leftBoundary, rightBoundary, speed);
+        addPlatform(newPlatform, center_->getPlatformHMoveTemplate(), xPosition, zPosition);
+
+        return newPlatform;
+    }
+
+    JumpPlatformVMove* Jump::addPlatformVMove(float xPosition, float zPosition, float lowerBoundary, float upperBoundary, float speed)
+    {
+        JumpPlatformVMove* newPlatform = new JumpPlatformVMove(center_->getContext());
+        newPlatform->setProperties(lowerBoundary, upperBoundary, speed);
+        addPlatform(newPlatform, center_->getPlatformVMoveTemplate(), xPosition, zPosition);
+
+        return newPlatform;
+    }
+
+    JumpPlatformDisappear* Jump::addPlatformDisappear(float xPosition, float zPosition)
+    {
+        JumpPlatformDisappear* newPlatform = new JumpPlatformDisappear(center_->getContext());
+        newPlatform->setProperties(true);
+        addPlatform(newPlatform, center_->getPlatformDisappearTemplate(), xPosition, zPosition);
+
+        return newPlatform;
+    }
+
+    JumpPlatformTimer* Jump::addPlatformTimer(float xPosition, float zPosition, float time, float variance)
+    {
+        float additionalTime = (float)(rand()%100)/(100*variance) - variance/2;
+
+        JumpPlatformTimer* newPlatform = new JumpPlatformTimer(center_->getContext());
+        newPlatform->setProperties(time + additionalTime);
+        addPlatform(newPlatform, center_->getPlatformTimerTemplate(), xPosition, zPosition);
+
+        return newPlatform;
+    }
+
+    JumpPlatformFake* Jump::addPlatformFake(float xPosition, float zPosition)
+    {
+        JumpPlatformFake* newPlatform = new JumpPlatformFake(center_->getContext());
+        addPlatform(newPlatform, center_->getPlatformFakeTemplate(), xPosition, zPosition);
+        newPlatform->setAngularVelocity(Vector3(0, 0, 2.0));
+
+        return newPlatform;
+    }
+
+
+    void Jump::addProjectile(float xPosition, float zPosition)
+    {
+        JumpProjectile* newProjectile = new JumpProjectile(center_->getContext());
+        if (newProjectile != NULL && center_ != NULL)
+        {
+            newProjectile->addTemplate(center_->getProjectileTemplate());
+            newProjectile->setPosition(Vector3(xPosition, 0.0, zPosition));
+            newProjectile->setFieldDimension(center_->getFieldDimension());
+            newProjectile->setFigure(this->figure_);
+            center_->attach(newProjectile);
+        }
+    }
+
+    void Jump::addSpring(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
+    {
+        JumpSpring* newSpring = new JumpSpring(center_->getContext());
+        if (newSpring != NULL && center_ != NULL)
+        {
+            newSpring->addTemplate(center_->getSpringTemplate());
+            newSpring->setPosition(Vector3(xPosition, 0.0, zPosition));
+            newSpring->setProperties(leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
+            newSpring->setFigure(figure_);
+            center_->attach(newSpring);
+        }
+    }
+
+    void Jump::addSpring(JumpPlatform* platform)
+    {
+        JumpSpring* newSpring = new JumpSpring(center_->getContext());
+        if (newSpring != NULL && center_ != NULL)
+        {
+            newSpring->addTemplate(center_->getSpringTemplate());
+            newSpring->setPosition(Vector3(0.0, 0.0, 0.0));
+            newSpring->setProperties(-10.0, 10.0, -10.0, 10.0, 0.0, 0.0);
+            newSpring->setFigure(figure_);
+            platform->attach(newSpring);
+        }
+    }
+
+    void Jump::addRocket(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
+    {
+        JumpRocket* newRocket = new JumpRocket(center_->getContext());
+        if (newRocket != NULL && center_ != NULL)
+        {
+            newRocket->addTemplate(center_->getRocketTemplate());
+            newRocket->setPosition(Vector3(xPosition, 0.0, zPosition));
+            newRocket->setProperties(leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
+            newRocket->setFigure(figure_);
+            center_->attach(newRocket);
+        }
+    }
+
+    void Jump::addRocket(JumpPlatform* platform)
+    {
+        JumpRocket* newRocket = new JumpRocket(center_->getContext());
+        if (newRocket != NULL && center_ != NULL)
+        {
+            newRocket->addTemplate(center_->getRocketTemplate());
+            newRocket->setPosition(Vector3(0.0, 0.0, 0.0));
+            newRocket->setProperties(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+            newRocket->setFigure(figure_);
+            platform->attach(newRocket);
+        }
+    }
+
+    void Jump::addPropeller(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
+    {
+        JumpPropeller* newPropeller = new JumpPropeller(center_->getContext());
+        if (newPropeller != NULL && center_ != NULL)
+        {
+            newPropeller->addTemplate(center_->getPropellerTemplate());
+            newPropeller->setPosition(Vector3(xPosition, 0.0, zPosition));
+            newPropeller->setProperties(leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
+            newPropeller->setFigure(figure_);
+            center_->attach(newPropeller);
+        }
+    }
+
+    void Jump::addPropeller(JumpPlatform* platform)
+    {
+        JumpPropeller* newPropeller = new JumpPropeller(center_->getContext());
+        if (newPropeller != NULL && center_ != NULL)
+        {
+            newPropeller->addTemplate(center_->getPropellerTemplate());
+            newPropeller->setPosition(Vector3(0.0, 0.0, 0.0));
+            newPropeller->setProperties(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+            newPropeller->setFigure(figure_);
+            platform->attach(newPropeller);
+        }
+    }
+
+    void Jump::addBoots(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
+    {
+        JumpBoots* newBoots = new JumpBoots(center_->getContext());
+        if (newBoots != NULL && center_ != NULL)
+        {
+            newBoots->addTemplate(center_->getBootsTemplate());
+            newBoots->setPosition(Vector3(xPosition, 0.0, zPosition));
+            newBoots->setProperties(leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
+            newBoots->setFigure(figure_);
+            center_->attach(newBoots);
+        }
+    }
+
+    void Jump::addBoots(JumpPlatform* platform)
+    {
+        JumpBoots* newBoots = new JumpBoots(center_->getContext());
+        if (newBoots != NULL && center_ != NULL)
+        {
+            newBoots->addTemplate(center_->getBootsTemplate());
+            newBoots->setPosition(Vector3(0.0, 0.0, 0.0));
+            newBoots->setProperties(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+            newBoots->setFigure(figure_);
+            platform->attach(newBoots);
+        }
+    }
+
+    void Jump::addShield(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
+    {
+        JumpShield* newShield = new JumpShield(center_->getContext());
+        if (newShield != NULL && center_ != NULL)
+        {
+            newShield->addTemplate(center_->getShieldTemplate());
+            newShield->setPosition(Vector3(xPosition, 0.0, zPosition));
+            newShield->setProperties(leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
+            newShield->setFigure(figure_);
+            center_->attach(newShield);
+        }
+    }
+
+    void Jump::addShield(JumpPlatform* platform)
+    {
+        JumpShield* newShield = new JumpShield(center_->getContext());
+        if (newShield != NULL && center_ != NULL)
+        {
+            newShield->addTemplate(center_->getShieldTemplate());
+            newShield->setPosition(Vector3(0.0, 0.0, 0.0));
+            newShield->setProperties(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+            newShield->setFigure(figure_);
+            platform->attach(newShield);
+        }
+    }
+
+    void Jump::addEnemy(int type, float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
+    {
+        JumpEnemy* newEnemy = new JumpEnemy(center_->getContext());
+        if (newEnemy != NULL && center_ != NULL)
+        {
+            switch (type)
+            {
+            case 1:
+                newEnemy->addTemplate(center_->getEnemy1Template());
+                break;
+            case 2:
+                newEnemy->addTemplate(center_->getEnemy2Template());
+                break;
+            case 3:
+                newEnemy->addTemplate(center_->getEnemy3Template());
+                break;
+            case 4:
+                newEnemy->addTemplate(center_->getEnemy4Template());
+                break;
+            default:
+                return;
+            }
+
+            newEnemy->setPosition(Vector3(xPosition, 0.0, zPosition));
+            newEnemy->setProperties(leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
+            newEnemy->setFieldDimension(center_->getFieldDimension());
+            newEnemy->setFigure(this->figure_);
+            center_->attach(newEnemy);
+        }
+    }
+
+    void Jump::addStartSection()
+    {
+        JumpPlatform* newPlatform;
+
+        float sectionLength = center_->getSectionLength();
+
+        newPlatform = new JumpPlatformStatic(center_->getContext());
+        addPlatform(newPlatform, center_->getPlatformStaticTemplate(), 0.0, -0.05*sectionLength);
+
+        platformWidth_ = newPlatform->getWidth();
+        platformHeight_ = newPlatform->getHeight();
+
+        for (float xPosition = platformWidth_; xPosition <= center_->getFieldDimension().x; xPosition += platformWidth_)
+        {
+            newPlatform = new JumpPlatformStatic(center_->getContext());
+            addPlatform(newPlatform, center_->getPlatformStaticTemplate(), xPosition, -0.05*sectionLength);
+            newPlatform = new JumpPlatformStatic(center_->getContext());
+            addPlatform(newPlatform, center_->getPlatformStaticTemplate(), -xPosition, -0.05*sectionLength);
+        }
+    }
+
+    void Jump::addSection()
+    {
+        float fieldWidth = center_->getFieldDimension().x;
+        float sectionLength = center_->getSectionLength();
+        float sectionBegin = sectionNumber_ * sectionLength;
+        float sectionEnd = (1 + sectionNumber_) * sectionLength;
+
+        int numI = 6;
+        int numJ = 4;
+
+        enum PlatformType
+        {
+            PLATFORM_EMPTY, PLATFORM_STATIC, PLATFORM_HMOVE, PLATFORM_VMOVE, PLATFORM_DISAPPEAR, PLATFORM_TIMER, PLATFORM_FAKE
+        };
+
+        enum ItemType
+        {
+            ITEM_NOTHING, ITEM_SPRING, ITEM_PROPELLER, ITEM_ROCKET, ITEM_BOOTS, ITEM_SHIELD
+        };
+
+        struct PlatformMatrix
+        {
+            PlatformType type;
+            bool done;
+        } matrix[numI][numJ];
+
+
+        for (int i = 0; i < numI; ++i)
+        {
+            for (int j = 0; j < numJ; ++j)
+            {
+                matrix[i][j].type = PLATFORM_EMPTY;
+                matrix[i][j].done = false;
+            }
+        }
+        PlatformType platformtype1;
+        PlatformType platformtype2;
+        ItemType itemType = ITEM_NOTHING;
+
+        if (rand()%2 == 0)
+        {
+            itemType = ITEM_SPRING;
+        }
+        else if (rand()%2 == 0 && sectionNumber_ > 3)
+        {
+            switch(rand()%4)
+            {
+            case 0:
+                itemType = ITEM_PROPELLER;
+                break;
+            case 1:
+                itemType = ITEM_ROCKET;
+                break;
+            case 2:
+                itemType = ITEM_BOOTS;
+                break;
+            case 3:
+                itemType = ITEM_SHIELD;
+                break;
+            default:
+                break;
+            }
+        }
+
+        switch((sectionNumber_ > 28) ? rand()%29 : rand()%(sectionNumber_+1))
+        {
+        case 0:
+            platformtype1 = PLATFORM_STATIC;
+            platformtype2 = PLATFORM_STATIC;
+            break;
+        case 1:
+            platformtype1 = PLATFORM_STATIC;
+            platformtype2 = PLATFORM_STATIC;
+            break;
+        case 2:
+            platformtype1 = PLATFORM_STATIC;
+            platformtype2 = PLATFORM_HMOVE;
+            break;
+        case 3:
+            platformtype1 = PLATFORM_STATIC;
+            platformtype2 = PLATFORM_DISAPPEAR;
+            break;
+        case 4:
+            platformtype1 = PLATFORM_STATIC;
+            platformtype2 = PLATFORM_VMOVE;
+            break;
+        case 5:
+            platformtype1 = PLATFORM_STATIC;
+            platformtype2 = PLATFORM_TIMER;
+            break;
+        case 6:
+            platformtype1 = PLATFORM_HMOVE;
+            platformtype2 = PLATFORM_STATIC;
+            break;
+        case 7:
+            platformtype1 = PLATFORM_HMOVE;
+            platformtype2 = PLATFORM_HMOVE;
+            break;
+        case 8:
+            platformtype1 = PLATFORM_HMOVE;
+            platformtype2 = PLATFORM_HMOVE;
+            break;
+        case 9:
+            platformtype1 = PLATFORM_HMOVE;
+            platformtype2 = PLATFORM_DISAPPEAR;
+            break;
+        case 10:
+            platformtype1 = PLATFORM_HMOVE;
+            platformtype2 = PLATFORM_VMOVE;
+            break;
+        case 11:
+            platformtype1 = PLATFORM_HMOVE;
+            platformtype2 = PLATFORM_TIMER;
+            break;
+        case 12:
+            platformtype1 = PLATFORM_DISAPPEAR;
+            platformtype2 = PLATFORM_STATIC;
+            break;
+        case 13:
+            platformtype1 = PLATFORM_DISAPPEAR;
+            platformtype2 = PLATFORM_HMOVE;
+            break;
+        case 14:
+            platformtype1 = PLATFORM_DISAPPEAR;
+            platformtype2 = PLATFORM_DISAPPEAR;
+            break;
+        case 15:
+            platformtype1 = PLATFORM_DISAPPEAR;
+            platformtype2 = PLATFORM_DISAPPEAR;
+            break;
+        case 16:
+            platformtype1 = PLATFORM_DISAPPEAR;
+            platformtype2 = PLATFORM_VMOVE;
+            break;
+        case 17:
+            platformtype1 = PLATFORM_DISAPPEAR;
+            platformtype2 = PLATFORM_TIMER;
+            break;
+        case 18:
+            platformtype1 = PLATFORM_VMOVE;
+            platformtype2 = PLATFORM_STATIC;
+            break;
+        case 19:
+            platformtype1 = PLATFORM_VMOVE;
+            platformtype2 = PLATFORM_HMOVE;
+            break;
+        case 20:
+            platformtype1 = PLATFORM_VMOVE;
+            platformtype2 = PLATFORM_DISAPPEAR;
+            break;
+        case 21:
+            platformtype1 = PLATFORM_VMOVE;
+            platformtype2 = PLATFORM_VMOVE;
+            break;
+        case 22:
+            platformtype1 = PLATFORM_VMOVE;
+            platformtype2 = PLATFORM_VMOVE;
+            break;
+        case 23:
+            platformtype1 = PLATFORM_VMOVE;
+            platformtype2 = PLATFORM_TIMER;
+            break;
+        case 24:
+            platformtype1 = PLATFORM_TIMER;
+            platformtype2 = PLATFORM_STATIC;
+            break;
+        case 25:
+            platformtype1 = PLATFORM_TIMER;
+            platformtype2 = PLATFORM_HMOVE;
+            break;
+        case 26:
+            platformtype1 = PLATFORM_TIMER;
+            platformtype2 = PLATFORM_DISAPPEAR;
+            break;
+        case 27:
+            platformtype1 = PLATFORM_TIMER;
+            platformtype2 = PLATFORM_VMOVE;
+            break;
+        case 28:
+            platformtype1 = PLATFORM_TIMER;
+            platformtype2 = PLATFORM_TIMER;
+            break;
+        default:
+            platformtype1 = PLATFORM_TIMER;
+            platformtype2 = PLATFORM_TIMER;
+            break;
+        }
+
+        // Fill matrix with selected platform types
+        for (int i = 0; i < numI; ++ i)
+        {
+            for (int j = 0; j < numJ; ++ j)
+            {
+                if (rand()%3 == 0)
+                {
+                    matrix[i][j].type = platformtype1;
+                }
+                else
+                {
+                    matrix[i][j].type = platformtype2;
+                }
+                matrix[i][j].done = false;
+            }
+        }
+
+        if (platformtype1 == platformtype2 && sectionNumber_ > 10 && rand()%2 == 0)
+        {
+            matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
+            matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
+        }
+
+        // Delete some planned platforms or replace them with fake platforms
+        if (sectionNumber_ > 5)
+        {
+            if (rand()%2 == 0)
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
+            }
+            else
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
+            }
+        }
+        else if (sectionNumber_ > 10)
+        {
+            if (rand()%2 == 0)
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
+            }
+            else
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
+            }
+            if (rand()%2 == 0)
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
+            }
+            else
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
+            }
+        }
+        else if (sectionNumber_ > 15)
+        {
+            if (rand()%2 == 0)
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
+            }
+            else
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
+            }
+            if (rand()%2 == 0)
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
+            }
+            else
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
+            }
+            if (rand()%2 == 0)
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
+            }
+            else
+            {
+                matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
+            }
+        }
+
+        std::vector<JumpPlatform*> platformList;
+
+        for (int i = 0; i < numI; ++ i)
+        {
+            for (int j = 0; j < numJ; ++ j)
+            {
+                if (matrix[i][j].done == false)
+                {
+                    float xPosition = 0.0;
+                    float zPosition = 0.0;
+                    float leftBoundary = 0.0;
+                    float rightBoundary = 0.0;
+                    float lowerBoundary = 0.0;
+                    float upperBoundary = 0.0;
+                    float xVelocity = 0.0;
+                    float zVelocity = 0.0;
+
+                    switch(matrix[i][j].type)
+                    {
+                    case PLATFORM_EMPTY:
+                        matrix[i][j].done = true;
+                        break;
+                    case PLATFORM_STATIC:
+                        xPosition = randomXPosition(numJ, j);
+                        zPosition = sectionBegin + i*sectionLength/numI;
+                        platformList.push_back(addPlatformStatic(xPosition, zPosition));
+                        matrix[i][j].done = true;
+                        break;
+                    case PLATFORM_FAKE:
+                        xPosition = randomXPosition(numJ, j);
+                        zPosition = sectionBegin + i*sectionLength/numI;
+                        platformList.push_back(addPlatformFake(xPosition, zPosition));
+                        matrix[i][j].done = true;
+                        break;
+                    case PLATFORM_TIMER:
+                        xPosition = randomXPosition(numJ, j);
+                        zPosition = sectionBegin + i*sectionLength/numI;
+                        platformList.push_back(addPlatformTimer(xPosition, zPosition, 12.0, 1.5));
+                        matrix[i][j].done = true;
+                        break;
+                    case PLATFORM_DISAPPEAR:
+                        xPosition = randomXPosition(numJ, j);
+                        zPosition = sectionBegin + i*sectionLength/numI;
+                        platformList.push_back(addPlatformDisappear(xPosition, zPosition));
+                        matrix[i][j].done = true;
+                        break;
+                    case PLATFORM_HMOVE:
+                        xVelocity = randomSpeed();
+                        if (j <= numJ-3 && matrix[i][j+1].type == PLATFORM_HMOVE && matrix[i][j+2].type == PLATFORM_HMOVE && rand()%2 == 0)
+                        {
+                            leftBoundary = randomXPositionLeft(numJ, j);
+                            rightBoundary = randomXPositionRight(numJ, j+2);
+                            xPosition = randomPosition(leftBoundary, rightBoundary);
+                            zPosition = sectionBegin + i*sectionLength/numI;
+                            platformList.push_back(addPlatformHMove(xPosition, zPosition, leftBoundary, rightBoundary, xVelocity));
+                            matrix[i][j].done = true;
+                            matrix[i][j+1].done = true;
+                            matrix[i][j+2].done = true;
+                        }
+                        else if (j <= numJ-2 && matrix[i][j+1].type == PLATFORM_HMOVE && rand()%2 == 0)
+                        {
+                            leftBoundary = randomXPositionLeft(numJ, j);
+                            rightBoundary = randomXPositionRight(numJ, j+1);
+                            xPosition = randomPosition(leftBoundary, rightBoundary);
+                            zPosition = sectionBegin + i*sectionLength/numI;
+                            platformList.push_back(addPlatformHMove(xPosition, zPosition, leftBoundary, rightBoundary, xVelocity));
+                            matrix[i][j].done = true;
+                            matrix[i][j+1].done = true;
+                        }
+                        else
+                        {
+                            leftBoundary = randomXPositionLeft(numJ, j);
+                            rightBoundary = randomXPositionRight(numJ, j);
+                            xPosition = randomPosition(leftBoundary, rightBoundary);
+                            zPosition = sectionBegin + i*sectionLength/numI;
+                            platformList.push_back(addPlatformHMove(xPosition, zPosition, leftBoundary, rightBoundary, xVelocity));
+                            matrix[i][j].done = true;
+                        }
+                        break;
+                    case PLATFORM_VMOVE:
+                        zVelocity = randomSpeed();
+                        if (i <= numI-3 && matrix[i+1][j].type == PLATFORM_VMOVE && matrix[i+2][j].type == PLATFORM_VMOVE && rand()%2 == 0)
+                        {
+                            lowerBoundary = randomZPositionLower(numI, i, sectionBegin, sectionEnd);
+                            upperBoundary = randomZPositionUpper(numI, i+2, sectionBegin, sectionEnd);
+                            zPosition = randomPosition(lowerBoundary, upperBoundary);
+                            xPosition = randomXPosition(numJ, j);
+                            platformList.push_back(addPlatformVMove(xPosition, zPosition, lowerBoundary, upperBoundary, zVelocity));
+                            matrix[i][j].done = true;
+                            matrix[i+1][j].done = true;
+                            matrix[i+2][j].done = true;
+                        }
+                        else if (i <= numI-2 && matrix[i+1][j].type == PLATFORM_VMOVE && rand()%2 == 0)
+                        {
+                            lowerBoundary = randomZPositionLower(numI, i, sectionBegin, sectionEnd);
+                            upperBoundary = randomZPositionUpper(numI, i+1, sectionBegin, sectionEnd);
+                            zPosition = randomPosition(lowerBoundary, upperBoundary);
+                            xPosition = randomXPosition(numJ, j);
+                            platformList.push_back(addPlatformVMove(xPosition, zPosition, lowerBoundary, upperBoundary, zVelocity));
+                            matrix[i][j].done = true;
+                            matrix[i+1][j].done = true;
+                        }
+                        else
+                        {
+                            lowerBoundary = randomZPositionLower(numI, i, sectionBegin, sectionEnd);
+                            upperBoundary = randomZPositionUpper(numI, i, sectionBegin, sectionEnd);
+                            zPosition = randomPosition(lowerBoundary, upperBoundary);
+                            xPosition = randomXPosition(numJ, j);
+                            platformList.push_back(addPlatformVMove(xPosition, zPosition, lowerBoundary, upperBoundary, zVelocity));
+                            matrix[i][j].done = true;
+                        }
+                        break;
+                    default:
+                        //ERROR
+                        break;
+
+                    }
+                }
+            }
+        }
+
+        //Add items
+        int numNewPlatforms = platformList.size();
+
+        if (rand()%4 == 0)
+        {
+            if (rand()%2 == 0)
+            {
+                switch (itemType)
+                {
+                case ITEM_ROCKET:
+                    addRocket(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0);
+                    break;
+                case ITEM_PROPELLER:
+                    addPropeller(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0);
+                    break;
+                case ITEM_BOOTS:
+                    addBoots(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0);
+                    break;
+                case ITEM_SHIELD:
+                    addShield(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0);
+                    break;
+                default:
+                    break;
+                }
+            }
+            else
+            {
+                switch (itemType)
+                {
+                case ITEM_ROCKET:
+                    addRocket(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed());
+                    break;
+                case ITEM_PROPELLER:
+                    addPropeller(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed());
+                    break;
+                case ITEM_BOOTS:
+                    addBoots(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed());
+                    break;
+                case ITEM_SHIELD:
+                    addShield(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed());
+                    break;
+                default:
+                    break;
+                }
+            }
+        }
+        else
+        {
+            if (numNewPlatforms > 0)
+            {
+                JumpPlatform* itemPlatform = platformList[rand()%numNewPlatforms];
+
+                switch (itemType)
+                {
+                case ITEM_SPRING:
+                    addSpring(itemPlatform);
+                    break;
+                case ITEM_ROCKET:
+                    addRocket(itemPlatform);
+                    break;
+                case ITEM_PROPELLER:
+                    addPropeller(itemPlatform);
+                    break;
+                case ITEM_BOOTS:
+                    addBoots(itemPlatform);
+                    break;
+                case ITEM_SHIELD:
+                    addShield(itemPlatform);
+                    break;
+                default:
+                    break;
+                }
+            }
+        }
+
+        if (sectionNumber_ >= 5 && rand()%3 == 0)
+        {
+            switch(rand()%4)
+            {
+            case 0:
+                addEnemy(1, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/3*2, fieldWidth/3*2, sectionBegin, sectionBegin + sectionLength, randomSpeed(), 0.0);
+                break;
+            case 1:
+                addEnemy(2, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/3*2, fieldWidth/3*2, sectionBegin, sectionBegin + sectionLength, randomSpeed(), 0.0);
+                break;
+            case 2:
+                addEnemy(3, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/3*2, fieldWidth/3*2, sectionBegin, sectionBegin + sectionLength, randomSpeed(), 0.0);
+                break;
+            case 3:
+                addEnemy(4, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/3*2, fieldWidth/3*2, sectionBegin, sectionBegin + sectionLength, randomSpeed(), 0.0);
+                break;
+            }
+        }
+        ++ sectionNumber_;
+    }
+
+    bool Jump::addAdventure(int number)
+    {
+        float fieldWidth = center_->getFieldDimension().x;
+        float sectionLength = center_->getSectionLength();
+        float sectionBegin = sectionNumber_ * sectionLength;
+        sectionLength *= 2;
+
+        switch(number)
+        {
+        case 0:
+        {
+            int numI = 10;
+            if (rand()%2 == 0)
+            {
+                for (int i = 0; i < numI; ++ i)
+                {
+                    addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+i*sectionLength/numI);
+                }
+            }
+            else
+            {
+                for (int i = 0; i < numI; ++ i)
+                {
+                    addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+(numI-i)*sectionLength/numI);
+                }
+            }
+            break;
+        }
+        case 1:
+        {
+            int numI = 7;
+
+            addPlatformStatic(0.0, sectionBegin);
+            if (rand()%2 == 0)
+            {
+                for (int i = 1; i < numI; ++ i)
+                {
+                    addPlatformStatic((fieldWidth-platformWidth_/2)*i/numI, sectionBegin+i*sectionLength/numI);
+                    addPlatformStatic(-(fieldWidth-platformWidth_/2)*i/numI, sectionBegin+i*sectionLength/numI);
+                }
+            }
+            else
+            {
+                for (int i = 1; i < numI; ++ i)
+                {
+                    addPlatformStatic((fieldWidth-platformWidth_/2)*i/numI, sectionBegin+(numI-i)*sectionLength/numI);
+                    addPlatformStatic(-(fieldWidth-platformWidth_/2)*i/numI, sectionBegin+(numI-i)*sectionLength/numI);
+                }
+            }
+            break;
+        }
+        case 2:
+        {
+            int numI = 5;
+            for (int i = 0; i <= numI; ++ i)
+            {
+                addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth, sectionBegin);
+                addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth, sectionBegin+sectionLength/5);
+                addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth, sectionBegin+sectionLength*2/5);
+                addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth, sectionBegin+sectionLength*3/5);
+                addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth, sectionBegin+sectionLength*4/5);
+                addEnemy(4, (2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+sectionLength/2, -fieldWidth, fieldWidth, sectionBegin, sectionBegin + sectionLength, 0.0, 0.0);
+            }
+            break;
+        }
+        case 3:
+        {
+            addRocket(addPlatformStatic(0.0, sectionBegin));
+            addEnemy(2, 0.0, sectionBegin+sectionLength/5, 0.0,0.0, 0.0, 0.0, 0.0, 0.0);
+            break;
+        }
+        case 4:
+        {
+            addPropeller(addPlatformStatic(0.0, sectionBegin));
+            addPropeller(addPlatformStatic(-fieldWidth/2, sectionBegin));
+            addPropeller(addPlatformStatic(fieldWidth/2, sectionBegin));
+            break;
+        }
+        default:
+            return false;
+        }
+        sectionNumber_ +=2;
+        return true;
+    }
+
+    float Jump::randomXPosition()
+    {
+        float fieldWidth = center_->getFieldDimension().x;
+
+        return (float)(rand()%(2*(int)fieldWidth)) - fieldWidth;
+    }
+
+    float Jump::randomXPosition(int totalColumns, int culomn)
+    {
+        float fieldWidth = center_->getFieldDimension().x;
+
+        float halfWidth = fieldWidth/totalColumns;
+        float leftBound = culomn*halfWidth*2-fieldWidth;
+        float rightBound = leftBound + 2*halfWidth;
+
+        return randomPosition(leftBound+platformWidth_/2, rightBound-platformWidth_/2);
+    }
+
+    float Jump::randomXPositionLeft(int totalColumns, int culomn)
+    {
+        float fieldWidth = center_->getFieldDimension().x;
+
+        float halfWidth = fieldWidth/totalColumns;
+        float leftBound = culomn*halfWidth*2-fieldWidth;
+        float rightBound = leftBound + 2*halfWidth/3;
+
+        return randomPosition(leftBound+platformWidth_/2, rightBound-platformWidth_/2);
+    }
+
+    float Jump::randomXPositionRight(int totalColumns, int culomn)
+    {
+        float fieldWidth = center_->getFieldDimension().x;
+
+        float halfWidth = fieldWidth/totalColumns;
+        float rightBound = (culomn+1)*halfWidth*2-fieldWidth;
+        float leftBound = rightBound - 2*halfWidth/3;
+        return randomPosition(leftBound+platformWidth_/2, rightBound-platformWidth_/2);
+    }
+
+    float Jump::randomZPosition(int totalRows, int row, float sectionBegin, float SectionEnd)
+    {
+        float fieldHeight = SectionEnd - sectionBegin;
+        float halfHeight = fieldHeight/totalRows;
+        float lowerBound = row*halfHeight*2+sectionBegin;
+        float upperBound = lowerBound + 2*halfHeight;
+
+        return randomPosition(lowerBound+platformHeight_/2, upperBound-platformHeight_/2);
+    }
+
+    float Jump::randomZPositionLower(int totalRows, int row, float sectionBegin, float SectionEnd)
+    {
+        float fieldHeight = SectionEnd - sectionBegin;
+        float rowHeight = fieldHeight/totalRows;
+        float lowerBound = row*rowHeight+sectionBegin;
+        float upperBound = lowerBound + rowHeight/3;
+
+        return randomPosition(lowerBound+platformHeight_/2, upperBound-platformHeight_/2);
+    }
+
+    float Jump::randomZPositionUpper(int totalRows, int row, float sectionBegin, float SectionEnd)
+    {
+        float fieldHeight = SectionEnd - sectionBegin;
+        float rowHeight = fieldHeight/totalRows;
+        float lowerBound = (row+1)*rowHeight+sectionBegin;
+        float upperBound = lowerBound - rowHeight/3;
+
+        return randomPosition(lowerBound+platformHeight_/2, upperBound-platformHeight_/2);
+    }
+
+    float Jump::randomPosition(float lowerBoundary, float upperBoundary)
+    {
+        if (lowerBoundary >= upperBoundary)
+        {
+            return (lowerBoundary + upperBoundary)/2;
+        }
+
+        return (float)(rand()%(int)(100*(upperBoundary - lowerBoundary)))/100 + lowerBoundary;
+    }
+
+    float Jump::randomSpeed()
+    {
+        float platformSpeed = center_->getPlatformSpeed();
+        return randomPosition(0.5*platformSpeed, 1.5*platformSpeed);
+    }
+
+    int Jump::getScore(PlayerInfo* player) const
+    {
+        return sectionNumber_ - 2;
+    }
+
+    bool Jump::getDead(PlayerInfo* player) const
+    {
+        return figure_->dead_;
+    }
+}
Index: code/trunk/src/modules/jump/Jump.h
===================================================================
--- code/trunk/src/modules/jump/Jump.h	(revision 10216)
+++ code/trunk/src/modules/jump/Jump.h	(revision 10216)
@@ -0,0 +1,102 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Jump_H__
+#define _Jump_H__
+
+#include "jump/JumpPrereqs.h"
+#include "tools/Timer.h"
+#include "graphics/Camera.h"
+#include "gametypes/Deathmatch.h"
+#include "JumpCenterpoint.h"
+#include <list>
+
+namespace orxonox
+{
+    class _JumpExport Jump : public Deathmatch
+    {
+        public:
+            Jump(Context* context);
+            virtual ~Jump();
+            virtual void tick(float dt);
+            virtual void start();
+            virtual void end();
+            virtual void spawnPlayer(PlayerInfo* player);
+            int getScore(PlayerInfo* player) const;
+            bool getDead(PlayerInfo* player) const;
+            void setCenterpoint(JumpCenterpoint* center)
+                { center_ = center; }
+            PlayerInfo* getPlayer() const;
+
+        protected:
+            void cleanup();
+            virtual void addPlatform(JumpPlatform* newPlatform, std::string platformTemplate, float xPosition, float zPosition);
+            virtual JumpPlatformStatic* addPlatformStatic(float xPosition, float zPosition);
+            virtual JumpPlatformHMove* addPlatformHMove(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float speed);
+            virtual JumpPlatformVMove* addPlatformVMove(float xPosition, float zPosition, float lowerBoundary, float upperBoundary, float speed);
+            virtual JumpPlatformDisappear* addPlatformDisappear(float xPosition, float zPosition);
+            virtual JumpPlatformTimer* addPlatformTimer(float xPosition, float zPosition, float time, float variance);
+            virtual JumpPlatformFake* addPlatformFake(float xPosition, float zPosition);
+            virtual void addProjectile(float xPosition, float zPosition);
+            virtual void addEnemy(int type, float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
+            virtual void addSpring(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
+            virtual void addSpring(JumpPlatform* platform);
+            virtual void addRocket(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
+            virtual void addRocket(JumpPlatform* platform);
+            virtual void addPropeller(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
+            virtual void addPropeller(JumpPlatform* platform);
+            virtual void addBoots(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
+            virtual void addBoots(JumpPlatform* platform);
+            virtual void addShield(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
+            virtual void addShield(JumpPlatform* platform);
+            virtual void addStartSection();
+            virtual void addSection();
+            virtual bool addAdventure(int number);
+            virtual float randomXPosition();
+            virtual float randomXPosition(int totalColumns, int culomn);
+            virtual float randomXPositionLeft(int totalColumns, int culomn);
+            virtual float randomXPositionRight(int totalColumns, int culomn);
+            virtual float randomZPosition(int totalRows, int row, float sectionBegin, float SectionEnd);
+            virtual float randomZPositionLower(int totalRows, int row, float sectionBegin, float SectionEnd);
+            virtual float randomZPositionUpper(int totalRows, int row, float sectionBegin, float SectionEnd);
+            virtual float randomPosition(float lowerBoundary, float upperBoundary);
+            virtual float randomSpeed();
+
+            WeakPtr<JumpCenterpoint> center_;
+            WeakPtr<JumpFigure> figure_;
+            WeakPtr<Camera> camera;
+            float totalScreenShift_;
+            float screenShiftSinceLastUpdate_;
+            int sectionNumber_;
+            int adventureNumber_;
+            float platformWidth_;
+            float platformHeight_;
+    };
+}
+
+#endif /* _Jump_H__ */
Index: code/trunk/src/modules/jump/JumpBoots.cc
===================================================================
--- code/trunk/src/modules/jump/JumpBoots.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpBoots.cc	(revision 10216)
@@ -0,0 +1,104 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpBoots.cc
+    @brief These boots give the figure a speed bonus when it jumpes.
+*/
+
+#include "JumpBoots.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+
+#include "JumpFigure.h"
+
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpBoots);
+
+    JumpBoots::JumpBoots(Context* context) : JumpItem(context)
+    {
+        RegisterObject(JumpBoots);
+
+        fuel_ = 3.0;
+        attachedToFigure_ = false;
+
+        setPosition(Vector3(0,0,0));
+        setVelocity(Vector3(0,0,0));
+        setAcceleration(Vector3(0,0,0));
+        setProperties(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+    }
+
+    JumpBoots::~JumpBoots()
+    {
+
+    }
+
+    void JumpBoots::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpBoots, XMLPort, xmlelement, mode);
+    }
+
+    void JumpBoots::tick(float dt)
+    {
+        SUPER(JumpBoots, tick, dt);
+
+        Vector3 rocketPosition = getWorldPosition();
+
+        if (attachedToFigure_ == false && figure_ != NULL)
+        {
+            Vector3 figurePosition = figure_->getWorldPosition();
+
+            if(figurePosition.x > rocketPosition.x-width_ && figurePosition.x < rocketPosition.x+width_ && figurePosition.z > rocketPosition.z-height_ && figurePosition.z < rocketPosition.z+height_)
+            {
+                touchFigure();
+            }
+        }
+        else if (attachedToFigure_ == true)
+        {
+            fuel_ -= dt;
+            if (fuel_ < 0.0)
+            {
+                figure_->StopBoots(this);
+            }
+        }
+    }
+
+    void JumpBoots::touchFigure()
+    {
+        JumpItem::touchFigure();
+
+        attachedToFigure_ = figure_->StartBoots(this);
+    }
+}
Index: code/trunk/src/modules/jump/JumpBoots.h
===================================================================
--- code/trunk/src/modules/jump/JumpBoots.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpBoots.h	(revision 10216)
@@ -0,0 +1,53 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpBoots_H__
+#define _JumpBoots_H__
+
+#include "jump/JumpPrereqs.h"
+#include "util/Math.h"
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _JumpExport JumpBoots : public JumpItem
+    {
+        public:
+            JumpBoots(Context* context);
+            virtual ~JumpBoots();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void touchFigure();
+        protected:
+            float stretch_;
+            float fuel_;
+    };
+}
+
+#endif /* _JumpBoots_H__ */
Index: code/trunk/src/modules/jump/JumpCenterpoint.cc
===================================================================
--- code/trunk/src/modules/jump/JumpCenterpoint.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpCenterpoint.cc	(revision 10216)
@@ -0,0 +1,97 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpCenterpoint.cc
+    @brief The JumpCenterpoint is a StaticEntity which represents the level of the minigame. All platforms, enemies and items are attached to the JumpCenterpoint.
+*/
+
+#include "JumpCenterpoint.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "Jump.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpCenterpoint);
+
+    JumpCenterpoint::JumpCenterpoint(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(JumpCenterpoint);
+
+        width_ = 0.0;
+        height_ = 0.0;
+        sectionLength_ = 0.0;
+        platformSpeed_ = 0.0;
+
+        checkGametype();
+    }
+
+    void JumpCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpCenterpoint, XMLPort, xmlelement, mode);
+
+        XMLPortParam(JumpCenterpoint, "dimension", setFieldDimension, getFieldDimension, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "sectionLength", setSectionLength, getSectionLength, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "platformSpeed", setPlatformSpeed, getPlatformSpeed, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "cameraOffset", setCameraOffset, getCameraOffset, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "platformStaticTemplate", setPlatformStaticTemplate, getPlatformStaticTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "platformHMoveTemplate", setPlatformHMoveTemplate, getPlatformHMoveTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "platformVMoveTemplate", setPlatformVMoveTemplate, getPlatformVMoveTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "platformDisappearTemplate", setPlatformDisappearTemplate, getPlatformDisappearTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "platformTimerTemplate", setPlatformTimerTemplate, getPlatformTimerTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "platformFakeTemplate", setPlatformFakeTemplate, getPlatformFakeTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "figureTemplate", setFigureTemplate, getFigureTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "projectileTemplate", setProjectileTemplate, getProjectileTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "springTemplate", setSpringTemplate, getSpringTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "rocketTemplate", setRocketTemplate, getRocketTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "propellerTemplate", setPropellerTemplate, getPropellerTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "bootsTemplate", setBootsTemplate, getBootsTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "shieldTemplate", setShieldTemplate, getShieldTemplate, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "enemy1Template", setEnemy1Template, getEnemy1Template, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "enemy2Template", setEnemy2Template, getEnemy2Template, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "enemy3Template", setEnemy3Template, getEnemy3Template, xmlelement, mode);
+        XMLPortParam(JumpCenterpoint, "enemy4Template", setEnemy4Template, getEnemy4Template, xmlelement, mode);
+    }
+
+    void JumpCenterpoint::changedGametype()
+    {
+        SUPER(JumpCenterpoint, changedGametype);
+
+        checkGametype();
+    }
+
+    void JumpCenterpoint::checkGametype()
+    {
+        if (getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
+        {
+            Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype().get());
+            jumpGametype->setCenterpoint(this);
+        }
+    }
+}
Index: code/trunk/src/modules/jump/JumpCenterpoint.h
===================================================================
--- code/trunk/src/modules/jump/JumpCenterpoint.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpCenterpoint.h	(revision 10216)
@@ -0,0 +1,228 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpCenterpoint_H__
+#define _JumpCenterpoint_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include <string>
+
+#include <util/Math.h>
+
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    
+    /**
+    @brief
+        The JumpCenterpoint implements the playing field @ref orxonox::Jump "Jump" takes place in and allows for many parameters of the minigame to be set.
+        The playing field resides in the x,z-plane, with the x-axis being the horizontal axis and the z-axis being the vertical axis.
+        
+        Various parameters can be set:
+        - The <b>dimension</b> is a vector, that defines the width and height of the playing field. The default is <em>(200, 120)</em>.
+        - The <b>balltemplate</b> is a template that is applied to the @ref orxonox::JumpPlatform "JumpPlatform", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
+        - The <b>battemplate</b> is a template that is applied to the @ref orxonox::JumpPlatform "JumpFigure", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
+        - The <b>ballspeed</b> is the speed with which the @ref orxonox::JumpPlatform "JumpPlatform" moves. The default is <em>100</em>.
+        - The <b>ballaccfactor</b> is the acceleration factor for the @ref orxonox::JumpPlatform "JumpPlatform". The default is <em>1.0</em>.
+        - The <b>batspeed</b> is the speed with which the @ref orxonox::JumpFigure "JumpFigures" move. The default is <em>60</em>.
+        - The <b>batlength</b> is the length of the @ref orxonox::JumpFigure "JumpFigures" as the percentage of the height of the playing field. The default is <em>0.25</em>.
+        
+        An example in XML of the JumpCenterpoint would be:
+        
+        First the needed templates:
+        The template for the @ref orxonox::JumpPlatform "JumpPlatform".
+        @code
+        <Template name="jumpball">
+          <JumpPlatform>
+            <attached>
+              <Model mesh="sphere.mesh" scale="2" />
+              <ParticleSpawner name="hiteffect" position="0,0,0" source="Orxonox/sparks2" lifetime="0.01" autostart="0" mainstate="spawn" />
+            </attached>
+            <eventlisteners>
+              <EventTarget target="hiteffect" />
+            </eventlisteners>
+          </JumpPlatform>
+        </Template>
+        @endcode
+        As can be seen, a sphere is attached as the @ref orxonox::Model "Model" for the @ref orxonox::JumpPlatform "JumpPlatform", and also an @ref orxonox::EventListener "EventListener" that triggers a @ref orxonox::ParticleSpawner "ParticleSpawner", whenever the ball hits the boundaries is attached.
+        
+        Additionally the template for the @ref orxonox::JumpFigure "JumpFigure".
+        @code
+        <Template name="jumpbatcameras" defaults="0">
+          <JumpFigure>
+            <camerapositions>
+              <CameraPosition position="0,200,0" pitch="-90" absolute="true" />
+            </camerapositions>
+          </JumpFigure>
+        </Template>
+
+        <Template name="jumpbat">
+          <JumpFigure camerapositiontemplate=jumpbatcameras>
+            <attached>
+              <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
+            </attached>
+          </JumpFigure>
+        </Template>
+        @endcode
+        As can be seen, there are actually two templates. The first template is needed to set the camera for the @ref orxonox::JumpFigure "JumpFigure". The second template ist the actual template for the @ref orxonox::JumpFigure "JumpFigure", the template for the camera position is added and a @ref orxonox::Model "Model" for the @ref orxonox::JumpFigure "JumpFigure" is attached.
+        propellerTemplate_
+        Finally the JumpCenterpoint is created.
+        @code
+        <JumpCenterpoint name="jumpcenter" dimension="200,120" balltemplate="jumpball" battemplate="jumpbat" ballspeed="200" ballaccfactor="1.0" batspeed="130" batlength="0.25">
+          <attached>
+            <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
+            <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
+          </attached>
+        </JumpCenterpoint>
+        @endcode
+        All parameters are specified. And also two @ref orxonox::Model "Models" (for the upper and lower boundary) are attached.
+        
+        For a more elaborate example, have a look at the <code>jump.oxw</code> level file.
+
+    */
+    class _JumpExport JumpCenterpoint : public StaticEntity
+    {
+        public:
+            JumpCenterpoint(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Jump.
+            virtual ~JumpCenterpoint() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a JumpCenterpoint through XML.
+            virtual void changedGametype();
+            void setPlatformStaticTemplate(const std::string& balltemplate)
+                { this->platformStaticTemplate_ = balltemplate; }
+            const std::string& getPlatformStaticTemplate() const
+                { return this->platformStaticTemplate_; }
+            void setPlatformHMoveTemplate(const std::string& balltemplate)
+                { this->platformHMoveTemplate_ = balltemplate; }
+            const std::string& getPlatformHMoveTemplate() const
+                { return this->platformHMoveTemplate_; }
+            void setPlatformVMoveTemplate(const std::string& balltemplate)
+                { this->platformVMoveTemplate_ = balltemplate; }
+            const std::string& getPlatformVMoveTemplate() const
+                { return this->platformVMoveTemplate_; }
+            void setPlatformDisappearTemplate(const std::string& balltemplate)
+                { this->platformDisappearTemplate_ = balltemplate; }
+            const std::string& getPlatformDisappearTemplate() const
+                { return this->platformDisappearTemplate_; }
+            void setPlatformTimerTemplate(const std::string& balltemplate)
+                { this->platformTimerTemplate_ = balltemplate; }
+            const std::string& getPlatformTimerTemplate() const
+                { return this->platformTimerTemplate_; }
+            void setPlatformFakeTemplate(const std::string& balltemplate)
+                { this->platformFakeTemplate_ = balltemplate; }
+            const std::string& getPlatformFakeTemplate() const
+                { return this->platformFakeTemplate_; }
+            void setProjectileTemplate(const std::string& newTemplate)
+                { this->projectileTemplate_ = newTemplate; }
+            const std::string& getProjectileTemplate() const
+                { return this->projectileTemplate_; }
+            void setSpringTemplate(const std::string& newTemplate)
+                { this->springTemplate_ = newTemplate; }
+            const std::string& getSpringTemplate() const
+                { return this->springTemplate_; }
+            void setRocketTemplate(const std::string& newTemplate)
+                { this->rocketTemplate_ = newTemplate; }
+            const std::string& getRocketTemplate() const
+                { return this->rocketTemplate_; }
+            void setPropellerTemplate(const std::string& newTemplate)
+                { this->propellerTemplate_ = newTemplate; }
+            const std::string& getPropellerTemplate() const
+                { return this->propellerTemplate_; }
+            void setBootsTemplate(const std::string& newTemplate)
+                { this->bootsTemplate_ = newTemplate; }
+            const std::string& getBootsTemplate() const
+                { return this->bootsTemplate_; }
+            void setShieldTemplate(const std::string& newTemplate)
+                { this->shieldTemplate_ = newTemplate; }
+            const std::string& getShieldTemplate() const
+                { return this->shieldTemplate_; }
+            void setFigureTemplate(const std::string& newTemplate)
+                { this->figureTemplate_ = newTemplate; }
+            const std::string& getFigureTemplate() const
+                { return this->figureTemplate_; }
+            void setEnemy1Template(const std::string& newTemplate)
+                { this->enemy1Template_ = newTemplate; }
+            const std::string& getEnemy1Template() const
+                { return this->enemy1Template_; }
+            void setEnemy2Template(const std::string& newTemplate)
+                { this->enemy2Template_ = newTemplate; }
+            const std::string& getEnemy2Template() const
+                { return this->enemy2Template_; }
+            void setEnemy3Template(const std::string& newTemplate)
+                { this->enemy3Template_ = newTemplate; }
+            const std::string& getEnemy3Template() const
+                { return this->enemy3Template_; }
+            void setEnemy4Template(const std::string& newTemplate)
+                { this->enemy4Template_ = newTemplate; }
+            const std::string& getEnemy4Template() const
+                { return this->enemy4Template_; }
+            void setFieldDimension(const Vector2& dimension)
+                { this->width_ = dimension.x; this->height_ = dimension.y; }
+            Vector2 getFieldDimension() const
+                { return Vector2(this->width_, this->height_); }
+            void setSectionLength(const float sectionLength)
+                { this->sectionLength_ = sectionLength; }
+            float getSectionLength() const
+                { return sectionLength_; }
+            void setPlatformSpeed(const float platformSpeed)
+                { this->platformSpeed_ = platformSpeed; }
+            float getPlatformSpeed() const
+                { return platformSpeed_; }
+            void setCameraOffset(const float cameraOffset)
+                { this->cameraOffset_ = cameraOffset; }
+            float getCameraOffset() const
+                { return cameraOffset_; }
+        private:
+            void checkGametype();
+            std::string platformStaticTemplate_;
+            std::string platformHMoveTemplate_;
+            std::string platformVMoveTemplate_;
+            std::string platformDisappearTemplate_;
+            std::string platformTimerTemplate_;
+            std::string platformFakeTemplate_;
+            std::string projectileTemplate_;
+            std::string springTemplate_;
+            std::string rocketTemplate_;
+            std::string propellerTemplate_;
+            std::string bootsTemplate_;
+            std::string shieldTemplate_;
+            std::string figureTemplate_;
+            std::string enemy1Template_;
+            std::string enemy2Template_;
+            std::string enemy3Template_;
+            std::string enemy4Template_;
+            float width_;
+            float height_;
+            float sectionLength_;
+            float platformSpeed_;
+            float cameraOffset_;
+    };
+}
+
+#endif /* _JumpCenterpoint_H__ */
Index: code/trunk/src/modules/jump/JumpEnemy.cc
===================================================================
--- code/trunk/src/modules/jump/JumpEnemy.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpEnemy.cc	(revision 10216)
@@ -0,0 +1,165 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpEnemy.cc
+    @brief All enemies in the minigame inherit from this class. This class manages the movement of all enemies and allows enemies to touch the figure to kill it.
+*/
+
+#include "JumpEnemy.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+
+#include "JumpFigure.h"
+
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpEnemy);
+
+    /**
+    @brief
+        Constructor. Registers and initializes the object.
+    */
+    JumpEnemy::JumpEnemy(Context* context) : MovableEntity(context)
+    {
+        RegisterObject(JumpEnemy);
+
+        dead_ = false;
+        figure_ = 0;
+        width_ = 0.0;
+        height_ = 0.0;
+        setPosition(Vector3(0,0,0));
+        setVelocity(Vector3(0,0,0));
+        setAcceleration(Vector3(0,0,0));
+        setProperties(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    JumpEnemy::~JumpEnemy()
+    {
+        /*if (this->isInitialized())
+        {
+            if (this->bDeleteBats_)
+                delete this->figure_;
+
+            delete[] this->batID_;
+        }*/
+    }
+
+    //xml port for loading sounds
+    void JumpEnemy::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpEnemy, XMLPort, xmlelement, mode);
+
+        XMLPortParam(JumpEnemy, "height", setHeight, getHeight, xmlelement, mode);
+        XMLPortParam(JumpEnemy, "width", setWidth, getWidth, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Is called every tick.
+        Handles the movement of the ball and its interaction with the boundaries and bats.
+    @param dt
+        The time since the last tick.
+    */
+    void JumpEnemy::tick(float dt)
+    {
+        SUPER(JumpEnemy, tick, dt);
+
+        // Get the current position, velocity and acceleration of the enemy.
+        Vector3 position = getPosition();
+        Vector3 velocity = getVelocity();
+
+        if ((position.x < leftBoundary_ && velocity.x < 0) || (position.x > rightBoundary_ && velocity.x > 0))
+        {
+            velocity.x = -velocity.x;
+        }
+
+        if ((position.z < lowerBoundary_ && velocity.z < 0) || (position.z > upperBoundary_ && velocity.z > 0))
+        {
+            velocity.z = -velocity.z;
+        }
+
+        // Set the position, velocity and acceleration of the enemy, if they have changed.
+        if (velocity != getVelocity())
+            setVelocity(velocity);
+        if (position != getPosition())
+            setPosition(position);
+
+
+        // Interact with Figure
+        Vector3 enemyPosition = getPosition();
+
+        if (figure_ != NULL)
+        {
+            Vector3 figurePosition = figure_->getPosition();
+            if(figurePosition.x > enemyPosition.x-width_ && figurePosition.x < enemyPosition.x+width_ && figurePosition.z > enemyPosition.z-height_ && figurePosition.z < enemyPosition.z+height_)
+            {
+                touchFigure();
+            }
+        }
+    }
+
+    void JumpEnemy::setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed)
+    {
+        leftBoundary_ = newLeftBoundary;
+        rightBoundary_ = newRightBoundary;
+        lowerBoundary_ = newLowerBoundary;
+        upperBoundary_ = newUpperBoundary;
+
+        this->setVelocity(Vector3(newHSpeed,0,newVSpeed));
+    }
+
+    /**
+    @brief
+        Set the bats for the ball.
+    @param bats
+        An array (of size 2) of weak pointers, to be set as the new bats.
+    */
+    void JumpEnemy::setFigure(WeakPtr<JumpFigure> newFigure)
+    {
+        figure_ = newFigure;
+    }
+
+    void JumpEnemy::touchFigure()
+    {
+        if (dead_ == false)
+        {
+            figure_->CollisionWithEnemy(this);
+        }
+    }
+}
Index: code/trunk/src/modules/jump/JumpEnemy.h
===================================================================
--- code/trunk/src/modules/jump/JumpEnemy.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpEnemy.h	(revision 10216)
@@ -0,0 +1,86 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpEnemy.h
+    @brief Declaration of the JumpEnemy class.
+    @ingroup Jump
+*/
+
+#ifndef _JumpEnemy_H__
+#define _JumpEnemy_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "util/Math.h"
+
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _JumpExport JumpEnemy : public MovableEntity
+    {
+        public:
+            JumpEnemy(Context* context);
+            virtual ~JumpEnemy();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            void setFieldDimension(float width, float height)
+                { this->fieldWidth_ = width; this->fieldHeight_ = height; }
+            void setFieldDimension(const Vector2& dimension)
+                { this->setFieldDimension(dimension.x, dimension.y); }
+            Vector2 getFieldDimension() const
+                { return Vector2(this->fieldWidth_, this->fieldHeight_); }
+            void setWidth(const float width)
+                { this->width_ = width; }
+            float getWidth() const
+                { return width_; }
+            void setHeight(const float height)
+                { this->height_ = height; }
+            float getHeight() const
+                { return height_; }
+
+            virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed);
+            void setFigure(WeakPtr<JumpFigure> bats);
+            virtual void touchFigure();
+            bool dead_;
+        protected:
+            float width_;
+            float height_;
+            float fieldWidth_;
+            float fieldHeight_;
+            float leftBoundary_;
+            float rightBoundary_;
+            float lowerBoundary_;
+            float upperBoundary_;
+            WeakPtr<JumpFigure> figure_;
+    };
+}
+
+#endif /* _JumpEnemy_H__ */
Index: code/trunk/src/modules/jump/JumpFigure.cc
===================================================================
--- code/trunk/src/modules/jump/JumpFigure.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpFigure.cc	(revision 10216)
@@ -0,0 +1,398 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpFigure.cc
+    @brief This class represents your figure when you play the minigame. Here the movement of the figure, activating items, ... are handled.
+*/
+
+#include "JumpFigure.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpFigure);
+
+    JumpFigure::JumpFigure(Context* context) : ControllableEntity(context)
+    {
+        RegisterObject(JumpFigure);
+
+        // initialize variables
+        leftHand_ = NULL;
+        rightHand_ = NULL;
+        fieldHeight_ = 0;
+        fieldWidth_ = 0;
+        jumpSpeed_ = 0.0;
+        handSpeed_ = 0.0;
+        handMaxAngle_ = 0.0;
+        handMinAngle_ = 0.0;
+        rocketPos_ = 0.0;
+        propellerPos_ = 0.0;
+        bootsPos_ = 0.0;
+        moveUpPressed_ = false;
+        moveDownPressed_ = false;
+        moveLeftPressed_ = false;
+        moveDownPressed_ = false;
+        firePressed_ = false;
+        fireSignal_ = false;
+        timeSinceLastFire_ = 0.0;
+        gravityAcceleration_ = 8.0;
+        mouseFactor_ = 75.0;
+        maxFireRate_ = 0.3;
+        handAngle_ = 0.0;
+        animateHands_ = false;
+        turnUp_ = false;
+        rocketActive_ = false;
+        propellerActive_ = false;
+        bootsActive_ = false;
+        shieldActive_ = false;
+        rocketSpeed_ = 0.0;
+        propellerSpeed_ = 0.0;
+        dead_ = false;
+    }
+
+    void JumpFigure::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpFigure, XMLPort, xmlelement, mode);
+        XMLPortParam(JumpFigure, "mouseFactor", setMouseFactor, getMouseFactor, xmlelement, mode);
+        XMLPortParam(JumpFigure, "modelLefthand", setModelLeftHand, getModelLeftHand, xmlelement, mode);
+        XMLPortParam(JumpFigure, "modelRighthand", setModelRightHand, getModelRightHand, xmlelement, mode);
+        XMLPortParam(JumpFigure, "rocketPos", setRocketPos, getRocketPos, xmlelement, mode);
+        XMLPortParam(JumpFigure, "propellerPos", setPropellerPos, getPropellerPos, xmlelement, mode);
+        XMLPortParam(JumpFigure, "bootsPos", setBootsPos, getBootsPos, xmlelement, mode);
+        XMLPortParam(JumpFigure, "jumpSpeed", setJumpSpeed, getJumpSpeed, xmlelement, mode);
+        XMLPortParam(JumpFigure, "rocketSpeed", setRocketSpeed, getRocketSpeed, xmlelement, mode);
+        XMLPortParam(JumpFigure, "propellerSpeed", setPropellerSpeed, getPropellerSpeed, xmlelement, mode);
+        XMLPortParam(JumpFigure, "handMinAngle", setHandMinAngle, getHandMinAngle, xmlelement, mode);
+        XMLPortParam(JumpFigure, "handMaxAngle", setHandMaxAngle, getHandMaxAngle, xmlelement, mode);
+        XMLPortParam(JumpFigure, "handSpeed", setHandSpeed, getHandSpeed, xmlelement, mode);
+    }
+
+    void JumpFigure::tick(float dt)
+    {
+        SUPER(JumpFigure, tick, dt);
+
+        if (hasLocalController())
+        {
+            timeSinceLastFire_ += dt;
+
+            // Move up/down
+            Vector3 velocity = getVelocity();
+            if (rocketActive_ == true)
+            {
+                velocity.z = rocketSpeed_;
+            }
+            else if (propellerActive_ == true)
+            {
+                velocity.z = propellerSpeed_;
+            }
+            else
+            {
+                velocity.z -= gravityAcceleration_;
+            }
+
+            // Animate Hands
+            if (animateHands_ == true)
+            {
+                if (turnUp_ == true)
+                {
+                    handAngle_ += handSpeed_ * dt;
+                }
+                else
+                {
+                    handAngle_ -= handSpeed_ * dt;
+                }
+                if (handAngle_ > handMaxAngle_)
+                {
+                    turnUp_ = false;
+                }
+                if (handAngle_ <= handMinAngle_)
+                {
+                    animateHands_ = false;
+                }
+
+                if (leftHand_ != NULL)
+                {
+                    leftHand_->setOrientation(Vector3(0.0, 1.0, 0.0), Degree(-handAngle_));
+                }
+                if (rightHand_ != NULL)
+                {
+                    rightHand_->setOrientation(Vector3(0.0, 1.0, 0.0), Degree(handAngle_));
+                }
+            }
+
+            // Move left/right
+            if (dead_ == false)
+            {
+                velocity.x = -mouseFactor_*horizontalSpeed_;
+            }
+            else
+            {
+                velocity.x = 0.0;
+            }
+
+            // Cheats
+            /*if (moveUpPressed_ == true)
+            {
+                velocity.z = 400.0f;
+                moveUpPressed_ = false;
+                dead_ = false;
+            }
+            if (moveDownPressed_ == true)
+            {
+                moveDownPressed_ = false;
+            }*/
+
+            setVelocity(velocity);
+
+
+            if (firePressed_ && timeSinceLastFire_ >= maxFireRate_)
+            {
+                firePressed_ = false;
+                timeSinceLastFire_ = 0.0;
+                fireSignal_ = true;
+            }
+        }
+
+        // Move through the left and right screen boundaries
+        Vector3 position = getPosition();
+        if (position.x < -fieldWidth_*1.1)
+        {
+            position.x = fieldWidth_*1.1;
+        }
+        else if (position.x > fieldWidth_*1.1)
+        {
+            position.x = -fieldWidth_*1.1;
+        }
+        setPosition(position);
+
+        // Reset key variables
+        moveUpPressed_ = false;
+        moveDownPressed_ = false;
+        moveLeftPressed_ = false;
+        moveDownPressed_ = false;
+        firePressed_ = false;
+    }
+
+    void JumpFigure::JumpFromPlatform(JumpPlatform* platform)
+    {
+        if (dead_ == false)
+        {
+            Vector3 velocity = getVelocity();
+            velocity.z = (bootsActive_ ? 1.2*jumpSpeed_ : jumpSpeed_);
+            setVelocity(velocity);
+
+            animateHands_ = true;
+            handAngle_ = 0.0;
+            turnUp_ = true;
+        }
+    }
+
+    void JumpFigure::JumpFromSpring(JumpSpring* spring)
+    {
+        if (dead_ == false)
+        {
+            Vector3 velocity = getVelocity();
+            velocity.z = 1.2*jumpSpeed_;
+            setVelocity(velocity);
+        }
+    }
+
+    void JumpFigure::CollisionWithEnemy(JumpEnemy* enemy)
+    {
+        if (rocketActive_ == false && propellerActive_ == false && shieldActive_ == false)
+        {
+            dead_ = true;
+        }
+    }
+
+    bool JumpFigure::StartRocket(JumpRocket* rocket)
+    {
+        if (rocketActive_ == false && propellerActive_ == false && bootsActive_ == false)
+        {
+            attach(rocket);
+            rocket->setPosition(0.0, rocketPos_, 0.0);
+            rocket->setVelocity(0.0, 0.0, 0.0);
+            rocketActive_ = true;
+
+            return true;
+        }
+
+        return false;
+    }
+
+    void JumpFigure::StopRocket(JumpRocket* rocket)
+    {
+        rocket->setPosition(0.0, 0.0, -1000.0);
+        rocket->setVelocity(0.0, 0.0, 0.0);
+        detach(rocket);
+        rocket->destroy();
+        rocketActive_ = false;
+    }
+
+    bool JumpFigure::StartPropeller(JumpPropeller* propeller)
+    {
+        if (rocketActive_ == false && propellerActive_ == false && bootsActive_ == false)
+        {
+            attach(propeller);
+            propeller->setPosition(0.0, 0.0, propellerPos_);
+            propeller->setVelocity(0.0, 0.0, 0.0);
+            propellerActive_ = true;
+
+            return true;
+        }
+
+        return false;
+    }
+
+    void JumpFigure::StopPropeller(JumpPropeller* propeller)
+    {
+        propeller->setPosition(0.0, 0.0, -1000.0);
+        propeller->setVelocity(0.0, 0.0, 0.0);
+        detach(propeller);
+        propeller->destroy();
+        propellerActive_ = false;
+    }
+
+    bool JumpFigure::StartBoots(JumpBoots* boots)
+    {
+        if (rocketActive_ == false && propellerActive_ == false && bootsActive_ == false)
+        {
+            attach(boots);
+            boots->setPosition(0.0, 0.0, bootsPos_);
+            boots->setVelocity(0.0, 0.0, 0.0);
+            bootsActive_ = true;
+
+            return true;
+        }
+
+        return false;
+    }
+
+    void JumpFigure::StopBoots(JumpBoots* boots)
+    {
+        boots->setPosition(0.0, 0.0, -1000.0);
+        boots->setVelocity(0.0, 0.0, 0.0);
+        detach(boots);
+        boots->destroy();
+        bootsActive_ = false;
+    }
+
+    bool JumpFigure::StartShield(JumpShield* shield)
+    {
+        if (shieldActive_ == false)
+        {
+            attach(shield);
+            shield->setPosition(0.0, 0.0, propellerPos_);
+            shield->setVelocity(0.0, 0.0, 0.0);
+            shieldActive_ = true;
+
+            return true;
+        }
+
+        return false;
+    }
+
+    void JumpFigure::StopShield(JumpShield* shield)
+    {
+        shield->setPosition(0.0, 0.0, -1000.0);
+        shield->setVelocity(0.0, 0.0, 0.0);
+        detach(shield);
+        shield->destroy();
+        shieldActive_ = false;
+    }
+
+    void JumpFigure::InitializeAnimation(Context* context)
+    {
+        leftHand_ = new Model(context);
+        rightHand_ = new Model(context);
+
+        leftHand_->addTemplate(modelLeftHand_);
+        rightHand_->addTemplate(modelRightHand_);
+
+        attach(leftHand_);
+        attach(rightHand_);
+    }
+
+    void JumpFigure::moveFrontBack(const Vector2& value)
+    {
+        if (value.x > 0)
+        {
+            moveUpPressed_ = true;
+            moveDownPressed_ = false;
+        }
+        else
+        {
+            moveUpPressed_ = false;
+            moveDownPressed_ = true;
+        }
+    }
+
+    void JumpFigure::moveRightLeft(const Vector2& value)
+    {
+        if (value.x > 0)
+        {
+            moveLeftPressed_ = false;
+            moveRightPressed_ = true;
+        }
+        else
+        {
+            moveLeftPressed_ = true;
+            moveRightPressed_ = false;
+        }
+    }
+
+    void JumpFigure::rotateYaw(const Vector2& value)
+    {
+        horizontalSpeed_ = value.x;
+    }
+
+    void JumpFigure::rotatePitch(const Vector2& value)
+    {
+
+
+    }
+
+    void JumpFigure::rotateRoll(const Vector2& value)
+    {
+
+
+    }
+
+    void JumpFigure::fire(unsigned int firemode)
+    {
+
+    }
+
+    void JumpFigure::fired(unsigned int firemode)
+    {
+        firePressed_ = true;
+    }
+}
Index: code/trunk/src/modules/jump/JumpFigure.h
===================================================================
--- code/trunk/src/modules/jump/JumpFigure.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpFigure.h	(revision 10216)
@@ -0,0 +1,158 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpFigure_H__
+#define _JumpFigure_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "worldentities/ControllableEntity.h"
+
+namespace orxonox
+{
+    class _JumpExport JumpFigure : public ControllableEntity
+    {
+        public:
+            JumpFigure(Context* context); //!< Constructor. Registers and initializes the object.
+            virtual ~JumpFigure() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void tick(float dt);
+            virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
+            virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
+            virtual void rotateYaw(const Vector2& value);
+            virtual void rotatePitch(const Vector2& value);
+            virtual void rotateRoll(const Vector2& value);
+            void fire(unsigned int firemode);
+            virtual void fired(unsigned int firemode);
+            virtual void JumpFromPlatform(JumpPlatform* platform);
+            virtual void JumpFromSpring(JumpSpring* spring);
+            virtual void CollisionWithEnemy(JumpEnemy* enemy);
+            virtual bool StartRocket(JumpRocket* rocket);
+            virtual void StopRocket(JumpRocket* rocket);
+            virtual bool StartPropeller(JumpPropeller* propeller);
+            virtual void StopPropeller(JumpPropeller* propeller);
+            virtual bool StartBoots(JumpBoots* boots);
+            virtual void StopBoots(JumpBoots* boots);
+            virtual bool StartShield(JumpShield* shield);
+            virtual void StopShield(JumpShield* shield);
+            virtual void InitializeAnimation(Context* context);
+
+            void setFieldDimension(float width, float height)
+                { fieldWidth_ = width; fieldHeight_ = height; }
+            void setFieldDimension(const Vector2& dimension)
+                { setFieldDimension(dimension.x, dimension.y); }
+            Vector2 getFieldDimension() const
+                { return Vector2(fieldWidth_, fieldHeight_); }
+            void setMouseFactor(const float mouseFactor)
+                { mouseFactor_ = mouseFactor; }
+            const float getMouseFactor() const
+                { return mouseFactor_; }
+            void setModelLeftHand(const std::string& modelLeftHand)
+                { modelLeftHand_ = modelLeftHand; }
+            const std::string& getModelLeftHand() const
+                { return modelLeftHand_; }
+            void setModelRightHand(const std::string& modelRightHand)
+                { modelRightHand_ = modelRightHand; }
+            const std::string& getModelRightHand() const
+                { return modelRightHand_; }
+            void setRocketPos(const float rocketPos)
+                { rocketPos_ = rocketPos; }
+            const float getRocketPos() const
+                { return rocketPos_; }
+            void setPropellerPos(const float propellerPos)
+                { propellerPos_ = propellerPos; }
+            const float getPropellerPos() const
+                { return propellerPos_; }
+            void setBootsPos(const float bootsPos)
+                { bootsPos_ = bootsPos; }
+            const float getBootsPos() const
+                { return bootsPos_; }
+            void setJumpSpeed(const float jumpSpeed)
+                { jumpSpeed_ = jumpSpeed; }
+            const float getJumpSpeed() const
+                { return jumpSpeed_; }
+            void setRocketSpeed(const float rocketSpeed)
+                { rocketSpeed_ = rocketSpeed; }
+            const float getRocketSpeed() const
+                { return rocketSpeed_; }
+            void setPropellerSpeed(const float propellerSpeed)
+                { propellerSpeed_ = propellerSpeed; }
+            const float getPropellerSpeed() const
+                { return propellerSpeed_; }
+            void setHandMinAngle(const float handMinAngle)
+                { handMinAngle_ = handMinAngle; }
+            const float getHandMinAngle() const
+                { return handMinAngle_; }
+            void setHandMaxAngle(const float handMaxAngle)
+                { handMaxAngle_ = handMaxAngle; }
+            const float getHandMaxAngle() const
+                { return handMaxAngle_; }
+            void setHandSpeed(const float handSpeed)
+                { handSpeed_ = handSpeed; }
+            const float getHandSpeed() const
+                { return handSpeed_; }
+
+            bool fireSignal_;
+            bool rocketActive_;
+            bool propellerActive_;
+            bool dead_;
+        private:
+            std::string modelLeftHand_;
+            std::string modelRightHand_;
+            Model* leftHand_;
+            Model* rightHand_;
+            float fieldWidth_;
+            float fieldHeight_;
+            float timeSinceLastFire_;
+            bool moveUpPressed_;
+            bool moveDownPressed_;
+            bool moveLeftPressed_;
+            bool moveRightPressed_;
+            bool firePressed_;
+            float gravityAcceleration_;
+            float mouseFactor_;
+            float jumpSpeed_;
+            float handSpeed_;
+            float handMaxAngle_;
+            float handMinAngle_;
+            float rocketPos_;
+            float propellerPos_;
+            float bootsPos_;
+            float maxFireRate_;
+            float horizontalSpeed_;
+            float handAngle_;
+            bool animateHands_;
+            bool turnUp_;
+            bool bootsActive_;
+            bool shieldActive_;
+            float rocketSpeed_;
+            float propellerSpeed_;
+    };
+}
+
+#endif /* _JumpFigure_H__ */
Index: code/trunk/src/modules/jump/JumpItem.cc
===================================================================
--- code/trunk/src/modules/jump/JumpItem.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpItem.cc	(revision 10216)
@@ -0,0 +1,120 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpItem.cc
+    @brief All items in this minigame inherit from this class. Items can move around like platforms and enemies.
+*/
+
+#include "JumpItem.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+
+#include "JumpFigure.h"
+
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpItem);
+
+    JumpItem::JumpItem(Context* context) : MovableEntity(context)
+    {
+        RegisterObject(JumpItem);
+
+        attachedToFigure_ = false;
+
+        figure_ = 0;
+        height_ = 0.0;
+        width_ = 0.0;
+        setPosition(Vector3(0,0,0));
+        setVelocity(Vector3(0,0,0));
+        setAcceleration(Vector3(0,0,0));
+    }
+
+    JumpItem::~JumpItem()
+    {
+
+    }
+
+    void JumpItem::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpItem, XMLPort, xmlelement, mode);
+
+        XMLPortParam(JumpItem, "height", setHeight, getHeight, xmlelement, mode);
+        XMLPortParam(JumpItem, "width", setWidth, getWidth, xmlelement, mode);
+    }
+
+    void JumpItem::tick(float dt)
+    {
+        SUPER(JumpItem, tick, dt);
+        // Get the current position, velocity and acceleration of the item.
+        Vector3 position = getWorldPosition();
+        Vector3 velocity = getVelocity();
+
+        if ((position.x < leftBoundary_ && velocity.x < 0) || (position.x > rightBoundary_ && velocity.x > 0))
+        {
+            velocity.x = -velocity.x;
+        }
+
+        if ((position.z < lowerBoundary_ && velocity.z < 0) || (position.z > upperBoundary_ && velocity.z > 0))
+        {
+            velocity.z = -velocity.z;
+        }
+
+        // Set the position, velocity and acceleration of the item, if they have changed.
+        if (velocity != getVelocity())
+        {
+            setVelocity(velocity);
+        }
+    }
+
+    void JumpItem::setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed)
+    {
+        leftBoundary_ = newLeftBoundary;
+        rightBoundary_ = newRightBoundary;
+        lowerBoundary_ = newLowerBoundary;
+        upperBoundary_ = newUpperBoundary;
+
+        setVelocity(Vector3(newHSpeed,0,newVSpeed));
+    }
+
+    void JumpItem::setFigure(WeakPtr<JumpFigure> newFigure)
+    {
+        figure_ = newFigure;
+    }
+
+    void JumpItem::touchFigure()
+    {
+
+    }
+}
Index: code/trunk/src/modules/jump/JumpItem.h
===================================================================
--- code/trunk/src/modules/jump/JumpItem.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpItem.h	(revision 10216)
@@ -0,0 +1,88 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpItem.h
+    @brief Declaration of the JumpItem class.
+    @ingroup Jump
+*/
+
+#ifndef _JumpItem_H__
+#define _JumpItem_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "util/Math.h"
+
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _JumpExport JumpItem : public MovableEntity
+    {
+        public:
+            JumpItem(Context* context);
+            virtual ~JumpItem();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed);
+            virtual void setFigure(WeakPtr<JumpFigure> bats); //!< Set the bats for the ball.
+            virtual void touchFigure();
+
+            void setFieldDimension(float width, float height)
+                { this->fieldWidth_ = width; this->fieldHeight_ = height; }
+            void setFieldDimension(const Vector2& dimension)
+                { this->setFieldDimension(dimension.x, dimension.y); }
+            Vector2 getFieldDimension() const
+                { return Vector2(this->fieldWidth_, this->fieldHeight_); }
+            void setWidth(const float width)
+                { this->width_ = width; }
+            float getWidth() const
+                { return width_; }
+            void setHeight(const float height)
+                { this->height_ = height; }
+            float getHeight() const
+                { return height_; }
+
+            bool attachedToFigure_;
+
+        protected:
+            float fieldWidth_; //!< The width of the playing field.
+            float fieldHeight_; //!< The height of the playing field.
+            WeakPtr<JumpFigure> figure_; //!< An array with the two bats.
+            float height_;
+            float width_;
+            float leftBoundary_;
+            float rightBoundary_;
+            float lowerBoundary_;
+            float upperBoundary_;
+    };
+}
+
+#endif /* _JumpItem_H__ */
Index: code/trunk/src/modules/jump/JumpPlatform.cc
===================================================================
--- code/trunk/src/modules/jump/JumpPlatform.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatform.cc	(revision 10216)
@@ -0,0 +1,187 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatform.cc
+    @brief All platforms in this minigame inherit from this class. The basic functions of a platform (interact with figure) is implemented here. Special functions are implemented in the specialized classes.
+*/
+
+#include "JumpPlatform.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+
+#include "JumpFigure.h"
+
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpPlatform);
+
+    JumpPlatform::JumpPlatform(Context* context) : MovableEntity(context)
+    {
+        RegisterObject(JumpPlatform);
+
+        figure_ = 0;
+
+        //initialize sound
+        if (GameMode::isMaster())
+        {
+            defScoreSound_ = new WorldSound(this->getContext());
+            defScoreSound_->setVolume(1.0f);
+            defBatSound_ = new WorldSound(this->getContext());
+            defBatSound_->setVolume(0.4f);
+            defBoundarySound_ = new WorldSound(this->getContext());
+            defBoundarySound_->setVolume(0.5f);
+        }
+        else
+        {
+            defScoreSound_ = 0;
+            defBatSound_ = 0;
+            defBoundarySound_ = 0;
+        }
+
+        setPosition(Vector3(0,0,0));
+        setVelocity(Vector3(0,0,0));
+        setAcceleration(Vector3(0,0,0));
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    JumpPlatform::~JumpPlatform()
+    {
+
+    }
+
+    //xml port for loading sounds
+    void JumpPlatform::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpPlatform, XMLPort, xmlelement, mode);
+
+        XMLPortParam(JumpPlatform, "height", setHeight, getHeight, xmlelement, mode);
+        XMLPortParam(JumpPlatform, "width", setWidth, getWidth, xmlelement, mode);
+
+        XMLPortParam(JumpPlatform, "defScoreSound",  setDefScoreSound,  getDefScoreSound,  xmlelement, mode);
+        XMLPortParam(JumpPlatform, "defBatSound",  setDefBatSound,  getDefBatSound,  xmlelement, mode);
+        XMLPortParam(JumpPlatform, "defBoundarySound",  setDefBoundarySound,  getDefBoundarySound,  xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Is called every tick.
+        Handles the movement of the ball and its interaction with the boundaries and bats.
+    @param dt
+        The time since the last tick.
+    */
+    void JumpPlatform::tick(float dt)
+    {
+        SUPER(JumpPlatform, tick, dt);
+
+        Vector3 platformPosition = this->getPosition();
+
+        if (figure_ != NULL)
+        {
+            Vector3 figurePosition = figure_->getPosition();
+            Vector3 figureVelocity = figure_->getVelocity();
+
+            float tolerance = 3.0;
+
+            if(figureVelocity.z < 0 && figurePosition.x > platformPosition.x-width_/2 && figurePosition.x < platformPosition.x+width_/2 && figurePosition.z > platformPosition.z-height_/2*tolerance && figurePosition.z < platformPosition.z+height_/2)
+            {
+                touchFigure();
+            }
+        }
+    }
+
+    void JumpPlatform::setFigure(WeakPtr<JumpFigure> newFigure)
+    {
+        figure_ = newFigure;
+    }
+
+    void JumpPlatform::touchFigure()
+    {
+
+    }
+
+    void JumpPlatform::setDefScoreSound(const std::string &jumpSound)
+    {
+        if( defScoreSound_ )
+            defScoreSound_->setSource(jumpSound);
+        else
+            assert(0); // This should never happen, because soundpointer is only available on master
+    }
+
+    const std::string& JumpPlatform::getDefScoreSound()
+    {
+        if( defScoreSound_ )
+            return defScoreSound_->getSource();
+        else
+            assert(0);
+        return BLANKSTRING;
+    }
+
+    void JumpPlatform::setDefBatSound(const std::string &jumpSound)
+    {
+        if( defBatSound_ )
+            defBatSound_->setSource(jumpSound);
+        else
+            assert(0); // This should never happen, because soundpointer is only available on master
+    }
+
+    const std::string& JumpPlatform::getDefBatSound()
+    {
+        if( defBatSound_ )
+            return defBatSound_->getSource();
+        else
+            assert(0);
+        return BLANKSTRING;
+    }
+
+    void JumpPlatform::setDefBoundarySound(const std::string &jumpSound)
+    {
+        if( defBoundarySound_ )
+            defBoundarySound_->setSource(jumpSound);
+        else
+            assert(0); // This should never happen, because soundpointer is only available on master
+    }
+
+    const std::string& JumpPlatform::getDefBoundarySound()
+    {
+        if( defBoundarySound_ )
+            return defBoundarySound_->getSource();
+        else
+            assert(0);
+        return BLANKSTRING;
+    }
+}
Index: code/trunk/src/modules/jump/JumpPlatform.h
===================================================================
--- code/trunk/src/modules/jump/JumpPlatform.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatform.h	(revision 10216)
@@ -0,0 +1,80 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatform.h
+    @brief Declaration of the JumpPlatform class.
+    @ingroup Jump
+*/
+
+#ifndef _JumpPlatform_H__
+#define _JumpPlatform_H__
+
+#include "jump/JumpPrereqs.h"
+#include "util/Math.h"
+#include "worldentities/MovableEntity.h"
+
+namespace orxonox
+{
+    class _JumpExport JumpPlatform : public MovableEntity
+    {
+        public:
+            JumpPlatform(Context* context);
+            virtual ~JumpPlatform();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            void setFigure(WeakPtr<JumpFigure> bats); //!< Set the bats for the ball.
+            virtual void touchFigure();
+
+            void setDefScoreSound(const std::string& engineSound);
+            const std::string& getDefScoreSound();
+            void setDefBatSound(const std::string& engineSound);
+            const std::string& getDefBatSound();
+            void setDefBoundarySound(const std::string& engineSound);
+            const std::string& getDefBoundarySound();
+
+            void setWidth(const float width)
+                { this->width_ = width; }
+            float getWidth() const
+                { return width_; }
+            void setHeight(const float height)
+                { this->height_ = height; }
+            float getHeight() const
+                { return height_; }
+
+        protected:
+            float width_;
+            float height_;
+            WeakPtr<JumpFigure> figure_;
+            WorldSound* defScoreSound_;
+            WorldSound* defBatSound_;
+            WorldSound* defBoundarySound_;
+    };
+}
+
+#endif /* _JumpPlatform_H__ */
Index: code/trunk/src/modules/jump/JumpPlatformDisappear.cc
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformDisappear.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformDisappear.cc	(revision 10216)
@@ -0,0 +1,90 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatformDisappear.cc
+    @brief This platform disappears after contact with the figure.
+*/
+
+#include "JumpPlatformDisappear.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+
+#include "gametypes/Gametype.h"
+
+#include "JumpFigure.h"
+
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpPlatformDisappear);
+
+    JumpPlatformDisappear::JumpPlatformDisappear(Context* context) : JumpPlatform(context)
+    {
+        RegisterObject(JumpPlatformDisappear);
+
+        setProperties(true);
+    }
+
+    JumpPlatformDisappear::~JumpPlatformDisappear()
+    {
+
+    }
+
+    void JumpPlatformDisappear::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpPlatformDisappear, XMLPort, xmlelement, mode);
+    }
+
+    void JumpPlatformDisappear::tick(float dt)
+    {
+        SUPER(JumpPlatformDisappear, tick, dt);
+    }
+
+    void JumpPlatformDisappear::setProperties(bool active)
+    {
+        active_ = active;
+    }
+
+    bool JumpPlatformDisappear::isActive()
+    {
+        return active_;
+    }
+
+    void JumpPlatformDisappear::touchFigure()
+    {
+        if (isActive())
+        {
+            figure_->JumpFromPlatform(this);
+            active_ = false;
+        }
+    }
+}
Index: code/trunk/src/modules/jump/JumpPlatformDisappear.h
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformDisappear.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformDisappear.h	(revision 10216)
@@ -0,0 +1,60 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatformDisappear.h
+    @brief Declaration of the JumpPlatformDisappear class.
+    @ingroup Jump
+*/
+
+#ifndef _JumpPlatformDisappear_H__
+#define _JumpPlatformDisappear_H__
+
+#include "jump/JumpPrereqs.h"
+#include "util/Math.h"
+#include "worldentities/MovableEntity.h"
+
+namespace orxonox
+{
+    class _JumpExport JumpPlatformDisappear : public JumpPlatform
+    {
+        public:
+            JumpPlatformDisappear(Context* context);
+            virtual ~JumpPlatformDisappear();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void setProperties(bool active);
+            virtual bool isActive();
+            virtual void touchFigure();
+
+        protected:
+            bool active_;
+    };
+}
+
+#endif /* _JumpPlatformDisappear_H__ */
Index: code/trunk/src/modules/jump/JumpPlatformFake.cc
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformFake.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformFake.cc	(revision 10216)
@@ -0,0 +1,66 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatformFake.cc
+    @brief This platform has a hole in it. You cannot jump from this platform. It has no touchFigure function.
+*/
+
+#include "JumpPlatformFake.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "gametypes/Gametype.h"
+#include "JumpFigure.h"
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpPlatformFake);
+
+    JumpPlatformFake::JumpPlatformFake(Context* context) : JumpPlatform(context)
+    {
+        RegisterObject(JumpPlatformFake);
+    }
+
+    JumpPlatformFake::~JumpPlatformFake()
+    {
+
+    }
+
+    void JumpPlatformFake::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpPlatformFake, XMLPort, xmlelement, mode);
+    }
+
+    void JumpPlatformFake::tick(float dt)
+    {
+        SUPER(JumpPlatformFake, tick, dt);
+    }
+
+}
Index: code/trunk/src/modules/jump/JumpPlatformFake.h
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformFake.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformFake.h	(revision 10216)
@@ -0,0 +1,57 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatformFake.h
+    @brief Declaration of the JumpPlatform class.
+    @ingroup Jump
+*/
+
+#ifndef _JumpPlatformFake_H__
+#define _JumpPlatformFake_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "util/Math.h"
+
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _JumpExport JumpPlatformFake : public JumpPlatform
+    {
+        public:
+            JumpPlatformFake(Context* context);
+            virtual ~JumpPlatformFake();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+    };
+}
+
+#endif /* _JumpPlatformFake_H__ */
Index: code/trunk/src/modules/jump/JumpPlatformHMove.cc
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformHMove.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformHMove.cc	(revision 10216)
@@ -0,0 +1,99 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatformHMove.cc
+    @brief This platform can move horizontally.
+*/
+
+#include "JumpPlatformHMove.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "gametypes/Gametype.h"
+#include "JumpFigure.h"
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpPlatformHMove);
+
+    JumpPlatformHMove::JumpPlatformHMove(Context* context) : JumpPlatform(context)
+    {
+        RegisterObject(JumpPlatformHMove);
+
+        setProperties(-100,100,5);
+    }
+
+    JumpPlatformHMove::~JumpPlatformHMove()
+    {
+
+    }
+
+    void JumpPlatformHMove::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpPlatformHMove, XMLPort, xmlelement, mode);
+    }
+
+    void JumpPlatformHMove::tick(float dt)
+    {
+        SUPER(JumpPlatformHMove, tick, dt);
+
+        // Get the current position, velocity and acceleration of the ball.
+        Vector3 position = getPosition();
+        Vector3 velocity = getVelocity();
+
+        if ((position.x < leftBoundary_ && velocity.x < 0) || (position.x > rightBoundary_ && velocity.x > 0))
+
+        {
+            velocity.x = -velocity.x;
+        }
+
+        // Set the position, velocity and acceleration of the ball, if they have changed.
+        if (velocity != getVelocity())
+        {
+            setVelocity(velocity);
+        }
+        if (position != this->getPosition())
+        {
+            setPosition(position);
+        }
+    }
+
+    void JumpPlatformHMove::setProperties(float leftBoundary, float rightBoundary, float speed)
+    {
+        leftBoundary_ = leftBoundary;
+        rightBoundary_ = rightBoundary;
+        setVelocity(Vector3(speed,0,0));
+    }
+
+    void JumpPlatformHMove::touchFigure()
+    {
+        figure_->JumpFromPlatform(this);
+    }
+}
Index: code/trunk/src/modules/jump/JumpPlatformHMove.h
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformHMove.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformHMove.h	(revision 10216)
@@ -0,0 +1,58 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpPlatformHMove_H__
+#define _JumpPlatformHMove_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "util/Math.h"
+
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+
+    class _JumpExport JumpPlatformHMove : public JumpPlatform
+    {
+        public:
+            JumpPlatformHMove(Context* context);
+            virtual ~JumpPlatformHMove();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void setProperties(float leftBoundary, float rightBoundary, float speed);
+            virtual void touchFigure();
+
+        protected:
+            float leftBoundary_;
+            float rightBoundary_;
+    };
+}
+
+#endif /* _JumpPlatform_H__ */
Index: code/trunk/src/modules/jump/JumpPlatformStatic.cc
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformStatic.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformStatic.cc	(revision 10216)
@@ -0,0 +1,72 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatformStatic.cc
+    @brief This is the most simple platform in this minigame.
+*/
+
+#include "JumpPlatformStatic.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "gametypes/Gametype.h"
+#include "JumpFigure.h"
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpPlatformStatic);
+
+    JumpPlatformStatic::JumpPlatformStatic(Context* context) : JumpPlatform(context)
+    {
+        RegisterObject(JumpPlatformStatic);
+
+    }
+
+    JumpPlatformStatic::~JumpPlatformStatic()
+    {
+
+    }
+
+    //xml port for loading sounds
+    void JumpPlatformStatic::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpPlatformStatic, XMLPort, xmlelement, mode);
+    }
+
+    void JumpPlatformStatic::tick(float dt)
+    {
+        SUPER(JumpPlatformStatic, tick, dt);
+    }
+
+    void JumpPlatformStatic::touchFigure()
+    {
+        figure_->JumpFromPlatform(this);
+    }
+}
Index: code/trunk/src/modules/jump/JumpPlatformStatic.h
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformStatic.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformStatic.h	(revision 10216)
@@ -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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpPlatformStatic_H__
+#define _JumpPlatformStatic_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "util/Math.h"
+
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _JumpExport JumpPlatformStatic : public JumpPlatform
+    {
+        public:
+            JumpPlatformStatic(Context* context);
+            virtual ~JumpPlatformStatic();
+
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void touchFigure();
+    };
+}
+
+#endif /* _JumpPlatform_H__ */
Index: code/trunk/src/modules/jump/JumpPlatformTimer.cc
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformTimer.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformTimer.cc	(revision 10216)
@@ -0,0 +1,104 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatformTimer.cc
+    @brief This platform will explode if you wait for too long time.
+*/
+
+#include "JumpPlatformTimer.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "gametypes/Gametype.h"
+#include "JumpFigure.h"
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpPlatformTimer);
+
+    JumpPlatformTimer::JumpPlatformTimer(Context* context) : JumpPlatform(context)
+    {
+        RegisterObject(JumpPlatformTimer);
+
+        particleSpawner_ = NULL;
+
+        setProperties(3.0);
+
+    }
+
+    JumpPlatformTimer::~JumpPlatformTimer()
+    {
+
+    }
+
+    void JumpPlatformTimer::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpPlatformTimer, XMLPort, xmlelement, mode);
+
+        XMLPortParam(JumpPlatformTimer, "effectPath", setEffectPath, getEffectPath, xmlelement, mode);
+        XMLPortParam(JumpPlatformTimer, "effectStartTime", setEffectStartTime, getEffectStartTime, xmlelement, mode);
+    }
+
+    void JumpPlatformTimer::tick(float dt)
+    {
+        SUPER(JumpPlatformTimer, tick, dt);
+
+        time_ -= dt;
+        if (time_ < effectStartTime_ && particleSpawner_ == NULL)
+        {
+
+            particleSpawner_ = new ParticleSpawner(getContext());
+            particleSpawner_->setSource(effectPath_);
+            particleSpawner_->setLoop(false);
+            particleSpawner_->setLOD(LODParticle::Low);
+            particleSpawner_->setLifetime(effectStartTime_);
+
+            attach(particleSpawner_);
+        }
+    }
+
+    void JumpPlatformTimer::setProperties(float time)
+    {
+        time_ = time;
+    }
+
+    bool JumpPlatformTimer::isActive(void)
+    {
+        return time_ > 0.0;
+    }
+
+    void JumpPlatformTimer::touchFigure()
+    {
+        if (isActive())
+        {
+            figure_->JumpFromPlatform(this);
+        }
+    }
+}
Index: code/trunk/src/modules/jump/JumpPlatformTimer.h
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformTimer.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformTimer.h	(revision 10216)
@@ -0,0 +1,79 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatformTimer.h
+    @brief Declaration of the JumpPlatformTimer class.
+    @ingroup Jump
+*/
+
+#ifndef _JumpPlatformTimer_H__
+#define _JumpPlatformTimer_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "util/Math.h"
+
+#include "worldentities/MovableEntity.h"
+#include "graphics/ParticleSpawner.h"
+
+
+namespace orxonox
+{
+    class _JumpExport JumpPlatformTimer : public JumpPlatform
+    {
+        public:
+            JumpPlatformTimer(Context* context);
+            virtual ~JumpPlatformTimer();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void setProperties(float time);
+            virtual bool isActive(void);
+            virtual void touchFigure();
+
+            void setEffectPath(const std::string& effectPath)
+                { this->effectPath_ = effectPath; }
+
+            const std::string& getEffectPath() const
+                { return this->effectPath_; }
+
+            void setEffectStartTime(const float effectStartTime)
+                { this->effectStartTime_ = effectStartTime; }
+
+            const float getEffectStartTime() const
+                { return this->effectStartTime_; }
+
+        protected:
+            float time_;
+            ParticleSpawner* particleSpawner_;
+            std::string effectPath_;
+            float effectStartTime_;
+    };
+}
+
+#endif /* _JumpPlatformTimer_H__ */
Index: code/trunk/src/modules/jump/JumpPlatformVMove.cc
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformVMove.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformVMove.cc	(revision 10216)
@@ -0,0 +1,100 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPlatformVMove.cc
+    @brief This platform can move vertically.
+*/
+
+#include "JumpPlatformVMove.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "gametypes/Gametype.h"
+#include "JumpFigure.h"
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpPlatformVMove);
+
+    JumpPlatformVMove::JumpPlatformVMove(Context* context) : JumpPlatform(context)
+    {
+        RegisterObject(JumpPlatformVMove);
+
+        setProperties(0,80,10);
+    }
+
+    JumpPlatformVMove::~JumpPlatformVMove()
+    {
+
+    }
+
+    void JumpPlatformVMove::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpPlatformVMove, XMLPort, xmlelement, mode);
+    }
+
+    void JumpPlatformVMove::tick(float dt)
+    {
+        SUPER(JumpPlatformVMove, tick, dt);
+
+        // Get the current position, velocity and acceleration of the ball.
+        Vector3 position = getPosition();
+        Vector3 velocity = getVelocity();
+
+        if ((position.z < lowerBoundary_ && velocity.z < 0) || (position.z > upperBoundary_ && velocity.z > 0))
+        {
+            velocity.z = -velocity.z;
+        }
+
+        // Set the position, velocity and acceleration of the ball, if they have changed.
+        if (velocity != getVelocity())
+        {
+            setVelocity(velocity);
+        }
+        if (position != getPosition())
+        {
+            setPosition(position);
+        }
+    }
+
+    void JumpPlatformVMove::setProperties(float lowerBoundary, float upperBoundary, float speed)
+    {
+        lowerBoundary_ = lowerBoundary;
+        upperBoundary_ = upperBoundary;
+
+        setVelocity(Vector3(0,0,speed));
+
+    }
+
+    void JumpPlatformVMove::touchFigure()
+    {
+        figure_->JumpFromPlatform(this);
+    }
+}
Index: code/trunk/src/modules/jump/JumpPlatformVMove.h
===================================================================
--- code/trunk/src/modules/jump/JumpPlatformVMove.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPlatformVMove.h	(revision 10216)
@@ -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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpPlatformVMove_H__
+#define _JumpPlatformVMove_H__
+
+#include "jump/JumpPrereqs.h"
+#include "util/Math.h"
+#include "worldentities/MovableEntity.h"
+
+namespace orxonox
+{
+    class _JumpExport JumpPlatformVMove : public JumpPlatform
+    {
+        public:
+            JumpPlatformVMove(Context* context);
+            virtual ~JumpPlatformVMove();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void setProperties(float leftBoundary, float rightBoundary, float speed);
+            virtual void touchFigure();
+
+        protected:
+            float lowerBoundary_;
+            float upperBoundary_;
+    };
+}
+
+#endif /* _JumpPlatform_H__ */
Index: code/trunk/src/modules/jump/JumpPrereqs.h
===================================================================
--- code/trunk/src/modules/jump/JumpPrereqs.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPrereqs.h	(revision 10216)
@@ -0,0 +1,91 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the jump module
+*/
+
+#ifndef _JumpPrereqs_H__
+#define _JumpPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(PONG_STATIC_BUILD)
+#  ifdef PONG_SHARED_BUILD
+#    define _JumpExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _JumpExport
+#    else
+#      define _JumpExport __declspec(dllimport)
+#    endif
+#  endif
+#  define _JumpPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+#  define _JumpExport  __attribute__ ((visibility("default")))
+#  define _JumpPrivate __attribute__ ((visibility("hidden")))
+#else
+#  define _JumpExport
+#  define _JumpPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class Jump;
+    class JumpPlatform;
+    class JumpPlatformStatic;
+    class JumpPlatformHMove;
+    class JumpPlatformVMove;
+    class JumpPlatformDisappear;
+    class JumpPlatformTimer;
+    class JumpPlatformFake;
+    class JumpProjectile;
+    class JumpEnemy;
+    class JumpItem;
+    class JumpSpring;
+    class JumpRocket;
+    class JumpPropeller;
+    class JumpBoots;
+    class JumpShield;
+    class JumpFigure;
+    class JumpCenterpoint;
+    class JumpScore;
+}
+
+#endif /* _JumpPrereqs_H__ */
Index: code/trunk/src/modules/jump/JumpProjectile.cc
===================================================================
--- code/trunk/src/modules/jump/JumpProjectile.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpProjectile.cc	(revision 10216)
@@ -0,0 +1,90 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpProjectile.cc
+    @brief projectiles are created by the gametype if the figure shoots. All projectiles check every tick, whether they hit an enemy.
+*/
+
+#include "JumpProjectile.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+#include "JumpFigure.h"
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpProjectile);
+
+    JumpProjectile::JumpProjectile(Context* context) : MovableEntity(context)
+    {
+        RegisterObject(JumpProjectile);
+
+        figure_ = 0;
+        setPosition(Vector3(0,0,0));
+        setVelocity(Vector3(0,0,250.0));
+        setAcceleration(Vector3(0,0,0));
+    }
+
+    JumpProjectile::~JumpProjectile()
+    {
+
+    }
+
+    void JumpProjectile::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpProjectile, XMLPort, xmlelement, mode);
+    }
+
+    void JumpProjectile::tick(float dt)
+    {
+        SUPER(JumpProjectile, tick, dt);
+
+        Vector3 projectilePosition = getPosition();
+
+        for (ObjectList<JumpEnemy>::iterator it = ObjectList<JumpEnemy>::begin(); it != ObjectList<JumpEnemy>::end(); ++it)
+        {
+            Vector3 enemyPosition = it->getPosition();
+            float enemyWidth = it->getWidth();
+            float enemyHeight = it->getHeight();
+
+            if(projectilePosition.x > enemyPosition.x-enemyWidth && projectilePosition.x < enemyPosition.x+enemyWidth && projectilePosition.z > enemyPosition.z-enemyHeight && projectilePosition.z < enemyPosition.z+enemyHeight)
+            {
+                it->dead_ = true;
+            }
+        }
+    }
+
+    void JumpProjectile::setFigure(WeakPtr<JumpFigure> figure)
+    {
+        figure_ = figure;
+    }
+}
Index: code/trunk/src/modules/jump/JumpProjectile.h
===================================================================
--- code/trunk/src/modules/jump/JumpProjectile.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpProjectile.h	(revision 10216)
@@ -0,0 +1,67 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpProjectile_H__
+#define _JumpProjectile_H__
+
+#include "jump/JumpPrereqs.h"
+#include "util/Math.h"
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _JumpExport JumpProjectile : public MovableEntity
+    {
+        public:
+            JumpProjectile(Context* context);
+            virtual ~JumpProjectile();
+
+            virtual void tick(float dt);
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void setFieldDimension(float width, float height)
+                { this->fieldWidth_ = width; this->fieldHeight_ = height; }
+
+            void setFieldDimension(const Vector2& dimension)
+                { this->setFieldDimension(dimension.x, dimension.y); }
+
+            Vector2 getFieldDimension() const
+                { return Vector2(this->fieldWidth_, this->fieldHeight_); }
+
+            void setFigure(WeakPtr<JumpFigure> figure);
+
+        protected:
+            float fieldWidth_;
+            float fieldHeight_;
+            WeakPtr<JumpFigure> figure_;
+    };
+}
+
+#endif /* _JumpProjectile_H__ */
Index: code/trunk/src/modules/jump/JumpPropeller.cc
===================================================================
--- code/trunk/src/modules/jump/JumpPropeller.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPropeller.cc	(revision 10216)
@@ -0,0 +1,108 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpPropeller.cc
+    @brief If this propeller is created, attachedToFigure_ is set to false. When the figure picks it up, the variable is set to true and the figure starts flying until the fuel is reduced to zero.
+*/
+
+#include "JumpPropeller.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+
+#include "JumpFigure.h"
+
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpPropeller);
+
+    JumpPropeller::JumpPropeller(Context* context) : JumpItem(context)
+    {
+        RegisterObject(JumpPropeller);
+
+        fuel_ = 3.0;
+        attachedToFigure_ = false;
+
+        setPosition(Vector3(0,0,0));
+        setVelocity(Vector3(0,0,0));
+        setAcceleration(Vector3(0,0,0));
+        setProperties(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+    }
+
+    JumpPropeller::~JumpPropeller()
+    {
+
+    }
+
+    void JumpPropeller::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpPropeller, XMLPort, xmlelement, mode);
+    }
+
+    void JumpPropeller::tick(float dt)
+    {
+        SUPER(JumpPropeller, tick, dt);
+
+        Vector3 PropellerPosition = getWorldPosition();
+
+        if (attachedToFigure_ == false && figure_ != NULL)
+        {
+            Vector3 figurePosition = figure_->getWorldPosition();
+
+            if(figurePosition.x > PropellerPosition.x-width_ && figurePosition.x < PropellerPosition.x+width_ && figurePosition.z > PropellerPosition.z-height_ && figurePosition.z < PropellerPosition.z+height_)
+            {
+                touchFigure();
+            }
+        }
+        else if (attachedToFigure_ == true)
+        {
+            fuel_ -= dt;
+            if (fuel_ < 0.0)
+            {
+                figure_->StopPropeller(this);
+            }
+        }
+    }
+
+    void JumpPropeller::touchFigure()
+    {
+        JumpItem::touchFigure();
+
+        attachedToFigure_ = figure_->StartPropeller(this);
+        if (attachedToFigure_)
+        {
+            setAngularVelocity(Vector3(0,0,10.0));
+        }
+    }
+}
Index: code/trunk/src/modules/jump/JumpPropeller.h
===================================================================
--- code/trunk/src/modules/jump/JumpPropeller.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpPropeller.h	(revision 10216)
@@ -0,0 +1,55 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpPropeller_H__
+#define _JumpPropeller_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "util/Math.h"
+
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _JumpExport JumpPropeller : public JumpItem
+    {
+        public:
+            JumpPropeller(Context* context);
+            virtual ~JumpPropeller();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void touchFigure();
+        protected:
+            float stretch_;
+            float fuel_;
+    };
+}
+
+#endif /* _JumpPropeller_H__ */
Index: code/trunk/src/modules/jump/JumpRocket.cc
===================================================================
--- code/trunk/src/modules/jump/JumpRocket.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpRocket.cc	(revision 10216)
@@ -0,0 +1,101 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpRocket.cc
+    @brief If this rocket is created, attachedToFigure_ is set to false. When the figure picks it up, the variable is set to true and the figure starts flying fast until the fuel is reduced to zero.
+*/
+
+#include "JumpRocket.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+#include "JumpFigure.h"
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpRocket);
+
+    JumpRocket::JumpRocket(Context* context) : JumpItem(context)
+    {
+        RegisterObject(JumpRocket);
+
+        fuel_ = 3.0;
+        attachedToFigure_ = false;
+
+        setPosition(Vector3(0,0,0));
+        setVelocity(Vector3(0,0,0));
+        setAcceleration(Vector3(0,0,0));
+        setProperties(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+    }
+
+    JumpRocket::~JumpRocket()
+    {
+
+    }
+
+    void JumpRocket::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpRocket, XMLPort, xmlelement, mode);
+    }
+
+    void JumpRocket::tick(float dt)
+    {
+        SUPER(JumpRocket, tick, dt);
+
+        Vector3 rocketPosition = getWorldPosition();
+
+        if (attachedToFigure_ == false && figure_ != NULL)
+        {
+            Vector3 figurePosition = figure_->getWorldPosition();
+
+            if(figurePosition.x > rocketPosition.x-width_ && figurePosition.x < rocketPosition.x+width_ && figurePosition.z > rocketPosition.z-height_ && figurePosition.z < rocketPosition.z+height_)
+            {
+                touchFigure();
+            }
+        }
+        else if (attachedToFigure_ == true)
+        {
+            fuel_ -= dt;
+            if (fuel_ < 0.0)
+            {
+                figure_->StopRocket(this);
+            }
+        }
+    }
+
+    void JumpRocket::touchFigure()
+    {
+        JumpItem::touchFigure();
+
+        attachedToFigure_ = figure_->StartRocket(this);
+    }
+}
Index: code/trunk/src/modules/jump/JumpRocket.h
===================================================================
--- code/trunk/src/modules/jump/JumpRocket.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpRocket.h	(revision 10216)
@@ -0,0 +1,52 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpRocket_H__
+#define _JumpRocket_H__
+
+#include "jump/JumpPrereqs.h"
+#include "util/Math.h"
+#include "worldentities/MovableEntity.h"
+
+namespace orxonox
+{
+    class _JumpExport JumpRocket : public JumpItem
+    {
+        public:
+            JumpRocket(Context* context);
+            virtual ~JumpRocket();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void touchFigure();
+        protected:
+            float stretch_;
+            float fuel_;
+    };
+}
+
+#endif /* _JumpRocket_H__ */
Index: code/trunk/src/modules/jump/JumpScore.cc
===================================================================
--- code/trunk/src/modules/jump/JumpScore.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpScore.cc	(revision 10216)
@@ -0,0 +1,111 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpScore.cc
+    @brief HUD of thejump minigame. If showScore_ is set, it displays the score. If showMessages_ is set, it displays the game over message.
+*/
+
+#include "JumpScore.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "infos/PlayerInfo.h"
+#include "Jump.h"
+#include "sound/WorldSound.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpScore);
+
+    JumpScore::JumpScore(Context* context) : OverlayText(context)
+    {
+        RegisterObject(JumpScore);
+
+        owner_ = NULL;
+        showScore_ = false;
+        showMessages_ = false;
+    }
+
+    JumpScore::~JumpScore()
+    {
+
+    }
+
+    void JumpScore::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpScore, XMLPort, xmlelement, mode);
+
+        XMLPortParam(JumpScore, "showScore", setShowScore, getShowScore, xmlelement, mode);
+        XMLPortParam(JumpScore, "showMessages", setShowMessages, getShowMessages, xmlelement, mode);
+        XMLPortParam(JumpScore, "gameOverText", setGameOverText, getGameOverText, xmlelement, mode);
+    }
+
+    void JumpScore::tick(float dt)
+    {
+        SUPER(JumpScore, tick, dt);
+
+        if (owner_ != NULL)
+        {
+            if (!owner_->hasEnded())
+            {
+                player_ = owner_->getPlayer();
+
+                if (player_ != NULL)
+                {
+                    if (showScore_ == true)
+                    {
+                        int score = owner_->getScore(player_);
+
+                        std::string str = multi_cast<std::string>(score);
+                        setCaption(str);
+                    }
+                    else if (showMessages_ == true)
+                    {
+
+                        setCaption(owner_->getDead(player_) == true ? gameOverText_ : "");
+                    }
+                }
+            }
+        }
+    }
+
+    void JumpScore::changedOwner()
+    {
+        SUPER(JumpScore, changedOwner);
+
+        if (this->getOwner() != NULL && this->getOwner()->getGametype())
+        {
+            this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype().get());
+        }
+        else
+        {
+            this->owner_ = NULL;
+        }
+    }
+}
Index: code/trunk/src/modules/jump/JumpScore.h
===================================================================
--- code/trunk/src/modules/jump/JumpScore.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpScore.h	(revision 10216)
@@ -0,0 +1,77 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpScore_H__
+#define _JumpScore_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _JumpExport JumpScore : public OverlayText, public Tickable
+    {
+        public:
+            JumpScore(Context* context);
+            virtual ~JumpScore();
+
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void changedOwner();
+
+            void setShowScore(const bool showScore)
+                { showScore_ = showScore; }
+
+            const bool getShowScore() const
+                { return showScore_; }
+
+            void setShowMessages(const bool showMessages)
+                { showMessages_ = showMessages; }
+
+            const bool getShowMessages() const
+                { return showMessages_; }
+
+            void setGameOverText(const std::string& gameOverText)
+                { this->gameOverText_ = gameOverText; }
+
+            const std::string& getGameOverText() const
+                { return this->gameOverText_; }
+
+        private:
+            Jump* owner_;
+            WeakPtr<PlayerInfo> player_;
+            WorldSound* scoreSound_;
+            bool showScore_;
+            bool showMessages_;
+            std::string gameOverText_;
+    };
+}
+#endif /* _JumpScore_H__ */
Index: code/trunk/src/modules/jump/JumpShield.cc
===================================================================
--- code/trunk/src/modules/jump/JumpShield.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpShield.cc	(revision 10216)
@@ -0,0 +1,104 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpShield.cc
+    @brief If this shield is created, attachedToFigure_ is set to false. When the figure picks it up, the variable is set to true and the figure is protected until the fuel is reduced to zero.
+*/
+
+#include "JumpShield.h"
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+
+#include "JumpFigure.h"
+
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpShield);
+
+    JumpShield::JumpShield(Context* context) : JumpItem(context)
+    {
+        RegisterObject(JumpShield);
+
+        fuel_ = 7.0;
+        attachedToFigure_ = false;
+
+        setPosition(Vector3(0,0,0));
+        setVelocity(Vector3(0,0,0));
+        setAcceleration(Vector3(0,0,0));
+        setProperties(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+    }
+
+    JumpShield::~JumpShield()
+    {
+
+    }
+
+    void JumpShield::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpShield, XMLPort, xmlelement, mode);
+    }
+
+    void JumpShield::tick(float dt)
+    {
+        SUPER(JumpShield, tick, dt);
+
+        Vector3 shieldPosition = getWorldPosition();
+
+        if (attachedToFigure_ == false && figure_ != NULL)
+        {
+            Vector3 figurePosition = figure_->getWorldPosition();
+
+            if(figurePosition.x > shieldPosition.x-width_ && figurePosition.x < shieldPosition.x+width_ && figurePosition.z > shieldPosition.z-height_ && figurePosition.z < shieldPosition.z+height_)
+            {
+                touchFigure();
+            }
+        }
+        else if (attachedToFigure_ == true)
+        {
+            fuel_ -= dt;
+            if (fuel_ < 0.0)
+            {
+                figure_->StopShield(this);
+            }
+        }
+    }
+
+    void JumpShield::touchFigure()
+    {
+        JumpItem::touchFigure();
+
+        attachedToFigure_ = figure_->StartShield(this);
+    }
+}
Index: code/trunk/src/modules/jump/JumpShield.h
===================================================================
--- code/trunk/src/modules/jump/JumpShield.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpShield.h	(revision 10216)
@@ -0,0 +1,55 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpShield_H__
+#define _JumpShield_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "util/Math.h"
+
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _JumpExport JumpShield : public JumpItem
+    {
+        public:
+            JumpShield(Context* context);
+            virtual ~JumpShield();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void touchFigure();
+        protected:
+            float stretch_;
+            float fuel_;
+    };
+}
+
+#endif /* _JumpShield_H__ */
Index: code/trunk/src/modules/jump/JumpSpring.cc
===================================================================
--- code/trunk/src/modules/jump/JumpSpring.cc	(revision 10216)
+++ code/trunk/src/modules/jump/JumpSpring.cc	(revision 10216)
@@ -0,0 +1,110 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file JumpSpring.cc
+    @brief If this spring is touched by the figure, it jumps higher then from a platform.
+*/
+
+#include "JumpSpring.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "graphics/Model.h"
+#include "gametypes/Gametype.h"
+#include "JumpFigure.h"
+#include "sound/WorldSound.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(JumpSpring);
+
+    JumpSpring::JumpSpring(Context* context) : JumpItem(context)
+    {
+        RegisterObject(JumpSpring);
+
+        stretch_ = 1.0;
+
+        setPosition(Vector3(0,0,0));
+        setVelocity(Vector3(0,0,0));
+        setAcceleration(Vector3(0,0,0));
+
+        setProperties(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+    }
+
+    JumpSpring::~JumpSpring()
+    {
+
+    }
+
+    void JumpSpring::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(JumpSpring, XMLPort, xmlelement, mode);
+    }
+
+    void JumpSpring::tick(float dt)
+    {
+        SUPER(JumpSpring, tick, dt);
+
+        if (stretch_ > 1.0)
+        {
+            stretch_ -= dt;
+            setScale3D(1.0, 1.0, stretch_);
+        }
+
+        Vector3 springPosition = getWorldPosition();
+
+        if (figure_ != NULL)
+        {
+            Vector3 figurePosition = figure_->getWorldPosition();
+            Vector3 figureVelocity = figure_->getVelocity();
+
+            if(figureVelocity.z < 0 && figurePosition.x > springPosition.x-width_ && figurePosition.x < springPosition.x+width_ && figurePosition.z > springPosition.z-height_ && figurePosition.z < springPosition.z+height_)
+            {
+                touchFigure();
+            }
+        }
+    }
+
+    void JumpSpring::touchFigure()
+    {
+        JumpItem::touchFigure();
+
+        stretch_ = 3.0;
+
+        accelerateFigure();
+    }
+
+    void JumpSpring::accelerateFigure()
+    {
+        if (figure_ != 0)
+        {
+            figure_->JumpFromSpring(this);
+        }
+    }
+}
Index: code/trunk/src/modules/jump/JumpSpring.h
===================================================================
--- code/trunk/src/modules/jump/JumpSpring.h	(revision 10216)
+++ code/trunk/src/modules/jump/JumpSpring.h	(revision 10216)
@@ -0,0 +1,55 @@
+/*
+ *   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:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _JumpSpring_H__
+#define _JumpSpring_H__
+
+#include "jump/JumpPrereqs.h"
+
+#include "util/Math.h"
+
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _JumpExport JumpSpring : public JumpItem
+    {
+        public:
+            JumpSpring(Context* context);
+            virtual ~JumpSpring();
+            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void accelerateFigure();
+            virtual void touchFigure();
+        protected:
+            float stretch_;
+    };
+}
+
+#endif /* _JumpSpring_H__ */
Index: code/trunk/src/modules/objects/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/objects/CMakeLists.txt	(revision 10215)
+++ code/trunk/src/modules/objects/CMakeLists.txt	(revision 10216)
@@ -11,4 +11,5 @@
 ADD_SUBDIRECTORY(eventsystem)
 ADD_SUBDIRECTORY(triggers)
+ADD_SUBDIRECTORY(controllers)
 
 ORXONOX_ADD_LIBRARY(objects
Index: code/trunk/src/modules/objects/Turret.cc
===================================================================
--- code/trunk/src/modules/objects/Turret.cc	(revision 10215)
+++ code/trunk/src/modules/objects/Turret.cc	(revision 10216)
@@ -21,5 +21,5 @@
  *
  *   Author:
- *      Marian Runo
+ *      Marian Runo, Martin Mueller
  *   Co-authors:
  *      ...
@@ -29,7 +29,8 @@
 #include "Turret.h"
 #include "core/CoreIncludes.h"
-#include "OgreQuaternion.h"
 #include "core/XMLPort.h"
-#include "controllers/WaypointPatrolController.h"
+#include "Scene.h"
+#include <OgreSceneManager.h>
+
 
 namespace orxonox
@@ -37,49 +38,247 @@
     RegisterClass(Turret);
 
-    /**
-     * @brief Constructor
+
+
+    /**
+        @brief 
+        Sets default values for all variables. Also hides the turret from the radar.
+
+        @param context
+        The context
      */
-    Turret::Turret(Context* context) : SpaceShip(context)
+    Turret::Turret(Context* context) : Pawn(context)
     {
         RegisterObject(Turret);
-        this->controller_ = new WaypointPatrolController(this->getContext());
-    }
-
-    /**
-     * @brief Destructor
+        this->rotationThrust_ = 50;
+        this->startDir_ = Vector3::ZERO;
+        this->localZ_ = Vector3::UNIT_Z;
+        this->localY_ = Vector3::UNIT_Y;
+        this->localX_ = Vector3::UNIT_X;
+        this->maxAttackRadius_ = 200;
+        this->minAttackRadius_ = 0;
+        this->maxPitch_ = 90;
+        this->maxYaw_ = 90;
+        this->once_ = false;
+        this->rotation_ = Quaternion::IDENTITY;
+
+        this->setRadarVisibility(false);
+
+        //this->rayTest_ = this->getScene()->getSceneManager()->createRayQuery(Ogre::Ray());
+    }
+
+    /**
+        @brief 
+        Destructor. Destroys the rayTest_ element (if it was used)  .
      */
     Turret::~Turret()
     {
-
-    }
-
-
+        //this->getScene()->getSceneManager()->destroyQuery(this->rayTest_);
+    }
+
+    /**
+        @brief
+        Checks, if a WorldEntity is inside the turret's range.
+
+        This function is safe to use on turrets that are attached, rotated, etc.
+        The turret's range is determined with the maxPitch, maxYaw, and the two attackRadius.
+
+        @param target
+        The WorldEntity to check
+
+        @return
+        The squared distance to the position. -1, if it's ouside of range
+    */
+    float Turret::isInRange(const WorldEntity* target )
+    {
+        //Check distance
+        Vector3 distance = target->getWorldPosition() - this->getWorldPosition();
+        float distanceVal = distance.squaredLength();
+        if(distanceVal > (this->maxAttackRadius_ * this->maxAttackRadius_) || distanceVal < (this->minAttackRadius_ * this->minAttackRadius_))
+        {
+            return -1.f;
+        }
+
+        //Check pitch
+        Vector3 dir = getTransformedVector(distance, this->localX_, this->localY_, this->localZ_);
+        Vector3 dirProjected = dir;
+        dirProjected.x = 0;
+        Vector3 startDirProjected = this->startDir_;
+        startDirProjected.x = 0;
+        Ogre::Real angle = startDirProjected.angleBetween(dirProjected).valueDegrees();
+        if(angle > this->maxPitch_)
+        {
+            return -1.f;
+        }
+
+        //Check yaw
+        dirProjected = dir;
+        dirProjected.y = 0;
+        startDirProjected = this->startDir_;
+        startDirProjected.y = 0;
+        angle = startDirProjected.angleBetween(dirProjected).valueDegrees();
+        if(angle > this->maxYaw_)
+        {
+            return -1.f;
+        }
+
+        //TODO: Finish this. Find a way to convert objects from Ogre to Orxonox
+        /*Ogre::Ray ray = Ogre::Ray(this->getWorldPosition(), distance);
+        this->rayTest_->setRay(ray);
+        Ogre::RaySceneQueryResult result = this->rayTest_->execute();*/
+
+
+        return distanceVal;
+    }
+
+    /**
+        @brief
+        Rotates the turret to make it aim at a certain position.
+
+        @note
+        There are no checks, if the position is valid (i.e. if the turret is allowed to aim there).
+        This function must be called again for every tick, or the turret will stop rotating.
+
+        @param position
+        The position to aim at
+    */
+    void Turret::aimAtPosition(const Vector3& position)
+    {
+        Vector3 currDir = this->getWorldOrientation() * WorldEntity::FRONT;
+        Vector3 targetDir = position - this->getWorldPosition();
+
+        this->rotation_ = currDir.getRotationTo(targetDir);
+    }
+
+    /**
+        @brief
+        Does currently nothing.
+
+        Should rotate the turret with the specified pitch. Contains a failed attempt at limiting said rotation.
+    */
     void Turret::rotatePitch(const Vector2& value)
-    {
-        orxout()<< "Turret rotate Pitch"<< endl;
-
-        const Quaternion& orient = this->getOrientation();
-        Radian pitch = orient.getPitch();
-
-        if((value.x > 0 && pitch < Radian(180)) || (value.x < 0 && pitch > Radian(0)))
-            SpaceShip::rotatePitch(value);
-    }
-
-
-    void Turret::setAlertnessRadius(float value)
-    {
-        this->controller_->setAlertnessRadius(value);
-    }
-    float Turret::getAlertnessRadius()
-    {
-        return this->controller_->getAlertnessRadius();
-    }
-
+    {    
+        //This is a failed attempt at limiting the turret's rotation. It's handled in the controller (for now?)
+        /*
+        Vector3 currentDir = getTransformedVector(this->getOrientation() * WorldEntity::FRONT, this->localX_, this->localY_, this->localZ_);
+        Vector3 currentDirProjected = currentDir;
+        currentDirProjected.x = 0;
+        Vector3 startDirProjected = this->startDir_;
+        startDirProjected.x = 0;     
+        Ogre::Real angle = startDirProjected.angleBetween(currentDirProjected).valueDegrees();
+        //orxout() << "Pitch: " << angle << endl;   
+        //if(angle < this->maxPitch_ || (currentDirProjected.y <= 0 && value.x > 0) || (currentDirProjected.y > 0 && value.x < 0) )
+        {
+            this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x*0.8f);
+        }
+        */
+    }
+
+    /**
+        @brief
+        Does currently nothing.
+
+        Should rotate the turret with the specified yaw. Contains a failed attempt at limiting said rotation.
+    */
+    void Turret::rotateYaw(const Vector2& value)
+    {
+        //This is a failed attempt at limiting the turret's rotation. It's handled in the controller (for now?)
+        /*
+        Vector3 currentDir = getTransformedVector(this->getOrientation() * WorldEntity::FRONT, this->localX_, this->localY_, this->localZ_);
+        Vector3 currentDirProjected = currentDir;
+        currentDirProjected.y = 0;
+        Vector3 startDirProjected = this->startDir_;
+        startDirProjected.y = 0;
+        Ogre::Real angle = startDirProjected.angleBetween(currentDirProjected).valueDegrees();
+        orxout() << "Yaw: " << angle << endl;
+        if(angle < this->maxYaw_ || (currentDirProjected.x <= 0 && value.x < 0) || (currentDirProjected.x > 0 && value.x > 0))
+        {
+            this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() + value.x*0.8f);
+        }
+        */
+    }
+
+    /**
+        @brief
+        Does currently nothing.
+
+        May be used to limit turret's rotation in the future.
+    */
+    void Turret::rotateRoll(const Vector2& value)
+    {
+    }
+
+    /**
+        @brief
+        Loads parameters from xml
+
+        Parameters loaded are: rotationThrust, maxAttackRadius, minAttackRadius, maxYaw, maxPitch
+    */
     void Turret::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
         SUPER(Turret, XMLPort, xmlelement, mode);
-        XMLPortParam(Turret, "alertnessRadius", setAlertnessRadius, getAlertnessRadius, xmlelement, mode).defaultValues("400");
-    }
-
-
+        
+        XMLPortParamVariable(Turret, "rotationThrust", rotationThrust_, xmlelement, mode);
+        XMLPortParam(Turret, "maxAttackRadius", setMaxAttackRadius, getMaxAttackRadius, xmlelement, mode);
+        XMLPortParam(Turret, "minAttackRadius", setMinAttackRadius, getMinAttackRadius, xmlelement, mode);
+        XMLPortParam(Turret, "maxYaw", setMaxYaw, getMaxYaw, xmlelement, mode);
+        XMLPortParam(Turret, "maxPitch", setMaxPitch, getMaxPitch, xmlelement, mode);
+    }
+
+    /**
+        @brief
+        The turret's actions are done here.
+
+        Every tick, the turret gets rotated if it should, and the local axes get updated with the parent's rotation.
+    
+        @param dt
+        Duration of the tick
+    */
+    void Turret::tick(float dt)
+    {
+        SUPER(Turret, tick, dt);
+
+        //Stuff isn't properly initialized in the c'tor, so we have to do it like this
+        if(!this->once_)
+        {
+            //Account for rotations done in xml
+            Quaternion startOrient = this->getOrientation();
+            this->localXStart_ = startOrient * this->localX_;
+            this->localXStart_.normalise();
+            this->localX_ = this->localXStart_;
+            this->localYStart_ = startOrient * this->localY_;
+            this->localYStart_.normalise();
+            this->localY_ = this->localYStart_;
+            this->localZStart_ = startOrient * this->localZ_;
+            this->localZStart_.normalise();
+            this->localZ_ = this->localZStart_;
+
+            //startDir should always be (0,0,-1)
+            this->startDir_ = getTransformedVector(startOrient * WorldEntity::FRONT, this->localX_, this->localY_, this->localZ_);
+
+            this->once_ = true;
+
+        }
+
+        //Adjust local axes to parent's rotation
+        WorldEntity* parent = this->getParent();
+        if(parent)
+        {
+            Quaternion parentrot = parent->getWorldOrientation();
+            this->localX_ = parentrot * this->localXStart_;
+            this->localY_ = parentrot * this->localYStart_;
+            this->localZ_ = parentrot * this->localZStart_;
+        }
+
+        //rotate
+        if(this->rotation_ != Quaternion::IDENTITY)
+        {
+            //Don't make the rotation instantaneous. Use an arbitrary interpolation, not that great...
+            //TODO: make the rotation better (constant velocity etc.). At the moment, the turret rotates
+            //slower the closer it is to the destination
+            Quaternion drot = Quaternion::nlerp(dt*this->rotationThrust_/20.f, Quaternion::IDENTITY, this->rotation_);
+            this->rotate(drot, WorldEntity::World);
+            this->rotation_ = Quaternion::IDENTITY;
+        }
+
+    }
 }
Index: code/trunk/src/modules/objects/Turret.h
===================================================================
--- code/trunk/src/modules/objects/Turret.h	(revision 10215)
+++ code/trunk/src/modules/objects/Turret.h	(revision 10216)
@@ -21,5 +21,5 @@
  *
  *   Author:
- *      Marian Runo
+ *      Marian Runo, Martin Mueller
  *   Co-authors:
  *      ...
@@ -28,5 +28,4 @@
 
 /**
-    @file Turret.h
     @brief Definition of the Turret class.
     @ingroup Objects
@@ -37,10 +36,24 @@
 
 #include "objects/ObjectsPrereqs.h"
-
-#include "worldentities/pawns/SpaceShip.h"
+#include "worldentities/pawns/Pawn.h"
+#include <OgreSceneQuery.h>
 
 namespace orxonox
 {
-    class _ObjectsExport Turret : public SpaceShip
+    /**
+    @brief
+        Creates a turret with limited rotation. The point of this class is to be able to attach
+        a turret to a spaceship or a spacestation which is more or less completely autonomous in
+        it's behaviour.
+
+        This class also contains a custom local coordinate system, which gets initially rotated through xml, and
+        afterwards is updated with the parent's rotation (if there is one). This allows for almost trivialal calculation
+        of pitch, yaw and roll through coordinate transformation. (TODO: Ogre should do something like this already, investigate...)
+        
+
+    @note
+        The rotation isn't limited "physically". You have to call isInRange to find out if the turret is allowed to shoot at a target.
+    */
+    class _ObjectsExport Turret : public Pawn
     {
         public:
@@ -48,17 +61,64 @@
             virtual ~Turret();
 
-            //virtual void tick(float dt);
-
             virtual void rotatePitch(const Vector2& value);
-
-            void setAlertnessRadius(float value);
-            float getAlertnessRadius();
+            virtual void rotateYaw(const Vector2& value);
+            virtual void rotateRoll(const Vector2& value);
+            virtual float isInRange(const WorldEntity* target);
+            virtual void aimAtPosition(const Vector3 &position);
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void tick(float dt);
 
+            /** @brief Sets the maximum distance the turret is allowed to shoot. @param radius The distance*/
+            inline void setMaxAttackRadius(float radius)
+                { this->maxAttackRadius_ = radius; }
+
+            /** @brief Sets the minimum distance the turret is allowed to shoot. @param radius The distance*/
+            inline void setMinAttackRadius(float radius)
+                { this->minAttackRadius_ = radius; }
+
+            /** @brief Sets the maximum pitch the turret can have (in both directions). @param pitch The pitch (in one direction)*/
+            inline void setMaxPitch(float pitch)
+                { this->maxPitch_ = pitch; }
+
+            /** @brief Sets the maximum yaw the turret can have (in both directions). @param yaw The yaw (in one direction)*/
+            inline void setMaxYaw(float yaw)
+                { this->maxYaw_ = yaw; }
+
+            /** @brief Returns the maximum distance the turret is allowed to shoot. @return The distance */
+            inline float getMaxAttackRadius() const
+                { return this->maxAttackRadius_; }                
+
+            /** @brief Returns the minimum distance the turret is allowed to shoot. @return The distance */
+            inline float getMinAttackRadius() const
+                { return this->minAttackRadius_; }   
+
+            /** @brief Returns the maximum pitch the turret can have. @return The pitch */
+            inline float getMaxPitch() const
+                { return this->maxPitch_; }
+
+            /** @brief Returns the maximum yaw the turret can have. @return The yaw */
+            inline float getMaxYaw() const
+                { return this->maxYaw_; }
 
         protected:
-            WaypointPatrolController* controller_;
+            Vector3 startDir_; //!< The initial facing direction, in local coordinates.
+            Vector3 localZ_; //!< The local z-axis, includes for the parent's rotation and rotations done in xml.
+            Vector3 localY_; //!< The local y-axis, includes for the parent's rotation and rotations done in xml.
+            Vector3 localX_; //!< The local x-axis, includes for the parent's rotation and rotations done in xml.      
+            Quaternion rotation_; //!< The rotation to be done by the turret.
+
         private:
+            bool once_; //!< Flag for executing code in the tick function only once.
+
+            Vector3 localZStart_; //!< The local z-axis, without the parent's rotation.
+            Vector3 localYStart_; //!< The local y-axis, without the parent's rotation.
+            Vector3 localXStart_; //!< The local x-axis, without the parent's rotation.
+            float maxAttackRadius_; //!< The maximum distance the turret is allowed to shoot.
+            float minAttackRadius_; //!< The minimum distance the turret is allowed to shoot.
+            Ogre::Real maxPitch_; //!< The maxmium pitch the turret can have (on one side).
+            Ogre::Real maxYaw_; //!< The maxmium yaw the turret can have (on one side).
+            float rotationThrust_;  //!< The velocity the turret rotates with.
+            Ogre::RaySceneQuery* rayTest_; //!< Used to perform a raytest, currently unused @see isInRange
 
     };
@@ -66,3 +126,2 @@
 
 #endif
-
Index: code/trunk/src/modules/objects/controllers/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/objects/controllers/CMakeLists.txt	(revision 10216)
+++ code/trunk/src/modules/objects/controllers/CMakeLists.txt	(revision 10216)
@@ -0,0 +1,4 @@
+ADD_SOURCE_FILES(OBJECTS_SRC_FILES
+  TurretController.cc
+  TeamTargetProxy.cc
+)
Index: code/trunk/src/modules/objects/controllers/TeamTargetProxy.cc
===================================================================
--- code/trunk/src/modules/objects/controllers/TeamTargetProxy.cc	(revision 10216)
+++ code/trunk/src/modules/objects/controllers/TeamTargetProxy.cc	(revision 10216)
@@ -0,0 +1,105 @@
+/*
+ *   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:
+ *      Martin Mueller
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "TeamTargetProxy.h"
+#include "worldentities/ControllableEntity.h"
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+    RegisterClass(TeamTargetProxy);
+
+   /**
+       @brief 
+       Sets default values for all variables.
+
+       @param context
+       The context
+    */
+    TeamTargetProxy::TeamTargetProxy(Context* context) : FormationController(context)
+    {
+        RegisterObject(TeamTargetProxy);
+
+        this->once_ = false;
+    }
+
+    /**
+        @brief 
+        Destructor. Nothing to see here.
+     */
+    TeamTargetProxy::~TeamTargetProxy()
+    {
+    }
+
+    /**
+        @brief
+        Copies the team and the target from the parent.
+
+        That's all there is.
+    */
+    void TeamTargetProxy::tick(float dt)
+    {
+        if (!this->isActive() || !this->getControllableEntity())
+            return;
+
+        ControllableEntity* parent = orxonox_cast<ControllableEntity*> (this->getControllableEntity()->getParent());
+
+        if(this->getTeam() != -1 && !this->once_ && parent)
+        {
+            orxout(internal_warning) << "TeamTargetProxy: Team already set, may result in undesired behaviour. Will get overridden by the parent's team." << endl;
+        }
+
+        if(!this->once_)
+            this->once_ = true;
+
+        //Teams aren't set immediately, after creation, so we have to check every tick...
+        if(parent)
+        {
+            Controller* parentcontroller = parent->getController();
+            if(parentcontroller)
+            {
+                this->setTeam(parentcontroller->getTeam());
+            }
+            else
+            {
+                this->setTeam(parent->getTeam());
+            }
+            this->getControllableEntity()->setTeam(parent->getTeam());
+        }
+
+        if(parent)
+        {
+            Pawn* parenttarget = orxonox_cast<Pawn*>(parent->getTarget());
+            if(parenttarget)
+            {
+                this->setTarget(parenttarget);
+                this->getControllableEntity()->setTarget(parenttarget);
+            }
+        }
+    }
+}
Index: code/trunk/src/modules/objects/controllers/TeamTargetProxy.h
===================================================================
--- code/trunk/src/modules/objects/controllers/TeamTargetProxy.h	(revision 10216)
+++ code/trunk/src/modules/objects/controllers/TeamTargetProxy.h	(revision 10216)
@@ -0,0 +1,60 @@
+/*
+ *   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:
+ *      Martin Mueller
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _TeamTargetProxy_H__
+#define _TeamTargetProxy_H__
+
+#include "OrxonoxPrereqs.h"
+#include "controllers/FormationController.h"
+
+ namespace orxonox
+ {
+    /**
+        @brief
+        A controller, that just copies the team and the target of a parent for itself and it's controllable entity.
+
+        Useful for following (and similar) situations: (-> means attached to)
+            turret (rotates) -> some kind of turret base (looks nice) -> spaceship (flies around)
+            The turret has a controller that wants to copy the spaceship's target and team. In this case it doesn't work though,
+            because the turret isn't directly attached to the spaceship. Here's where this controller comes in. Drawback: the base
+            has to be controllable and ticks every second (performance?)
+    */
+    class _OrxonoxExport TeamTargetProxy : public FormationController, public Tickable
+    {
+        public:
+            TeamTargetProxy(Context* context);
+            virtual ~TeamTargetProxy();
+
+            virtual void tick(float dt);
+
+        private:
+            bool once_; //!< Flag for executing code in the tick function only once.
+    };
+ }
+
+ #endif
Index: code/trunk/src/modules/objects/controllers/TurretController.cc
===================================================================
--- code/trunk/src/modules/objects/controllers/TurretController.cc	(revision 10216)
+++ code/trunk/src/modules/objects/controllers/TurretController.cc	(revision 10216)
@@ -0,0 +1,202 @@
+/*
+ *   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:
+ *      Martin Mueller
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "TurretController.h"
+#include "worldentities/pawns/Pawn.h"
+#include "Turret.h"
+
+ namespace orxonox
+ {
+    RegisterClass(TurretController);
+
+    /**
+        @brief 
+        Sets default values for all variables.
+
+        @param context
+        The context
+    */
+    TurretController::TurretController(Context* context) : ArtificialController(context)
+    {
+        RegisterObject(TurretController);
+
+        this->once_ = false;
+
+    }
+
+    /**
+        @brief 
+        Destructor. Nothing to see here.
+    */
+    TurretController::~TurretController()
+    {
+
+    }
+
+    /**
+        @brief 
+        Searches a valid target for the turret to aim at.
+
+        Loops through all pawns and tests, if it is in range. Scores every pawn and chooses the best one (the one with the lowest score).
+        If the turret has a parent, try to aim at the same target the parent has, if there is one.
+
+        @see targetScore
+        The function that scores the pawns.
+    */
+    void TurretController::searchTarget()
+    {
+        Turret* turret = orxonox_cast<Turret*>(this->getControllableEntity());
+
+        //The controller might find a target before teams are set, so we need to check again here.
+        if(this->target_ && turret->isInRange(target_) != -1.f && !FormationController::sameTeam(turret, this->target_, this->getGametype()))
+        {
+            return;
+        }
+        else
+        {
+            this->forgetTarget();
+            turret->setTarget(0);
+        }
+
+
+        ControllableEntity* parent = orxonox_cast<ControllableEntity*>(turret->getParent());
+        if(parent)
+        {
+            Pawn* parenttarget = orxonox_cast<Pawn*>(parent->getTarget());
+            if(parenttarget && turret->isInRange(parenttarget))
+            {
+                this->setTarget(parenttarget);
+                turret->setTarget(parenttarget);
+                return;
+            }
+        }
+
+        float minScore = FLT_MAX;
+        float tempScore;
+        Pawn* minScorePawn = 0;
+
+        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
+        {
+            Pawn* entity = orxonox_cast<Pawn*>(*it);
+            if (!entity || FormationController::sameTeam(this->getControllableEntity(), entity, this->getGametype()))
+                continue;
+            tempScore = turret->isInRange(entity);
+            if(tempScore != -1.f)
+            {
+                if(tempScore < minScore)
+                {
+                    minScore = tempScore;
+                    minScorePawn = entity;
+                }
+            }
+        }
+        this->setTarget(minScorePawn);
+        turret->setTarget(minScorePawn);
+    }
+
+    /**
+        @brief 
+        Tests, if the turret is looking at the target, with a specified tolerance
+
+        This uses the world position as opposed to the local position in the old version.
+
+        @param angle
+        The tolerance, in radians
+    */
+    bool TurretController::isLookingAtTargetNew(float angle) const
+    {
+        return (getAngle(this->getControllableEntity()->getWorldPosition(), this->getControllableEntity()->getWorldOrientation() * WorldEntity::FRONT, this->target_->getWorldPosition()) < angle);
+    }
+
+    /**
+        @brief 
+        Scores a pawn as a target, based on distance and health.
+
+        The more health and distance a pawn has, the higher the score. This means lower equals better.
+
+        @param pawn
+        The pawn to score
+
+        @param distance
+        The distance. Can be squared or normed, doesn't matter as long as all are treated the same.
+    */   
+    float TurretController::targetScore(Pawn* pawn, float distance) const
+    {
+        return pawn->getHealth()/pawn->getMaxHealth() + distance;
+    }
+
+    /**
+        @brief
+        Does all the controlling of the turret.
+
+        If the turret has a parent, copies the team from there, if it's not already set.
+        Other actions are: Search a target. If a target has been found, aim and shoot at it.
+    */
+    void TurretController::tick(float dt)
+    {
+        if (!this->isActive() || !this->getControllableEntity())
+            return;
+
+
+        ControllableEntity* parent = orxonox_cast<ControllableEntity*> (this->getControllableEntity()->getParent());
+        if(this->getTeam() != -1 && !this->once_ && parent)
+        {
+            orxout(internal_warning) << "TurretController: Team already set, may result in undesired behaviour. Will get overridden by the parent's team." << endl;
+        }
+
+        if(!this->once_)
+            this->once_ = true;
+     
+        //Teams aren't set immediately, after creation, so we have to check every tick...
+        if(parent)
+        {
+            Controller* parentcontroller = parent->getController();
+            if(parentcontroller)
+            {
+                this->setTeam(parentcontroller->getTeam());
+            }
+            else
+            {
+                this->setTeam(parent->getTeam());
+            }
+            this->getControllableEntity()->setTeam(parent->getTeam());
+        }
+
+        this->searchTarget();
+        if(this->target_)
+        {
+            Turret* turret = orxonox_cast<Turret*> (this->getControllableEntity());
+            this->aimAtTarget();
+            turret->aimAtPosition(target_->getWorldPosition());
+            if(this->isLookingAtTargetNew(Degree(5).valueRadians()))
+            {
+                this->getControllableEntity()->fire(0);
+            }
+        }
+    }
+ }
Index: code/trunk/src/modules/objects/controllers/TurretController.h
===================================================================
--- code/trunk/src/modules/objects/controllers/TurretController.h	(revision 10216)
+++ code/trunk/src/modules/objects/controllers/TurretController.h	(revision 10216)
@@ -0,0 +1,65 @@
+/*
+ *   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:
+ *      Martin Mueller
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @brief Definition for the controller for turrets.
+*/
+
+#ifndef _TurretController_H__
+#define _TurretController_H__
+
+#include "OrxonoxPrereqs.h"
+#include "controllers/ArtificialController.h"
+
+ namespace orxonox
+ {
+    /**
+        @brief
+        Controller for turrets. Chooses a target, and makes the turret aim/shoot at it.
+
+        The controllableEntity gets casted to Turret, so this controller won't work for anything else.
+    */
+    class _OrxonoxExport TurretController : public ArtificialController, public Tickable
+    {
+        public:
+            TurretController(Context* context);
+            virtual ~TurretController();
+
+            virtual void tick(float dt);
+
+        private:
+
+            void searchTarget();
+            bool isLookingAtTargetNew(float angle) const;
+            float targetScore(Pawn* pawn, float distance) const;
+
+            bool once_; //!< Flag for executing code in the tick function only once.
+    };
+ }
+
+ #endif
Index: code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc	(revision 10215)
+++ code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc	(revision 10216)
@@ -78,5 +78,5 @@
     @see Pawn.h
     */
-    bool BasicProjectile::processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+    bool BasicProjectile::processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs)
     {
         if (!this->bDestroy_ && GameMode::isMaster())
@@ -96,5 +96,5 @@
             if (victim)
             {
-                victim->hit(this->getShooter(), contactPoint, this->getDamage(), this->getHealthDamage(), this->getShieldDamage());
+                victim->hit(this->getShooter(), contactPoint, cs, this->getDamage(), this->getHealthDamage(), this->getShieldDamage());
                 victim->startReloadCountdown();
             }
@@ -141,4 +141,5 @@
     }
 
+
     /**
     @brief
Index: code/trunk/src/modules/weapons/projectiles/BasicProjectile.h
===================================================================
--- code/trunk/src/modules/weapons/projectiles/BasicProjectile.h	(revision 10215)
+++ code/trunk/src/modules/weapons/projectiles/BasicProjectile.h	(revision 10216)
@@ -119,5 +119,5 @@
 
         protected:
-            bool processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint);
+            bool processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs);
             void destroyCheck(void);
 
Index: code/trunk/src/modules/weapons/projectiles/Projectile.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/Projectile.cc	(revision 10215)
+++ code/trunk/src/modules/weapons/projectiles/Projectile.cc	(revision 10216)
@@ -88,7 +88,7 @@
     }
 
-    bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+    bool Projectile::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint)
     {
-        return this->processCollision(otherObject, contactPoint);
+        return this->processCollision(otherObject, contactPoint, cs);
     }
 
Index: code/trunk/src/modules/weapons/projectiles/Projectile.h
===================================================================
--- code/trunk/src/modules/weapons/projectiles/Projectile.h	(revision 10215)
+++ code/trunk/src/modules/weapons/projectiles/Projectile.h	(revision 10216)
@@ -64,5 +64,5 @@
 
             virtual void tick(float dt);
-            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
 
         private:
Index: code/trunk/src/modules/weapons/projectiles/Rocket.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/Rocket.cc	(revision 10215)
+++ code/trunk/src/modules/weapons/projectiles/Rocket.cc	(revision 10216)
@@ -191,7 +191,7 @@
     }
 
-    bool Rocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
-    {
-        return this->processCollision(otherObject, contactPoint);
+    bool Rocket::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint)
+    {
+        return this->processCollision(otherObject, contactPoint, cs);
     }
 
Index: code/trunk/src/modules/weapons/projectiles/Rocket.h
===================================================================
--- code/trunk/src/modules/weapons/projectiles/Rocket.h	(revision 10215)
+++ code/trunk/src/modules/weapons/projectiles/Rocket.h	(revision 10216)
@@ -64,5 +64,5 @@
             virtual void tick(float dt); //!< Defines which actions the Rocket has to take in each tick.
 
-            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
             virtual void destroyObject(void);
             void destructionEffect();
Index: code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc	(revision 10215)
+++ code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc	(revision 10216)
@@ -172,7 +172,7 @@
     }
 
-    bool SimpleRocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
-    {
-        return this->processCollision(otherObject, contactPoint);
+    bool SimpleRocket::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint)
+    {
+        return this->processCollision(otherObject, contactPoint, cs);
     }
 
Index: code/trunk/src/modules/weapons/projectiles/SimpleRocket.h
===================================================================
--- code/trunk/src/modules/weapons/projectiles/SimpleRocket.h	(revision 10215)
+++ code/trunk/src/modules/weapons/projectiles/SimpleRocket.h	(revision 10216)
@@ -64,5 +64,5 @@
             virtual void tick(float dt);
 
-            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
 
             void disableFire(); //!< Method to disable the fire and stop all acceleration
Index: code/trunk/src/orxonox/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/CMakeLists.txt	(revision 10215)
+++ code/trunk/src/orxonox/CMakeLists.txt	(revision 10216)
@@ -31,4 +31,5 @@
   PawnManager.cc
   PlayerManager.cc
+  ShipPartManager.cc
   Radar.cc
 #  Test.cc
@@ -64,4 +65,5 @@
     infos/PlayerInfo.h
     sound/SoundManager.h
+    controllers/ScriptController.h
   PCH_FILE
     OrxonoxPrecompiledHeaders.h
Index: code/trunk/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 10215)
+++ code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 10216)
@@ -142,4 +142,6 @@
 
     // items
+    class ShipPart;
+    class PartDestructionEvent;
     class Engine;
     class Item;
@@ -189,4 +191,5 @@
     class Pawn;
     class SpaceShip;
+    class ModularSpaceShip;
     class Spectator;
     class TeamBaseMatchBase;
Index: code/trunk/src/orxonox/Scene.cc
===================================================================
--- code/trunk/src/orxonox/Scene.cc	(revision 10215)
+++ code/trunk/src/orxonox/Scene.cc	(revision 10216)
@@ -363,10 +363,14 @@
         SmartPtr<WorldEntity> object1 = static_cast<WorldEntity*>(colObj1->getUserPointer());
 
+        // get the CollisionShape pointers
+        const btCollisionShape* cs0 = colObj0->getCollisionShape();
+        const btCollisionShape* cs1 = colObj1->getCollisionShape();
+
         // false means that bullet will assume we didn't modify the contact
         bool modified = false;
         if (object0->isCollisionCallbackActive())
-            modified |= object0->collidesAgainst(object1, cp);
+            modified |= object0->collidesAgainst(object1, cs1, cp);
         if (object1->isCollisionCallbackActive())
-            modified |= object1->collidesAgainst(object0, cp);
+            modified |= object1->collidesAgainst(object0, cs0, cp);
 
         return modified;
Index: code/trunk/src/orxonox/ShipPartManager.cc
===================================================================
--- code/trunk/src/orxonox/ShipPartManager.cc	(revision 10216)
+++ code/trunk/src/orxonox/ShipPartManager.cc	(revision 10216)
@@ -0,0 +1,61 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ShipPartManager.h"
+
+#include "util/ScopedSingletonManager.h"
+#include "core/CoreIncludes.h"
+#include "items/ShipPart.h"
+
+namespace orxonox
+{
+    ManageScopedSingleton(ShipPartManager, ScopeID::Root, false);
+
+    ShipPartManager::ShipPartManager()
+    {
+        RegisterObject(ShipPartManager);
+    }
+
+    ShipPartManager::~ShipPartManager()
+    {
+        // Be sure to delete all the pawns
+        for (ObjectList<ShipPart>::iterator it = ObjectList<ShipPart>::begin(); it != ObjectList<ShipPart>::end(); )
+            (it++)->death();
+    }
+
+    void ShipPartManager::preUpdate(const Clock& time)
+    {
+        for (ObjectList<ShipPart>::iterator it = ObjectList<ShipPart>::begin(); it != ObjectList<ShipPart>::end(); )
+        {
+            if (!it->isAlive())
+                (it++)->death();
+            else
+                ++it;
+        }
+    }
+}
Index: code/trunk/src/orxonox/ShipPartManager.h
===================================================================
--- code/trunk/src/orxonox/ShipPartManager.h	(revision 10216)
+++ code/trunk/src/orxonox/ShipPartManager.h	(revision 10216)
@@ -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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ShipPartManager_H__
+#define _ShipPartManager_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "util/Singleton.h"
+#include "tools/interfaces/Tickable.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport ShipPartManager : public Singleton<ShipPartManager>, public Tickable
+    {
+            friend class Singleton<ShipPartManager>;
+        public:
+            ShipPartManager();
+            virtual ~ShipPartManager();
+
+            virtual void preUpdate(const Clock& time);
+
+        private:
+
+            static ShipPartManager* singletonPtr_s;
+    };
+}
+
+#endif /* _ShipPartManager_H__ */
Index: code/trunk/src/orxonox/collisionshapes/CollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/collisionshapes/CollisionShape.cc	(revision 10215)
+++ code/trunk/src/orxonox/collisionshapes/CollisionShape.cc	(revision 10216)
@@ -121,8 +121,17 @@
         WorldEntityCollisionShape* parentWECCS = orxonox_cast<WorldEntityCollisionShape*>(newParent);
         if (parentWECCS)
+        {
             this->parentID_ = parentWECCS->getWorldEntityOwner()->getObjectID();
-        // Else it is set to the objectID of the CompoundCollisionShape.
+
+            // If this shape is not a CompoundCollisionShape (thus an actual physical shape) & the parent is a WorldEntity's CollisionShape,
+            // set it's userPointer to the WorldEntity this CompoundCollisionShape belongs to.
+            if (!orxonox_cast<CompoundCollisionShape*>(this))
+                this->getCollisionShape()->setUserPointer(parentWECCS->getWorldEntityOwner());
+        }
         else
+        {
+            // Else it is set to the objectID of the CompoundCollisionShape.
             this->parentID_ = newParent->getObjectID();
+        }
 
         return true;
Index: code/trunk/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ArtificialController.cc	(revision 10215)
+++ code/trunk/src/orxonox/controllers/ArtificialController.cc	(revision 10216)
@@ -94,5 +94,5 @@
         static const float hardcoded_projectile_speed = 1250;
 
-        this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getPosition(), hardcoded_projectile_speed, this->target_->getPosition(), this->target_->getVelocity());
+        this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getWorldPosition(), hardcoded_projectile_speed, this->target_->getWorldPosition(), this->target_->getVelocity());
         this->bHasTargetPosition_ = (this->targetPosition_ != Vector3::ZERO);
 
Index: code/trunk/src/orxonox/controllers/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/controllers/CMakeLists.txt	(revision 10215)
+++ code/trunk/src/orxonox/controllers/CMakeLists.txt	(revision 10216)
@@ -10,3 +10,4 @@
   DroneController.cc
   FormationController.cc
+  ControllerDirector.cc
 )
Index: code/trunk/src/orxonox/controllers/ControllerDirector.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ControllerDirector.cc	(revision 10216)
+++ code/trunk/src/orxonox/controllers/ControllerDirector.cc	(revision 10216)
@@ -0,0 +1,157 @@
+/*
+ * First try of a ControllerDirector. Target: An event occurs in the levelTry.oxw
+ * file, which is "heard" by an object of the type of this class. It then SHOULD
+ * (because it is not working) execute the party function.
+ */
+
+#include "ControllerDirector.h"
+#include "ScriptController.h"
+#include "core/CoreIncludes.h"
+
+//#include "network/NetworkFunction.h"
+
+#include "infos/HumanPlayer.h"
+#include "interfaces/PlayerTrigger.h"
+#include "worldentities/pawns/Pawn.h"
+#include "core/LuaState.h"
+
+
+namespace orxonox
+{
+    RegisterClass(ControllerDirector);
+
+    ControllerDirector::ControllerDirector(Context* context) : ArtificialController(context)
+    {
+        // Register the object with the framework
+        RegisterObject(ControllerDirector);
+
+        // output a message to ensure we know the constructor was run
+        orxout(verbose)<<"hello universe constructor blablub"<< endl;
+
+
+
+        // Initialize member variables
+        this->player_ = NULL;
+        this->entity_ = NULL;
+        this->pTrigger_ = NULL;
+        this->context_ = context;
+    }
+
+    void ControllerDirector::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ControllerDirector, XMLPort, xmlelement, mode);
+
+        orxout(verbose)<< "ControllerDirector::XMLPort " 
+          << "An instance of ControllerDirector has been created." << endl;
+    }
+
+    void ControllerDirector::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        // Call the xmleventport functions of the classes we derive from
+        SUPER(ControllerDirector, XMLEventPort, xmlelement, mode);
+
+        // Add an event sink for a "takeControl" event, which leads to the
+        // function takeControl() being called.
+        XMLPortEventSink(ControllerDirector, BaseObject, "takeControl", 
+          takeControl, xmlelement, mode);
+    }
+
+
+
+
+    void ControllerDirector::takeControl(Controller * controller, BaseObject * trigger) 
+    {
+       /* Output a message confirming that the function was called */
+       orxout(verbose)<<"test takecontrol."<< endl;
+
+       /* First, we set up a new controller to attach to the unit that
+        * triggered our event. 
+        */
+       static int ctrlid = 1;
+       bool prepok = preparationToTakeControl(trigger);
+       if( prepok == true) 
+       {
+         /* Create a scriptcontroller object */
+         ScriptController *newctrl = new ScriptController(this->context_);
+
+         /* Make the player we were given its slave */
+         newctrl->setPlayer(this->player_);
+
+         /* Start controlling that object */
+         newctrl->takeControl(ctrlid);
+       }
+       else
+         return;
+       
+       /* Set up a luastate to use for running the scripts */
+       LuaState * ls = new LuaState();
+       
+       /* Assemble a string to define a controller id variable in lua space */
+       std::stringstream tmp;
+       tmp << "newctrlid = " << ctrlid << endl;
+       std::string todo = tmp.str();
+       
+       /* Run the string using the luastate created earlier */
+       ls->doString(todo);
+
+       /* Now run the script on this controller. This will still have the above
+        * variable "newctrlid" defined, which means it can make use of it.
+        */
+
+       ls->doFile("testscript.lua");
+
+       /* Increase the controller ID so we have a different one for
+        * the next time it is triggered */
+       ctrlid += 1;
+    } 
+
+    bool ControllerDirector::preparationToTakeControl(BaseObject * trigger) 
+    {
+        this->pTrigger_ = orxonox_cast<PlayerTrigger*>(trigger);
+        this->player_ = NULL;
+
+        orxout(verbose) << "Preparation to take Control!" << endl; 
+
+        // Check whether it is a player trigger and extract pawn from it
+        if(this->pTrigger_ != NULL)
+        {
+            // Get the object which triggered the event.
+            this->player_ = this->pTrigger_->getTriggeringPlayer();  
+
+            // Check if there actually was a player returned.
+            if( this->player_ == NULL) return false;
+        }
+        else
+        {
+            orxout(verbose) << "ControllerDirector::preparationToTakeControl " 
+              << "Not a player trigger, can't extract pawn from it.." << endl;
+            return false;
+        }
+
+        this->entity_ = this->player_->getControllableEntity();
+        assert(this->entity_);
+
+        return true;
+    }
+
+    /* // Currently unused
+    void ControllerDirector::setNewController(Controller * controller) {
+
+
+        orxout() << "New Controller is going to be set!" << endl;
+
+        this->entity_->setDestroyWhenPlayerLeft(false);
+        this->player_->pauseControl();
+        this->entity_->setController(controller);
+        this->player_->startControl(this->entity_);
+        //this->setControllableEntity(this->entity_);
+    }
+    */
+       
+    
+
+}
+
+
+
+
Index: code/trunk/src/orxonox/controllers/ControllerDirector.h
===================================================================
--- code/trunk/src/orxonox/controllers/ControllerDirector.h	(revision 10216)
+++ code/trunk/src/orxonox/controllers/ControllerDirector.h	(revision 10216)
@@ -0,0 +1,65 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ControllerDirector_H__
+#define _ControllerDirector_H__
+
+#include "OrxonoxPrereqs.h"
+#include "ArtificialController.h"
+#include "core/EventIncludes.h"
+
+
+namespace orxonox
+{
+    class _OrxonoxExport ControllerDirector : public ArtificialController
+    {
+        public:
+            ControllerDirector(Context* context);
+            virtual ~ControllerDirector() { }
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            bool party(bool bTriggered, BaseObject* trigger);
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+
+
+            /* Take over control of a given object */
+            void takeControl(Controller * controller, BaseObject * trigger);
+            bool preparationToTakeControl(BaseObject * trigger);
+
+            // currently unused
+            //void setNewController(Controller * controller);
+
+        private:
+            PlayerInfo* player_;
+            ControllableEntity* entity_; 
+            PlayerTrigger * pTrigger_;
+            Context* context_;
+    };
+}
+
+#endif /* _ControllerDirector_H__ */
Index: code/trunk/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/NewHumanController.cc	(revision 10215)
+++ code/trunk/src/orxonox/controllers/NewHumanController.cc	(revision 10216)
@@ -220,5 +220,5 @@
                 if (!controlPaused_ )
                 {
-                    if (this->getControllableEntity() && (this->getControllableEntity()->isExactlyA(ClassByString("SpaceShip")) || this->getControllableEntity()->isExactlyA(ClassByString("Rocket"))))
+                    if (this->getControllableEntity() && ((this->getControllableEntity()->isExactlyA(ClassByString("SpaceShip")) || (this->getControllableEntity()->isExactlyA(ClassByString("ModularSpaceShip")))) || this->getControllableEntity()->isExactlyA(ClassByString("Rocket"))))
                         this->showOverlays();
                     else if (this->getControllableEntity() &&  this->getControllableEntity()->isExactlyA(ClassByString("FpsPlayer")))
@@ -498,5 +498,5 @@
         this->controlMode_ = 0;
         this->centerCursor();
-        if (this->getControllableEntity() && (this->getControllableEntity()->isExactlyA(ClassByString("SpaceShip")) || this->getControllableEntity()->isExactlyA(ClassByString("Rocket"))))
+        if (this->getControllableEntity() && ((this->getControllableEntity()->isExactlyA(ClassByString("SpaceShip")) || (this->getControllableEntity()->isExactlyA(ClassByString("ModularSpaceShip")))) || this->getControllableEntity()->isExactlyA(ClassByString("Rocket"))))
         {
             this->showOverlays_ = true;
Index: code/trunk/src/orxonox/controllers/ScriptController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ScriptController.cc	(revision 10215)
+++ code/trunk/src/orxonox/controllers/ScriptController.cc	(revision 10216)
@@ -28,5 +28,9 @@
 
 #include "ScriptController.h"
+#include "infos/PlayerInfo.h"
 #include "core/CoreIncludes.h"
+#include "worldentities/ControllableEntity.h"
+#include "core/LuaState.h"
+#include <cmath>
 
 namespace orxonox
@@ -37,4 +41,222 @@
     {
         RegisterObject(ScriptController);
+
+        /* By default, this controller has ID 0, which means it is not assigned
+         * to anything yet. 
+         */
+        this->ctrlid_ = 0;
+
+        /* Set default values for all variables */
+        /* - pointers to zero */
+        this->player_ = NULL;
+        this->entity_ = NULL;
+
+        /* - times */
+        this->scTime = 0.0f;
+        this->eventTime = 0.0f;
+
+        /* - Points in space */
+        this->startpos = Vector3(0,0,0);
+        //this->lookAtPosition = Vector3(0,0,0);
+
+        /* - Processing flag */
+        this->processing = false;
+
+        /* - Counters */
+        this->eventno = 0;
+
+    }
+
+    void ScriptController::takeControl(int ctrlid)
+    {
+        /* Output some debugging information */
+        orxout(verbose) << "ScriptController: Taking control" << endl;
+        orxout(verbose) << "This-pointer: " << this << endl;
+
+        /* Set the controller ID (the argument here should be nonzero) */
+        this->ctrlid_ = ctrlid;
+
+        /* Store the entity pointer in a private variable */
+        this->entity_ = this->player_->getControllableEntity();
+        assert(this->entity_);
+         
+        /* Add the controller here to this entity. Apparently this still leaves
+         * any preexisting human controllers in place. 
+         */
+        this->entity_->setDestroyWhenPlayerLeft(false);
+        this->player_->pauseControl();
+        this->entity_->setController(this);
+        this->setControllableEntity(this->entity_);
+        this->entity_->mouseLook();
+        this->entity_->setVisible(false);
+    }
+
+    const Vector3& ScriptController::getPosition()
+    {
+      return this->entity_->getPosition();
+    }
+
+    ScriptController* ScriptController::getScriptController()
+    {
+      /* Output a message that confirms this function was called */
+      orxout(verbose) << "Great success!" << std::endl;
+
+      /* Debugging: print all the scriptcontroller object pointers */
+      for(ObjectList<ScriptController>::iterator it = 
+        ObjectList<ScriptController>::begin(); 
+        it != ObjectList<ScriptController>::end(); ++it)
+      { orxout(verbose) << "Have object in list: " << *it << endl; }
+
+      /* Find the first one with a nonzero ID */
+      for(ObjectList<ScriptController>::iterator it = 
+        ObjectList<ScriptController>::begin(); 
+        it != ObjectList<ScriptController>::end(); ++it)
+      { 
+        // TODO: do some selection here. Currently just returns the first one
+        if( (*it)->getID() > 0 )
+        { orxout(verbose) << "Controller to return: " << *it << endl;
+          return *it; 
+        }
+      
+      }
+      return NULL;
+    }
+
+    void ScriptController::execute(event ev)
+    {
+        /* Debugging output */
+        //orxout() << "Executing event " << ev.fctName 
+          //<< " with parameters:\n " 
+          //<< ev.x1 << " " << ev.y1 << " " << ev.z1 << "\n"
+          //<< ev.x2 << " " << ev.y2 << " " << ev.z2 << "\n"
+          //<< ev.duration << endl;
+
+        /* Event is starting, hence set the time to 0 */
+        this->eventTime = 0.0f;
+        this->processing = true;
+
+        /* Copy the event into the currentEvent holder */
+        this->currentEvent = ev;
+
+        /* Store starting position */
+        this->startpos = this->entity_->getPosition();
+    }
+
+
+    void ScriptController::tick(float dt)
+    {
+        /* Call the tick function of the classes we derive from */
+        SUPER(ScriptController, tick, dt);
+
+        /* If this controller has no entity entry, do nothing */
+        if( !(this->entity_) ) return;
+
+        /* See if time has come for the next event to be run */
+        if(this->eventList.size() > 0 && this->eventList[0].eventTime <= scTime)
+        { /* Execute the next event on the list */
+          this->execute(this->eventList[0]);
+          this->eventList.erase(this->eventList.begin());
+          this->eventno -= 1;
+        }
+
+        /* Update the local timers in this object */
+        scTime += dt; eventTime += dt;
+
+        /* If we've arrived at the target, stop processing */
+        if( eventTime > currentEvent.duration && this->processing == true)
+        { this->processing = false;
+
+          /* If we reached the last event, also reenable the normal movement
+           * and make the model visible again
+           */
+          if( this->eventno == 0 )
+          {
+            this->entity_->mouseLook();
+            this->entity_->setVisible(true);
+          }
+        }
+
+        /* Get a variable that specifies how far along the trajectory
+         * we are 
+         */
+        float dl = eventTime / currentEvent.duration; 
+
+        /* Depending  */
+        /* Do some moving */
+        if( this->processing )
+        { 
+          if( this->currentEvent.fctName == "mal" )
+          {
+            /* Set the position to the correct place in the trajectory */
+            this->entity_->setPosition( (1-dl)*startpos + dl * this->currentEvent.v1);
+
+            /* Look at the specified position */
+            this->entity_->lookAt(this->currentEvent.v2);
+
+            /* Update look at position */
+            //this->lookAtPosition = this->currentEvent.v2;
+          }
+          else if( this->currentEvent.fctName == "chl" )
+          {
+            /* Sweep the look from v1 to v2 */
+            this->entity_->lookAt( (1-dl)*this->currentEvent.v1 + 
+              dl * this->currentEvent.v2 );
+          }
+
+
+          /* Force mouse look */
+          if( this->entity_->isInMouseLook() == false )
+            this->entity_->mouseLook();
+        }
+    }
+
+    void ScriptController::eventScheduler(std::string instruction, 
+      float x1, float y1, float z1, 
+      float x2, float y2, float z2, 
+      float duration, float executionTime)
+    {
+      /* put data (from LUA) into time-sorted eventList*/ 
+      /* Nimmt den befehl und die argumente aus luascript und ertellt einen
+       * struct pro event, diese structs werden sortiert nach eventTime
+       */
+      struct event tmp;
+
+      /* Fill the structure with all the provided information */
+      tmp.fctName = instruction;
+      //tmp.x1 = x1; tmp.y1 = y1; tmp.z1 = z1;
+      //tmp.x2 = x2; tmp.y2 = y2; tmp.z2 = z2;
+      tmp.v1 = Vector3(x1,y1,z1);
+      tmp.v2 = Vector3(x2,y2,z2);
+      tmp.duration = duration;
+      tmp.eventTime = executionTime;
+
+      orxout(verbose) << tmp.fctName << endl;
+
+      /* Add the created event to the event list */
+      if(eventList.size()==0)
+      { /* The list is still empty, just add it */
+        orxout(verbose) << "eventList empty (01)" << endl;
+        eventList.insert(eventList.begin(), tmp);
+        this->eventno += 1;
+        return; /* Nothing more to do, the event was added */
+      }
+
+      /* Event was not added yet since the list was not empty. Walk through
+       * the list of events and add it so that the events are correctly in
+       * order.
+       */
+      for (std::vector<event>::iterator it=eventList.begin(); it<eventList.end(); it++)
+      { if(tmp.eventTime < it->eventTime)
+        { eventList.insert(it,tmp);
+          this->eventno += 1;
+          //orxout()<<"new event added"<<endl;
+          return;
+        }
+      }
+
+      /* If the event was still not added here, it belongs in the end of the list */
+      eventList.insert(eventList.end(), tmp);
+      this->eventno += 1;
+
     }
 }
Index: code/trunk/src/orxonox/controllers/ScriptController.h
===================================================================
--- code/trunk/src/orxonox/controllers/ScriptController.h	(revision 10215)
+++ code/trunk/src/orxonox/controllers/ScriptController.h	(revision 10216)
@@ -30,18 +30,95 @@
 #define _ScriptController_H__
 
-#include "OrxonoxPrereqs.h"
+#include "OrxonoxPrereqs.h"                 /* die ganzen tolua, kopiert aus Dock.h*/
 #include "ArtificialController.h"
+#include "core/EventIncludes.h"
 
-namespace orxonox
-{
-    class _OrxonoxExport ScriptController : public ArtificialController
-    {
+
+
+namespace orxonox  // tolua_export
+{  // tolua_export
+
+    /** Structure to describe a single event */
+    struct event 
+    {   
+        /** Instruction for this event */
+        std::string fctName;
+
+        Vector3 v1;
+        Vector3 v2;
+
+        /** Time span of the event */
+        float duration;
+
+        /** Start point in time of the event */
+        float eventTime;
+    }; 
+
+    class _OrxonoxExport ScriptController // tolua_export 
+       : public ArtificialController, public Tickable
+    {  // tolua_export
         public:
             ScriptController(Context* context);
             virtual ~ScriptController() { }
 
+            void takeControl(int ctrlid);
+            void setPlayer(PlayerInfo* player) { this->player_ = player; }
+           
+            virtual void tick(float dt);
+
+            // LUA interface
+            // tolua_begin 
+            void eventScheduler(std::string instruction, 
+              float x1, float y1, float z1, 
+              float x2, float y2, float z2, 
+              float duration, float executionTime);
+
+            static ScriptController* getScriptController();
+
+            int getID() { return ctrlid_; }
+
+            // tolua_end
+            const Vector3& getPosition();
+
+            void execute(event ev);
+
         private:
-    };
-}
+            /* Information about the player that this ScriptController will
+             * control */
+            /* - Player pointer */
+            PlayerInfo* player_;
+
+            /* - Entity pointer, this is for convenience and will be the same as 
+             *   player_->getControllableEntity() 
+             */
+            ControllableEntity* entity_;
+
+            /* Controller ID, defaults to 0 and is set using takeControl() */
+            int ctrlid_;
+
+            /* List of events to walk through */
+            std::vector<event> eventList;
+            unsigned int eventno;
+
+            /* Time since the creation of this ScriptController object */
+            float scTime;  
+
+            /* Boolean that specifies whether we're processing an event right
+             * now */
+            bool processing;
+
+            /* Data about the event currently being processed */
+            /* - The event itself */
+            event currentEvent;
+
+            /* - Time this event has been going on for */
+            float eventTime;
+            Vector3 startpos;
+
+            /* - Position to look at during that transition */
+            //Vector3 lookAtPosition;
+
+    };// tolua_export
+} // tolua_export
 
 #endif /* _ScriptController_H__ */
Index: code/trunk/src/orxonox/controllers/testscript.lua
===================================================================
--- code/trunk/src/orxonox/controllers/testscript.lua	(revision 10216)
+++ code/trunk/src/orxonox/controllers/testscript.lua	(revision 10216)
@@ -0,0 +1,1 @@
+print	('1: Hello World')
Index: code/trunk/src/orxonox/items/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/items/CMakeLists.txt	(revision 10215)
+++ code/trunk/src/orxonox/items/CMakeLists.txt	(revision 10216)
@@ -3,3 +3,5 @@
   Engine.cc
   MultiStateEngine.cc
+  ShipPart.cc
+  PartDestructionEvent.cc
 )
Index: code/trunk/src/orxonox/items/PartDestructionEvent.cc
===================================================================
--- code/trunk/src/orxonox/items/PartDestructionEvent.cc	(revision 10216)
+++ code/trunk/src/orxonox/items/PartDestructionEvent.cc	(revision 10216)
@@ -0,0 +1,352 @@
+/*
+ *   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:
+ *      Noe Pedrazzini
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "PartDestructionEvent.h"
+
+#include <algorithm>
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
+#include "network/NetworkFunction.h"
+#include "Item.h"
+#include "worldentities/pawns/Pawn.h"
+#include "worldentities/pawns/ModularSpaceShip.h"
+#include "items/Engine.h"
+#include "gametypes/Gametype.h"
+#include "chat/ChatManager.h"
+
+
+namespace orxonox
+{
+    RegisterClass(PartDestructionEvent);
+
+    PartDestructionEvent::PartDestructionEvent(Context* context)
+        : Item(context)
+    {
+        RegisterObject(PartDestructionEvent);
+        this->setValid(true);
+    }
+
+    PartDestructionEvent::~PartDestructionEvent()
+    {
+
+    }
+
+    void PartDestructionEvent::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(PartDestructionEvent, XMLPort, xmlelement, mode);
+
+        XMLPortParam(PartDestructionEvent, "targetType", setTargetType, getTargetType, xmlelement, mode).defaultValues("NULL");
+        XMLPortParam(PartDestructionEvent, "targetName", setTargetName, getTargetName, xmlelement, mode).defaultValues("NULL");
+        XMLPortParam(PartDestructionEvent, "operation", setOperation, getOperation, xmlelement, mode).defaultValues("NULL");
+        XMLPortParam(PartDestructionEvent, "targetParam", setTargetParam, getTargetParam, xmlelement, mode).defaultValues("NULL");
+        XMLPortParam(PartDestructionEvent, "value", setEventValue, getEventValue, xmlelement, mode).defaultValues(0);
+        XMLPortParam(PartDestructionEvent, "message", setMessage, getMessage, xmlelement, mode).defaultValues("NULL");
+
+        /*
+        XMLPortParam(PartDestructionEvent, "health", setHealth, getHealth, xmlelement, mode).defaultValues(100);
+        XMLPortParam(PartDestructionEvent, "maxhealth", setMaxHealth, getMaxHealth, xmlelement, mode).defaultValues(200);
+        XMLPortParam(PartDestructionEvent, "initialhealth", setInitialHealth, getInitialHealth, xmlelement, mode).defaultValues(100);
+        */
+    }
+
+    /**
+    @brief
+        Executes this event.
+    */
+    void PartDestructionEvent::execute()
+    {
+        // Do not execute if this event is invalid
+        if(!isValid())
+        {
+            orxout(internal_warning) << "Attempted to execute an invalid PartDestructionEvent!" << endl;
+            return;
+        }
+
+        // Output the destruction-message to the chat
+        if(this->message_ != "NULL")
+            ChatManager::message(this->message_);
+
+        // Modify parameters as configured for all cases
+        if (this->targetType_ == "ship")
+        {
+            switch (this->targetParam_) {
+            case shieldhealth:
+                this->parent_->getParent()->setShieldHealth(operate(this->parent_->getParent()->getShieldHealth()));
+                break;
+            case boostpower:
+                this->parent_->getParent()->setInitialBoostPower(operate(this->parent_->getParent()->getInitialBoostPower()));
+                break;
+            case boostpowerrate:
+                this->parent_->getParent()->setBoostPowerRate(operate(this->parent_->getParent()->getBoostPowerRate()));
+                break;
+            case rotationthrust:
+                this->parent_->getParent()->setRotationThrust(operate(this->parent_->getParent()->getRotationThrust()));
+                break;
+            default:
+                break;
+            }
+            this->setValid(false);
+            return;
+        }
+
+        if (this->targetType_ == "engine")
+        {
+            switch (this->targetParam_) {
+            case null:
+                this->parent_->getParent()->getEngineByName(targetName_)->destroy();
+                break;
+            case boostfactor:
+                this->parent_->getParent()->getEngineByName(targetName_)->setBoostFactor(operate(this->parent_->getParent()->getEngineByName(targetName_)->getBoostFactor()));
+                break;
+            case speedfront:
+                this->parent_->getParent()->getEngineByName(targetName_)->setMaxSpeedFront(operate(this->parent_->getParent()->getEngineByName(targetName_)->getMaxSpeedFront()));
+                break;
+            case accelerationfront:
+                this->parent_->getParent()->getEngineByName(targetName_)->setAccelerationFront(operate(this->parent_->getParent()->getEngineByName(targetName_)->getAccelerationFront()));
+                break;
+            default:
+                break;
+            }
+            this->setValid(false);
+            return;
+        }
+
+        if (this->targetType_ == "part")
+        {
+            switch (this->targetParam_) {
+            case null:
+                if (!this->parent_->getParent()->getShipPartByName(targetName_))
+                    return;
+                this->parent_->getParent()->getShipPartByName(targetName_)->setEventExecution(false);
+                this->parent_->getParent()->killShipPart(targetName_);
+                break;
+            default:
+                break;
+            }
+            this->setValid(false);
+            return;
+        }
+    }
+
+    void PartDestructionEvent::setParent(ShipPart* part)
+    {
+        this->parent_ = part;
+    }
+
+    /**
+    @brief
+        Set type of the target
+    @param param
+        The desired target-type as string. Valid target-types: ship engine weapon
+    */
+    void PartDestructionEvent::setTargetType(std::string type)
+    {
+        if ((type == "ship") || (type == "engine") || (type == "weapon") || (type == "part"))
+        {
+            this->targetType_ = type;
+            return;
+        }
+
+        // Error, if invalid target-type was entered.
+        orxout(internal_warning) << "\"" << type << "\" is not a valid target-type for a PartDestructionEvent. Valid types are: ship engine weapon part" << endl;
+        this->setValid(false);
+        return;
+    }
+
+    void PartDestructionEvent::setTargetName(std::string name)
+    {
+        // Error, if the target-type is "weapon" or "engine", but the name of said target was not defined.
+        if (((this->targetType_ == "weapon") || (this->targetType_ == "engine")) && (name == "NULL"))
+        {
+            orxout(internal_warning) << "The target-name of a PartDestructionEvent with target-type \"" << this->targetType_ << "\" needs to be defined!" << endl;
+            return;
+        }
+
+        this->targetName_ = name;
+    }
+
+    /**
+    @brief
+        Set the operation to be applied.
+    @param param
+        The desired parameter as string. Valid parameters: c.f. @ref orxnox::PartDestructionEvent::TargetParam
+    */
+    void PartDestructionEvent::setTargetParam(std::string param)
+    {
+        // A target-type needs to be defined in order to choose a parameter.
+        if (this->targetType_ == "NULL")
+        {
+            orxout(internal_warning) << "No valid target-type defined. Cannot set target-param for this PartDestructionEvent." << endl;
+            this->setValid(false);
+            return;
+        }
+
+        // engine: NULL boostfactor speedfront accelerationfront
+        if (this->targetType_ == "engine")
+        {
+            if (param == "NULL")
+            {
+                this->targetParam_ = null;
+                return;
+            }
+            if (param == "boostfactor")
+            {
+                this->targetParam_ = boostfactor;
+                return;
+            }
+            if (param == "speedfront")
+            {
+                this->targetParam_ = speedfront;
+                return;
+            }
+            if (param == "accelerationfront")
+            {
+                this->targetParam_ = accelerationfront;
+                return;
+            }
+
+            orxout(internal_warning) << "\"" << param << "\" is not a valid target-param for a PartDestructionEvent with target-type \"engine\". Valid types are: boostfactor speedfront accelerationfront" << endl;
+            return;
+        }
+
+        // weapon:
+
+        // ship: shieldhealth (maxshieldhealth shieldabsorption shieldrechargerate) boostpower boostpowerrate rotationthrust
+        if (this->targetType_ == "ship")
+        {
+            if (param == "shieldhealth")
+            {
+                this->targetParam_ = shieldhealth;
+                return;
+            }
+            if (param == "boostpower")
+            {
+                this->targetParam_ = boostpower;
+                return;
+            }
+            if (param == "boostpowerrate")
+            {
+                this->targetParam_ = boostpowerrate;
+                return;
+            }
+            if (param == "rotationthrust")
+            {
+                this->targetParam_ = rotationthrust;
+                return;
+            }
+
+            orxout(internal_warning) << "\"" << param << "\" is not a valid target-param for a PartDestructionEvent with target-type \"ship\". Valid types are: shieldhealth maxshieldhealth shieldabsorption shieldrechargerate boostpower boostpowerrate rotationthrust" << endl;
+            return;
+        }
+
+        if (this->targetType_ == "part")
+        {
+            if (param == "NULL")
+            {
+                this->targetParam_ = null;
+                return;
+            }
+
+            orxout(internal_warning) << "\"" << param << "\" is not a valid target-param for a PartDestructionEvent with target-type \"part\". Valid types are: NULL (set operation to \"destroy\")" << endl;
+            return;
+        }
+
+        orxout(internal_warning) << "No valid target-param defined. The chosen param is either invalid or not available for this target-type." << endl;
+        this->setValid(false);
+    }
+
+    /**
+    @brief
+        Set the operation to be applied.
+    @param operation
+        The desired operator as string. Valid operators: * + - destroy
+    */
+    void PartDestructionEvent::setOperation(std::string operation)
+    {
+        // * + - destroy
+        if ((operation == "*") || (operation == "+") || (operation == "-") || (operation == "set") || (operation == "destroy"))
+        {
+            this->operation_ = operation;
+            return;
+        }
+        this->operation_ = "NULL";
+        orxout(internal_warning) << "\"" << operation << "\" is not a valid operation for a PartDestructionEvent. Valid operations are: * + - set destroy" << endl;
+    }
+
+    /**
+    @brief
+        Set the message to be shown upon execution of the vent.
+    @param msg
+        The desired message as string.
+    */
+    void PartDestructionEvent::setMessage(std::string msg)
+    {
+        this->message_ = msg;
+    }
+
+
+    /**
+    @brief
+        Apply the configured operation and value to an input.
+    @param input
+        The value which should be modified
+    @return
+        Returns the product / sum / difference of input and configured value,
+        the configured value if the operation is "set",
+        or 0 if the operation is "destroy"
+    */
+    float PartDestructionEvent::operate(float input)
+    {
+        if (this->operation_ == "*")
+            return input * this->value_;
+        if (this->operation_ == "+")
+            return input + this->value_;
+        if (this->operation_ == "-")
+            return input - this->value_;
+        if (this->operation_ == "set")
+            return this->value_;
+        if (this->operation_ == "destroy")
+        {
+            return 0;
+        }
+        return 0;
+    }
+
+    /**
+    @brief
+        Sets the value applied with the chosen operation.
+    @param value
+        The value as float.
+    */
+    void PartDestructionEvent::setEventValue(float value)
+    {
+        this->value_ = value;
+    }
+}
Index: code/trunk/src/orxonox/items/PartDestructionEvent.h
===================================================================
--- code/trunk/src/orxonox/items/PartDestructionEvent.h	(revision 10216)
+++ code/trunk/src/orxonox/items/PartDestructionEvent.h	(revision 10216)
@@ -0,0 +1,160 @@
+/*
+ *   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:
+ *      Noe Pedrazzini
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _PartDestructionEvent_H__
+#define _PartDestructionEvent_H__
+
+#include "OrxonoxPrereqs.h"
+#include "Item.h"
+
+#include <string>
+
+
+namespace orxonox // tolua_export
+{ // tolua_export
+    /**
+        @brief
+            In order to assign attached entities to a ShipPart, a ShipPart with the same name as the corresponding entity needs to be created in the <parts> tag.
+            Here is a (primitive) example of a ModularSpaceShip with ShipParts and PartDestructionEvents defined in XML:
+            @code
+            <ModularSpaceShip
+                ...
+                >
+                    <attached>
+                        <StaticEntity name="generator"  . . .  />
+                        <StaticEntity name="tail" . . . />
+                    </attached>
+                    <parts>
+                        <ShipPart name="generator" . . . >
+                            <destructionevents>
+                                <PartDestructionEvent targetType="ship" targetParam="boostpowerrate" operation="-" value="0.5" message="Your boost-regeneration is reduced!" />
+                            </destructionevents>
+                        </ShipPart>
+                        <ShipPart name="tail" . . . >
+                            <destructionevents>
+                                <PartDestructionEvent ... />
+                            </destructionevents>
+                        </ShipPart>
+                    </parts>
+                    <engines>
+                        <Engine />
+                        <Engine />
+                    </engines>
+                </ModularSpaceShip>
+            @endcode
+
+        @author
+            Fabian 'x3n' Landau, Noe Pedrazzini
+        */
+    class _OrxonoxExport PartDestructionEvent // tolua_export
+        : public Item
+    { // tolua_export
+
+        public:
+
+            /**
+                @brief
+                    List of all allowed parameters.
+                */
+            enum TargetParam
+            {
+                shieldhealth,
+                maxshieldhealth,
+                shieldabsorption,
+                shieldrechargerate,
+                boostpower,         // Amount of available boost
+                boostpowerrate,     // Recharge-rate of boost
+                rotationthrust,
+                boostfactor,
+                speedfront,
+                accelerationfront,
+                null
+            };
+
+            PartDestructionEvent(Context* context);
+            virtual ~PartDestructionEvent();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void execute();
+
+            inline void setValid(bool valid)
+                { this->valid_ = valid; }
+            inline bool isValid()
+                { return this->valid_; }
+
+            void setParent(ShipPart* parent);
+            inline ShipPart* getParent()
+                { return this->parent_; }
+
+            void setTargetType(std::string type);
+            inline std::string getTargetType()
+                { return this->targetType_; }
+
+            void setTargetName(std::string name);
+            inline std::string getTargetName()
+                { return this->targetName_; }
+
+            void setTargetParam(std::string param);
+            inline std::string getTargetParam()
+                { return this->targetName_; }
+
+            void setOperation(std::string operation);
+            inline std::string getOperation()
+                { return this->operation_; }
+
+            void setMessage(std::string msg);
+            inline std::string getMessage()
+                { return this->message_; }
+
+            float operate(float input);
+
+            void setEventValue(float value);
+            inline float getEventValue()
+                { return this->value_; }
+
+        protected:
+
+        private:
+
+            ShipPart* parent_;          //!< Pointer to the ShipPart this event belongs to
+            bool valid_;                //!< Whether this event is valid or not.
+
+            std::string targetType_;    //!< The type of the target. (ship weapon engine)
+            std::string targetName_;    //!< The name of the target.
+            TargetParam targetParam_;   //!< The parameter to be modified
+            std::string operation_;     //!< The operation to be applied
+            float value_;               //!< The value used to do the operation
+            std::string message_;       //!< The message which is shown in chat when the event is executed.
+
+
+
+    }; // tolua_export
+} // tolua_export
+
+#endif /* _PartDestructionEvent_H__ */
Index: code/trunk/src/orxonox/items/ShipPart.cc
===================================================================
--- code/trunk/src/orxonox/items/ShipPart.cc	(revision 10216)
+++ code/trunk/src/orxonox/items/ShipPart.cc	(revision 10216)
@@ -0,0 +1,291 @@
+/*
+ *   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:
+ *      Noe Pedrazzini
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ShipPart.h"
+
+#include <algorithm>
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
+#include "network/NetworkFunction.h"
+#include "Item.h"
+#include "worldentities/pawns/Pawn.h"
+#include "worldentities/pawns/ModularSpaceShip.h"
+#include "gametypes/Gametype.h"
+#include "worldentities/StaticEntity.h"
+#include "items/PartDestructionEvent.h"
+#include "worldentities/BigExplosion.h"
+#include "chat/ChatManager.h"
+
+
+namespace orxonox
+{
+    RegisterClass(ShipPart);
+
+    ShipPart::ShipPart(Context* context)
+        : Item(context)
+    {
+        RegisterObject(ShipPart);
+        this->setAlive(true);
+        this->setEventExecution(true);
+        this->healthMem_ = 100;
+    }
+
+    ShipPart::~ShipPart()
+    {
+
+    }
+
+    void ShipPart::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ShipPart, XMLPort, xmlelement, mode);
+
+        XMLPortParam(ShipPart, "health", setHealth, getHealth, xmlelement, mode).defaultValues(100);
+        XMLPortParam(ShipPart, "maxhealth", setMaxHealth, getMaxHealth, xmlelement, mode).defaultValues(200);
+        XMLPortParam(ShipPart, "initialhealth", setInitialHealth, getInitialHealth, xmlelement, mode).defaultValues(100);
+
+        XMLPortParam(ShipPart, "damageabsorption", setDamageAbsorption, getDamageAbsorption, xmlelement, mode).defaultValues(0.5);
+
+        XMLPortParamTemplate(ShipPart, "explosionposition", setExplosionPosition, getExplosionPosition, xmlelement, mode, Vector3);
+
+        XMLPortObject(ShipPart, PartDestructionEvent, "destructionevents", addDestructionEvent, getDestructionEvent, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Is called when the ShipPart dies.
+        Executes PartDestructionEvents.
+        Tells the ModularSpaceShip to remove this ShipPart.
+    */
+    void ShipPart::death()
+    {
+        //if (!(this->isAlive()))
+            //return;
+
+        this->explode();
+        this->setAlive(false);
+
+        if(eventExecution_)
+        {
+            // Execute all destruction events
+            for (unsigned int i = 0; i < this->eventList_.size(); i++)
+            {
+                this->getDestructionEvent(i)->execute();
+            }
+        }
+
+        // Remove this ShipPart from the parent.
+        this->parent_->removeShipPart(this);
+        delete this;
+    }
+
+    void ShipPart::explode()
+    {
+        BigExplosion* chunk = new BigExplosion(this->getContext());
+        chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * (this->explosionPosition_));
+        //chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * Vector3(this->entityList_[0]->getLocalInertia()));
+        chunk->setVelocity(this->parent_->getVelocity());
+
+        // this->explosionSound_->setPosition(this->parent_->getPosition());
+        // this->explosionSound_->play();
+    }
+
+    /**
+    @brief
+        Add a StaticEntity to the ShipPart.
+    @param engine
+        A pointer to the StaticEntity to be added.
+    */
+    void ShipPart::addEntity(StaticEntity* entity)
+    {
+        OrxAssert(entity != NULL, "The Entity cannot be NULL.");
+        this->entityList_.push_back(entity);
+    }
+
+    /**
+    @brief
+        Get the i-th StaticEntity of the ShipPart.
+    @return
+        Returns a pointer to the i-the StaticEntity. NULL if there is no StaticEntity with that index.
+    */
+    StaticEntity* ShipPart::getEntity(unsigned int index)
+    {
+        if(this->entityList_.size() >= index)
+            return NULL;
+        else
+            return this->entityList_[index];
+    }
+
+    /**
+    @brief
+        Check whether the ShipPart has a particular Entity.
+    @param engine
+        A pointer to the Entity to be checked.
+    */
+    bool ShipPart::hasEntity(StaticEntity* entity) const
+    {
+        for(unsigned int i = 0; i < this->entityList_.size(); i++)
+        {
+            if(this->entityList_[i] == entity)
+                return true;
+        }
+        return false;
+    }
+
+    /**
+    @brief
+        Add a PartDestructionEvent to the ShipPart.
+    @param engine
+        A pointer to the PartDestructionEvent to be added.
+    */
+    void ShipPart::addDestructionEvent(PartDestructionEvent* event)
+    {
+        OrxAssert(event != NULL, "The PartDestructionEvent cannot be NULL.");
+        event->setParent(this);
+        this->eventList_.push_back(event);
+    }
+
+    /**
+    @brief
+        Get the i-th PartDestructionEvent of the ShipPart.
+    @return
+        Returns a pointer to the i-the PartDestructionEvent. NULL if there is no PartDestructionEvent with that index.
+    */
+    PartDestructionEvent* ShipPart::getDestructionEvent(unsigned int index)
+    {
+        if(this->eventList_.size() <= index)
+            return NULL;
+        else
+            return this->eventList_[index];
+    }
+
+    void ShipPart::setDamageAbsorption(float value)
+    {
+        this->damageAbsorption_ = value;
+    }
+
+    void ShipPart::setParent(ModularSpaceShip* ship)
+    {
+        this->parent_ = ship;
+    }
+
+    /**
+    @brief
+        Sets the health of the ShipPart.
+    */
+    void ShipPart::setHealth(float health)
+    {
+        this->health_ = health;
+    }
+
+    void ShipPart::setAlive(bool var)
+    {
+        this->alive_ = var;
+        orxout() << "ShipPart " << this->getName() << " alive_: " << this->alive_ << endl;
+    }
+
+    /**
+    @brief
+        Handles a received hit.
+    */
+    void ShipPart::handleHit(float damage, float healthdamage, float shielddamage, Pawn* originator)
+    {
+        if (parent_->getGametype() && parent_->getGametype()->allowPawnDamage(parent_, originator))
+        {
+            if (shielddamage >= parent_->getShieldHealth())
+            {
+                parent_->setShieldHealth(0);
+                this->setHealth(this->health_ - (healthdamage + damage) * this->damageAbsorption_);
+                parent_->setHealth(parent_->getHealth() - (healthdamage + damage) * (1 - this->damageAbsorption_));
+            }
+            else
+            {
+                parent_->setShieldHealth(parent_->getShieldHealth() - shielddamage);
+
+                // remove remaining shieldAbsorpton-Part of damage from shield
+                shielddamage = damage * parent_->getShieldAbsorption();
+                shielddamage = std::min(parent_->getShieldHealth(),shielddamage);
+                parent_->setShieldHealth(parent_->getShieldHealth() - shielddamage);
+
+                // set remaining damage to health
+                this->setHealth(this->health_ - ((damage - shielddamage) - healthdamage) * this->damageAbsorption_);
+                parent_->setHealth(parent_->getHealth() - ((damage - shielddamage) - healthdamage) * (1- this->damageAbsorption_));
+            }
+        }
+        if (this->health_ < 0)
+            this->alive_ = false;
+            //this->death();
+
+        // (Ugly) Chatoutput of health, until a GUI for modularspaceships-shipparts is implemented.
+        if ((this->health_ < 0.2 * this->maxHealth_) && (this->healthMem_ == 40))
+        {
+            this->healthMem_ = 20;
+            ChatManager::message("ShipPart " + this->getName() + " remaining health is 20%!");
+            return;
+        }
+        if ((this->health_ < 0.4 * this->maxHealth_) && (this->healthMem_ == 60))
+        {
+            this->healthMem_ = 40;
+            ChatManager::message("ShipPart " + this->getName() + " remaining health is 40%!");
+            return;
+        }
+        if ((this->health_ < 0.6 * this->maxHealth_) && (this->healthMem_ == 80))
+        {
+            this->healthMem_ = 60;
+            ChatManager::message("ShipPart " + this->getName() + " remaining health is 60%!");
+            return;
+        }
+        if ((this->health_ < 0.8 * this->maxHealth_) && (this->healthMem_ == 100))
+        {
+            this->healthMem_ = 80;
+            ChatManager::message("ShipPart " + this->getName() + " remaining health is 80%!");
+            return;
+        }
+    }
+
+
+    /**
+    @brief
+        Adds the ShipPart to the input SpaceShip.
+    @param ship
+        A pointer to the SpaceShip to which the ShipPart is added.
+    */
+    /*void ShipPart::addToSpaceShip(ModularSpaceShip* ship)
+    {
+        this->parent_ = ship;
+
+        if (ship)
+        {
+            this->parentID_ = ship->getObjectID();
+            if (!ship->hasShipPart(this))
+                ship->addShipPart(this);
+        }
+    }*/
+
+}
Index: code/trunk/src/orxonox/items/ShipPart.h
===================================================================
--- code/trunk/src/orxonox/items/ShipPart.h	(revision 10216)
+++ code/trunk/src/orxonox/items/ShipPart.h	(revision 10216)
@@ -0,0 +1,134 @@
+/*
+ *   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:
+ *      Noe Pedrazzini
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ShipPart_H__
+#define _ShipPart_H__
+
+#include "OrxonoxPrereqs.h"
+#include "Item.h"
+#include "items/PartDestructionEvent.h"
+
+#include <string>
+
+
+namespace orxonox // tolua_export
+{ // tolua_export
+    class _OrxonoxExport ShipPart // tolua_export
+        : public Item
+    { // tolua_export
+
+        public:
+            ShipPart(Context* context);
+            virtual ~ShipPart();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void handleHit(float damage, float healthdamage, float shielddamage, Pawn* originator);
+
+            virtual void death();
+            virtual void explode();
+
+            //virtual void attachTo(Pawn* newParent);
+            //virtual void detach();
+
+            void addEntity(StaticEntity* entity);
+            StaticEntity* getEntity(unsigned int index);
+            bool hasEntity(StaticEntity* entity) const;
+
+            void addDestructionEvent(PartDestructionEvent* event);
+            PartDestructionEvent* getDestructionEvent(unsigned int index);
+
+            virtual void setDamageAbsorption(float value);
+            inline float getDamageAbsorption()
+                { return this->damageAbsorption_; }
+
+            void setParent(ModularSpaceShip* ship);
+            inline ModularSpaceShip* getParent()
+                { return this->parent_; }
+
+            void setAlive(bool var);
+            inline bool isAlive()
+                { return this->alive_; }
+
+            inline void setEventExecution(bool var)
+                { this->eventExecution_ = var; }
+            inline bool isEventExecution()
+                { return this->eventExecution_; }
+
+            virtual void setHealth(float health);
+            inline void addHealth(float health)
+                { this->setHealth(this->health_ + health); }
+            inline void removeHealth(float health)
+                { this->setHealth(this->health_ - health); }
+            inline float getHealth() const
+                { return this->health_; }
+
+            inline void setMaxHealth(float maxhealth)
+                { this->maxHealth_ = maxhealth; this->setHealth(this->health_); }
+            inline float getMaxHealth() const
+                { return this->maxHealth_; }
+
+            inline void setInitialHealth(float initialhealth)
+                { this->initialHealth_ = initialhealth; this->setHealth(initialhealth); }
+            inline float getInitialHealth() const
+                { return this->initialHealth_; }
+
+            inline void setExplosionPosition(Vector3 pos)
+                { this->explosionPosition_ = pos; }
+            inline Vector3 getExplosionPosition()
+                { return this->explosionPosition_; }
+
+
+            // FIXME: (noep) Why doesn't this work? Works fine in Engine.h
+            //void addToSpaceShip(ModularSpaceShip* ship);
+
+        protected:
+            ModularSpaceShip* parent_;
+            unsigned int parentID_;     // Object ID of the SpaceShip the Part is mounted on.
+
+            float damageAbsorption_;
+            float health_;
+            float maxHealth_;
+            float initialHealth_;
+
+        private:
+            std::vector<StaticEntity*> entityList_;         // List of all entities which belong to this part
+            std::vector<PartDestructionEvent*> eventList_;  // The list of all PartDestructionEvent assigned to this ShipPart.
+
+            bool alive_;
+            bool eventExecution_;
+
+            float healthMem_;
+
+            Vector3 explosionPosition_;
+
+
+    }; // tolua_export
+} // tolua_export
+
+#endif /* _ShipPart_H__ */
Index: code/trunk/src/orxonox/worldentities/MovableEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/MovableEntity.cc	(revision 10215)
+++ code/trunk/src/orxonox/worldentities/MovableEntity.cc	(revision 10216)
@@ -72,5 +72,5 @@
     }
 
-    bool MovableEntity::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+    bool MovableEntity::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
     {
         if (GameMode::isMaster() && enableCollisionDamage_)
@@ -80,5 +80,5 @@
             {
                 float damage = this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length();
-                victim->hit(0, contactPoint, damage);
+                victim->hit(0, contactPoint, ownCollisionShape, damage);
             }
         }
@@ -86,5 +86,4 @@
         return false;
     }
-
 
     void MovableEntity::registerVariables()
Index: code/trunk/src/orxonox/worldentities/MovableEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/MovableEntity.h	(revision 10215)
+++ code/trunk/src/orxonox/worldentities/MovableEntity.h	(revision 10216)
@@ -47,5 +47,5 @@
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
 
             using WorldEntity::setPosition;
Index: code/trunk/src/orxonox/worldentities/WorldEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/WorldEntity.h	(revision 10215)
+++ code/trunk/src/orxonox/worldentities/WorldEntity.h	(revision 10216)
@@ -374,5 +374,5 @@
                 Condition is that enableCollisionCallback() was called.
             */
-            virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
+            virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
                 { return false; } /* With false, Bullet assumes no modification to the collision objects. */
 
Index: code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt	(revision 10215)
+++ code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt	(revision 10216)
@@ -4,4 +4,5 @@
   Pawn.cc
   SpaceShip.cc
+  ModularSpaceShip.cc
   TeamBaseMatchBase.cc
   Destroyer.cc
Index: code/trunk/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10216)
+++ code/trunk/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10216)
@@ -0,0 +1,308 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      Noe Pedrazzini
+ *
+ */
+
+#include "ModularSpaceShip.h"
+
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+
+#include "core/CoreIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "core/Template.h"
+#include "core/XMLPort.h"
+#include "util/Math.h"
+#include "gametypes/Gametype.h"
+#include "core/command/ConsoleCommand.h"
+
+#include "items/ShipPart.h"
+#include "items/Engine.h"
+#include "worldentities/StaticEntity.h"
+#include <BulletCollision/CollisionShapes/btCollisionShape.h>
+#include <BulletCollision/CollisionShapes/btCompoundShape.h>
+
+
+
+namespace orxonox
+{
+    SetConsoleCommand("ModularSpaceShip", "killshippart", &ModularSpaceShip::killShipPartStatic);
+
+    RegisterClass(ModularSpaceShip);
+
+    std::map<StaticEntity*, ShipPart*>* ModularSpaceShip::partMap_s = 0;
+
+    ModularSpaceShip::ModularSpaceShip(Context* context) : SpaceShip(context)
+    {
+        RegisterObject(ModularSpaceShip);
+
+        this->registerVariables();
+
+        ModularSpaceShip::partMap_s = &(this->partMap_);
+
+    }
+
+    ModularSpaceShip::~ModularSpaceShip()
+    {
+        if (this->isInitialized())
+        {
+
+        }
+    }
+
+    void ModularSpaceShip::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ModularSpaceShip, XMLPort, xmlelement, mode);
+        XMLPortObject(ModularSpaceShip, ShipPart, "parts", addShipPart, getShipPart, xmlelement, mode);
+    }
+
+    void ModularSpaceShip::registerVariables()
+    {
+        return;
+    }
+
+    /**
+    @brief
+        Searches for ShipParts matching to StaticEntities.
+    */
+    void ModularSpaceShip::updatePartAssignment()
+    {
+        // iterate through all attached objects
+        for (unsigned int i=0; i < this->getAttachedObjects().size(); i++)
+        {
+            if (this->getAttachedObject(i) == NULL)
+            {
+                break;
+            }
+            // iterate through all attached parts
+            for(unsigned int j = 0; j < this->partList_.size(); j++)
+            {
+                // if the name of the part matches the name of the object, add the object to that parts entitylist (unless it was already done).
+                if((this->partList_[j]->getName() == this->getAttachedObject(i)->getName()) && !this->partList_[j]->hasEntity(orxonox_cast<StaticEntity*>(this->getAttachedObject(i))))
+                {
+                    // The Entity is added to the part's entityList_
+                    this->partList_[j]->addEntity(orxonox_cast<StaticEntity*>(this->getAttachedObject(i)));
+                    // An entry in the partMap_ is created, assigning the part to the entity.
+                    this->addPartEntityAssignment((StaticEntity*)(this->getAttachedObject(i)), this->partList_[j]);
+                }
+            }
+        }
+    }
+
+    /**
+    @brief
+        Creates a new assignment for the given StaticEntity and ShipPart in the partMap_
+    @param entity
+        A pointer to the StaticEntity
+    @param part
+        A pointer to the ShipPart.
+    */
+    void ModularSpaceShip::addPartEntityAssignment(StaticEntity* entity, ShipPart* part)
+    {
+        if (!entity || !part)
+            return;
+
+        if (this->partMap_.find(entity) != this->partMap_.end())
+                {
+                    orxout(internal_warning) << "Assigning an Entity to multiple parts is not yet supported." << endl;
+                    return;
+                }
+
+        this->partMap_[entity] = part;
+    }
+
+
+    /**
+    @brief
+        Get the ShipPart an attached entity belongs to.
+    @param entity
+        The entity to be searched.
+    @return
+        Returns a pointer to the ShipPart the entity belongs to.
+    */
+    ShipPart* ModularSpaceShip::getPartOfEntity(StaticEntity* entity) const
+    {
+        for (std::map<StaticEntity*, ShipPart*>::const_iterator it = this->partMap_.begin(); it != this->partMap_.end(); ++it)
+        {
+            if (it->first == entity)
+                return it->second;
+        }
+        return NULL;
+    }
+
+    /**
+    @brief
+        If the damage occurred on an attached StaticEntity, the damage is given to the corresponding ShipPart to handle.
+    */
+    void ModularSpaceShip::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
+    {
+        if (this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != NULL)
+            this->getPartOfEntity((StaticEntity*)(cs->getUserPointer()))->handleHit(damage, healthdamage, shielddamage, originator);
+        else
+            SpaceShip::damage(damage, healthdamage, shielddamage, originator, cs);
+    }
+
+    /**
+    @brief
+        STATIC: Needed for consolecommand. Kills the ShipPart with the given name. Used from the console-command "ModularSpaceShip killshippart [string]".
+    @param name
+        The name of the part to be killed.
+    */
+    void ModularSpaceShip::killShipPartStatic(std::string name)
+    {
+        for (std::map<StaticEntity*, ShipPart*>::const_iterator it = ModularSpaceShip::partMap_s->begin(); it != ModularSpaceShip::partMap_s->end(); ++it)
+        {
+            if (it->second->getName() == name)
+            {
+                it->second->setAlive(false);
+                return;
+            }
+        }
+        orxout(internal_warning) << "Could not apply damage to ShipPart \"" << name << "\". Part not found." << endl;
+    }
+
+    /**
+    @brief
+        Kills the ShipPart with the given name. Used from the console-command "ModularSpaceShip killshippart [string]".
+    @param name
+        The name of the part to be killed.
+    */
+    void ModularSpaceShip::killShipPart(std::string name)
+    {
+        for (std::map<StaticEntity*, ShipPart*>::const_iterator it = ModularSpaceShip::partMap_.begin(); it != ModularSpaceShip::partMap_.end(); ++it)
+        {
+            if (it->second->getName() == name)
+            {
+                it->second->setAlive(false);
+                return;
+            }
+        }
+        orxout(internal_warning) << "Could not apply damage to ShipPart \"" << name << "\". Part not found." << endl;
+    }
+
+    /**
+    @brief
+        Add a ShipPart to the SpaceShip.
+    @param engine
+        A pointer to the ShipPart to be added.
+    */
+    void ModularSpaceShip::addShipPart(ShipPart* part)
+    {
+        OrxAssert(part != NULL, "The ShipPart cannot be NULL.");
+        this->partList_.push_back(part);
+        part->setParent(this);
+        this->updatePartAssignment();
+    }
+
+    /**
+    @brief
+        Get the i-th ShipPart of the SpaceShip.
+    @return
+        Returns a pointer to the i-the ShipPart. NULL if there is no ShipPart with that index.
+    */
+    ShipPart* ModularSpaceShip::getShipPart(unsigned int index)
+    {
+        if(this->partList_.size() <= index)
+            return NULL;
+        else
+            return this->partList_[index];
+    }
+
+    /**
+    @brief
+        Looks for an attached ShipPart with a certain name.
+    @param name
+        The name of the ShipPart to be returned.
+    @return
+        Pointer to the ShipPart with the given name, or NULL if not found.
+    */
+    ShipPart* ModularSpaceShip::getShipPartByName(std::string name)
+    {
+        for(std::vector<ShipPart*>::iterator it = this->partList_.begin(); it != this->partList_.end(); ++it)
+        {
+            if(orxonox_cast<ShipPart*>(*it)->getName() == name)
+            {
+                return orxonox_cast<ShipPart*>(*it);
+            }
+        }
+        orxout(internal_warning) << "Couldn't find ShipPart with name \"" << name << "\"." << endl;
+        return NULL;
+    }
+
+    /**
+    @brief
+        Check whether the SpaceShip has a particular Engine.
+    @param engine
+        A pointer to the Engine to be checked.
+    */
+    bool ModularSpaceShip::hasShipPart(ShipPart* part) const
+    {
+        for(unsigned int i = 0; i < this->partList_.size(); i++)
+        {
+            if(this->partList_[i] == part)
+                return true;
+        }
+        return false;
+    }
+
+
+    /**
+    @brief
+        Removes a ShipPart from the SpaceShip, destroying the corresponding StaticEntity
+    @param part
+        The ShipPart to be removed.
+    */
+    void ModularSpaceShip::removeShipPart(ShipPart* part)
+    {
+        // Remove the part from the partList_
+        std::vector<ShipPart*>::iterator it = this->partList_.begin();
+        for(unsigned int i = 0; i < this->partList_.size(); i++)
+        {
+            if(this->partList_[i] == part)
+            {
+                this->partList_.erase(it);
+                break;
+            }
+            it++;
+        }
+        // Remove the part-entity assignment and detach the Entity of this ShipPart
+        for (std::map<StaticEntity*, ShipPart*>::iterator itt = this->partMap_.begin(); itt != this->partMap_.end(); )
+        {
+            if (itt->second == part)
+            {
+                this->detach(itt->first);
+                itt->first->destroy();
+                //itt->first->setActive(false);
+                //itt->first->setVisible(false);
+                //itt->first->setCollisionResponse(false);
+                //itt->first->setCollisionType(None);
+                //itt->first->deactivatePhysics();
+                this->partMap_.erase(itt++);
+            } else {
+                ++itt;
+            }
+        }
+    }
+}
Index: code/trunk/src/orxonox/worldentities/pawns/ModularSpaceShip.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/ModularSpaceShip.h	(revision 10216)
+++ code/trunk/src/orxonox/worldentities/pawns/ModularSpaceShip.h	(revision 10216)
@@ -0,0 +1,141 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      Noe Pedrazzini
+ *
+ */
+
+#ifndef _ModularSpaceShip_H__
+#define _ModularSpaceShip_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <string>
+#include <LinearMath/btVector3.h>
+
+#include "tools/Timer.h"
+#include "util/Math.h"
+#include "util/OrxAssert.h"
+
+#include "SpaceShip.h"
+#include "items/ShipPart.h"
+#include <map>
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        The SpaceShip is the principal entity through which the player interacts with the game. Its main function is to fly, however many things, such as @ref orxonox::Engine Engines or @ref orxonox::Weapon Weapons, can be attached to it.
+        The ModularSpaceShip is an extension of a @ref orxonox::SpaceShip SpaceShip, which uses @ref orxonox::ShipPart ShipParts to allow entities attached to it to be destroyed individually.
+
+        There are several parameters that define the behavior of the ModularSpaceShip>
+        - The <b>rotationThrust</b>, specifies the force with which the ModularSpaceShip rotates.
+        - The <b>boost</b>, there are quite some parameters pertaining to boosting. The boost is a special move of the ModularSpaceShip, where, for a limited amount of time, it can fly considerably faster than usual. The <b>boostPower</b> is the amount of power available for boosting. The <b>boostPowerRate</b> is the rate at which the boost power is replenished. The <b>boostRate</b> is the rate at which boosting uses power. And the <b>boostCooldownDuration</b> is the time the ModularSpaceShip cannot boost, once all the boost power has been used up. Naturally all of these parameters must be non-negative.
+        - The <b>boost shaking</b>, when the ModularSpaceShip boosts, the camera shakes to create a more immersive effect. Two parameters can be used to adjust the effect. The <b>shakeFrequency</b> is the frequency with which the camera shakes. And the <b>shakeAmplitude</b> is the amount with which the camera shakes. Again these parameters must bee non-negative.
+        - The <b>lift</b> creates a more natural flight feeling through the addition of a lift force. There are again tow parameters that can be specified. The <b>lift</b> which is the lift force that is applied. And the <b>stallSpeed</b> which is the forward speed after which no more lift is generated.
+
+        As mentioned @ref orxonox::Engine Engines can be mounted on the ModularSpaceShip.
+        In order to assign attached entities to a ShipPart, a ShipPart with the same name as the corresponding entity needs to be created in the <parts> tag.
+        Here is a (primitive) example of a ModularSpaceShip defined in XML:
+        @code
+        <ModularSpaceShip
+            rotationThrust    = 50
+
+            lift = 1;
+            stallSpeed = 220;
+
+            boostPower            = 15
+            boostPowerRate        = 1
+            boostRate             = 5
+            boostCooldownDuration = 10
+
+            shakeFrequency = 15
+            shakeAmplitude = 9
+
+            collisionType     = "dynamic"
+            mass              = 100
+            linearDamping     = 0.7
+            angularDamping    = 0.9999999
+            >
+                <attached>
+                    <StaticEntity name="wing"  . . .  />
+                    <StaticEntity name="tail" . . . />
+                </attached>
+                <parts>
+                    <ShipPart name="wing" . . . />
+                    <ShipPart name="tail" . . . />
+                </parts>
+                <engines>
+                    <Engine />
+                    <Engine />
+                </engines>
+            </ModularSpaceShip>
+        @endcode
+
+    @author
+        Fabian 'x3n' Landau, Noe Pedrazzini
+    */
+    class _OrxonoxExport ModularSpaceShip : public SpaceShip
+    {
+        public:
+            ModularSpaceShip(Context* context);
+            virtual ~ModularSpaceShip();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void addPartEntityAssignment(StaticEntity* entity, ShipPart* part);
+            ShipPart* getPartOfEntity(StaticEntity* entity) const;
+
+            virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL, const btCollisionShape* cs = NULL);
+
+            static void killShipPartStatic(std::string name);
+            void killShipPart(std::string name);
+
+            void addShipPart(ShipPart* part);
+            ShipPart* getShipPart(unsigned int index);
+            ShipPart* getShipPartByName(std::string name);
+            bool hasShipPart(ShipPart* part) const;
+            void removeShipPart(ShipPart* part);
+
+            inline void setRotationThrust(float val)
+                { this->rotationThrust_ = val; }
+            inline float getRotationThrust()
+                { return this->rotationThrust_; }
+
+            virtual void updatePartAssignment();
+
+        protected:
+
+
+        private:
+            void registerVariables();
+            std::vector<ShipPart*> partList_;                       // The list of all Parts mounted on this ModularSpaceShip.
+            std::map<StaticEntity*, ShipPart*> partMap_;            // Map of Part-Entity-assignments
+            static std::map<StaticEntity*, ShipPart*>* partMap_s;
+        
+    };
+}
+
+#endif /* _ModularSpaceShip_H__ */
Index: code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 10215)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 10216)
@@ -244,5 +244,5 @@
     }
 
-    void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator)
+    void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
     {
         // Applies multiplier given by the DamageBoost Pickup.
@@ -279,19 +279,18 @@
 
 */
-    void Pawn::hit(Pawn* originator, const Vector3& force, float damage, float healthdamage, float shielddamage)
+    void Pawn::hit(Pawn* originator, const Vector3& force, const btCollisionShape* cs, float damage, float healthdamage, float shielddamage)
     {
         if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
         {
-            this->damage(damage, healthdamage, shielddamage, originator);
+            this->damage(damage, healthdamage, shielddamage, originator, cs);
             this->setVelocity(this->getVelocity() + force);
         }
     }
 
-
-    void Pawn::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage, float shielddamage)
+    void Pawn::hit(Pawn* originator, btManifoldPoint& contactpoint, const btCollisionShape* cs, float damage, float healthdamage, float shielddamage)
     {
         if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
         {
-            this->damage(damage, healthdamage, shielddamage, originator);
+            this->damage(damage, healthdamage, shielddamage, originator, cs);
 
             if ( this->getController() )
@@ -559,5 +558,3 @@
         return BLANKSTRING;
     }
-
-
 }
Index: code/trunk/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 10215)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 10216)
@@ -126,6 +126,6 @@
             //virtual void hit(Pawn* originator, const Vector3& force, float damage);
             //virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage);
-            virtual void hit(Pawn* originator, const Vector3& force, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
-            virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
+            virtual void hit(Pawn* originator, const Vector3& force, const btCollisionShape* cs, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
+            virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, const btCollisionShape* cs, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
 
             virtual void kill();
@@ -196,5 +196,5 @@
 
             //virtual void damage(float damage, Pawn* originator = 0);
-            virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL);
+            virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL, const btCollisionShape* cs = NULL);
 
             bool bAlive_;
Index: code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 10215)
+++ code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 10216)
@@ -342,4 +342,22 @@
     /**
     @brief
+        Looks for an attached Engine with a certain name.
+    @param name
+        The name of the engine to be returned.
+    @return
+        Pointer to the engine with the given name, or NULL if not found.
+    */
+    Engine* SpaceShip::getEngineByName(const std::string& name)
+    {
+        for(size_t i = 0; i < this->engineList_.size(); ++i)
+            if(this->engineList_[i]->getName() == name)
+                return this->engineList_[i];
+
+        orxout(internal_warning) << "Couldn't find Engine with name \"" << name << "\"." << endl;
+        return NULL;
+    }
+
+    /**
+    @brief
         Remove and destroy all Engines of the SpaceShip.
     */
@@ -355,4 +373,6 @@
     @param engine
         A pointer to the Engine to be removed.
+    @note
+        Don't forget to reset the Engine's ship pointer after it was removed (or destroy the engine).
     */
     void SpaceShip::removeEngine(Engine* engine)
Index: code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 10215)
+++ code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 10216)
@@ -124,4 +124,5 @@
             bool hasEngine(Engine* engine) const; // Check whether the SpaceShip has a particular Engine.
             Engine* getEngine(unsigned int i); // Get the i-th Engine of the SpaceShip.
+            Engine* getEngineByName(const std::string& name);
             /**
             @brief Get the list of all Engines that are mounted on the SpaceShip.
