Index: /code/trunk/data/gui/layouts/Dialog.layout
===================================================================
--- /code/trunk/data/gui/layouts/Dialog.layout	(revision 11783)
+++ /code/trunk/data/gui/layouts/Dialog.layout	(revision 11783)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="DefaultWindow" Name="orxonox/Dialog/Background" > 
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialog/Options" >
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.15,0},{0.85,0},{0.8,0}}" />
+
+            <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialog/Person" >
+                <Property Name="Alpha" Value="0.8" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="LeftAligned" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="CentreAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.05,0},{0.25,0},{0.15,0}}" />
+            </Window>
+
+            <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestionWrapper" >
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="HorzFormatting" Value="HorzCentred" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{0.3,0},{0.05,0},{0.95,0},{0.45,0}}" />
+                <Window Type="MenuWidgets/ScrollablePane" Name="orxonox/QuestionPane" >
+                        <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />
+                        <Property Name="HorzStepSize" Value="0.005" />
+                        <Property Name="VertStepSize" Value="0.005" />
+                        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                        <Property Name="HorzOverlapSize" Value="0.01" />
+                        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0.997,0},{0.997,0}}" />
+                        <Property Name="VertOverlapSize" Value="0.01" />
+                        <Property Name="HorzScrollPosition" Value="0" />
+                        <Property Name="VertScrollPosition" Value="0" />
+                        <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialog/Question" >
+                            <Property Name="Alpha" Value="0.8" />
+                            <Property Name="InheritsAlpha" Value="False" />
+                            <Property Name="HorzFormatting" Value="WordWrapLeftAligned" />
+                            <Property Name="VertFormatting" Value="CentreAligned" />
+                            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+                        </Window>
+                </Window>
+            </Window>
+
+            <Window Type="MenuWidgets/Listbox" Name="orxonox/AnsListbox" >
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.5,0},{0.95,0},{0.85,0}}" />
+                <Event Name="ItemSelectionChanged" Function="Dialog.answer_changed" />
+            </Window>
+        
+            <Window Type="MenuWidgets/Button" Name="orxonox/SayButton" >
+                <Property Name="Text" Value="Say" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.425,0},{0.9,0},{0.575,0},{0.975,0}}" />
+                <Event Name="Clicked" Function="Dialog.Button_clicked"/>
+            </Window>
+        </Window>
+         
+    </Window>
+</GUILayout>
Index: de/trunk/data/gui/layouts/Dialogue.layout
===================================================================
--- /code/trunk/data/gui/layouts/Dialogue.layout	(revision 11782)
+++ 	(revision )
@@ -1,26 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<GUILayout >
-    <Window Type="DefaultWindow" Name="orxonox/Dialogue/Background" > 
-        <Property Name="InheritsAlpha" Value="False" />
-        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
-        <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialogue/Inventory" >
-            <Property Name="Alpha" Value="0.8" />
-            <Property Name="InheritsAlpha" Value="False" />
-            <Property Name="HorzFormatting" Value="HorzCentred" />
-            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="VertFormatting" Value="TopAligned" />
-            <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.15,0},{0.85,0},{0.8,0}}" />
-            <Window Type="MenuWidgets/StaticText" Name="orxonox/Dialogue/Wrapper" >
-                <Property Name="TextColours" Value="FF4444FF" />
-                <Property Name="InheritsAlpha" Value="False" />
-                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-                <Property Name="HorzFormatting" Value="HorzCentred" />
-                <Property Name="VertFormatting" Value="TopAligned" />
-                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
-            </Window>
-        </Window>
-         
-    </Window>
-</GUILayout>
Index: /code/trunk/data/gui/scripts/Dialog.lua
===================================================================
--- /code/trunk/data/gui/scripts/Dialog.lua	(revision 11783)
+++ /code/trunk/data/gui/scripts/Dialog.lua	(revision 11783)
@@ -0,0 +1,127 @@
+-- Dialog.lua
+
+local P = createMenuSheet("Dialog")
+
+P.wrapper = nil
+P.detailsWindows = {}
+P.showing = false
+P.choice = 0
+P.scrollbarWidth = 12
+
+function P.onLoad() --wird ausgefuert wenn Fenster geladen
+    P.wrapper = nil
+end
+
+function P.onShow() --wird ausgefuert wenn Dialogfenster gezeigt
+
+    orxonox.CommandExecutor:execute("setTimeFactor 0")
+    P.createDialog()
+    P.showing = true
+
+end
+
+function P.onHide() --aufgefuert wenn Fenster geschlossen wird
+    orxonox.CommandExecutor:execute("setTimeFactor 1")
+    P.showing = false
+    P.cleanup(true)
+end
+
+function P.createDialog() -- initiallisiert das Dialog Fenster, setzt Namen sowie die erste Frage mit enstprechenden Antworten
+
+    local manager = orxonox.DialogManager:getInstance()
+    
+    
+    local personfield = winMgr:getWindow("orxonox/Dialog/Person")
+    local person = manager:getPerson()
+    personfield:setText(person)
+
+    local questionfield = winMgr:getWindow("orxonox/Dialog/Question")
+    local question = manager:getQuestion()
+    questionfield:setText(question)
+
+    local listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
+    CEGUI.toListbox(listboxwindow):resetList()
+
+    local ansList = {}
+    local anssize = manager:getSize()
+
+    for index = 0, anssize -1, 1 do
+        table.insert(ansList, manager:getAnswer(index))
+    end  
+
+    for k,v in pairs(ansList) do
+        item = CEGUI.createListboxTextItem(v)
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        CEGUI.toListbox(listboxwindow):addItem(item)
+    end
+end
+
+function P.updateDialog()   --updated den Dialog entsprechend der Ausgeaehlten option der letzten Frage, setzt Frage und Antwortmoeglichkeiten neu
+    local manager = orxonox.DialogManager:getInstance()
+    manager:update(P.choice)
+
+    local questionfield = winMgr:getWindow("orxonox/Dialog/Question")
+    local question = manager:getQuestion()
+    questionfield:setText(question)
+
+    local listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
+    listboxwindow:resetList()
+
+    local ansList = {}
+    local anssize = manager:getSize()
+
+    for index = 0, anssize -1, 1 do
+        table.insert(ansList, manager:getAnswer(index))
+    end  
+
+    for k,v in pairs(ansList) do
+        item = CEGUI.createListboxTextItem(v)
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        CEGUI.toListbox(listboxwindow):addItem(item)
+    end
+
+    P.choice = 0
+end
+
+function P.answer_changed(e)    --wird aufgerufen falls Auswahl geaendert wird und setzt enstprechenden Indexparameter  
+    listboxwindow = winMgr:getWindow("orxonox/AnsListbox")
+    selection = listboxwindow:getFirstSelectedItem()
+    if selection ~= nil then
+    P.choice = listboxwindow:getItemIndex(selection)
+    else 
+        P.choice = 0
+    end
+end
+
+
+function P.cleanup(destroyDetails)  --loest Fenster wieder auf (!nicht selbst geschrieben, nur uebernommen, eventuell nicht noetiger code)
+
+    if P.wrapper ~= nil then
+        winMgr:destroyWindow(P.wrapper)
+    end
+    
+    --Destroy details windows.
+    if destroyDetails == false then
+        return
+    end
+    for k,v in pairs(P.detailsWindows) do
+        if v ~= nil then
+            P.destroyDetailWindow(k)
+        end
+    end
+    
+end
+
+
+
+function P.Button_clicked(e)    --wird bei click auf say knopf ausgeloest, entscheidet ob Dialog schliesst oder updated und fuert entsprechen aus
+    local ending = orxonox.DialogManager:getInstance():endtest(P.choice)
+    
+    if ending then
+        orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialog")
+    else 
+        P.updateDialog(index)
+    end
+end
+
+return P
Index: de/trunk/data/gui/scripts/Dialogue.lua
===================================================================
--- /code/trunk/data/gui/scripts/Dialogue.lua	(revision 11782)
+++ 	(revision )
@@ -1,144 +1,0 @@
-
--- Dialogue.lua
-
-local P = createMenuSheet("Dialogue")
-
-P.wrapper = nil
-P.detailsWindows = {}
-P.detailPickups = {}
-P.pickupsList = {}
-
-P.showing = false
-
--- Design parameters
-P.imageHeight = 50
-P.detailImageSize = 100
-P.textHeight = 30
-P.buttonWidth = 85
-
-function P.onLoad()
-    P.wrapper = nil
-    P.detailsWindows = {}
-    P.detailPickups = {}
-    P.pickupsList = {}
-end
-
-function P.onShow()
-    orxonox.CommandExecutor:execute("setTimeFactor 0")
-    P.createInventory()
-    P.showing = true
-
-end
-
-function P.onHide()
-    orxonox.CommandExecutor:execute("setTimeFactor 1")
-    P.showing = false
-    P.cleanup(true)
-end
-
-function P.update()
-    P.updateInventory()
-    if P.showing == false then
-        return
-    end
-
-    -- Update opened detail windows.
-    
-
-    -- Update main inventory.
-    P.cleanup(false)
-    P.createInventory()
-    -- TODO: Recover scrolling position
-    
-end
-
-function P.createInventory()
-
-    local pickupManager = orxonox.DialogueManager:getInstance()
-    
-    root = winMgr:getWindow("orxonox/Dialogue/Inventory")
-    local question = orxonox.DialogueManager:getInstance():getquestion()
-    root:setText(question)
-    P.wrapper = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/Dialogue/Inventory/Wrapper")
-    P.wrapper:setSize(CEGUI.UVector2(CEGUI.UDim(1,0),CEGUI.UDim(1,0)))
-    root:addChildWindow(P.wrapper)
-    
-    
-    detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton")
-    local a1 = orxonox.DialogueManager:getInstance():getanswers1()
-    detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.25, (P.imageHeight-P.textHeight)/2)))
-    detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0.8, 0), CEGUI.UDim(0, P.textHeight)))
-    detailsButton:setText(a1)
-    orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name ..".a1Button_clicked")
-    P.wrapper:addChildWindow(detailsButton)
-
-    a2Button = winMgr:createWindow("MenuWidgets/Button", "/a2Button")
-    local a2 = orxonox.DialogueManager:getInstance():getanswers2()
-    a2Button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.4, (P.imageHeight-P.textHeight)/2)))
-    a2Button:setSize(CEGUI.UVector2(CEGUI.UDim(0.8, 0), CEGUI.UDim(0, P.textHeight)))
-    a2Button:setText(a2)
-    orxonox.GUIManager:subscribeEventHelper(a2Button, "Clicked", P.name ..".a2Button_clicked")
-    P.wrapper:addChildWindow(a2Button)
-
-
-end
-
-function P.updateInventory()
-    local questionn = orxonox.DialogueManager:getInstance():getquestion()
-    root:setText(questionn)
-    local a1n = orxonox.DialogueManager:getInstance():getanswers1()
-    detailsButton:setText(a1n)
-    local a2n = orxonox.DialogueManager:getInstance():getanswers2()
-    a2Button:setText(a2n)
-
-end
-
-
-function P.cleanup(destroyDetails)
-    
-    if P.wrapper ~= nil then
-        winMgr:destroyWindow(P.wrapper)
-    end
-    
-    --Destroy details windows.
-    if destroyDetails == false then
-        return
-    end
-    for k,v in pairs(P.detailsWindows) do
-        if v ~= nil then
-            P.destroyDetailWindow(k)
-        end
-    end
-    
-end
-
-
-
-function P.a1Button_clicked(e)
-    local ending = orxonox.DialogueManager:getInstance():theEnd()
-    
-    if ending then
-        orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialogue")
-    
-    
-    else 
-        orxonox.DialogueManager:getInstance():a1clicked()
-        P.update()
-    end
-end
-
-function P.a2Button_clicked(e)
-    local ending = orxonox.DialogueManager:getInstance():theEnd()
-    
-    if ending then
-        orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialogue")
-    
-    
-    else 
-        orxonox.DialogueManager:getInstance():a2clicked()
-        P.update()
-    end
-    
-end
-
-return P
Index: /code/trunk/data/levels/ArrowLevel.oxw
===================================================================
--- /code/trunk/data/levels/ArrowLevel.oxw	(revision 11783)
+++ /code/trunk/data/levels/ArrowLevel.oxw	(revision 11783)
@@ -0,0 +1,79 @@
+<LevelInfo
+ name = "ArrowLevel"
+ description = "A level to show the funtionality of the Waypoint Arrow."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+  include("templates/HeavyCruiser.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipEscort.oxt")
+  include("templates/endurancetest_template.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipAssff.oxt")
+
+
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <NotificationQueueCEGUI
+    name="narrative"
+    targets="simpleNotification"
+    size=3
+    displayTime=3.9
+    position="0.2, 0, 0.1, 0"
+    fontSize="23"
+    fontColor="0.3, 1, 0.2, 0.8"
+    alignment="HorzCentred"
+    displaySize="0.6, 0, 0, 0"
+    />
+
+   <Scene
+   ambientlight = "0.5, 0.5, 0.5"
+   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 position="50,0,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+
+
+    
+    
+    <Arrow>
+      <attached>
+       <Model scale="10" mesh="Arrow.mesh"/>
+      </attached>
+      <controller>
+        <ArrowController accuracy = 2000>
+          <gpspoints>
+            <Model mesh="cube.mesh" scale=8 position="100,100,100"/>
+            <Model mesh="cube.mesh" scale=8 position="400,200,187"/>
+            <Model mesh="cube.mesh" scale=8 position="-200,-500,615"/>
+            <Model mesh="cube.mesh" scale=8 position="0,0,0"/>      
+          </gpspoints>
+        </ArrowController>
+      </controller>
+    </Arrow>
+
+
+
+
+
+  </Scene>
+</Level>
+
Index: /code/trunk/data/levels/AsteroidFarming.oxw
===================================================================
--- /code/trunk/data/levels/AsteroidFarming.oxw	(revision 11783)
+++ /code/trunk/data/levels/AsteroidFarming.oxw	(revision 11783)
@@ -0,0 +1,142 @@
+<LevelInfo
+ name = "AsteroidFarming"
+ description = "Testing the Asteroid Mining Project, PPS HS 17"
+ tags = "test, showcase"
+ screenshot = "asteroids.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+
+<WorldAmbientSound source="Asteroid_rocks.ogg" looping="true" playOnLoad="true" />
+
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+    hasPhysics = true
+  >
+
+
+  <?lua
+      include("includes/pickups.oxi")
+  ?>
+
+    <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="0,0,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+    
+
+     <!-- Asteroid Display: -->
+      <Model position="0,  0,40" yaw="90" pitch="-90" roll="0" scale="3" mesh="ast1.mesh" />
+      <Model position="0, 20,40" yaw="90" pitch="-90" roll="0" scale="3" mesh="ast2.mesh" />
+      <Model position="0, 40,40" yaw="90" pitch="-90" roll="0" scale="3" mesh="ast3.mesh" />
+      <Model position="0, 60,40" yaw="90" pitch="-90" roll="0" scale="3" mesh="ast4.mesh" />
+      <Model position="0,-20,40" yaw="90" pitch="-90" roll="0" scale="4" mesh="ast5.mesh" />
+      <Model position="0,-40,40" yaw="90" pitch="-90" roll="0" scale="4" mesh="ast6.mesh" />
+      <Model position="0,-60,40" yaw="90" pitch="-90" roll="0" scale="5" mesh="asteroid_ice.mesh" />
+      <Model position="0,-80,40" yaw="90" pitch="-90" roll="0" scale="5" mesh="asteroid_UV.mesh" />
+
+     <!-- Display some pickup, 'Meta' -->
+    <PickupSpawner pickup=usemetapickup position="-25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
+    <PickupSpawner pickup=dropmetapickup position="0,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
+    <PickupSpawner pickup=destroymetapickup position="25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
+    <PickupSpawner pickup=destroycarriermetapickup position="50,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
+
+    <!-- Drone pickup -->
+    <PickupSpawner pickup=dronepickup position="-25,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+
+
+    <!-- @Objects: 4 boxes (uncontrolled pawns) Trying to understand the pickup generation-->
+    <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 4" >
+        <events>
+          <visibility>
+            <EventListener event="flying4" />
+          </visibility>
+        </events>
+        <attached>
+            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
+        </collisionShapes>
+
+    </Pawn>
+
+    <!----Just a box with different mesh-->
+    <Pawn team=1 health=50 position="0,1000,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Globi Asteroid" >
+        <events>
+          <visibility>
+            <EventListener event="flying4" />
+
+          </visibility>
+        </events>
+        <attached>
+            <Model position="0,0,0" mesh="ast4.mesh" scale3D="3,3,3" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
+        </collisionShapes>
+    </Pawn>
+
+
+    <!-- AsteroidMinable -->
+    <AsteroidMinable size=15 position="0,-500,0" />
+    <AsteroidMinable size=5 position="100,-500,100" />
+    <AsteroidMinable size=50 position="500,-500, 500" />
+    <AsteroidMinable size=30 position="-100, -500, -100" velocity= "0, -30, 0"/>
+
+    <!-- SpicedAsteroidField -->
+    <SpicedAsteroidField count=30 mDensity= 0.5 maxSize=40 minSize=1 position="5000, 0, 0" radius=1000 velocity="0,0,0"/>
+
+
+    <!-- Asteroid Belt with a planet -->
+
+    <SpicedAsteroidBelt position="-15000,0,0" mDensity=0.3 segments=50 minSize=1 maxSize=50 radius0=7190 radius1 = 7800 count=250 tiltBy=0.5 tiltAt=0/>
+    <Planet
+      position="-15000,0,0"
+      scale="5000"
+      collisionType="dynamic"
+      linearDamping="0.8"
+      angularDamping="0"
+      mass="10000000"
+      pitch="0"
+      mesh="planets/muunilinst.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/Asteroids2D.oxw
===================================================================
--- /code/trunk/data/levels/Asteroids2D.oxw	(revision 11783)
+++ /code/trunk/data/levels/Asteroids2D.oxw	(revision 11783)
@@ -0,0 +1,82 @@
+<LevelInfo
+ name = "Asteroids2D"
+ description = "Try to prevent asteroids from colliding into your spaceship. Be prepared to dodge all asteroids or destroy them."
+ tags = "minigame"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff2.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipAsteroids2D.oxt")
+  include("templates/enemyInvader.oxt")
+  include("overlays/Asteroids2DHUD.oxo")
+  include("templates/asteroidsAsteroids2D.oxt")
+?>
+
+<Level
+  plugins = asteroids2D
+  gametype = Asteroids2D
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "1.0, 1.0, 1.0"
+    skybox       = "Orxonox/Starbox"
+    negativeWorldRange = "-100000, -100000, -100000"
+    positiveWorldRange = " 100000,  100000,  100000"
+  >
+
+  <WorldAmbientSound
+    source="Earth.ogg"
+    looping="true"
+    playOnLoad="true"
+  />
+
+    <!-- <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"/> -->
+    <Light type=directional position="-100, 10000, -700" lookat="0.2, -1, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+    <SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass= Asteroids2DShip pawndesign=spaceshipasteroids2d />
+
+    <!--<Model mesh="axes.mesh" scale=10 position="0,0,0" /> -->
+
+
+    <!--<?lua
+      for i = 1, 250, 1
+      do
+      j = math.random()
+    ?>
+
+    <MovableEntity
+      position = "<?lua print(math.random()* 15000 - 1000) ?>,<?lua print(math.random() * 12000 - 4000) ?>,<?lua print(math.random() * 12000 - 4000) ?>"
+      collisionType = dynamic
+      linearDamping = 0.8
+      angularDamping = 0
+      scale = "<?lua print(j * 150)?>"
+      collisiondamage = 1
+      enablecollisiondamage = true
+    >
+      <attached>
+        <Model mass="<?lua print(j * 1000) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="<?lua print(j * 350) ?>" />
+      </collisionShapes>
+    </MovableEntity>
+
+    <?lua
+      end
+    ?>-->
+
+    <Asteroids2DCenterPoint name=asteroids2Dcenter />
+  
+    
+  </Scene>
+</Level>
Index: /code/trunk/data/levels/DialogShowcase.oxw
===================================================================
--- /code/trunk/data/levels/DialogShowcase.oxw	(revision 11783)
+++ /code/trunk/data/levels/DialogShowcase.oxw	(revision 11783)
@@ -0,0 +1,131 @@
+<LevelInfo
+ name = "DialogShowase"
+ description = "A level to show and test the functionality of the Dialog module."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+  include("templates/HeavyCruiser.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipEscort.oxt")
+  include("templates/endurancetest_template.oxt")
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+  
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+ <DistanceTrigger name="test" position="100,0,100" target="Pawn" distance=25 stayActive="true" />
+ <Backlight position="100,0,100" visible=true frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,0,1"/>
+    
+    <Dialog name="Kurt" currentQuestionId="loop1">
+      <questions>
+        <Question Id="loop1" question="Wanna be looped?" >
+          <answerIds>
+            <AnswerId Id="yes"/>
+            <AnswerId Id="no"/>
+            <AnswerId Id="giveItToMe"/>
+          </answerIds>
+        </Question>
+        <Question Id="lorem" question="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." >
+          <answerIds>
+            <AnswerId Id="endIt"/>
+          </answerIds>
+        </Question>
+        <Question Id="loop2" question="Wanna be looped again?" >
+          <answerIds>
+            <AnswerId Id="yes"/>
+            <AnswerId Id="no"/>
+            <AnswerId Id="endIt"/>
+          </answerIds>
+        </Question>
+        <Question  Id="ok" question="Guess not then"/>
+      </questions>
+      <answers>
+        <Answer Id="giveItToMe" answer="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." nextQuestionId="lorem"/>
+        <Answer Id="yes" answer="yeah loop me" nextQuestionId="loop2"/>
+        <Answer Id="no" answer="i'd rather not" nextQuestionId="ok"/>
+        <Answer Id="endIt" answer="i will go now..." nextQuestionId="end"/>
+      </answers>
+      <events>
+        <execute>
+          <EventListener event="test"/>
+        </execute>
+      </events>
+    </Dialog>
+    
+
+
+
+  <DistanceTrigger name="troll" position="100,0,200" target="Pawn" distance=25 stayActive="true" />
+  <Backlight position="100,0,200" visible=true frequency=0.3 amplitude=3 material="Flares/lensflare" colour="1,0,1"/>
+  
+    <Dialog name="Rick" currentQuestionId="start">
+      <questions>
+        <Question Id= "start" question= "hey can you predect what i will do next?"> 
+          <answerIds>
+            <AnswerId Id="NeverGonnaGiveMeUp" />
+            <AnswerId Id="DontCare"/>
+            <AnswerId Id="Serious" />
+          </answerIds>
+        </Question>
+        
+        <Question Id= "WeAreNoStrangers" question= "We're no strangers to love. You know the rules and so do I. A full commitment's what I'm thinking of,
+You wouldn't get this from any other guy.">
+          <answerIds>
+            <AnswerId Id="whatIamFeeling"/>
+            <AnswerId Id="DontCare"/>
+            <AnswerId Id="IGoNow"/>
+          </answerIds>
+        </Question>
+        
+        <Question Id= "NeverGonnaLetYouDown" question= "Never gonna give you up
+Never gonna let you down
+Never gonna run around and desert you
+Never gonna make you cry
+Never gonna say goodbye
+Never gonna tell a lie and hurt you" >
+          <answerIds>
+            <AnswerId Id="Again"/>
+            <AnswerId Id="IGoNow"/>
+          </answerIds>
+        </Question>
+
+        <Question Id= "leave" question= "That was not what i had in mind but that is way better, thanks for the advidce. I will leave now."/>
+
+      </questions>
+    
+      <answers>
+        <Answer Id= "NeverGonnaGiveMeUp" nextQuestionId ="WeAreNoStrangers" answer= "wait are you the RICK?!" />
+        <Answer Id= "DontCare" nextQuestionId ="end" answer= "I could not care less" />
+        <Answer Id= "Serious" nextQuestionId ="leave" answer= "The same thing you do every night? - try to take over the world?" />
+        <Answer Id= "whatIamFeeling" nextQuestionId ="NeverGonnaLetYouDown" answer= "I just wanna tell you how I'm feeling, gotta make you understand" />
+        <Answer Id= "IGoNow" nextQuestionId ="" answer= "well that strange i guess i go now..." />
+        <Answer Id= "Again" nextQuestionId ="WeAreNoStrangers" answer= "I didn't quiet get it." />
+      </answers>
+
+      <events>
+          <execute>
+              <EventListener event="troll"/>
+          </execute>
+      </events>
+    </Dialog>
+    
+    <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 />
+    
+  </Scene>
+</Level>
Index: de/trunk/data/levels/DialogueShowcase.oxw
===================================================================
--- /code/trunk/data/levels/DialogueShowcase.oxw	(revision 11782)
+++ 	(revision )
@@ -1,79 +1,0 @@
-<LevelInfo
- name = "DialogueShowcase"
- description = "A level to show and test the functionality of the Dialogue module."
- tags = "test"
- screenshot = "emptylevel.png"
-/>
-
-<?lua
-  include("stats.oxo")
-  include("HUDTemplates3.oxo")
-  include("templates/lodInformation.oxt")
-  include("templates/HeavyCruiser.oxt")
-?>
-
-<?lua
-  include("templates/spaceshipEscort.oxt")
-  include("templates/endurancetest_template.oxt")
-?>
-
-<Level>
-  <templates>
-    <Template link=lodtemplate_default />
-  </templates>
-  <?lua include("includes/notifications.oxi") ?>
-  
-
-  <Scene
-    ambientlight = "0.8, 0.8, 0.8"
-    skybox       = "Orxonox/Starbox"
-  >
- <DistanceTrigger name="test" position="100,0,100" target="Pawn" distance=25 stayActive="true" />
-    <Backlight position="100,0,100" visible=true frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,0,1"/>
-    
-    <NextQuestion  question="Unknown Spaceship Transmission: Who goes there?" a1="(say your name)" a2="None of your business I'm afraid." >
-     <possibleQuestions> 
-        <NextQuestion  question="You're not cleared for this area, turn back." a1="Doesn't look too exciting here anyways." a2="You gotta make me try...(attack)" />
-        <NextQuestion  question="I'll make it my business. Only military allowed in this area." a1="Whoops, didn't know that, I'll be on my way then." a2="Got an important message for Sgt Smith though." >
-        <possibleQuestions>
-          <NextQuestion  question="Make sure I don't have to see your ugly face again." a1="...thanks, bye." a2="I'll think about it." />
-          <NextQuestion  question="Oh why didn't you say that in the first place? Off you go." a1="Thanks mate." a2="Just don't be so rude next time." />
-        </possibleQuestions>
-      </NextQuestion>
-      </possibleQuestions>    
-      <events>
-        <execute>
-           <EventListener event="test" />
-        </execute>
-      </events>
-    </NextQuestion>
-
-    <DistanceTrigger name="test1" position="100,0,-100" target="Pawn" distance=25 stayActive="true" />
-    <Backlight position="100,0,-100" visible=true frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,1,1"/>
-    
-    <NextQuestion  question="Hey,  sorry to bother you,  could you help me with something?" a1="Yeah sure." a2="Nope get lost." >
-     <possibleQuestions> 
-        <NextQuestion  question="Do you like fish" a1="...yes?" a2="This is wasting my time." >
-        <possibleQuestions>
-          <NextQuestion  question="Splendid! Would you like your ship to look like one?" a1="..." a2="I'm going now,  okay?" />
-          <NextQuestion  question="Turtles then?" a1="..." a2="Im going now,  okay?" />
-        </possibleQuestions>
-        </NextQuestion>
-        <NextQuestion  question="I can pay you know." a1="Got enough money." a2="...are you deaf? Bye."/>
-      </possibleQuestions>    
-      <events>
-        <execute>
-           <EventListener event="test1" />
-        </execute>
-      </events>
-    </NextQuestion>
-
-    
-
-    <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 />
-
-    
-    
-  </Scene>
-</Level>
Index: /code/trunk/data/levels/FlappyOrx.oxw
===================================================================
--- /code/trunk/data/levels/FlappyOrx.oxw	(revision 11783)
+++ /code/trunk/data/levels/FlappyOrx.oxw	(revision 11783)
@@ -0,0 +1,65 @@
+<LevelInfo
+ name = "Flappy Orx"
+ description = "A clone of the iconic Flappy Bird"
+ tags = "minigame"
+ screenshot = "FlappyOrx.png"
+/>
+
+<?lua
+  include("templates/lodInformation.oxt")
+  include("templates/spaceshipFlappyOrx.oxt")
+  include("overlays/FlappyOrxHUD.oxo")
+
+?>
+
+<Level
+  plugins = flappyorx
+  gametype = FlappyOrx
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+
+  <Scene
+    ambientlight = "0.8, 0.7, 0.4"
+    skybox     = "Orxonox/skyBoxBasic"
+  >
+  <WorldAmbientSound
+    source="Earth.ogg"
+    looping="true"
+    playOnLoad="true"
+  />
+
+ <Light type=directional position="11000, 11000, -7000" lookat="0, 0, 0" diffuse="1, 1, 1, 1" specular="1.0, 0.9, 0.9, 1.0" />
+    <SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=FlappyOrxShip pawndesign=spaceshipFlappyOrx />
+  
+    <?lua
+      for i = 1, 5, 1 do
+        for j = 3, 12,3 do
+    ?>
+
+        <Template name=Asteroid<?lua print(j) ?>_<?lua print(i) ?>>
+          <MovableEntity
+            collisionType = dynamic
+            linearDamping = 0.8
+            angularDamping = 1
+            scale = "<?lua print(j) ?>"
+            collisiondamage = 10000
+            enablecollisiondamage = true
+          >
+          
+            <attached>
+              <Model mass="1000" mesh="ast<?lua print(i) ?>.mesh" />
+            </attached>
+            <collisionShapes>
+               <SphereCollisionShape radius="<?lua print(j + 8) ?>" />
+            </collisionShapes>
+          </MovableEntity>
+        </Template>
+
+    <?lua
+        end
+      end
+    ?>
+  </Scene>
+</Level>
Index: /code/trunk/data/levels/NC_StoryModeLevel.oxw
===================================================================
--- /code/trunk/data/levels/NC_StoryModeLevel.oxw	(revision 11783)
+++ /code/trunk/data/levels/NC_StoryModeLevel.oxw	(revision 11783)
@@ -0,0 +1,65 @@
+<LevelInfo
+ name = "NC StoryMode"
+ description = "A level in which the Campaign Menu is defined, which opens other levels."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("templates/lodInformation.oxt")
+  include("templates/StoryMode.oxt")
+  include("StoryModeHUD2.oxo")
+  include("templates/spaceshipAssff.oxt")
+  include("templates/StoryModeEscort.oxt")
+  include("templates/endurancetest_template.oxt")
+?>
+
+<Level  gametype = StoryMode>
+
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+  <SpawnPoint position="000.000, 000.000, 000.000" spawnclass=StoryModePawn orientation="0, 0, 0, 1" pawndesign=StoryModeEscort /> 
+
+ <NameableStaticEntity levelName="Level 1" position="0,0,-500" direction="0,1,0">
+  <attached>
+    <Model position="0,0,0" mesh="ETH.mesh" scale=80 />
+  </attached>
+ </NameableStaticEntity>
+
+<NameableStaticEntity levelName="Level 2" position="500,0,-1000" direction="0,0,0">
+  <attached>
+    <Model position="0,0,0" mesh="planets/moon.mesh" scale=50 />
+  </attached>
+ </NameableStaticEntity>
+    
+<NameableStaticEntity levelName="Level 3" position="-500,0,-1000" direction="0,1,0">
+  <attached>
+    <Model position="0,0,0" mesh="can.mesh" scale=50 />
+  </attached>
+</NameableStaticEntity>
+
+<NameableStaticEntity levelName="Level 4" position="1000,0,-1500" direction="0,0,0">
+  <attached>
+    <Model position="0,0,0" mesh="cube.mesh" scale=50 />
+  </attached>
+ </NameableStaticEntity>
+
+ <NameableStaticEntity levelName="Level 5" position="-1000,0,-1500" direction="0,0,0">
+  <attached>
+    <Model position="0,0,0" mesh="Pilz.mesh" scale=50 />
+  </attached>
+ </NameableStaticEntity>
+
+  
+  </Scene>
+</Level>
+
Index: /code/trunk/data/levels/ProtectBoss.oxw
===================================================================
--- /code/trunk/data/levels/ProtectBoss.oxw	(revision 11783)
+++ /code/trunk/data/levels/ProtectBoss.oxw	(revision 11783)
@@ -0,0 +1,362 @@
+<LevelInfo
+ name = "ProtectBoss"
+ description = "Protect a disabled cargo ship!"
+ tags = "mission"
+ screenshot = "emptylevel.png"
+/>
+
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+  include("templates/HeavyCruiser.oxt")
+  include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipEscort.oxt")
+  include("templates/spaceshipAssff.oxt")
+  include("templates/endurancetest_template.oxt")
+  include("templates/spaceshipPirate.oxt")
+?>
+
+<Level gametype="Mission">
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <NotificationQueueCEGUI
+    name="narrative"
+    targets="simpleNotification"
+    size=3
+    displayTime=7
+    position="0.2, 0, 0.1, 0"
+    fontSize="16"
+    fontColor="0.3, 1, 0.2, 0.8"
+    alignment="HorzCentred"
+    displaySize="0.6, 0, 0, 0"
+  />
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+    <?lua
+      include("includes/pickups.oxi")
+    ?>
+
+    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" /> <!-- AlphaCentauri.ogg, Mars.ogg-->
+
+    <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"/>
+
+    <EventMultiTrigger name=spawntrigger>
+      <events>
+        <trigger>
+          <SpawnPoint team=0 position="0,0,1" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+        </trigger>
+      </events>
+    </EventMultiTrigger>
+    
+    <Pawn
+        team      = 0
+        collisionType = kinematic
+        enablecollisiondamage=true
+        collisiondamage = 5
+        position  = "0,0,-2500"
+        mass      = 100000
+        health    = 2500 initialhealth=2500 maxhealth="2500"
+        direction = "1,0,0"
+        rotationaxis="0,0,1" rotationrate="4.5" velocity="0,0,30"
+        vulnerable=true
+        name      = "CargoShip"
+        radarname = "Cargo Ship" >
+      <attached>
+        <DistanceTriggerBeacon name="CargoShip" />
+        <Model mesh="escortShip.mesh" mass=10000 position="0,0,0" scale=100 />
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="300,100,200" /> <!-- laenge  ,   dicke    , breite -->
+        <BoxCollisionShape position="-100,-50,-280" halfExtents="220,70,100" />
+        <BoxCollisionShape position="-100,-50,280" halfExtents="220,70,100" />
+      </collisionShapes>
+      <explosion>
+        <ExplosionPart scale = 12 minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+        <ExplosionPart scale = 12 minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+        <ExplosionPart scale = 12 minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        <ExplosionPart offset="94,33,-50" delay=1 minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+        <ExplosionPart offset="94,33,-50" delay=1 minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+        <ExplosionPart offset="94,33,-50" delay=1 minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+   
+        <ExplosionPart scale = 5 mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart scale = 5 mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart scale = 5 mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart scale = 5 mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart scale = 5 mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart scale = 5 mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart scale = 5 mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart scale = 5 mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart delay=0.8 scale = 2.5 mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart delay=0.8 scale = 2.5 mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart delay=0.8 scale = 2.5 mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+        <ExplosionPart delay=0.8 scale = 2.5 mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+       
+        <ExplosionPart offset="20,13,-15" scale=7 delay=1.3 minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+        <ExplosionPart offset="30,13,-15" scale=7 delay=1.3 minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+        <ExplosionPart offset="20,13,-15" scale=7 delay=1.3 minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        <ExplosionPart offset="-20,-13,-15" scale=5 delay=1.8 minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+        <ExplosionPart offset="-20,-13,-15" scale=5 delay=1.8 minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+        <ExplosionPart offset="-20,-13,-15" scale=5 delay=1.8 minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+      </explosion>
+    </Pawn>
+
+    <!-- triggers some time after start -->
+    <DistanceTrigger name="someTimeAfterStart" beaconMode=identify position="0,0,1000" distance=1000 target="Pawn" targetname="CargoShip" />
+
+    <!-- triggers when first quest is completed -->
+    <DistanceTrigger name="passedAsteroidFieldOne" beaconMode=identify position="0,0,3000" distance=1000 target="Pawn" targetname="CargoShip" />
+
+    <!-- triggers when first pirate wave is defeated -->
+
+    <Trigger name="firstPirateWaveKilled" mode="and">
+      <?lua
+        for n = 1, 3, 1 do
+          print("<EventTrigger activations=1 stayactive=true><events><trigger><EventListener event=p" .. n .. "/></trigger></events></EventTrigger>")
+        end
+      ?>
+    </Trigger>
+
+    <!-- triggers when second pirate wave is defeated -->
+    <Trigger name="secondPirateWaveKilled" mode="and">
+      <?lua
+        for n = 1, 6, 1 do
+          print("<EventTrigger activations=1 stayactive=true><events><trigger><EventListener event=p1" .. n .. "/></trigger></events></EventTrigger>")
+        end
+      ?>
+    </Trigger>
+
+    <!-- triggers some time after the second pirate wave was defeated -->
+    <Trigger name="thirdPirateWaveStarting" delay=15>
+      <EventTrigger activations="1" stayactive="true" >
+        <events>
+          <trigger>
+             <EventListener event="secondPirateWaveKilled" />
+          </trigger>
+        </events>
+      </EventTrigger>
+    </Trigger>
+
+    <!-- triggers when third pirate wave is defeated -->
+    <Trigger name="thirdPirateWaveKilled" mode="and">
+      <?lua
+        for n = 1, 7, 1 do
+          print("<EventTrigger activations=1 stayactive=true><events><trigger><EventListener event=p2" .. n .. "/></trigger></events></EventTrigger>")
+        end
+      ?>
+    </Trigger>
+
+    <Trigger name="succeedMission" mode=and delay=1>
+      <EventTrigger activations="1" stayactive="true" >
+        <events>
+          <trigger>
+             <EventListener event="thirdPirateWaveKilled" />
+          </trigger>
+        </events>
+      </EventTrigger>
+      <EventTrigger activations="1" stayactive="false" name="cargoShipStillAlive" invert=true>
+        <events>
+          <trigger>
+             <EventListener event="CargoShip" />
+          </trigger>
+        </events>
+      </EventTrigger>
+    </Trigger>
+
+    <EventTrigger activations="1" stayactive="true" name="failMission" delay=0.1>
+      <events>
+        <trigger>
+           <EventListener event="CargoShip" />
+        </trigger>
+      </events>
+    </EventTrigger>
+
+    <!-- create asteroids and pickups -->
+    <?lua
+      function asteroidMesh()
+        x = math.random(8)
+        if x < 7 then
+          return "ast" .. x .. ".mesh"
+        elseif x == 7 then
+          return "asteroid_ice.mesh"
+        else
+          return "asteroid_UV.mesh"
+        end
+      end
+
+      for count = 1, 60, 1 do
+        x = math.random(-1000, 1000)
+        y = math.random(-1000, 1000)
+        z = 125 * count + math.random(-250, 250)
+        vmax = 7
+        if count > 30 then
+          vmax = 2
+        end
+        rx = math.random(-vmax, vmax)
+        ry = math.random(-vmax, vmax)
+        rz = math.random(-vmax, vmax)
+        vx = math.random(-vmax, vmax)
+        vy = math.random(-vmax, vmax)
+        vz = math.random(-vmax, vmax)
+        rr = math.random() * 10
+        print("<ShootableObstacle team=1 enablecollisiondamage=true collisiondamage=10 health=100 maxhealth=100 initialhealth=100 position=\"" .. x .. "," .. y .. "," .. z .. "\" direction=\"0,0,-1\" velocity=\"" .. vx .. "," .. vy .. "," .. vz .. "\"rotationaxis=\"" .. rx .. "," .. ry .. "," .. rz .. "\" rotationrate=" .. rr .. " collisionType=dynamic mass=1 name=asteroid radarname=Asteroid> <attached> <Model position=\"0,0,0\" mesh=\"" .. asteroidMesh() .. "\" scale3D=\"10,10,10\" /> </attached> <collisionShapes> <SphereCollisionShape position=\"0,0,0\" radius=5 /> </collisionShapes> <controller> <WaypointController team=1> </WaypointController> </controller> <explosion> <ExplosionPart minspeed=0 maxspeed=0 effect1=\"orxonox/explosion_flash2\" effect2=\"orxonox/explosion_flame2\" /> <ExplosionPart minspeed=0 maxspeed=0 effect1=\"orxonox/explosion_shockwave2\" effect2=\"orxonox/explosion_sparks2\" /> <ExplosionPart minspeed=0 maxspeed=0 effect1=\"orxonox/explosion_streak2\" effect2=\"orxonox/explosion_afterglow\" /> </explosion> </ShootableObstacle>")
+      end
+
+      for count = 1, 60, 1 do
+        x = math.random(-1000, 1000)
+        y = math.random(-1000, 1000)
+        z = 3000 + 125 * count + math.random(-250, 250)
+        typenum = math.random(11)
+        type = ""
+        if typenum == 1 then
+          type = "smallmunition"
+        elseif typenum == 2 then
+          type = "mediummunition"
+        elseif typenum == 3 then
+          type = "hugemunition"
+        elseif typenum == 4 then
+          type = "smallhealth"
+        elseif typenum == 5 then
+          type = "mediumhealth"
+        elseif typenum == 6 then
+          type = "hugehealth"
+        elseif typenum == 7 then
+          type = "crazyhealth"
+        elseif typenum == 8 then
+          type = "smallshield"
+        elseif typenum == 9 then
+          type = "mediumshield"
+        elseif typenum == 10 then
+          type = "hugeshield"
+        else
+          type = "drone"
+        end
+        type = type .. "pickup"
+        print("<PickupSpawner pickup=\"" .. type .. "\" position=\"" .. x .. "," .. y .. "," .. z .. "\" triggerDistance=10 respawnTime=5 maxSpawnedItems=1 />")
+      end
+    ?>
+
+    <!-- start first quest -->
+    <QuestEffectBeacon times=1>
+      <effects>
+        <AddQuest questId="ProtectBoss.AsteroidField" />
+      </effects>
+      <events>
+        <execute>
+          <EventListener event=spawntrigger />
+        </execute>
+      </events>
+    </QuestEffectBeacon>
+
+    <!-- start second quest (doesn't work yet) -->
+    <QuestEffectBeacon times=1>
+      <effects>
+        <CompleteQuest questId="ProtectBoss.AsteroidField" />
+        <!--AddQuest questId="ProtectBoss.PirateAttack" /-->
+      </effects>
+      <events>
+        <execute>
+          <EventListener event=passedAsteroidFieldOne />
+        </execute>
+      </events>
+    </QuestEffectBeacon>
+
+    <SimpleNotification message="Protect the cargo ship! (Info: F3)" broadcast="true">
+        <events>
+            <trigger>
+                <EventListener event=spawntrigger />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <LocalQuest id="ProtectBoss.AsteroidField">
+        <QuestDescription title="Protect the Cargo Ship" description="The cargo ship in front of you is disabled and is drifting uncontrolled! Shoot the asteroids out of the way to protect it!" failmessage="The cargo ship has been hit!" completeMessage="" />
+        <complete-effects>
+            <AddQuest questId="ProtectBoss.PirateAttack" />
+        </complete-effects>
+    </LocalQuest>
+
+    <LocalQuest id="ProtectBoss.PirateAttack">
+      <QuestDescription title="Pirate Attack" description="Protect the cargo ship from the attacking pirates!" failmessage="The pirates boarded the cargo ship!" completeMessage="" />
+    </LocalQuest>
+
+    <SimpleNotification message="There are pirates around!" broadcast="true" >
+        <events>
+            <trigger>
+                <EventListener event="someTimeAfterStart" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification message="The cargo ship got destroyed! Game over!" broadcast=true >
+      <events>
+            <trigger>
+                <EventListener event="CargoShip" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification message="A second pirate wave is approaching!" broadcast=true >
+      <events>
+            <trigger>
+                <EventListener event="firstPirateWaveKilled" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification message="The third and last pirate wave is near!" broadcast=true >
+      <events>
+            <trigger>
+                <EventListener event="secondPirateWaveKilled" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification message="The cargo ship is out of danger. You made it!" broadcast=true >
+      <events>
+            <trigger>
+                <EventListener event="succeedMission" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <!-- A function to put pirates to a certain location -->
+    <?lua
+      function placePirate(posX, posY, posZ, name, trigger)
+        print("<SpaceShip mass=10 health=25 initialhealth=25 maxhealth=25 shieldhealth=10 maxshieldhealth=10 initialshieldhealth=10 shieldabsorption=0.3 shieldrechargerate=1 shieldrechargewaittime=1 primaryThrust=20 auxiliaryThrust=5 rotationThrust=5 boostpower=2 boostrate=1 boostCooldownDuration = 50 accuracy=1 position=\"" .. posX .. "," .. posY .. "," .. posZ .. "\" name=\"" .. name .. "\" radarname=Pirate><!--events><visibility><EventListener event=\"" .. trigger .. "\"/></visibility><activity><EventListener event=\"" .. trigger .. "\"/></activity></events--><templates><Template link=spaceshippirate /></templates><controller><WaypointPatrolController alertnessradius=2700 attackradius=1850 team=1 active=true><waypoints><StaticEntity position=\"" .. posX .. "," .. posY .. "," .. posZ .. "\"/><StaticEntity position=\"" .. (posX + 100) .. "," .. posY .. "," .. posZ .. "\"/><!--Model mesh=\"cube.mesh\" scale=0 position=\"-1300,-600,900\" /><Model mesh=\"cube.mesh\" scale=0 position=\"0,0,0\" /--></waypoints><events><activity><EventListener event=attack /></activity></events></WaypointPatrolController></controller></SpaceShip>")
+      end
+    ?>
+
+    <?lua
+      placePirate(0, 0, 4800, "p1", "passedAsteroidFieldOne")
+      placePirate(50, 0, 4900, "p2", "passedAsteroidFieldOne")
+      placePirate(0, 50, 5000, "p3", "passedAsteroidFieldOne")
+      placePirate(0, 0, 6500, "p11", "firstPirateWaveKilled")
+      placePirate(50, 0, 6600, "p12", "firstPirateWaveKilled")
+      placePirate(-50, 0, 6700, "p13", "firstPirateWaveKilled")
+      placePirate(0, 50, 6800, "p14", "firstPirateWaveKilled")
+      placePirate(0, -50, 6900, "p15", "firstPirateWaveKilled")
+      placePirate(0, 0, 7000, "p16", "firstPirateWaveKilled")
+      placePirate(0, 0, 8000, "p21", "thirdPirateWaveStarting")
+      placePirate(50, 0, 8100, "p22", "thirdPirateWaveStarting")
+      placePirate(-50, 0, 8200, "p23", "thirdPirateWaveStarting")
+      placePirate(0, 50, 8300, "p24", "thirdPirateWaveStarting")
+      placePirate(0, -50, 8400, "p25", "thirdPirateWaveStarting")
+      placePirate(50, 50, 8500, "p26", "thirdPirateWaveStarting")
+      placePirate(-50, -50, 8600, "p27", "thirdPirateWaveStarting")
+    ?>
+
+  </Scene>
+</Level>
+
Index: /code/trunk/data/levels/SOB.oxw
===================================================================
--- /code/trunk/data/levels/SOB.oxw	(revision 11782)
+++ /code/trunk/data/levels/SOB.oxw	(revision 11783)
@@ -7,10 +7,9 @@
 
 	<?lua
-	include("HUDTemplates3.oxo")  
-	include("jumpHUD.oxo")
 	include("stats.oxo")
 	include("templates/lodInformation.oxt")
 	include("overlays/SOBHUD.oxo")
 	?>
+
 
 
@@ -48,5 +47,4 @@
 
 
-
 	<Template name=sobFigureTemplate>
 		<SOBFigure camerapositiontemplate=sobfigurecameras collisionType="dynamic" position="0,0,30">
@@ -57,10 +55,37 @@
 
 			<collisionShapes>
-				<BoxCollisionShape position="-2,0,2" halfExtents="3,1,10" />
+				<BoxCollisionShape position="0,0,2" halfExtents="3,1,10" />
 			</collisionShapes>
 
 
 		</SOBFigure>
+	</Template> 
+
+
+	<Template name=fireball>
+		<SOBFireball collisionType="dynamic" speed=90>
+			<attached>
+				<Model mesh="planets/sol.mesh" position="0,0,0" scale=3 pitch=90/> 
+
+				<ParticleSpawner source="Orxonox/fire4" startdelay=0  position="-4,0,0" visible="false"/>
+				
+			</attached>
+			<collisionShapes>
+				<SphereCollisionShape position="0,0,0" radius="3" /> 			
+			</collisionShapes>
+		</SOBFireball>
 	</Template>
+
+	<Template name=gumbaShootable>
+		<SOBGumba collisionType="dynamic" speed=60>
+			<attached>
+				<Model mesh="Goomba.mesh" position="0,0,1" scale=3 pitch=90/> 				
+			</attached>
+			<collisionShapes>
+				<BoxCollisionShape position="0,0,0" halfExtents="5,5,3" /> 			
+			</collisionShapes>
+		</SOBGumba>
+	</Template>
+
 
 	<Level
@@ -95,5 +120,8 @@
 
 
-					<!--Gumba-->
+
+
+
+
 
 					<SOBGumba collisionType="dynamic" speed=40 position = "240,0,0">
@@ -106,4 +134,5 @@
 						</collisionShapes>
 					</SOBGumba>
+
 					<SOBGumba collisionType="dynamic" speed=30 position = "420,0,0">
 						<attached>
@@ -193,24 +222,15 @@
 					</SOBGumba>
 
-					<SOBGumba collisionType="dynamic" speed=30 position = "1750,0,0">
-						<attached>
-							<Model mesh="Goomba.mesh" position="0,0,21" scale=3 pitch=90/> 
-							
-						</attached>
-						<collisionShapes>
-							<BoxCollisionShape position="0,0,20" halfExtents="5,5,3" /> 			
-						</collisionShapes>
-					</SOBGumba>
-
-					<SOBGumba collisionType="dynamic" speed=20 position = "1770,0,0">
-						<attached>
-							<Model mesh="Goomba.mesh" position="0,0,21" scale=3 pitch=90/> 
-							
-						</attached>
-						<collisionShapes>
-							<BoxCollisionShape position="0,0,20" halfExtents="5,5,3" /> 			
-						</collisionShapes>
-					</SOBGumba>
-
+					<!--GumbaBoss-->
+					<SOBGumbaBoss collisionType="dynamic" speed=20 position = "1750,0,0">
+						<attached>
+							<Model mesh="Goomba.mesh" position="0,0,21" scale=6 pitch=90/> 
+							
+						</attached>
+						<collisionShapes>
+							<BoxCollisionShape position="0,0,20" halfExtents="10,10,6" /> 			
+						</collisionShapes>
+					</SOBGumbaBoss>
+x	
 
 					<!--CollisionShape for Gumba-->
@@ -225,9 +245,4 @@
 						</collisionShapes>
 					</StaticEntity>
-
-
-
-					
-
 
 
@@ -581,23 +596,8 @@
 
 
-					<!-- Luft4 -->
+					<!-- Luft4 (BossAbschnitt)-->
 					<Model mesh="Dreieck.mesh" position="1560,0,-10" scale=10 Roll=90 Pitch=-90 yaw=90/> 			<!-- L4.1 -->
 
 					<Model mesh="Rohr.mesh" position="1645,5,-35" scale=10  roll=90 yaw=90 pitch=-90 /> 			<!-- L4.2 -->
-
-					<Model mesh="Cube1.1.mesh" position="1690,0,20" scale=10/> 										<!-- L4.3 -->
-					<Model mesh="Cube1.1.mesh" position="1700,0,20" scale=10/> 										<!-- L4.4 -->
-
-					<SOBQBlock collisionType="static" type="Coin" position="1710,0,20" mass='-1'> 					<!-- L4.5 -->				
-						<attached>
-							<Model mesh="QCube.mesh" scale=10 pitch=90/>
-							<Model mesh="QCube-grey.mesh" scale=10 pitch=90 visible=false/>				
-						</attached>
-						<collisionShapes>
-							<BoxCollisionShape position="0,0,0" halfExtents="5,5,5" />
-						</collisionShapes>
-					</SOBQBlock> 
-
-					<Model mesh="Cube1.1.mesh" position="1720,0,20" scale=10/> 										<!-- L4.6 -->
 					<Model mesh="Rohr.mesh" position="1805,5,-35" scale=10  roll=90 yaw=90 pitch=-90 /> 			<!-- L4.7 -->
 					<Model mesh="Dreieckgross.mesh" position="1850,0,-10" scale=10 pitch=90 /> 						<!-- L4.8 -->
@@ -606,5 +606,5 @@
 
 
-					<Model mesh="Schloss.mesh" position="2050,40,60" scale=12 pitch=90/>					<!-- L4.12 -->
+					<Model mesh="Schloss.mesh" position="2050,40,80" scale=15 pitch=90/>					<!-- L4.12 -->
 					<Model mesh="Fahne.mesh" position="1984,-5,88" scale=10 pitch=90/>						<!-- L4.11 -->
 					<Model mesh="Fahnenstange.mesh" position="1990,0,95" pitch=90 scale=3/>					<!-- L4.10 -->
@@ -680,17 +680,4 @@
 					</StaticEntity>
 
-
-
-
-					<StaticEntity collisionType="static" mass='-1'>
-						<collisionShapes>
-
-							<BoxCollisionShape position="1690,0,20" halfExtents="5,5,5" /> 					<!-- 4.3 -->
-							<BoxCollisionShape position="1700,0,20" halfExtents="5,5,5" /> 					<!-- 4.4 -->
-							<BoxCollisionShape position="1720,0,20" halfExtents="5,5,5" /> 					<!-- 4.6 -->
-
-
-						</collisionShapes>
-					</StaticEntity>
 
 
Index: /code/trunk/data/levels/includes/asteroids2DWeapon.oxi
===================================================================
--- /code/trunk/data/levels/includes/asteroids2DWeapon.oxi	(revision 11783)
+++ /code/trunk/data/levels/includes/asteroids2DWeapon.oxi	(revision 11783)
@@ -0,0 +1,30 @@
+    <weaponslots>
+      <WeaponSlot position="-9.2,2,-13" />
+      <WeaponSlot position=" 9.2,2,-13" />
+    </weaponslots>
+    <weaponsets>
+      <WeaponSet firemode=0 />
+      <WeaponSet firemode=1 />
+    </weaponsets>
+    <weaponpacks>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+        </links>
+        <Weapon>
+          <Asteroids2DWeapon mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="laserbeam.mesh" />
+        </Weapon>
+        <Weapon>
+          <Asteroids2DWeapon mode=0 munitionpershot=0 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="laserbeam.mesh" />
+        </Weapon>
+      </WeaponPack>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
+        </links>
+      </WeaponPack>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=0.5/>
+    </munition>
Index: /code/trunk/data/levels/templates/StoryModeEscort.oxt
===================================================================
--- /code/trunk/data/levels/templates/StoryModeEscort.oxt	(revision 11783)
+++ /code/trunk/data/levels/templates/StoryModeEscort.oxt	(revision 11783)
@@ -0,0 +1,128 @@
+<Template name=StoryModeEscort>
+  <StoryModePawn
+   hudtemplate            = StoryModeHUD2
+   camerapositiontemplate = spaceshipescortcameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 10
+
+   health            = 80
+   maxhealth         = 200
+   initialhealth     = 80
+
+   shieldhealth        = 35
+   initialshieldhealth = 35
+   maxshieldhealth     = 60
+   shieldabsorption    = 0.9
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
+
+   primaryThrust     = 150
+   auxilaryThrust    = 30
+   rotationThrust    = 50
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 20
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 6
+
+   collisionType     = "dynamic"
+   mass              = 80
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+  >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipescortengine />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipescortengine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=0 roll=0 scale=4 mesh="escortShip.mesh" />
+      <Model position="0,0,0" yaw=180 pitch=90 roll=0 scale=4 mesh="escortWeapon.mesh" />
+<!--Model mesh="cube.mesh" mass=10 position="0,0,3" scale3D="10,4,8" />
+<Model mesh="cube.mesh" mass=10 position="12.6,-2,3" scale3D="2.8,2.8,11" />
+<Model mesh="cube.mesh" mass=10 position="-12.6,-2,3" scale3D="2.8,2.8,11" />
+<Model mesh="cube.mesh" mass=10 position="0,0,-12" scale3D="4,4,7" /-->
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0    ,0 ,  3" halfExtents="10,   4,8" />
+      <BoxCollisionShape position="12.6 ,-2,  3" halfExtents="2.8,2.8,11"/>
+      <BoxCollisionShape position="-12.6,-2,  3" halfExtents="2.8,2.8,11"/>
+      <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
+    </collisionShapes>
+    <explosion>
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart mesh="explosionparts/escort_part_1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_3.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_4.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_5.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_6.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
+<?lua
+  include("../includes/weaponSettingsEscort.oxi")
+?>
+  </StoryModePawn>
+</Template>
+
+<Template name=spaceshipescortcameras defaults=0>
+  <StoryModePawn>
+    <camerapositions>
+      <CameraPosition position="0, 500, 400" drag=true mouselook=false />
+      <CameraPosition position="0,20, 90" drag=true mouselook=false />
+      <CameraPosition position="0,30,120" drag=true mouselook=false />
+    </camerapositions>
+  </StoryModePawn>
+</Template>
+
+<Template name=spaceshipescortengine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2.2
+
+   speedfront     = 200
+   speedback      =  70
+   speedleftright =  70
+   speedupdown    =  70
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+
+   accelerationfront     = 700
+   accelerationbrake     = 700
+   accelerationback      =  125
+   accelerationleftright =  125
+   accelerationupdown    =  125
+  >
+    <EffectContainer condition="idle">
+      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
+
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=150 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=15 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="not idle">
+      <FadingBillboard mainstate=activity active=false scale=0.09 position="12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.09 position="-12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+    <EffectContainer condition="normal or brake">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=5 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+
+    <EffectContainer condition="boost">
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 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" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, 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" />
+    </EffectContainer>
+
+  </MultiStateEngine>
+</Template>
Index: /code/trunk/data/levels/templates/asteroidsAsteroids2D.oxt
===================================================================
--- /code/trunk/data/levels/templates/asteroidsAsteroids2D.oxt	(revision 11783)
+++ /code/trunk/data/levels/templates/asteroidsAsteroids2D.oxt	(revision 11783)
@@ -0,0 +1,62 @@
+<Template name = stone1>
+  <Asteroids2DStone
+    collisionType = dynamic
+    linearDamping = 0
+    angularDamping = 0
+    scale= 10
+    enablecollisiondamage = true
+
+    health            = 10
+    maxhealth         = 10
+    initialhealth     = 10
+  >
+    <attached>
+      <Model mass= 4000 mesh="ast1.mesh" />
+    </attached>
+    <collisionShapes>
+      <SphereCollisionShape radius="10" />
+    </collisionShapes>
+  </Asteroids2DStone>
+</Template>
+
+<Template name = stone2>
+  <Asteroids2DStone
+    collisionType = dynamic
+    linearDamping = 0
+    angularDamping = 0
+    scale= 20
+    enablecollisiondamage = true
+
+    health            = 10
+    maxhealth         = 10
+    initialhealth     = 10
+  >
+    <attached>
+      <Model mass= 8000 mesh="ast1.mesh" />
+    </attached>
+    <collisionShapes>
+      <SphereCollisionShape radius="20" />
+    </collisionShapes>
+  </Asteroids2DStone>
+</Template>
+
+<Template name = stone3>
+  <Asteroids2DStone
+    collisionType = dynamic
+    linearDamping = 0
+    angularDamping = 0
+    scale= 30
+    enablecollisiondamage = true
+
+    health            = 10
+    maxhealth         = 10
+    initialhealth     = 10
+  >
+    <attached>
+      <Model mass= 16000 mesh="ast1.mesh" />
+    </attached>
+    <collisionShapes>
+      <SphereCollisionShape radius="30" />
+    </collisionShapes>
+  </Asteroids2DStone>
+</Template>
Index: /code/trunk/data/levels/templates/enemyFlappyOrx.oxt
===================================================================
--- /code/trunk/data/levels/templates/enemyFlappyOrx.oxt	(revision 11783)
+++ /code/trunk/data/levels/templates/enemyFlappyOrx.oxt	(revision 11783)
@@ -0,0 +1,174 @@
+<Template name=enemyFlappyOrx>
+  <FlappyOrxEnemy
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipescortcameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 4
+
+   health            = 10
+   maxhealth         = 10
+   initialhealth     = 10
+
+   shieldhealth        = 10
+   initialshieldhealth = 10
+   maxshieldhealth     = 10
+   shieldabsorption    = 0.9
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
+
+   primaryThrust     = 150
+   auxilaryThrust    = 30
+   rotationThrust    = 50
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 20
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 6
+
+   collisionType     = "dynamic"
+   mass              = 0.00001
+   linearDamping     = 0
+   angularDamping    = 0
+
+    collisiondamage = 100
+    enablecollisiondamage = true
+  >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipescortengine />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipescortengine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=180 pitch=270 roll=0 scale=2 mesh="swallow_mat.mesh" />
+      <Model position="0,0,0" yaw=180 pitch=270 roll=0 scale=2 mesh="escortWeapon.mesh" />
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0    ,0 ,  3" halfExtents="10,   4,8" />
+      <BoxCollisionShape position="12.6 ,-2,  3" halfExtents="2.8,2.8,11"/>
+      <BoxCollisionShape position="-12.6,-2,  3" halfExtents="2.8,2.8,11"/>
+      <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
+    </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
+<?lua
+  include("../includes/FlappyOrxWeapon.oxi")
+?>
+  </FlappyOrxEnemy>
+</Template>
+
+<Template name=enemyFlappyOrxshooter>
+  <FlappyOrxEnemyShooter
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipescortcameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 4
+
+   health            = 20
+   maxhealth         = 20
+   initialhealth     = 20
+
+   shieldhealth        = 20
+   initialshieldhealth = 20
+   maxshieldhealth     = 20
+   shieldabsorption    = 0.9
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
+
+   primaryThrust     = 150
+   auxilaryThrust    = 30
+   rotationThrust    = 50
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 20
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 6
+
+   collisionType     = "dynamic"
+   mass              = 100
+   linearDamping     = 0
+   angularDamping    = 0
+
+    collisiondamage = 100
+    enablecollisiondamage = true
+  >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipescortengine />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipescortengine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=180 pitch=270 roll=0 scale=2 mesh="ghost.mesh" />
+      <Model position="0,0,0" yaw=180 pitch=270 roll=0 scale=2 mesh="escortWeapon.mesh" />
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0    ,0 ,  3" halfExtents="10,   4,8" />
+      <BoxCollisionShape position="12.6 ,-2,  3" halfExtents="2.8,2.8,11"/>
+      <BoxCollisionShape position="-12.6,-2,  3" halfExtents="2.8,2.8,11"/>
+      <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
+    </collisionShapes>
+<?lua
+  include("../includes/FlappyOrxWeaponEnemy.oxi")
+?>
+  </FlappyOrxEnemyShooter>
+</Template>
+
+<Template name=spaceshipescortengine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2.2
+
+   speedfront     = 200
+   speedback      =  70
+   speedleftright =  70
+   speedupdown    =  70
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+
+   accelerationfront     = 700
+   accelerationbrake     = 700
+   accelerationback      =  125
+   accelerationleftright =  125
+   accelerationupdown    =  125
+  >
+    <EffectContainer condition="idle">
+      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
+    </EffectContainer>
+    <EffectContainer condition="not idle">
+      <FadingBillboard mainstate=activity active=false scale=0.09 position="12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.09 position="-12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+    <EffectContainer condition="normal or brake">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 0, 10" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, 0, 10" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="boost">
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 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" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, 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" />
+    </EffectContainer>
+
+  </MultiStateEngine>
+</Template>
Index: /code/trunk/data/levels/templates/spaceshipAsteroids2D.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipAsteroids2D.oxt	(revision 11783)
+++ /code/trunk/data/levels/templates/spaceshipAsteroids2D.oxt	(revision 11783)
@@ -0,0 +1,137 @@
+<Template name=spaceshipasteroids2d>
+  <Asteroids2DShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipescortcameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 4
+
+   health            = 10
+   maxhealth         = 10
+   initialhealth     = 10
+
+   shieldhealth        = 20
+   initialshieldhealth = 20
+   maxshieldhealth     = 20
+   shieldabsorption    = 0.1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
+
+   primaryThrust     = 150
+   auxilaryThrust    = 30
+   rotationThrust    = 100
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 20
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 6
+
+   collisionType     = "dynamic"
+   mass              = 4200000
+   linearDamping     = 0.9
+   angularDamping    = 0.9999999
+
+   collisiondamage = 100
+   enablecollisiondamage = true
+   
+  >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipasteroids2dengine />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipasteroids2dengine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=0 roll=0 scale=4 mesh="escortShip.mesh" />
+      <Model position="0,0,0" yaw=180 pitch=90 roll=0 scale=4 mesh="escortWeapon.mesh" />
+<!--Model mesh="cube.mesh" mass=10 position="0,0,3" scale3D="10,4,8" />
+<Model mesh="cube.mesh" mass=10 position="12.6,-2,3" scale3D="2.8,2.8,11" />
+<Model mesh="cube.mesh" mass=10 position="-12.6,-2,3" scale3D="2.8,2.8,11" />
+<Model mesh="cube.mesh" mass=10 position="0,0,-12" scale3D="4,4,7" /-->
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0    ,0 ,  3" halfExtents="10,   4,8" />
+      <BoxCollisionShape position="12.6 ,-2,  3" halfExtents="2.8,2.8,11"/>
+      <BoxCollisionShape position="-12.6,-2,  3" halfExtents="2.8,2.8,11"/>
+      <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
+    </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
+<?lua
+  include("../includes/asteroids2DWeapon.oxi")
+?>
+  </Asteroids2DShip>
+</Template>
+
+<Template name=spaceshipescortcameras defaults=0>
+  <Asteroids2DShip>
+    <camerapositions>
+    <!--<CameraPosition position="0,100,180" direction="0, -0.2, -1" drag=false mouselook=true />
+    <CameraPosition position="0,200,250" direction="0, -0.4, -1" drag=false mouselook=true />
+    <CameraPosition position="0,30,150" direction="0, 0, -1" drag=false mouselook=true />
+    <CameraPosition position="0,1300,-100" direction="0, -1, 0" drag=false mouselook=true />
+-->
+    <CameraPosition position="0,600,0" pitch=-90 absolute=true drag = false mouselook=true/>
+    <CameraPosition position="0,50,160" drag=true mouselook=true />
+    <CameraPosition position="0,40,125" drag=true mouselook=true />
+    <CameraPosition position="0,30, 90" drag=true mouselook=true />
+    </camerapositions>
+  </Asteroids2DShip>
+</Template>
+
+<Template name=spaceshipasteroids2dengine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2.2
+
+   speedfront     = 200
+   speedback      = 200
+   speedleftright =  100
+   speedupdown    =  100
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+
+   accelerationfront     = 700
+   accelerationbrake     = 700
+   accelerationback      = 700
+   accelerationleftright =  500
+   accelerationupdown    =  500
+  >
+
+  <!-- backlight error if you fly over the edge
+    <EffectContainer condition="idle">
+      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
+    </EffectContainer>
+    <EffectContainer condition="not idle">
+      <FadingBillboard mainstate=activity active=false scale=0.09 position="12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.09 position="-12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+    <EffectContainer condition="normal or brake">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 0, 10" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, 0, 10" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="boost">
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 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" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, 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" />
+    </EffectContainer>
+
+  -->
+
+  </MultiStateEngine>
+</Template>
Index: /code/trunk/data/levels/templates/spaceshipFlappyOrx.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipFlappyOrx.oxt	(revision 11783)
+++ /code/trunk/data/levels/templates/spaceshipFlappyOrx.oxt	(revision 11783)
@@ -0,0 +1,56 @@
+<Template name=spaceshipFlappyOrx>
+  <FlappyOrxShip
+
+   camerapositiontemplate = spaceshipescortcameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 6
+
+   health            = 80
+   maxhealth         = 200
+   initialhealth     = 80
+
+   primaryThrust     = 150
+   auxilaryThrust    = 30
+   rotationThrust    = 50
+
+   collisionType     = "dynamic"
+   mass              = 4200000
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+
+  collisiondamage = 100
+  enablecollisiondamage = true
+
+  speedBase = 100
+  speedIncrease = 0.5
+  tubeDistanceBase = 200
+  tubeDistanceIncrease = -1
+
+  upwardThrust = 220
+  gravity = 700
+
+  >
+   
+    <attached>
+      <Model position="0,0,0" yaw=180 pitch=90 roll=270 scale=9 mesh="FlappyOrxShip.mesh" />
+
+      <ParticleSpawner source="Orxonox/fire3" startdelay=0  position="0,0,20" visible="true"/>
+    
+    </attached>
+    <collisionShapes>
+      <SphereCollisionShape position="-1.8    ,0 ,  -11" radius="15" />
+      <SphereCollisionShape position="-0.8   ,0 ,  0" radius="16" />
+      <!-- <SphereCollisionShape position="0   ,0 ,  11" radius="12.5" /> -->
+    </collisionShapes>
+  
+  </FlappyOrxShip>
+</Template>
+
+<Template name=spaceshipescortcameras defaults=0>
+  <FlappyOrxShip>
+    <camerapositions>
+      <CameraPosition position="0,300,-100" direction="0, -1, 0" drag=false absolute=true mouselook=true />
+    </camerapositions>
+  </FlappyOrxShip>
+</Template>
+
Index: /code/trunk/data/overlays/Asteroids2DHUD.oxo
===================================================================
--- /code/trunk/data/overlays/Asteroids2DHUD.oxo	(revision 11783)
+++ /code/trunk/data/overlays/Asteroids2DHUD.oxo	(revision 11783)
@@ -0,0 +1,84 @@
+<Template name="spectatorhud">
+  <OverlayGroup name = "spectatorhud" scale = "1, 1">
+  </OverlayGroup>
+</Template>
+
+<Template name="Asteroids2DHUD">
+  <OverlayGroup name="Asteroids2DHUD" scale = "1, 1">
+
+    <OverlayText
+     position  = "0.02, 0.1"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+     caption   = "Lives:   "
+    />
+
+    <Asteroids2DHUDinfo
+     position  = "0.14, 0.1"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+
+     showlives     = true
+     showlevel     = false
+     showpoints     = false
+    />
+
+    <OverlayText
+     position  = "0.02, 0.02"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+     caption   = "Points: "
+    />
+
+    <Asteroids2DHUDinfo
+     position  = "0.14, 0.02"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+
+     showpoints     = true
+    />
+
+    <OverlayText
+     position  = "0.02, 0.055"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+     caption   = "Level: "
+    />
+
+    <Asteroids2DHUDinfo
+     position  = "0.14, 0.055"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+
+     showlives     = false
+     showlevel     = true
+     showpoints     = false
+    />
+
+    
+  </OverlayGroup>
+</Template>
+
+<Template name="spaceshiphud">
+  <OverlayGroup name = "spaceshiphud" scale = "1, 1">
+    
+ </OverlayGroup>
+</Template>
Index: /code/trunk/data/overlays/FlappyOrxHUD.oxo
===================================================================
--- /code/trunk/data/overlays/FlappyOrxHUD.oxo	(revision 11783)
+++ /code/trunk/data/overlays/FlappyOrxHUD.oxo	(revision 11783)
@@ -0,0 +1,69 @@
+<Template name="spectatorhud">
+  <OverlayGroup name = "spectatorhud" scale = "1, 1">
+  </OverlayGroup>
+</Template>
+<Template name="FlappyOrxHUD">
+  <OverlayGroup name="FlappyOrxHUD" scale = "1, 1">
+   
+    <FlappyOrxHUDinfo
+     position  = "0.02, 0.01"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+
+     showpoints     = true
+    />
+
+    <FlappyOrxHUDinfo
+     position  = "0.5, 0.5"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 0.0, 0.0, 1.0"
+     align     = "center"
+
+     showmessage     = true
+     messageID = 0
+
+    />
+
+    <FlappyOrxHUDinfo
+         position  = "0.5, 0.6"
+         pickpoint = "0.0, 0.0"
+         font      = "ShareTechMono"
+         textsize  = 0.04
+         colour    = "1.0, 1.0, 1.0, 1.0"
+         align     = "center"
+
+         showmessage     = true
+         messageID = 1
+    />
+    <FlappyOrxHUDinfo
+     position  = "0.5, 0.65"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "center"
+
+     showmessage     = true
+     messageID = 2
+    />
+    <FlappyOrxHUDinfo
+     position  = "0.5, 0.7"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.04
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "center"
+
+     showmessage     = true
+     messageID = 3
+
+    />
+
+    
+  </OverlayGroup>
+</Template>
Index: /code/trunk/data/overlays/HUDTemplates3.oxo
===================================================================
--- /code/trunk/data/overlays/HUDTemplates3.oxo	(revision 11782)
+++ /code/trunk/data/overlays/HUDTemplates3.oxo	(revision 11783)
@@ -47,5 +47,5 @@
 <Template name="spaceshiphud">
   <OverlayGroup name = "spaceshiphud" scale = "1, 1">
-    <Map />
+
 
     <HUDHealthBar
@@ -217,6 +217,6 @@
 
     <GUIOverlay
-      name = "Dialogue"
-      guiname = "Dialogue"
+      name = "Dialog"
+      guiname = "Dialog"
       visible = "false"
     />
Index: /code/trunk/data/overlays/HUDTemplatesFPS.oxo
===================================================================
--- /code/trunk/data/overlays/HUDTemplatesFPS.oxo	(revision 11782)
+++ /code/trunk/data/overlays/HUDTemplatesFPS.oxo	(revision 11783)
@@ -1,6 +1,4 @@
 <Template name="fpshud">
   <OverlayGroup name = "fpshud" scale = "1, 1">
-    <Map />
-
     <HUDHealthBar
      name              = "HealthBar1"
Index: /code/trunk/data/overlays/StoryModeHUD.oxo
===================================================================
--- /code/trunk/data/overlays/StoryModeHUD.oxo	(revision 11782)
+++ /code/trunk/data/overlays/StoryModeHUD.oxo	(revision 11783)
@@ -2,6 +2,4 @@
 <Template name="StoryModeMap">
   <OverlayGroup name = "spaceshiphud" scale = "1, 1">
-    <Map />
-
 
      <GUIOverlay
Index: /code/trunk/data/overlays/StoryModeHUD2.oxo
===================================================================
--- /code/trunk/data/overlays/StoryModeHUD2.oxo	(revision 11783)
+++ /code/trunk/data/overlays/StoryModeHUD2.oxo	(revision 11783)
@@ -0,0 +1,13 @@
+<Template name="StoryModeHUD2">
+  <OverlayGroup name = "StoryModeHUD2" scale = "1, 1">\
+
+    <StoryModeHUD
+     name           = "StoryMode"
+     correctaspect  = false
+     font           = "VeraMono"
+     textSize       = 0.0420
+     align          = "center"
+    />
+
+  </OverlayGroup>
+</Template>
Index: /code/trunk/data/particle/fire3.particle
===================================================================
--- /code/trunk/data/particle/fire3.particle	(revision 11782)
+++ /code/trunk/data/particle/fire3.particle	(revision 11783)
@@ -65,8 +65,5 @@
 		colour3	0 0 0 0
 		time3	1
-		colour4	0.5 0.5 0.5 0
-		time4	1
-		colour5	0.5 0.5 0.5 0
-		time5	1
+		
 	}
 }
Index: /code/trunk/src/libraries/tools/Mesh.cc
===================================================================
--- /code/trunk/src/libraries/tools/Mesh.cc	(revision 11782)
+++ /code/trunk/src/libraries/tools/Mesh.cc	(revision 11783)
@@ -100,4 +100,15 @@
     }
 
+    // PRE: a valid  Ogre::Entity* entity with a valid subentity at index
+    // POST: changed material of subentity at index to name
+    void Mesh::setSubMaterial(const std::string& name, const int index){
+         if (this->entity_ && this->entity_->getSubEntity(index))
+        {
+                this->entity_->getSubEntity(index)->setMaterialName(name);
+        }
+        else 
+            orxout() << "ERROR at Index " << index << endl;
+    }
+
     const std::string& Mesh::getMaterial() const
     {
Index: /code/trunk/src/libraries/tools/Mesh.h
===================================================================
--- /code/trunk/src/libraries/tools/Mesh.h	(revision 11782)
+++ /code/trunk/src/libraries/tools/Mesh.h	(revision 11783)
@@ -51,4 +51,6 @@
             const std::string& getMaterial() const;
 
+            void setSubMaterial(const std::string& name, const int index);
+
             void setVisible(bool bVisible);
             bool isVisible() const;
Index: /code/trunk/src/modules/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/CMakeLists.txt	(revision 11782)
+++ /code/trunk/src/modules/CMakeLists.txt	(revision 11783)
@@ -26,5 +26,6 @@
 ################ Sub Directories ################
 
-ADD_SUBDIRECTORY(dialogue)
+ADD_SUBDIRECTORY(asteroidmining)
+ADD_SUBDIRECTORY(dialog)
 ADD_SUBDIRECTORY(designtools)
 ADD_SUBDIRECTORY(gametypes)
@@ -46,2 +47,4 @@
 ADD_SUBDIRECTORY(hover)
 ADD_SUBDIRECTORY(superorxobros)
+ADD_SUBDIRECTORY(asteroids2D)
+ADD_SUBDIRECTORY(flappyorx)
Index: /code/trunk/src/modules/asteroidmining/AsteroidMinable.cc
===================================================================
--- /code/trunk/src/modules/asteroidmining/AsteroidMinable.cc	(revision 11783)
+++ /code/trunk/src/modules/asteroidmining/AsteroidMinable.cc	(revision 11783)
@@ -0,0 +1,367 @@
+
+ /*   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:
+ *      remartin
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*
+
+    @file
+    @author remartin
+    @brief An asteroid which can be destroyed. Some smaller asteroids are created and a pickup spawns. 
+
+HANDBUCH:
+o Die Collision Shape kann nur im Konstruktor hinzugefügt werden. Die XML-Argumente werden aber erst nach dem Konstruktor gesetzt. 
+  Darum wird hier beim ersten Aufruf der tick()-Methode via putStuff() ein komplett neuer Asteroid generiert und der alte zerstört. 
+o im Level-File includes/pickups.oxi importieren. 
+
+OFFEN/Weiterentwicklung: 
+o @TODO Add resource pickups. 
+--> data_extern/images/effects: PNG's für die Pickups
+--> https://www.orxonox.net/jenkins/view/Management/job/orxonox_doxygen_trunk/javadoc/group___pickup.html
+
+o Density doesn't add up to 1...
+o Does collision damage work properly
+o Add sound effect (crunching etc. ) (No sound in space...)
+o Explosion parts
+
+ANDERORTS VERÄNDERTE SACHEN: 
+Pickup-Zeug: 
+o PickupSpawner.h: Zugriffsrechte setPickupTemplateName() und setMaxSpawnedItems()
+o PickupSpawner.h: In Tick() zwei Testbedingungen eingefügt.
+o Pawn.h: Attribut acceptsPickups_ inklusive get/set. 
+
+ERLEGTE FEHLER:
+o Grössenabhängige Collision Shape -> putStuff-Methode, Werte noch nicht durchgesickert. 
+o setHealth: maxHealth() des pawns setzen! 
+o Asteroiden fressen Pickups: Argument in Pawn, Test darauf in Tick() von PickupSpawner. 
+o i++ einfach ganz verhindern, ++i stattdessen. 
+o Velocity didn-t get passed properly through the 2nd constructor. Used get/set instead. 
+o Rand() geht bis zu riesigen Nummern! rnd() ist zwischen 0 und 1
+
+NOTIZEN:
+o SUPER
+o Warnungsverhinderung anderswo: (void)pickedUp; // To avoid compiler warning.
+o friend class Pickupable;
+
+
+
+*/
+
+#include "AsteroidMinable.h"
+
+#include <algorithm>
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "util/Math.h"
+
+#include "pickup/PickupSpawner.h"
+#include "pickup/Pickup.h"
+
+#include "objects/collisionshapes/SphereCollisionShape.h"
+#include "graphics/Model.h"
+
+namespace orxonox{
+
+    RegisterClass(AsteroidMinable);
+
+    // @brief Standard constructor
+    AsteroidMinable::AsteroidMinable(Context* context) : Pawn(context){
+
+        RegisterObject(AsteroidMinable);
+
+        // Default Values:
+        this->size = 1;
+        this->dropStuff = true; 
+        this->generateSmaller = true; 
+        this->acceptsPickups_ = false; 
+
+        this->setCollisionType(WorldEntity::CollisionType::Dynamic);
+        this->enableCollisionCallback();
+
+        // Old from Pawn
+        this->registerVariables();
+
+        this->initialised = false;
+    }
+
+    AsteroidMinable::~AsteroidMinable(){
+
+    }
+
+    void AsteroidMinable::setSize(float s)
+    {
+        this->size = s;
+        this->health_ = 15*size;
+        this->maxHealth_ = this->health_;
+    }
+
+    // @brief Helper method.
+    void AsteroidMinable::putStuff(){
+
+        // The radar is able to detect whether an asteroid contains resources....
+        if(dropStuff){
+            this->setRadarObjectColour(ColourValue(1.0f, 1.0f, 0.0f, 1.0f));
+            this->setRadarObjectShape(RadarViewable::Shape::Dot);
+        }else{
+            // Somehow remove from radar? (all pawns get registered automatically... )
+            this->setRadarObjectColour(ColourValue(0.663f, 0.663f, 0.663f, 1.0f));
+            this->setRadarObjectShape(RadarViewable::Shape::Dot);
+        }
+
+        // Add Model, random one of the 6 shapes
+        Model* hull = new Model(this->getContext());
+        hull->setMeshSource("ast" + multi_cast<std::string>(1 + (int)rnd(0, 6)) + ".mesh");
+        hull->setScale(this->size);
+        this->attach(hull);
+
+        // Collision shape
+        SphereCollisionShape* cs = new SphereCollisionShape(this->getContext());
+        cs->setRadius((this->size)*2); //OFFEN: Feinabstimmung der Radien. 
+        this->attachCollisionShape(cs); 
+
+        this->initialised=true; 
+    }
+
+    void AsteroidMinable::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+
+        SUPER(AsteroidMinable, XMLPort, xmlelement, mode); 
+
+        XMLPortParam(AsteroidMinable, "size", setSize, getSize, xmlelement, mode);
+        XMLPortParam(AsteroidMinable, "generateSmaller", setShattering, doesShatter, xmlelement, mode);
+        XMLPortParam(AsteroidMinable, "dropStuff", setDropStuff, doesDropStuff, xmlelement, mode);
+
+    }
+
+    void AsteroidMinable::registerVariables(){
+
+        registerVariable(this->size, VariableDirection::ToClient);
+        registerVariable(this->generateSmaller, VariableDirection::ToClient);
+        registerVariable(this->dropStuff, VariableDirection::ToClient); 
+        registerVariable(this->initialised, VariableDirection::ToClient);
+
+    }
+
+    void AsteroidMinable::tick(float dt){
+
+        if(!(this->initialised)){this->putStuff();} 
+
+        if(this->health_ <=0){this->death();}
+
+    }
+
+    void AsteroidMinable::death(){ // @brief Überschreibt die Methode in Pawn
+
+        // just copied that from somewhere else. 
+        this->bAlive_ = false;
+        this->destroyLater();
+        this->setDestroyWhenPlayerLeft(false);
+        // pawn -> addExplosionPart
+        // this->goWithStyle();
+
+
+        // Pickups which can be harvested. It's munition at the moment, could be changed/extended. 
+        if(dropStuff){
+            PickupSpawner* thingy = new PickupSpawner(this->getContext());
+
+            std::string tname;
+            if(this->size <= 5){
+                tname = "smallmunitionpickup";
+            }else if(this->size <= 20){
+                tname = "mediummunitionpickup";
+            }else{
+                tname = "hugemunitionpickup";
+            }
+            thingy->setPickupTemplateName(tname);
+            thingy->setPosition(this->getPosition());
+            thingy->setMaxSpawnedItems(1); // Would be default anyways
+            thingy->setRespawnTime(0.2f);
+        }
+
+        // Smaller Parts = 'Children'
+        if(this->generateSmaller){this->spawnChildren();}
+
+    }
+
+// @brief If the option generateSmaller is enabled, individual fragments are added with this method. 
+    void AsteroidMinable::spawnChildren(){
+
+    if (this->size <=1){return;} // Absicherung trivialer Fall
+
+    float massRem = (this->size-1); //some mass is lost
+    int num = (int)roundf(rnd(massRem-1)) + 1; // random number of children, at least one
+    if(num > 10){num = 10;} // no max function in C? 
+    std::vector<float> masses(num); // Masses of the asteroids
+    // orxout() << "SpawnChildren(): Passed basic stuff. num = " << num << "; massRem(total) = "<< massRem << endl;
+    massRem = massRem-num; // mass must be at least one, add later.  
+
+    // Randomnised spawning points for the new asteroids
+    std::vector<float> phi(num);
+    std::vector<float> theta(num);
+
+    // Discusting C stuff -> use that to initialise dynamic array values to 0. 
+    for(int twat = 0; twat<num; ++twat)
+    {
+        masses[twat] = 0.0f;
+        phi[twat] = 0.0f;
+        theta[twat] = 0.0f;
+    }
+
+    float piG = 3.1415927410125732421875; //pi; // Math.pi ist statisch oder so. 
+    float d_p = 2*piG/num;
+    float d_t = piG/num;
+    float p = d_p/2.0f;
+    float t = d_t/2.0f;
+    // float phiOffset = rnd()*2*pi; // Added everywhere to become independent of the coordinate system?
+    // float thetaOffset = rnd()*pi;
+    float rScaling; // scale radius to prevent asteroids from touching. (distance=AsteroidRadius/tan(sector/2))
+
+    if(num == 1 ){
+        rScaling = 1; // avoid tan(90). Unused. 
+    }else{
+
+        rScaling = tan(t); 
+
+        int pos; // insert at random position (linear probing) in array, to get some randomness.  
+        for(int it = 0; it<num; ++it){
+
+            pos = mod((int)(rnd((float)num)),num);
+            while(phi[pos] != 0.0){// find empty spot in array
+                pos = (int)mod(++pos, num);
+            }
+            phi[pos] = p + it*d_p;// set angle there
+
+            pos = mod((int)(rnd((float)num)),num);
+            while(theta[pos] != 0.0){
+                pos = (int)mod(++pos, num);
+            }
+            theta[pos] = t + it*d_t;
+        }
+    }
+
+    //orxout() << "SpawnChildren(): Phi: "; printArrayString(phi);
+    //orxout() << "SpawnChildren(): Theta: "; printArrayString(theta);
+    //orxout() << "SpawnChildren(): Passed angle stuff. " << endl;
+
+    // Triangular, discrete probability "density" with max at the average value massRem/num. 50% chance to be below that. 
+    if(massRem>0){
+        int c = (int)massRem;
+        std::vector<float> probDensity(c);
+
+        int a = (int)roundf(massRem/num);
+        int b = c-a;
+        
+        int z = 0;
+        float dProbA = 1.0f/(a*a + 3.0f*a + 2.0f); // one 'probability unit' for discrete ramp function. Gauss stuff.
+        for(z = 0; z<a; ++z){probDensity[z] = (z+1)*dProbA; } // rising part
+
+        float dProbB = 1.0f/(b*b +3.0f*b + 2.0f);
+        for(z = 0; z<b; ++z){probDensity[c-1-z] = (z+1)*dProbB;} // falling part
+    
+        // // Just for testing:
+        // float sum = 0.0;
+        // for(int globi = 0; globi<c; ++globi){
+        //     orxout() << "pDensity at [" << globi << "] is: " << probDensity[globi] << endl;
+        //     sum = sum+ probDensity[globi];
+        // }
+        // orxout() << "Sum of densities should b 1, it is: " << sum << endl;
+
+        // Distributing the mass to individual asteroids
+        int result; 
+        float rVal; // between 0 and 1
+        float probSum; // summing up until rval is reached. 
+        for(int trav = 0; trav<num; ++trav){
+            result = 0;
+            rVal = rnd(); 
+            probSum = probDensity[0]; 
+
+            while(rVal>probSum && result<massRem){// Not yet found && there-s smth left to distribute (Incrementing inside!)
+                if(result<(massRem-2)){probSum = probSum + probDensity[result+1];} // avoid logical/acess error
+                ++result;
+            }
+
+            masses[trav] = 1.0f + result; // Fragments have mass of at least one.
+            massRem = massRem-result;
+
+        }
+    }else{
+        for(int schnaegg = 0; schnaegg<num; ++schnaegg){masses[schnaegg] = 1;}
+    }
+
+    // orxout() << "SpawnChildren(): Masses: "; printArrayString(masses);
+    // orxout() << "SpawnChildren(): Passed mass stuff. " << endl;
+
+    // Creating the 'chlidren':
+    for(int fisch = 0; fisch<num; ++fisch){
+
+        Vector3 pos = Vector3::ZERO; // Position offset
+        if(num > 1){// not required if there-s just one child
+            float r = masses[fisch]/rScaling;
+            pos = Vector3(r*sin(theta[fisch])*cos(phi[fisch]), r*sin(theta[fisch])*sin(phi[fisch]), r*cos(theta[fisch])); // convert spheric coordinates to vector
+        }
+        
+        AsteroidMinable* child = new AsteroidMinable(this->getContext());
+        child->setSize(masses[fisch]);
+        child->setPosition(this->getPosition() + pos);
+        child->setVelocity(this->getVelocity());
+        child->setDropStuff(this->dropStuff);
+    }
+    // orxout() << "Leaving spawnChildren() method. " << endl;
+}
+
+// @brief overloading that to prevent asteroids from taking damage from each other (domino effect etc. ) 
+    void AsteroidMinable::hit(Pawn* originator, const Vector3& force, const btCollisionShape* cs, float damage, float healthdamage, float shielddamage){
+
+        // orxout() << "AsteroidMining::Hit(Variante 1) Dings aufgerufen. " << endl; 
+        if(orxonox_cast<AsteroidMinable*>(originator) || orxonox_cast<Pickup*>(originator)){return;}
+        this->damage(damage, healthdamage, shielddamage, originator, cs);
+        this->setVelocity(this->getVelocity() + force);
+
+        // if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator))// && (!this->getController() || !this->getController()->getGodMode()) )
+        // {
+        //     this->damage(damage, healthdamage, shielddamage, originator, cs);
+        //     this->setVelocity(this->getVelocity() + force);
+        // }
+    }
+
+// @brief overloading that to prevent asteroids from taking damage from each other (domino effect etc. ) 
+    void AsteroidMinable::hit(Pawn* originator, btManifoldPoint& contactpoint, const btCollisionShape* cs, float damage, float healthdamage, float shielddamage){
+
+        //orxout() << "AsteroidMining::Hit(Variante 2) Dings aufgerufen. " << endl;
+        if(orxonox_cast<AsteroidMinable*>(originator) || orxonox_cast<Pickup*>(originator)){return;}
+        this->damage(damage, healthdamage, shielddamage, originator, cs);
+
+        // if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator))// && (!this->getController() || !this->getController()->getGodMode()) )
+        // {
+        //     this->damage(damage, healthdamage, shielddamage, originator, cs);
+
+        //     //if ( this->getController() )
+        //     //    this->getController()->hit(originator, contactpoint, damage); // changed to damage, why shielddamage?
+        // }
+    }
+}
Index: /code/trunk/src/modules/asteroidmining/AsteroidMinable.h
===================================================================
--- /code/trunk/src/modules/asteroidmining/AsteroidMinable.h	(revision 11783)
+++ /code/trunk/src/modules/asteroidmining/AsteroidMinable.h	(revision 11783)
@@ -0,0 +1,129 @@
+/*
+ *   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:
+ *      remartin
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+/**
+
+    @file
+    @author remartin
+    @brief An asteroid which can be destroyed. Some smaller asteroids are created and a pickup spawns. 
+
+HANDBUCH:
+o Die Collision Shape kann nur im Konstruktor hinzugefügt werden. Die XML-Argumente werden aber erst nach dem Konstruktor gesetzt. 
+  Darum wird hier beim ersten Aufruf der tick()-Methode via putStuff() ein komplett neuer Asteroid generiert und der alte zerstört. 
+o im Level-File includes/pickups.oxi importieren. 
+
+OFFEN/Weiterentwicklung: 
+o @TODO Add resource pickups. 
+--> data_extern/images/effects: PNG's für die Pickups
+--> https://www.orxonox.net/jenkins/view/Management/job/orxonox_doxygen_trunk/javadoc/group___pickup.html
+
+o Density doesn't add up to 1...
+o Does collision damage work properly
+o Add sound effect (crunching etc. ) (No sound in space...)
+o Explosion parts
+
+ANDERORTS VERÄNDERTE SACHEN: 
+Pickup-Zeug: 
+o Pickup.h: createSpawner() neu public statt private
+o PickupSpawner.h: Zugriffsrechte setPickupTemplateName() und setMaxSpawnedItems()
+o PickupSpawner.h: In Tick() zwei Testbedingungen eingefügt.
+o Pawn.h: Attribut acceptsPickups_ inklusive get/set. 
+
+ERLEGTE FEHLER:
+o Grössenabhängige Collision Shape -> putStuff-Methode, Werte noch nicht durchgesickert. 
+o setHealth: maxHealth() des pawns setzen! 
+o Asteroiden fressen Pickups: Argument in Pawn, Test darauf in Tick() von PickupSpawner. 
+o i++ einfach ganz verhindern, ++i stattdessen. 
+o Velocity didn-t get passed properly through the 2nd constructor. Used get/set instead. 
+o Rand() geht bis zu riesigen Nummern! rnd() ist zwischen 0 und 1
+
+NOTIZEN:
+o SUPER
+o Warnungsverhinderung anderswo: (void)pickedUp; // To avoid compiler warning.
+o friend class Pickupable;
+
+*/
+
+#ifndef _AsteroidMinable_H__
+#define _AsteroidMinable_H__
+
+#include "AsteroidMiningPrereqs.h"
+
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox{
+
+
+    class _AsteroidMiningExport AsteroidMinable : public Pawn
+    {
+        public:
+            AsteroidMinable(Context* context);
+            virtual ~AsteroidMinable();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void tick(float dt) override;
+
+            // @brief overloading that to prevent asteroids from taking damage from each other (domino effect etc. ) 
+            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);
+
+            void setSize(float s);
+            inline float getSize(){return this->size;}
+
+            inline void setShattering(bool b){this->generateSmaller = b;}
+            inline bool doesShatter(){return this->generateSmaller;}
+
+            inline void setDropStuff(bool b){this->dropStuff = b;}
+            inline bool doesDropStuff(){return this->dropStuff;}
+
+        protected:
+
+            float size; //!< Implies health and type of dropped pickups
+            bool generateSmaller; //!< Whether this asteroid leaves fragments
+            bool dropStuff; //!< Whether this asteroid yields valuable stuff
+
+            // @brief Überschreibt die Methode in Pawn
+            virtual void death(); 
+
+        private:
+
+            bool initialised; //!< Used in relation to the constructor detour described above 
+
+            void registerVariables();
+
+            // @brief Helper method. 
+            virtual void putStuff();
+
+            // @brief If the option generateSmaller is enabled, individual fragments are added with this method. 
+            virtual void spawnChildren();
+
+    }; // tolua_export
+} // tolua_export
+
+#endif /* _AsteroidMinable_H__ */
Index: /code/trunk/src/modules/asteroidmining/AsteroidMiningPrereqs.h
===================================================================
--- /code/trunk/src/modules/asteroidmining/AsteroidMiningPrereqs.h	(revision 11783)
+++ /code/trunk/src/modules/asteroidmining/AsteroidMiningPrereqs.h	(revision 11783)
@@ -0,0 +1,75 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the AsteroidMining module
+*/
+
+#ifndef _AsteroidMiningPrereqs_H__
+#define _AsteroidMiningPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ASTEROIDMINING_STATIC_BUILD)
+#  ifdef ASTEROIDMINING_SHARED_BUILD
+#    define _AsteroidMiningExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _AsteroidMiningExport
+#    else
+#      define _AsteroidMiningExport __declspec(dllimport)
+#    endif
+#  endif
+#  define _AsteroidMiningPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+#  define _AsteroidMiningExport  __attribute__ ((visibility("default")))
+#  define _AsteroidMiningPrivate __attribute__ ((visibility("hidden")))
+#else
+#  define _AsteroidMiningExport
+#  define _AsteroidMiningPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class AsteroidMinable;
+    class SpicedAsteroidBelt;
+    class SpicedAsteroidField;
+}
+
+#endif /* _AsteroidMiningPrereqs_H__ */
Index: /code/trunk/src/modules/asteroidmining/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/asteroidmining/CMakeLists.txt	(revision 11783)
+++ /code/trunk/src/modules/asteroidmining/CMakeLists.txt	(revision 11783)
@@ -0,0 +1,19 @@
+SET_SOURCE_FILES(PICKUP_SRC_FILES
+  AsteroidMinable.cc
+  SpicedAsteroidField.cc
+  SpicedAsteroidBelt.cc
+)
+
+ORXONOX_ADD_LIBRARY(asteroidmining
+  MODULE
+  FIND_HEADER_FILES
+  TOLUA_FILES
+
+  PCH_FILE
+
+  LINK_LIBRARIES
+    orxonox
+    objects
+    pickup
+  SOURCE_FILES ${PICKUP_SRC_FILES}
+)
Index: /code/trunk/src/modules/asteroidmining/SpicedAsteroidBelt.cc
===================================================================
--- /code/trunk/src/modules/asteroidmining/SpicedAsteroidBelt.cc	(revision 11783)
+++ /code/trunk/src/modules/asteroidmining/SpicedAsteroidBelt.cc	(revision 11783)
@@ -0,0 +1,150 @@
+
+ /*   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:
+ *      remartin
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+
+    @file 
+    @author remartin
+    @brief Asteroid belt with lots of parameters. Derived from asteroidField.lua
+
+    Generates a ring of asteroids by calling SpicedAsteroidField multiple times. 
+    It's in the xy-plane at default, orientation can be changed with tiltAt 
+    (angle where it gets elevated/lowered the most) and TiltBy (angle at z-axis). 
+    This doesn't work very well and could probably implemented differently with 
+    relative coordinates (attach etc, stuff in WorldEntity). 
+
+    It is required to wait until all XML-arguments are set. That's why the actual 
+    generation happens when tick() gets called for the first time. 
+    
+*/
+
+
+#include "SpicedAsteroidBelt.h"
+#include "SpicedAsteroidField.h"
+
+#include <algorithm>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Math.h"
+
+namespace orxonox{
+
+    RegisterClass(SpicedAsteroidBelt);
+
+    SpicedAsteroidBelt::SpicedAsteroidBelt(Context* context) : BaseObject(context) {
+
+        RegisterObject(SpicedAsteroidBelt);
+
+        // Default Values:
+        this->count = 250; 
+        this->position = Vector3(0,0,0);
+        this->segments = 30;
+        this->minSize = 1;
+        this->maxSize = 50;
+        this->radius0 = 7190;
+        this->radius1 = 7800;
+
+        this->mDensity = 0.3;
+        this->foggy = true;
+        this->fogDensity = 0.5;
+
+        this->tiltAt = 0.0; 
+        this->tiltBy = 0.0;  
+
+    }
+
+    SpicedAsteroidBelt::~SpicedAsteroidBelt(){
+
+    }
+
+    void SpicedAsteroidBelt::create(){
+
+        float myPi = math::pi;
+        float width = fabs(this->radius1 - this->radius0);
+        float radius = (this->radius1 + this->radius0) / 2.0f;
+        int segmentCount = (int)roundf(this->count / this->segments);
+
+        float dPhi = (2 * myPi) / this->segments;
+        float dTheta = 4.0f*this->tiltBy/this->segments;
+        float sepp = -this->tiltAt;
+        float globi = (myPi/2.0f) + this->tiltBy;
+
+        for(int s = 0; s<segments; ++s){
+            sepp = sepp + dPhi;
+            if(s<segments/2){            
+                globi = globi - dTheta; 
+            }else{
+                globi = globi + dTheta; 
+            }
+            
+            Vector3 pos(radius*cos(sepp)*sin(globi), radius*sin(sepp)*sin(globi), radius*cos(globi));
+
+            SpicedAsteroidField* field = new SpicedAsteroidField(this->getContext());
+            field->setPosition(this->position + pos);
+            field->setMinSize(this->minSize);
+            field->setMaxSize(this->maxSize);
+            field->setRadius(width);
+            field->setCount(segmentCount);
+            field->setFog(this->foggy);
+            field->setMineralDensity(this->mDensity);
+            field->setFogDensity(this->fogDensity);
+        }
+    }
+
+    void SpicedAsteroidBelt::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+
+        SUPER(SpicedAsteroidBelt, XMLPort, xmlelement, mode); 
+
+        XMLPortParam(SpicedAsteroidBelt, "count", setCount, getCount, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidBelt, "mDensity", setMineralDensity, getMineralDensity, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidBelt, "position", setPosition, getPosition, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidBelt, "segments", setSegments, getSegments, xmlelement, mode);
+
+        XMLPortParam(SpicedAsteroidBelt, "maxSize", setMaxSize, getMaxSize, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidBelt, "minSize", setMinSize, getMinSize, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidBelt, "radius0", setRadius0, getRadius0, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidBelt, "radius1", setRadius1, getRadius1, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidBelt, "foggy", setFog, isFoggy, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidBelt, "fogDensity", setFogDensity, getFogDensity, xmlelement, mode);
+
+        XMLPortParam(SpicedAsteroidBelt, "tiltAt", setTiltAt, getTiltAt, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidBelt, "tiltBy", setTiltBy, getTiltBy, xmlelement, mode); 
+
+    }
+
+    void SpicedAsteroidBelt::tick(float dt){
+
+        this->create();
+        this->destroyLater();
+
+    }
+
+}
+
+
Index: /code/trunk/src/modules/asteroidmining/SpicedAsteroidBelt.h
===================================================================
--- /code/trunk/src/modules/asteroidmining/SpicedAsteroidBelt.h	(revision 11783)
+++ /code/trunk/src/modules/asteroidmining/SpicedAsteroidBelt.h	(revision 11783)
@@ -0,0 +1,131 @@
+/*
+ *   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:
+ *      remartin
+ *   Co-authors:
+ *
+ */
+
+/**
+
+    @file 
+    @author remartin
+    @brief Asteroid belt with lots of parameters. Derived from asteroidField.lua
+
+    Generates a ring of asteroids by calling SpicedAsteroidField multiple times. 
+    It's in the xy-plane at default, orientation can be changed with tiltAt 
+    (angle where it gets elevated/lowered the most) and TiltBy (angle at z-axis). 
+    This doesn't work very well and could probably implemented differently with 
+    relative coordinates (attach etc, stuff in WorldEntity). 
+
+    It is required to wait until all XML-arguments are set. That's why the actual 
+    generation happens when tick() gets called for the first time. 
+    
+*/
+
+
+#ifndef _SpicedAsteroidBelt_H__
+#define _SpicedAsteroidBelt_H__
+
+#include "AsteroidMiningPrereqs.h"
+
+#include "core/BaseObject.h"
+#include "tools/interfaces/Tickable.h"
+
+namespace orxonox // tolua_export
+{
+
+    // tolua_export
+    class _AsteroidMiningExport SpicedAsteroidBelt : public BaseObject, public Tickable
+    { // tolua_export
+
+        public:
+            SpicedAsteroidBelt(Context* context);// This constructor is for XML access only!
+            virtual ~SpicedAsteroidBelt();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void tick(float dt) override;
+
+            inline void setCount(float s){this->count = s;}
+            inline float getCount(){return this->count;}
+
+            inline void setMineralDensity(float d){this->mDensity = d;}
+            inline float getMineralDensity(){return this->mDensity;}
+
+            inline void setPosition(const Vector3& v){this->position = v;}
+            inline const Vector3& getPosition(){return this->position;}
+
+            inline void setSegments(int s){this->segments = s;}
+            inline int getSegments(){return this->segments;}
+
+            inline void setMaxSize(float i){this->maxSize = i;}
+            inline float getMaxSize(){return this->maxSize;}
+
+            inline void setMinSize(float i){this->minSize = i;}
+            inline float getMinSize(){return this->minSize;}
+
+            inline void setRadius0(float r0){this->radius0 = r0;}
+            inline float getRadius0(){return this->radius0;}
+
+            inline void setRadius1(float r1){this->radius1 = r1;}
+            inline float getRadius1(){return this->radius1;}
+
+            inline void setFog(bool f){this->foggy = f;}
+            inline bool isFoggy(){return this->foggy;}
+
+            inline void setFogDensity(float fd){this->fogDensity = fd;}
+            inline float getFogDensity(){return this->fogDensity;}
+
+            inline void setTiltAt(float ta){this->tiltAt = ta;}
+            inline void setTiltBy(float tb){this->tiltBy = tb;}
+            inline float getTiltAt(){return this->tiltAt;}
+            inline float getTiltBy(){return this->tiltBy;}
+
+
+        protected:
+
+            float count; //!< Approximate number of asteroids
+            float mDensity; //!< Approximate commonness of asteroids that yield stuff, value between 0 and 1;
+
+            Vector3 position;
+
+            int segments; //!< Number of asteroidFields that get generated. 
+            
+            float maxSize; //!< Most obese asteroid possible
+            float minSize; //!< Most meagre asteroid possible
+
+            float radius0; //!< Inner radius
+            float radius1; //!< Outer radius
+
+            bool foggy; //!< Whether there's fog arount the asteroids
+            float fogDensity; 
+
+            float tiltAt; //!< Orientation: Angle where it gets elevated/lowered the most
+            float tiltBy; //!< angle at z-axis
+
+        private:
+            virtual void create();
+
+    }; // tolua_export
+} // tolua_export
+
+#endif /* _SpicedAsteroidBelt_H__ */
Index: /code/trunk/src/modules/asteroidmining/SpicedAsteroidField.cc
===================================================================
--- /code/trunk/src/modules/asteroidmining/SpicedAsteroidField.cc	(revision 11783)
+++ /code/trunk/src/modules/asteroidmining/SpicedAsteroidField.cc	(revision 11783)
@@ -0,0 +1,132 @@
+
+ /*   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:
+ *      remartin
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+
+    @file 
+    @author remartin
+    @brief Asteroid field with lots of parameters. Derived from asteroidField.lua
+
+    Generates a bunch of asteroids that may contain some stuff. 
+    It is required to wait until all XML-arguments are set. That's why the actual 
+    generation happens when tick() gets called for the first time. 
+    
+*/
+
+
+#include "SpicedAsteroidField.h"
+#include "AsteroidMinable.h"
+
+#include <algorithm>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Math.h"
+
+#include "graphics/Billboard.h"
+
+
+namespace orxonox{
+
+    RegisterClass(SpicedAsteroidField);
+
+    SpicedAsteroidField::SpicedAsteroidField(Context* context) : BaseObject(context) {
+
+        RegisterObject(SpicedAsteroidField);
+
+        // Default Values: 
+        this->count = 30; 
+        this->mDensity = 0.5;
+        this->position = Vector3(0,0,0);
+        this->maxSize = 40; 
+        this->minSize = 1; 
+        this->radius = 1000;
+        this->foggy = true; 
+        this->fogDensity = 0.5;
+    }
+
+    SpicedAsteroidField::~SpicedAsteroidField(){
+
+    }
+
+    void SpicedAsteroidField::create(){
+
+        float size;
+        float pX;
+        float pY;
+        float pZ;
+
+        for(int gertrud = 0; gertrud<count; ++gertrud){
+
+            AsteroidMinable* a = new AsteroidMinable(this->getContext());
+
+            size = roundf(rnd(this->maxSize - this->minSize)) + this->minSize;
+            a->setSize(size); 
+
+            pX = roundf(rnd(2*this->radius)) - radius;
+            pY = roundf(rnd(2*this->radius)) - radius;
+            pZ = roundf(rnd(2*this->radius)) - radius;
+            Vector3 relPos(pX, pY, pZ);
+            a->setPosition(this->position + relPos);
+
+            bool spiced = (rnd() < (this->mDensity)); // Whether the asteroid does drop pickups etc. 
+            a->setDropStuff(spiced);
+            
+            // Fog is iplemented with billboards (as in asteroidField.lua, that bloke had the idea)
+            if(this->foggy && mod(gertrud, 5) == 0){
+                Billboard* bb = new Billboard(this->getContext());
+                bb->setPosition(this->position + relPos);
+                bb->setMaterial("Smoke/Smoke");
+                bb->setScale(size);
+                bb->setColour(ColourValue(this->fogDensity, this->fogDensity, this->fogDensity));    
+            }
+        }
+    }
+
+    void SpicedAsteroidField::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+
+        SUPER(SpicedAsteroidField, XMLPort, xmlelement, mode); 
+
+        XMLPortParam(SpicedAsteroidField, "count", setCount, getCount, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidField, "mDensity", setMineralDensity, getMineralDensity, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidField, "position", setPosition, getPosition, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidField, "maxSize", setMaxSize, getMaxSize, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidField, "minSize", setMinSize, getMinSize, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidField, "radius", setRadius, getRadius, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidField, "foggy", setFog, isFoggy, xmlelement, mode);
+        XMLPortParam(SpicedAsteroidField, "fogDensity", setFogDensity, getFogDensity, xmlelement, mode);
+
+    }
+
+    void SpicedAsteroidField::tick(float dt){
+
+        this->create();
+        this->destroyLater();
+    }
+
+}
Index: /code/trunk/src/modules/asteroidmining/SpicedAsteroidField.h
===================================================================
--- /code/trunk/src/modules/asteroidmining/SpicedAsteroidField.h	(revision 11783)
+++ /code/trunk/src/modules/asteroidmining/SpicedAsteroidField.h	(revision 11783)
@@ -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:
+ *      remartin
+ *   Co-authors:
+ *
+ */
+
+/**
+
+    @file 
+    @author remartin
+    @brief Asteroid field with lots of parameters. Derived from asteroidField.lua
+
+    Generates a bunch of asteroids that may contain some stuff. 
+    It is required to wait until all XML-arguments are set. That's why the actual 
+    generation happens when tick() gets called for the first time. 
+    
+*/
+
+#ifndef _SpicedAsteroidField_H__
+#define _SpicedAsteroidField_H__
+
+#include "AsteroidMiningPrereqs.h"
+
+#include "core/BaseObject.h"
+#include "tools/interfaces/Tickable.h"
+
+namespace orxonox // tolua_export
+{
+
+    // tolua_export
+    class _AsteroidMiningExport SpicedAsteroidField : public BaseObject, public Tickable
+    { // tolua_export
+
+        public:
+            SpicedAsteroidField(Context* context);
+            virtual ~SpicedAsteroidField();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void tick(float dt) override;
+
+            inline void setCount(int s){this->count = s;}
+            inline int getCount(){return this->count;}
+
+            inline void setMineralDensity(float d){this->mDensity = d;}
+            inline float getMineralDensity(){return this->mDensity;}
+
+            inline void setPosition(const Vector3& v){this->position = v;}
+            inline const Vector3& getPosition(){return this->position;}
+
+            inline void setMaxSize(float i){this->maxSize = i;}
+            inline float getMaxSize(){return this->maxSize;}
+
+            inline void setMinSize(float i){this->minSize = i;}
+            inline float getMinSize(){return this->minSize;}
+
+            inline void setRadius(float r){this->radius = r;}
+            inline float getRadius(){return this->radius;}
+
+            inline void setFog(bool f){this->foggy = f;}
+            inline bool isFoggy(){return this->foggy;}
+
+            inline void setFogDensity(float fd){this->fogDensity = fd;}
+            inline float getFogDensity(){return this->fogDensity;}
+
+        protected:
+
+            int count; //!< Number of asteroids generated
+            float mDensity; //!< Mineral density, between 0 and 1;
+
+            Vector3 position; //!< The center
+            
+            float maxSize; //!< Upper bound to asteroid size
+            float minSize; //!< Lower bound to asteroid size
+
+            float radius; //!< Asteroids can appear within a sphere. 
+            bool foggy; //!< Whether there's fog
+            float fogDensity;
+
+
+        private:
+            virtual void create();
+
+
+    }; // tolua_export
+} // tolua_export
+
+#endif /* _SpicedAsteroidField_H__ */
Index: /code/trunk/src/modules/asteroids2D/Asteroids2D.cc
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2D.cc	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2D.cc	(revision 11783)
@@ -0,0 +1,229 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+
+/**
+    @file Asteroids2D.cc
+    @brief Implementation of the Asteroids2D class.
+
+    TODO: 
+        - Implement a counting system for the score
+        - HUD can be improved (display health, points, level etc.
+        - Problem: The asteroids spawn randomly on the playing field.
+            During spawn or level up, there is the possibility that they pawn at the position of the ship.
+            ->spawn somewhere with a safty distance/radius
+        - look over collisionshapes of the stones ->  sometimes collison with stone is not triggered for bigger stones 
+        - modify parameters in data/levels/templates/spaceshipAsteroids2D.oxt for a better playing experience -> mass, damping, rotation etc.
+
+    IDEAS:
+        - make Asteroids more beautiful! (setting, ship, explosion particles, stones)
+        - particle effect after you got hit -> during bImmune is true
+        - implement shield -> object that can be triggered
+        - Projectiles should also move over the boarders and appear on the other side
+            -> they can also hurt the player
+
+*/
+
+#include "Asteroids2D.h"
+#include "Asteroids2DShip.h" // Necessary for getPlayer function. Do NOT include this in Header!
+#include "Asteroids2DStone.h"
+#include "Asteroids2DCenterPoint.h"
+#include "Asteroids2DHUDinfo.h"
+#include "core/CoreIncludes.h"
+#include "Highscore.h"
+#include "gamestates/GSLevel.h"
+#include "infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    RegisterUnloadableClass(Asteroids2D);
+
+    Asteroids2D::Asteroids2D(Context* context) : Deathmatch(context)
+    {
+        RegisterObject(Asteroids2D);
+
+        bEndGame = false;
+        lives = 3; 
+        level = 1;
+        point = 0;
+        bShowLevel = false;
+        multiplier = 1;
+        b_combo = false;
+        firstTick_ = true;
+        this->numberOfBots_ = 0; //sets number of default bots temporarly to 0
+        this->center_ = nullptr;
+        this->setHUDTemplate("Asteroids2DHUD");
+        levelupTimer.setTimer(30.0f, true, createExecutor(createFunctor(&Asteroids2D::levelUp, this))); //level up every 30s
+    }
+
+    void Asteroids2D::setCenterpoint(Asteroids2DCenterPoint* center)
+    {
+        this->center_ = center;
+    }
+
+    void Asteroids2D::levelUp()
+    {
+        level++;
+        if (getPlayer() != nullptr)
+        {
+
+            //Do something that indicates a level up
+            for (int i = 0; i < 7; i++)
+            {
+                WeakPtr<ExplosionPart> chunk5 = new ExplosionPart(this->center_->getContext());
+                chunk5->setPosition(Vector3(600, 0, 100.f * i - 300));
+                chunk5->setVelocity(Vector3(1000, 0, 0));  //player->getVelocity()
+                chunk5->setScale(10);
+                chunk5->setEffect1("Orxonox/explosion2b");
+                chunk5->setEffect2("Orxonox/smoke6");
+                chunk5->Explode();
+
+            }
+        }
+        addPoints(multiplier * 20);
+        multiplier *= 2;
+        toggleShowLevel();
+        showLevelTimer.setTimer(1.0f, false, createExecutor(createFunctor(&Asteroids2D::toggleShowLevel, this)));
+
+
+        //After level up -> spawn stones. Modify for different difficulty level
+        for(int i = 0; i < level*2; i++){
+            spawnStone();
+        }
+
+    }
+
+    void Asteroids2D::tick(float dt)
+    {
+        //Do this only for the first tick, generate 5 stones in the beginning
+        if(this->firstTick_)
+        {
+            for(int i = 0; i < 5; ++i)
+            {
+                spawnStone();
+            }
+            //after first tick, firstTick_ will remain false
+            this->firstTick_ = false;
+        }
+        
+        SUPER(Asteroids2D, tick, dt);
+    }
+
+    void Asteroids2D::spawnStone()
+    {
+
+        //stones are created with a size -> second constructor in Asteroids2DStone class
+        Asteroids2DStone* newStone = new Asteroids2DStone(this->center_->getContext());
+
+        //look at templates in data/levels/templates/asteroidsAsteroids2D.oxt
+        switch(newStone->getSize()){
+            case 1:
+                newStone->addTemplate("stone1");
+                break;
+            case 2: 
+                newStone->addTemplate("stone2");
+                break;
+            case 3:
+                newStone->addTemplate("stone3");
+                break;
+            default:
+                orxout(internal_error) << "Asteroids2DStone has invalid size and cannot be created" << endl;
+                break;
+
+        }
+    }
+
+    Asteroids2DShip* Asteroids2D::getPlayer()
+    {
+        for (Asteroids2DShip* ship : ObjectList<Asteroids2DShip>())
+        {
+            return ship;
+        }
+        return nullptr;
+    }
+
+    void Asteroids2D::costLife()
+    {
+        --lives;
+        if(lives <= 0){
+            endGameTimer.setTimer(8.0f, false, createExecutor(createFunctor(&Asteroids2D::end, this)));            
+        }
+    };
+    
+    //The first function that will be called
+    void Asteroids2D::start()
+    {
+        //orxout() << "start" << endl;
+
+        // Set variable to temporarily force the player to spawn.
+        this->bForceSpawn_ = false;
+
+        if (this->center_ == nullptr)  // abandon mission!
+        {
+            orxout(internal_error) << "Asteroids2D: No Centerpoint specified." << endl;
+            GSLevel::startMainMenu();
+            return;
+        }
+        // Call start for the parent class.
+        Deathmatch::start();
+    }
+
+    void Asteroids2D::playerPreSpawn(PlayerInfo* player)
+    {
+        this->playerInfo_ = player;
+        if(lives <= 0)
+        {
+            this->end();
+        }
+    }
+
+    //This function will be called from the ship or the stone class (if the stone was hit)
+    void Asteroids2D::addPoints(int numPoints)
+    {
+        if (!bEndGame)
+        {
+            point += numPoints * multiplier;
+            b_combo = true;
+        }
+    }
+
+    void Asteroids2D::end()
+    {
+        // DON'T CALL THIS!
+        //      Deathmatch::end();
+        // It will misteriously crash the game!
+        // Instead startMainMenu, this won't crash.
+        if (Highscore::exists())
+        {
+            int score = this->getPoints();
+            Highscore::getInstance().storeScore("Asteroids2D", score, this->playerInfo_);
+        }
+        GSLevel::startMainMenu();
+    }
+}
Index: /code/trunk/src/modules/asteroids2D/Asteroids2D.h
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2D.h	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2D.h	(revision 11783)
@@ -0,0 +1,113 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+
+/**
+    @file Asteroids2D.h
+    @brief Gametype:
+     - Goal: Survive as long as you can, do not collide with stones
+     - spawns stones in every level up
+     - if you shoot and hit a stone, it will spit into two smaller stones
+    @ingroup Asteroids2D
+*/
+
+#ifndef _Asteroids2D_H__
+#define _Asteroids2D_H__
+
+#include "asteroids2D/Asteroids2DPrereqs.h"
+
+#include "gametypes/Deathmatch.h"
+#include "tools/Timer.h"
+
+namespace orxonox
+{
+
+    class _Asteroids2DExport Asteroids2D : public Deathmatch
+    {
+       public:
+            Asteroids2D(Context* context);
+
+            virtual void start() override;
+            virtual void end() override;
+
+            //updates the game every few ns
+            virtual void tick(float dt) override;
+
+            virtual void playerPreSpawn(PlayerInfo* player) override;
+
+            void levelUp();
+
+
+            //For HUD
+            int getLives(){return this->lives;}
+            int getLevel(){return this->level;}
+            int getPoints(){return this->point;}
+            int getMultiplier(){return this->multiplier;}
+
+            //Generate Stones
+            void spawnStone();
+            void setCenterpoint(Asteroids2DCenterPoint* center);
+
+            void addPoints(int numPoints);
+            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
+
+            // checks if multiplier should be reset.
+            void costLife();
+
+            //Returns player (ship) of the game
+            Asteroids2DShip* getPlayer();
+
+            bool bEndGame;
+            bool bShowLevel;
+            int lives;
+            int multiplier;
+
+
+       private:
+
+
+
+            WeakPtr<PlayerInfo> playerInfo_;
+            void toggleShowLevel(){bShowLevel = !bShowLevel;}
+
+            WeakPtr<Asteroids2DCenterPoint> center_;
+            int level;
+            int point;
+            bool b_combo, firstTick_;
+
+            Timer comboTimer;
+            Timer showLevelTimer;
+            Timer levelupTimer;
+            Timer endGameTimer;
+
+
+    };
+}
+
+#endif /* _Asteroids2D_H__ */
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DCenterPoint.cc
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DCenterPoint.cc	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DCenterPoint.cc	(revision 11783)
@@ -0,0 +1,76 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file Asteroids2DCenterPoint.cc
+    @brief Implementation of the Asteroids2DCenterPoint class.
+*/
+
+#include "Asteroids2DCenterPoint.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "Asteroids2D.h"
+
+namespace orxonox
+{
+    RegisterClass(Asteroids2DCenterPoint);
+
+    Asteroids2DCenterPoint::Asteroids2DCenterPoint(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(Asteroids2DCenterPoint);
+
+        this->checkGametype();
+        this->width_ = 1043;
+        this->height_ = 646;
+    }
+
+    
+    /**
+    @brief
+        Method to create a Asteroids2DCenterpoint through XML.
+        Set dimension of the field with "width_, height_"
+    */
+    void Asteroids2DCenterPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Asteroids2DCenterPoint, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Asteroids2DCenterPoint, "dimension", setFieldDimension, getFieldDimension, xmlelement, mode);
+    }
+
+
+    void Asteroids2DCenterPoint::checkGametype()
+    {
+        if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Asteroids2D)))
+        {
+            Asteroids2D* Asteroids2DGametype = orxonox_cast<Asteroids2D*>(this->getGametype());
+            Asteroids2DGametype->setCenterpoint(this);
+        }
+    }
+}
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DCenterPoint.h
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DCenterPoint.h	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DCenterPoint.h	(revision 11783)
@@ -0,0 +1,69 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file Asteroids2DCenterPoint.h
+    @brief Declaration of the Asteroids2DCenterPoint class.
+    @ingroup Asteroids2D
+*/
+
+#ifndef _Asteroids2DCenterPoint_H__
+#define _Asteroids2DCenterPoint_H__
+
+#include "asteroids2D/Asteroids2DPrereqs.h"
+
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    class _Asteroids2DExport Asteroids2DCenterPoint : public StaticEntity
+    {
+        public:
+            Asteroids2DCenterPoint(Context* context); //checks whether the gametype is actually Asteroids2D.
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a PongCenterpoint through XML.
+            /**
+            @brief Set the dimensions of the playing field.
+            @param dimension A vector with the width of the playing field as first component and the height as second.
+            */
+            void setFieldDimension(const Vector2& dimension)
+                { this->width_ = dimension.x; this->height_ = dimension.y; }
+            /**
+            @brief Get the dimensions of the playing field.
+            @return Returns a vector with the width of the playing field as first component and the height as second.
+            */
+            Vector2 getFieldDimension() const
+                { return Vector2(this->width_, this->height_); }
+
+        private:
+            void checkGametype(); //checks whether the gametype actually is Asteroids2D
+            float width_, height_;
+
+    };
+}
+
+#endif /* _Asteroids2DCenterPoint_H__ */
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DHUDinfo.cc
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DHUDinfo.cc	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DHUDinfo.cc	(revision 11783)
@@ -0,0 +1,93 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *
+ */
+
+#include "Asteroids2DHUDinfo.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "Asteroids2D.h"
+
+namespace orxonox
+{
+    RegisterClass(Asteroids2DHUDinfo);
+
+    Asteroids2DHUDinfo::Asteroids2DHUDinfo(Context* context) : OverlayText(context)
+    {
+        RegisterObject(Asteroids2DHUDinfo);
+
+        this->Asteroids2DGame = nullptr;
+        this->bShowPoints_ = true;
+    }
+
+    void Asteroids2DHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Asteroids2DHUDinfo, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Asteroids2DHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);
+    }
+
+    void Asteroids2DHUDinfo::tick(float dt)
+    {
+        SUPER(Asteroids2DHUDinfo, tick, dt);
+
+
+        if(this->bShowPoints_)
+        {
+            const std::string& points = multi_cast<std::string>(this->Asteroids2DGame->getPoints());
+            if (this->Asteroids2DGame->lives <= 0)
+            {
+                setTextSize(0.2);
+                setPosition(Vector2(0.1, 0.02));
+                this->setCaption("Final score:\n" + points);
+                this->setColour(ColourValue(1, 0, 0, 1));
+            }
+            else
+            {
+                setTextSize(0.04);
+                setPosition(Vector2(0.14, 0.02));
+                this->setColour(ColourValue(1, 1, 1, 1));
+                this->setCaption(points);
+            }
+        }
+
+    }
+
+    void Asteroids2DHUDinfo::changedOwner()
+    {
+        SUPER(Asteroids2DHUDinfo, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+        {
+            this->Asteroids2DGame = orxonox_cast<Asteroids2D*>(this->getOwner()->getGametype());
+
+        }
+        else
+        {
+            this->Asteroids2DGame = nullptr;
+        }
+    }
+}
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DHUDinfo.h
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DHUDinfo.h	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DHUDinfo.h	(revision 11783)
@@ -0,0 +1,62 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *      
+ *      TODO: - get information for lives and level from gametype
+ *            - implement it as you did for points  
+ *
+ */
+
+#ifndef _Asteroids2DHUDinfo_H__
+#define _Asteroids2DHUDinfo_H__
+
+#include "asteroids2D/Asteroids2DPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _Asteroids2DExport Asteroids2DHUDinfo : public OverlayText, public Tickable
+    {
+     public:
+            Asteroids2DHUDinfo(Context* context);
+
+            virtual void tick(float dt) override;
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void changedOwner() override;
+
+            inline void setShowPoints(bool value)
+                { this->bShowPoints_ = value; }
+            inline bool getShowPoints() const
+                { return this->bShowPoints_; }
+
+
+        private:
+            Asteroids2D* Asteroids2DGame;
+            bool bShowPoints_;
+
+
+    };
+}
+#endif /* _Asteroids2DHUDinfo_H__ */
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DPrereqs.h
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DPrereqs.h	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DPrereqs.h	(revision 11783)
@@ -0,0 +1,78 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the Asteroids2D module
+*/
+
+#ifndef _Asteroids2DPrereqs_H__
+#define _Asteroids2DPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ASTEROIDS2D_STATIC_BUILD)
+#  ifdef ASTEROIDS2D_SHARED_BUILD
+#    define _Asteroids2DExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _Asteroids2DExport
+#    else
+#      define _Asteroids2DExport __declspec(dllimport)
+#    endif
+#  endif
+#  define _Asteroids2DPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+#  define _Asteroids2DExport  __attribute__ ((visibility("default")))
+#  define _Asteroids2DPrivate __attribute__ ((visibility("hidden")))
+#else
+#  define _Asteroids2DExport
+#  define _Asteroids2DPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class Asteroids2D;
+    class Asteroids2DCenterPoint;
+    class Asteroids2DHUDinfo;
+    class Asteroids2DShip;
+    class Asteroids2DStone;
+    class Asteroids2DWeapon;
+}
+
+#endif /* _Asteroids2DPrereqs_H__*/
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DShip.cc
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DShip.cc	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DShip.cc	(revision 11783)
@@ -0,0 +1,135 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*  TODO: 
+
+    @file Asteroids2DShip.cc
+    @brief Implementation of the Asteroids2DShip class.
+*/
+
+#include "Asteroids2DShip.h"
+#include "Asteroids2DStone.h"
+#include "Asteroids2D.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    RegisterClass(Asteroids2DShip);
+
+    Asteroids2DShip::Asteroids2DShip(Context* context) : SpaceShip(context)
+    {
+        RegisterObject(Asteroids2DShip);
+
+        this->bImmune = false;
+        this->width = 1043;
+        this->height = 646;
+
+        //timer.setTimer(3.5f, true, createExecutor(createFunctor(&Asteroids2DShip::showorientation, this)));
+    }
+
+    //Use this function to display your position on the field -> to determine field width and height
+    void Asteroids2DShip::showposition()
+    {
+        Vector3 pos = this->getPosition();
+        orxout() << "x = "<< pos.x << " y = " << pos.y << " z = "<< pos.z << endl; 
+    }
+
+    //Same thing for orientation
+    void Asteroids2DShip::showorientation()
+    {
+        Quaternion ort = this->getOrientation();
+        orxout() << "w = " << ort.w << " x = " << ort.x << " y = " << ort.y << "z = " << ort.z << endl;
+    }
+
+    void Asteroids2DShip::tick(float dt)
+    {
+        SUPER(Asteroids2DShip, tick, dt);
+        Vector3 pos = this->getPosition();
+
+        //ensure that the ship stays in playing field
+        if(pos.x > width/2)   pos.x = -width/2;
+        if(pos.x < -width/2)  pos.x = width/2;
+        if(pos.z > height/2)  pos.z = -height/2;
+        if(pos.z < -height/2) pos.z = height/2;
+
+        //2D movement, position should always = 0 on y-axis
+        if(pos.y!=0) pos.y = 0;
+        this->setPosition(pos);
+
+
+        //if you hit an asteroid, the ship will turn -> you need to reorientate the ship 
+        Quaternion ort = this->getOrientation();
+        ort.x = 0;
+        ort.z = 0;
+        this->setOrientation(ort);
+    }
+
+    void Asteroids2DShip::boost(bool bBoost)
+    {
+    }
+
+    void Asteroids2DShip::updateLevel()
+    {
+        if (getGame())
+            getGame()->levelUp();
+    }
+
+    inline bool Asteroids2DShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
+    {
+
+        Asteroids2DStone* stone = orxonox_cast<Asteroids2DStone*>(otherObject);       
+        if(stone != nullptr && !bImmune)
+        {
+            removeHealth(100); 
+            this->getGame()->addPoints(10);
+
+            //The ship will be immune for 3 seconds after it has been hit by an asteroid
+            bImmune = true;
+            isimmune.setTimer(3.0f, false, createExecutor(createFunctor(&Asteroids2DShip::toggleImmune, this)));
+        }
+        return false;
+    }
+
+    Asteroids2D* Asteroids2DShip::getGame()
+    {
+        if (game == nullptr)
+        {
+            for (Asteroids2D* race : ObjectList<Asteroids2D>())
+            {
+                game = race;
+            }
+        }
+        return game;
+    }
+
+    void Asteroids2DShip::death()
+    {
+        getGame()->costLife();
+        SpaceShip::death();
+    }
+}
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DShip.h
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DShip.h	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DShip.h	(revision 11783)
@@ -0,0 +1,87 @@
+/*
+ *   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:
+ *      Florian Zinggeler
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file Asteroids2DShip.h
+    @brief Declaration of the Asteroids2DShip class.
+*/
+
+#ifndef _Asteroids2DShip_H__
+#define _Asteroids2DShip_H__
+
+
+#include "asteroids2D/Asteroids2DPrereqs.h"
+
+#include "worldentities/pawns/SpaceShip.h"
+#include "tools/Timer.h"
+
+namespace orxonox
+{
+    class _Asteroids2DExport Asteroids2DShip : public SpaceShip
+    {
+        public:
+            Asteroids2DShip(Context* context);
+
+            virtual void tick(float dt) override;
+
+            //no rotation in x and z direction!
+            virtual void rotatePitch(const Vector2& value) override{}; // Rotate in pitch direction.
+            virtual void rotateRoll(const Vector2& value) override{}; // Rotate in roll direction.
+            virtual void boost(bool boost) override; //Override, so that the ship does not shake
+            virtual void updateLevel();
+
+            virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+            
+            /*Functions that can be helpful while debugging.
+                - Set a timer so that the function is called for instance every 3s to display the coordinates
+                - Open console with "~`"-key in when you start the Asteroids2D - Minigame.
+            */
+            void showposition();
+            void showorientation();
+
+
+            void toggleImmune()
+            {
+                bImmune = !bImmune;
+            }
+
+        protected:
+            virtual void death() override;
+
+        private:
+            Asteroids2D* getGame();
+
+            float width, height;
+            WeakPtr<Asteroids2D> game;
+            bool bImmune;
+            Timer timer;
+            Timer isimmune;
+    };
+}
+
+#endif /* _Asteroids2DShip_H__ */
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DStone.cc
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DStone.cc	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DStone.cc	(revision 11783)
@@ -0,0 +1,155 @@
+/*   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:
+ *      Viviane Yang
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+
+/**
+    @file Asteroids2DStone.cc
+
+    @brief Implementation of the Asteroids2DStone class.
+
+    TO DO:  
+    - when to split? It does not work if you override kill() function...->damage() function?
+*/ 
+
+#include "Asteroids2DStone.h"
+#include "Asteroids2D.h"
+#include "Asteroids2DShip.h"
+#include "core/CoreIncludes.h"
+#include "util/Math.h"
+
+namespace orxonox
+{
+    RegisterClass(Asteroids2DStone);
+
+    Asteroids2DStone::Asteroids2DStone(Context* context) : Pawn(context)
+    {
+        RegisterObject(Asteroids2DStone);
+        this->size = rand()%3+1;
+        this->width = 1043;
+        this->height = 646;
+        this->setPosition(randomPosition(this->width, this->height));
+        this->setCollisionType(WorldEntity::CollisionType::Dynamic);
+        this->setVelocity(randomVelocity(MAX_SPEED));
+    }
+
+    Asteroids2DStone::Asteroids2DStone(Context* c, int sze, Vector3 pos) : Pawn(c)
+    {
+        RegisterObject(Asteroids2DStone);
+        this->size = sze;
+        this->width = 1043;
+        this->height = 646;
+        this->setPosition(pos);
+        this->setCollisionType(WorldEntity::CollisionType::Dynamic);
+        this->setVelocity(randomVelocity(MAX_SPEED));
+    }
+
+    Vector3 Asteroids2DStone::randomPosition(float maxwidth, float maxheight)
+    {
+        Vector3 pos;
+        pos.x = rnd(-maxwidth/2, maxwidth/2);
+        pos.y = 0;
+        pos.z = rnd(-maxheight/2, maxheight/2);
+        return pos;
+    }
+
+    Vector3 Asteroids2DStone::randomVelocity(float maxspeed)
+    {
+        Vector3 vel;
+        vel.x = rnd(-maxspeed, maxspeed);
+        vel.y = 0;
+        vel.z = rnd(-maxspeed, maxspeed);
+        return vel;
+    }
+
+
+    void Asteroids2DStone::tick(float dt)
+    {
+        SUPER(Asteroids2DStone, tick, dt);
+        Vector3 pos = this->getPosition();
+        Vector3 vel = this->getVelocity();
+
+        //ensure that the stone bounces from the playing field borders
+        if(pos.x > width/2  || pos.x < -width/2)  vel.x = -vel.x;
+        if(pos.z > height/2 || pos.z < -height/2) vel.z = -vel.z;
+        this->setVelocity(vel);
+
+        //2D movement, position should always = 0 on y-axis
+        if(pos.y!=0) pos.y = 0;
+        this->setPosition(pos);
+    }
+
+    inline bool Asteroids2DStone::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
+    {
+        if(orxonox_cast<Asteroids2DShip*>(otherObject))
+        {
+            split();
+        }
+        return false;
+    }
+
+    void Asteroids2DStone::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
+    {
+        if (getGame() && orxonox_cast<Asteroids2DShip*>(originator) != nullptr)
+            getGame()->addPoints(100);
+        split();
+        //Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
+    }
+
+    Asteroids2D* Asteroids2DStone::getGame()
+    {
+        if (game == nullptr)
+        {
+            for (Asteroids2D* asteroids : ObjectList<Asteroids2D>())
+                game = asteroids;
+        }
+        return game;
+    }
+
+    void Asteroids2DStone::split()
+    {
+        //orxout() << "split" << endl;
+        if(size == 3)
+        {
+            Asteroids2DStone* newStone1 = new Asteroids2DStone(this->getContext(), 2, this->getPosition());
+            newStone1->addTemplate("stone2");
+            Asteroids2DStone* newStone2 = new Asteroids2DStone(this->getContext(), 2, this->getPosition());
+            newStone2->addTemplate("stone2");
+
+        }else if(size == 2){
+
+
+            //Templates can be found in data/levels/templates/asteroidsAsteroids2D.oxt
+            Asteroids2DStone* newStone1 = new Asteroids2DStone(this->getContext(), 1, this->getPosition());
+            newStone1->addTemplate("stone1");
+            Asteroids2DStone* newStone2 = new Asteroids2DStone(this->getContext(), 1, this->getPosition());
+            newStone2->addTemplate("stone1");
+        }   
+        this->death();
+    }
+
+}
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DStone.h
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DStone.h	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DStone.h	(revision 11783)
@@ -0,0 +1,70 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *   Co-authors:
+ *      ...
+ *    TO DO: 
+ *
+ */
+
+/**
+    @file Asteroids2D.h
+    @brief Gametype.
+    @ingroup Asteroids2D
+*/
+
+#ifndef _Asteroids2DStone_H__
+#define _Asteroids2DStone_H__
+
+#include "asteroids2D/Asteroids2DPrereqs.h"
+
+#include "worldentities/pawns/Pawn.h"
+
+
+namespace orxonox
+{
+    class _Asteroids2DExport Asteroids2DStone : public Pawn
+    {
+       public:
+            Asteroids2DStone(Context* context);
+            Asteroids2DStone(Context* c, int sze, Vector3 pos);
+
+            virtual void tick(float dt) override;
+            Vector3 randomPosition (float maxwidth, float maxheight);
+            Vector3 randomVelocity(float maxspeed);
+            virtual int getSize(){ return this->size;}
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+            virtual void split();
+            virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs) override;
+
+       private:
+          Asteroids2D* getGame();
+          WeakPtr<Asteroids2D> game;
+          int size; // three sizes, 3-> two 2s, 2-> two 1s, 1-> die
+          float width, height; //field
+          float MAX_SPEED = 100;
+          float delta = 5;
+    };
+}
+
+#endif /* _Asteroids2DStone_H__ */
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DWeapon.cc
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DWeapon.cc	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DWeapon.cc	(revision 11783)
@@ -0,0 +1,94 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *   Co-authors:
+ *      --
+ *
+ */
+
+/**
+    @file Asteroids2DWeapon.h
+    @brief Implementation of the Asteroids2DWeapon class.
+*/
+
+#include "Asteroids2DWeapon.h"
+
+#include "core/CoreIncludes.h"
+
+#include "graphics/Model.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+
+#include "weapons/projectiles/Projectile.h"
+#include "weapons/MuzzleFlash.h"
+
+namespace orxonox
+{
+    RegisterClass(Asteroids2DWeapon);
+
+    Asteroids2DWeapon::Asteroids2DWeapon(Context* context) : HsW01(context)
+    {
+        RegisterObject(Asteroids2DWeapon);
+
+
+    }
+
+    Asteroids2DWeapon::~Asteroids2DWeapon()
+    {
+
+    }
+
+    void Asteroids2DWeapon::shot()
+    {
+        assert( this->getWeapon() && this->getWeapon()->getWeaponPack() && this->getWeapon()->getWeaponPack()->getWeaponSystem() && this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn() );
+
+        // Create the projectile.
+        Projectile* projectile = new Projectile(this->getContext());
+        Model* model = new Model(projectile->getContext());
+        model->setMeshSource(mesh_);
+        model->setCastShadows(false);
+        projectile->attach(model);
+        model->setScale(5);
+
+        //get position and orientation of the ship to know in which direction the projectile needs to fire off
+        Pawn* player = this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn();
+
+        projectile->setOrientation(player->getOrientation());
+        projectile->setPosition(player->getPosition());
+
+        //Velocity & position of the projectile must be y = 0 since the game takes place in the x-z plane
+        Vector3 muzzle2D = player->getOrientation()* WorldEntity::FRONT ;
+        muzzle2D.y = 0; 
+        projectile->setVelocity(muzzle2D * this->speed_);
+
+        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+        projectile->setShieldDamage(this->getShieldDamage());
+        projectile->setHealthDamage(this->getHealthDamage());
+
+        // Display the muzzle flash.
+        this->HsW01::muzzleflash();
+    }
+    
+}
Index: /code/trunk/src/modules/asteroids2D/Asteroids2DWeapon.h
===================================================================
--- /code/trunk/src/modules/asteroids2D/Asteroids2DWeapon.h	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/Asteroids2DWeapon.h	(revision 11783)
@@ -0,0 +1,56 @@
+/*
+ *   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:
+ *      Viviane Yang
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file Asteroids2DWeapon.h
+    @brief Definition of the Asteroids2DWeapon class.
+*/
+
+#ifndef _Asteroids2DWeapon_H__
+#define _Asteroids2DWeapon_H__
+
+#include "asteroids2D/Asteroids2DPrereqs.h"
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weapons/weaponmodes/HsW01.h"
+
+namespace orxonox
+{
+    class _Asteroids2DExport Asteroids2DWeapon : public HsW01
+    {
+        public:
+            Asteroids2DWeapon(Context* context);
+            virtual ~Asteroids2DWeapon();
+
+        protected:
+            virtual void shot() override; //2D movement
+            WeakPtr<Projectile> projectile;
+    };
+}
+
+#endif /* _Asteroids2DWeapon_H__ */
Index: /code/trunk/src/modules/asteroids2D/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/asteroids2D/CMakeLists.txt	(revision 11783)
+++ /code/trunk/src/modules/asteroids2D/CMakeLists.txt	(revision 11783)
@@ -0,0 +1,17 @@
+SET_SOURCE_FILES(MINIGAMESTEST_SRC_FILES
+Asteroids2D.cc
+Asteroids2DCenterPoint.cc
+Asteroids2DShip.cc
+Asteroids2DStone.cc
+Asteroids2DHUDinfo.cc
+Asteroids2DWeapon.cc
+)
+
+ORXONOX_ADD_LIBRARY(asteroids2D
+  PLUGIN
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+  SOURCE_FILES ${MINIGAMESTEST_SRC_FILES}
+)
Index: /code/trunk/src/modules/dialog/Answer.cc
===================================================================
--- /code/trunk/src/modules/dialog/Answer.cc	(revision 11783)
+++ /code/trunk/src/modules/dialog/Answer.cc	(revision 11783)
@@ -0,0 +1,81 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Answer.h"
+#include "core/CoreIncludes.h"
+
+
+namespace orxonox{
+
+    RegisterClass(Answer);
+
+
+    // Constructor:
+    Answer::Answer(Context* context) : BaseObject(context)
+    {
+        RegisterObject(Answer);
+    }
+
+    void Answer::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Answer, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Answer, "Id", setAnswerId, getAnswerId, xmlelement, mode);
+        XMLPortParam(Answer, "answer", setAnswer, getAnswer, xmlelement, mode);
+        XMLPortParam(Answer, "nextQuestionId", setNextQuestion, getNextQuestion, xmlelement,mode);
+    }
+
+    void Answer::setAnswerId(const std::string& answerId){
+        this->answerId_ = answerId;
+    }
+
+    const std::string& Answer::getAnswerId() const
+    {
+        return this->answerId_;
+    }
+
+    void Answer::setNextQuestion(const std::string& nextId)
+    {
+        this->nextQuestionId_ = nextId;
+    }
+
+    const std::string& Answer::getNextQuestion() const
+    {
+        return this->nextQuestionId_;
+    }
+
+    void Answer::setAnswer(const std::string& answer)
+    {
+        this->answer_ = answer;
+    }
+
+    const std::string& Answer::getAnswer() const
+    {
+        return this->answer_;
+    }
+}
Index: /code/trunk/src/modules/dialog/Answer.h
===================================================================
--- /code/trunk/src/modules/dialog/Answer.h	(revision 11783)
+++ /code/trunk/src/modules/dialog/Answer.h	(revision 11783)
@@ -0,0 +1,70 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Answer_H__
+#define _Answer_H__
+
+#include "core/BaseObject.h"
+#include "DialogPrereqs.h"
+#include "core/XMLPort.h"
+#include "core/CoreIncludes.h"
+#include <string>
+
+namespace orxonox
+{
+    /**
+    @brief
+    class containing the pc side of the Dialog
+
+    this class contains one possible text option of the pc, it's id and the id of the reaction of the npc to this answer
+    */
+
+    class _DialogExport Answer : public BaseObject
+    {
+        public:
+            Answer(Context* context);
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void setAnswerId(const std::string& answerId); //xmlPort-Funktion, setzt AntwortId
+            const std::string& getAnswerId() const; //xmlPort-Funktion, gibt AntwortId
+
+            void setNextQuestion(const std::string& nextId); //xmlPort-Funktion, um Dialog zu beenden tag benutzen der von keiner Frage benutzt wird
+            const std::string& getNextQuestion() const; //xmlPort-Funktion, gibt Id der Folgefrage
+
+            void setAnswer(const std::string& awns); //xmlPort-Funktion, setzt Antworttext
+            const std::string& getAnswer() const; //xmlPort-Funktion, gibt Antworttext
+
+        private:
+            std::string answerId_;  //!< id of the pc textoption
+            std::string answer_;    //!< string with the pc text
+            std::string nextQuestionId_; //!< id of the npc reaction to pc answer
+    };
+}
+
+#endif
Index: /code/trunk/src/modules/dialog/AnswerId.cc
===================================================================
--- /code/trunk/src/modules/dialog/AnswerId.cc	(revision 11783)
+++ /code/trunk/src/modules/dialog/AnswerId.cc	(revision 11783)
@@ -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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "AnswerId.h"
+#include "core/CoreIncludes.h"
+
+
+namespace orxonox{
+
+    RegisterClass(AnswerId);
+
+    AnswerId::AnswerId(Context* context) : BaseObject(context)
+    {
+        RegisterObject(AnswerId);
+    }
+
+    void AnswerId::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(AnswerId, XMLPort, xmlelement, mode);
+
+        XMLPortParam(AnswerId, "Id", setId, getId, xmlelement, mode);
+    }
+
+    void AnswerId::setId(const std::string& id)
+    {
+        this->id_ = id;
+    }
+
+    const std::string& AnswerId::getId() const
+    {
+        return this->id_;
+    }
+}
Index: /code/trunk/src/modules/dialog/AnswerId.h
===================================================================
--- /code/trunk/src/modules/dialog/AnswerId.h	(revision 11783)
+++ /code/trunk/src/modules/dialog/AnswerId.h	(revision 11783)
@@ -0,0 +1,62 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _AnswerID_H__
+#define _AnswerID_H__
+
+#include "DialogPrereqs.h"
+#include "core/XMLPort.h"
+#include "core/BaseObject.h"
+#include "core/CoreIncludes.h"
+
+#include <string>
+
+namespace orxonox{
+
+    /**
+    @brief
+    container class for answerids in xml
+
+    */
+
+    class _DialogExport AnswerId : public BaseObject
+    {
+        public:
+            AnswerId(Context* context);
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void setId(const std::string& Id);  //allows to set Id, only use in xmlPort for initializing AnswerIds in lvl files
+            const std::string& getId() const;   //allows to get Id, used in xmlPort
+
+        private:
+            std::string id_;    //!< id of one answer
+    };
+}
+
+#endif
Index: /code/trunk/src/modules/dialog/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/dialog/CMakeLists.txt	(revision 11783)
+++ /code/trunk/src/modules/dialog/CMakeLists.txt	(revision 11783)
@@ -0,0 +1,17 @@
+SET_SOURCE_FILES(DIALOG_SRC_FILES
+  DialogManager.cc
+  Dialog.cc
+  Question.cc
+  Answer.cc
+  AnswerId.cc
+)
+
+ORXONOX_ADD_LIBRARY(dialog
+  MODULE
+  FIND_HEADER_FILES
+   TOLUA_FILES
+   DialogManager.h
+  LINK_LIBRARIES
+    orxonox
+  SOURCE_FILES ${DIALOG_SRC_FILES}
+)
Index: /code/trunk/src/modules/dialog/Dialog.cc
===================================================================
--- /code/trunk/src/modules/dialog/Dialog.cc	(revision 11783)
+++ /code/trunk/src/modules/dialog/Dialog.cc	(revision 11783)
@@ -0,0 +1,164 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DialogManager.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "core/EventIncludes.h"
+#include "Dialog.h"
+#include "Question.h"
+
+
+namespace orxonox
+{
+
+    RegisterClass(Dialog);
+
+    //Constructor:
+    Dialog::Dialog(Context* context) : BaseObject(context)
+    {
+        RegisterObject(Dialog);
+    }
+
+    void Dialog::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Dialog, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Dialog, "name", setName, getName, xmlelement, mode);
+        XMLPortParam(Dialog, "currentQuestionId", setCurrentQuestionId, getCurrentQuestionId, xmlelement, mode);
+        XMLPortObject(Dialog, Question, "questions", addQuestion, getQuestion, xmlelement, mode);
+        XMLPortObject(Dialog, Answer, "answers", addAnswer, getAnswer, xmlelement, mode);
+    }
+
+    void Dialog::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Dialog, XMLEventPort, xmlelement, mode);
+
+        XMLPortEventSink(Dialog, BaseObject, "execute", execute, xmlelement, mode); 
+    }
+
+    void Dialog::setName(const std::string& name)
+    {
+        this->name_ = name;
+    }
+
+    const std::string& Dialog::getName() const
+    {
+        return this->name_;
+    }
+
+    void Dialog::setCurrentQuestionId(const std::string& questionId)
+    {
+        this->currentQuestionId_ = questionId;
+    }
+
+    const std::string& Dialog::getCurrentQuestionId() const
+    {
+        return this->currentQuestionId_;
+    }
+
+
+    void Dialog::addQuestion(Question* question) //fuegt Question der Map hinzu
+    {
+        this->questions_.insert(make_pair(question->getQuestionId(), question));
+    }
+
+    Question* Dialog::getQuestion(unsigned int index) const
+    {
+        unsigned int i = 0;
+        for (auto entry : this->questions_)
+        {
+            if (i == index)
+                return entry.second;
+            ++i;
+        }
+        return nullptr;
+    }
+
+    void Dialog::addAnswer(Answer* answer) //fuegt Answer der Map hinzu
+    {
+        this->answers_.insert(make_pair(answer->getAnswerId(), answer));
+    }
+
+    Answer* Dialog::getAnswer(unsigned int index) const
+    {
+        unsigned int i = 0;
+        for (auto entry : this->answers_)
+        {
+            if (i == index)
+                return entry.second;
+            ++i;
+        }
+        return nullptr;
+    }
+
+
+    const std::vector<std::string>& Dialog::getAnswerIds() const // returned vector mit allen momentanen AntwortenIds
+    {
+
+        Question* question = (this->questions_.find(this->currentQuestionId_))->second;
+        return question->getAnswerIds();
+
+    }
+
+    bool Dialog::execute(bool bTriggered, BaseObject* trigger)
+    {  
+        DialogManager& m = DialogManager::getInstance();
+
+        if(questions_.count(this->currentQuestionId_)){
+            m.setDialog(this);
+            OrxonoxOverlay::showOverlay("Dialog");
+        }
+        else {
+            orxout() << "no start defined " << endl;
+        }
+
+        return false;
+    }
+
+    void Dialog::update(const std::string& givenAnswerId)
+    {
+        Answer* answer = (answers_.find(givenAnswerId))->second;
+        this->currentQuestionId_ = answer->getNextQuestion();
+    }
+
+    bool Dialog::ending(const std::string& givenAnswerId)
+    {
+        return !this->questions_.count(this->answers_.find(givenAnswerId)->second->getNextQuestion());
+    }
+
+    const std::string& Dialog::getQuestionString()
+    {
+        return this->questions_.find(this->currentQuestionId_)->second->getQuestion();
+    }
+
+    const std::string& Dialog::getAnswerString(const std::string& answerId)
+    {
+        return this->answers_.find(answerId)->second->getAnswer();
+    }
+}
Index: /code/trunk/src/modules/dialog/Dialog.h
===================================================================
--- /code/trunk/src/modules/dialog/Dialog.h	(revision 11783)
+++ /code/trunk/src/modules/dialog/Dialog.h	(revision 11783)
@@ -0,0 +1,145 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Dialog_H__
+#define _Dialog_H__
+
+#include "core/BaseObject.h"
+#include "DialogPrereqs.h"
+#include "Question.h"
+#include "Answer.h"
+#include "core/XMLPort.h"
+#include "core/CoreIncludes.h"
+#include "overlays/OrxonoxOverlay.h"
+
+#include <map>
+#include <vector>
+#include <string>
+
+namespace orxonox
+{
+    /**
+    @brief
+    class containing core of one dialog with one npc
+
+    this class contains a map of all answerids to answers (player text options) and one of all questionids to questions (npc text options)
+    it realizes a state machine with the question beeing the states and the answers beeing the connections, it has a current state and
+    can be commanded to go to the next state according to a given answer
+    */
+
+    class _DialogExport Dialog : public BaseObject
+    {
+        public:
+            Dialog(Context* context);
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void setName(const std::string& name); //xmlPort-Funktion, sets Namen
+            const std::string& getName() const; //xmlPort-Funktion, returns Namen
+
+            void setCurrentQuestionId(const std::string& questionId); //xmlPort-Funktion, sets string id of current question
+            const std::string& getCurrentQuestionId() const; //xmlPort-Funktion, returns id of current question
+
+            void addQuestion(Question* question); //xmlPort-Funktion, adds question to map
+            Question* getQuestion(unsigned int index) const; //xmlPort-Funktion
+
+            void addAnswer(Answer* answer); //xmlPort-Funktion, adds answer to map
+            Answer* getAnswer(unsigned int index) const; //xmlPort-Funktion
+
+            /**
+            @brief
+                returns a pointer to the array of answers belonging to the current question for use in dialogManager
+
+            @return
+                pointer to answerId array of question
+            */
+            const std::vector<std::string>& getAnswerIds() const;
+
+            /**
+            @brief
+                function called when the trigger object defined in the xml file sets to triggered
+
+            @param bTriggered
+                needs to be set like this for correctness
+            @param trigger
+                needs to be set like this for correctness
+            @return
+                not really used
+            */
+            bool execute(bool bTriggered, BaseObject* trigger);
+
+            /**
+            @brief
+                updates the current Dialog according to the id of a given answer, by setting currentQuestionId to the next one
+
+            @param givenAnswerId
+                id of the answer given by player
+            */
+            void update(const std::string& givenAnswerId);
+
+            /**
+            @brief
+                tests if there is a next question for the given answerId
+
+            @param givenAnswerId
+                id of the answer given by player
+            @return
+                true if there is no more Question to the given answerId
+            */
+            bool ending(const std::string& givenAnswerId);
+
+            /**
+            @brief
+                gives the text of the npc in the current state
+
+            @return
+                sting with npc text
+            */
+            const std::string& getQuestionString();
+
+            /**
+            @brief
+                returns a sting with the pc answer to the id
+
+            @param answerId
+                the id of the answer looked for
+            @return
+                sting with answer
+            */
+            const std::string& getAnswerString(const std::string& answerId);
+
+        private:
+            std::string name_; //!< name of the npc talking
+            std::string currentQuestionId_; //!< id of the npc question currently active
+            std::map<std::string, Question*> questions_; //!< a map form the ids of npc textoptions to the objects containing them
+            std::map<std::string, Answer*> answers_; //!< a map form the ids of npc textoptions to the objects containing them
+    };
+}
+
+#endif
Index: /code/trunk/src/modules/dialog/DialogManager.cc
===================================================================
--- /code/trunk/src/modules/dialog/DialogManager.cc	(revision 11783)
+++ /code/trunk/src/modules/dialog/DialogManager.cc	(revision 11783)
@@ -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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DialogManager.h"
+#include "core/CoreIncludes.h"
+#include "core/singleton/ScopedSingletonIncludes.h"
+#include <string>
+
+namespace orxonox {
+    ManageScopedSingleton(DialogManager, ScopeID::ROOT, false);
+
+
+
+    DialogManager::DialogManager()
+    {
+        this->currentTalk_ = nullptr;
+        this->answerIds_ = nullptr;
+    }
+
+    void DialogManager::setDialog(Dialog* dialog)
+    {
+        this->currentTalk_ = dialog;
+        this->answerIds_ = &this->currentTalk_->getAnswerIds();
+    }
+
+    //from here onward funcionality for lua axports
+
+    std::string DialogManager::getQuestion()
+    {
+        return this->currentTalk_->getQuestionString();
+    }
+
+    int DialogManager::getSize()
+    {   
+        return this->answerIds_->size();
+    }
+
+    std::string DialogManager::getAnswer(int index)
+    {
+        return this->currentTalk_->getAnswerString(this->answerIds_->at(index));
+    }
+
+    std::string DialogManager::getPerson()
+    {
+        return this->currentTalk_->getName();
+    }
+
+    bool DialogManager::endtest(int index)
+    {   
+        if(this->answerIds_->empty())
+        {
+            return true;
+        }
+        else 
+        {
+            return this->currentTalk_->ending(this->answerIds_->at(index));
+        }
+
+    }
+
+    void DialogManager::update(int index)
+    {
+        this->currentTalk_->update(this->answerIds_->at(index));
+        this->answerIds_ = &this->currentTalk_->getAnswerIds();
+    }
+}
Index: /code/trunk/src/modules/dialog/DialogManager.h
===================================================================
--- /code/trunk/src/modules/dialog/DialogManager.h	(revision 11783)
+++ /code/trunk/src/modules/dialog/DialogManager.h	(revision 11783)
@@ -0,0 +1,156 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _DialogManager_H__
+#define _DialogManager_H__
+
+#include "DialogPrereqs.h"
+#include "util/Singleton.h"
+#include "core/singleton/ScopedSingletonIncludes.h"
+#include "core/object/Listable.h"
+#include "Dialog.h"
+
+#include <string>
+
+namespace orxonox //tolua_export
+
+{//tolua_export
+
+    /**
+    @brief
+    this class is used for calling on a dialog form luascript
+
+    the class is the interface of dialog to lua, all lua functionallity is given by this class, it can be found by lua due to singleton definition
+
+    @todo 
+        reseting or setting new start for dialog on exit, to allow coming back to a npc
+        picture of person
+        parameters to differ dialog depending on some world values, like items, completed objectives etc...
+    */
+
+    class _DialogExport DialogManager //tolua_export
+    : public Singleton<DialogManager>
+    {//tolua_export
+        friend class Singleton<DialogManager>;
+    
+        public:
+        
+        DialogManager(); 
+
+        /**
+        @brief
+            gives the pointer to the sigleton dialog manager to the lua script
+
+        @return
+            returns pointer
+        */
+
+        static DialogManager& getInstance() { return Singleton<DialogManager>::getInstance(); } //tolua_export
+
+        /**
+        @brief
+            allows to set the current dialog
+
+            this is used by a dialog when triggered to set its self to the current dialog
+
+        @param dialog
+            pointer to the dialog that wants to be current one
+        */
+        void setDialog(Dialog* dialog);
+
+        //from here on functions for lua interface
+
+        /**
+        @brief
+            gives the string of the momentary npc textoption
+
+        @return
+            string of npc text
+        */
+        std::string getQuestion(); //tolua_export
+
+        /**
+        @brief
+            function that returns size of answerid array
+
+        @return
+            returns number of possible answers to momentary questions, 0 if there are no player text options
+        */
+        int getSize(); //tolua_export
+
+        /**
+        @brief
+            returns the answer to the id that is at index in the array of answers
+
+        @param param1
+            index of desired answer
+
+        @return
+            string of answer
+        */
+        std::string getAnswer(int index); //tolua_export
+
+        /**
+        @brief
+            gives name of npc the player is currently talking to
+
+        @return
+            sting with name
+        */
+        std::string getPerson(); //tolua_export
+
+        /**
+        @brief
+            tests the dialog if there are any followup npc textoptions to the given answer or if there are no answers to the current question 
+
+        @return
+            true if the answer array of the question is empty or the next question id of the answer does not exist
+        */
+        bool endtest(int index); //tolua_export
+
+        /**
+        @brief
+            tells the dialog to update according to a given answer, if no answer is actively clicked the standard index is sett 0 in the lua
+            when called the current question of the dialog is set to the new one and the answerId vector is set accordingly 
+
+        @param param1
+            index of the answer given by the player
+
+        */
+        void update(int index); //tolua_export
+
+private:
+    static DialogManager* singletonPtr_s;   //!< a pointer to the single class object
+
+    Dialog* currentTalk_;   //!< pointer to the currently active dialog or last active if no one is currently active
+    const std::vector<std::string>* answerIds_; //!< pointer to the possible answerIds of the current question, for faster access
+
+    };//tolua_export
+}//tolua_export
+
+#endif /* _DialogManager_H__ */
Index: /code/trunk/src/modules/dialog/DialogPrereqs.h
===================================================================
--- /code/trunk/src/modules/dialog/DialogPrereqs.h	(revision 11783)
+++ /code/trunk/src/modules/dialog/DialogPrereqs.h	(revision 11783)
@@ -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:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the questsystem module
+*/
+
+#ifndef _DialogPrereqs_H__
+#define _DialogPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(DIALOG_STATIC_BUILD)
+#  ifdef DIALOG_SHARED_BUILD
+#    define _DialogExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _DialogExport
+#    else
+#      define _DialogExport __declspec(dllimport)
+#    endif
+#  endif
+#  define _DialogPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+#  define _DialogExport  __attribute__ ((visibility("default")))
+#  define _DialogPrivate __attribute__ ((visibility("hidden")))
+#else
+#  define _DialogExport
+#  define _DialogPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+
+    class DialogManager;
+    class Dialog;
+    class Answer;
+    class Question;
+    class AnswerId;
+   
+}
+
+#endif /* _DialogPrereqs_H__ */
Index: /code/trunk/src/modules/dialog/Question.cc
===================================================================
--- /code/trunk/src/modules/dialog/Question.cc	(revision 11783)
+++ /code/trunk/src/modules/dialog/Question.cc	(revision 11783)
@@ -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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Question.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+
+    RegisterClass(Question);
+
+    Question::Question(Context* context) : BaseObject(context)
+    {
+        RegisterObject(Question);
+    }
+
+    void Question::XMLPort(Element& xmlement, XMLPort::Mode mode)
+    {
+        SUPER(Question, XMLPort, xmlement, mode);
+
+        XMLPortParam(Question, "question", setQuestion, getQuestion, xmlement, mode);
+        XMLPortParam(Question, "Id", setQuestionId, getQuestionId, xmlement, mode);
+
+        XMLPortObject(Question, AnswerId, "answerIds", addAnswerId, getAnswerId, xmlement, mode);
+    }
+
+    void Question::setQuestionId(const std::string& Id)
+    {
+        this->questionId_ = Id;
+    }
+
+    const std::string& Question::getQuestionId() const
+    {
+        return this->questionId_;
+    }
+
+    void Question::setQuestion(const std::string& question)
+    {
+        this->question_ = question;
+    }
+
+    const std::string& Question::getQuestion() const
+    {
+        return this->question_;
+    }
+
+    void Question::addAnswerId(AnswerId* answerId)
+    {
+        this->answerIds_.push_back(answerId->getId());
+    }
+
+    AnswerId* Question::getAnswerId(unsigned int index) const
+    {
+        return nullptr;
+    }
+
+    const std::vector<std::string>& Question::getAnswerIds() const
+    {
+        return this->answerIds_;
+    }
+}
Index: /code/trunk/src/modules/dialog/Question.h
===================================================================
--- /code/trunk/src/modules/dialog/Question.h	(revision 11783)
+++ /code/trunk/src/modules/dialog/Question.h	(revision 11783)
@@ -0,0 +1,85 @@
+/*
+ *   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:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Question_H__
+#define _Question_H__
+
+#include "core/BaseObject.h"
+#include "DialogPrereqs.h"
+#include "AnswerId.h"
+#include "core/XMLPort.h"
+#include "core/CoreIncludes.h"
+
+
+#include <string>
+
+namespace orxonox
+{
+
+    /**
+    @brief
+    class containing the npc side of the Dialog
+
+    this class contains one possible text option of the npc, it's id and the ids of possible player reactions (answers)
+    */
+
+    class _DialogExport Question : public BaseObject
+    {
+        public:
+            Question(Context* context);
+
+            virtual void XMLPort(Element& xmelement, XMLPort::Mode mode);
+
+            void setQuestionId(const std::string& Id); //xmlPort-Funktion, setzt Id
+            const std::string& getQuestionId() const; //xmlPort-Funktion, gibt Id string zuruek
+
+            void setQuestion(const std::string& question); //xmlPort-Funktion, setzt Fragen string
+            const std::string& getQuestion() const; //xmlPort-Funktion, gibt Fragen string
+
+            void addAnswerId(AnswerId* answerId);  //xmlPort-Funktion, nimmt AnswerIds von entsprechenden Objekten und fuegt sie in List ein.
+            AnswerId* getAnswerId(unsigned int index) const; //xmlPort-Funktion, gibt nichts zuruek
+
+            /**
+            @brief
+                gives pointer to possivle answerIds of this question
+
+            @return
+                returns pointer to the array with ids of possible pc textoptions
+            */
+            const std::vector<std::string>& getAnswerIds() const; //returnt Pointer auf Vektor mit allen Ids
+
+
+
+        private:
+            std::string questionId_; //!< id of npc textoption
+            std::string question_; //!< string with npc text
+            std::vector<std::string> answerIds_; //!< vector with possible player reactions
+    };
+}
+
+#endif
Index: /code/trunk/src/modules/dodgerace/DodgeRace.cc
===================================================================
--- /code/trunk/src/modules/dodgerace/DodgeRace.cc	(revision 11782)
+++ /code/trunk/src/modules/dodgerace/DodgeRace.cc	(revision 11783)
@@ -37,4 +37,5 @@
 #include "core/CoreIncludes.h"
 #include "Highscore.h"
+#include "infos/PlayerInfo.h"
 
 namespace orxonox
@@ -90,11 +91,12 @@
     void DodgeRace::tick(float dt)
     {
-        if (getPlayer() != nullptr)
-        {
-            currentPosition = getPlayer()->getWorldPosition().x;
+        DodgeRaceShip* player = this->getPlayer();
+        if (player != nullptr)
+        {
+            currentPosition = player->getWorldPosition().x;
             counter = counter + (currentPosition - lastPosition);
             lastPosition = currentPosition;
             point = (int) currentPosition;
-            getPlayer()->speed = 830.0f - (point / 1000);
+            player->speed = 830.0f - (point / 1000);
 
             for(unsigned int i=0; i < cubeList.size();i++)
@@ -123,5 +125,5 @@
                     }
 
-                    cube->setPosition(getPlayer()->getWorldPosition() + Vector3(5000.0f, 0.0f, -3600.0f + (i*1200)));
+                    cube->setPosition(player->getWorldPosition() + Vector3(5000.0f, 0.0f, -3600.0f + (i*1200)));
                     //stEntity->setScale3D(50,50,50);
                 }
@@ -139,12 +141,9 @@
     DodgeRaceShip* DodgeRace::getPlayer()
     {
-        if (player == nullptr)
-        {
-            for (DodgeRaceShip* ship : ObjectList<DodgeRaceShip>())
-            {
-                player = ship;
-            }
-        }
-        return player;
+        for (DodgeRaceShip* ship : ObjectList<DodgeRaceShip>())
+        {
+            return ship;
+        }
+        return nullptr;
     }
 
@@ -190,4 +189,5 @@
     void DodgeRace::playerPreSpawn(PlayerInfo* player)
     {
+        this->playerInfo_ = player;
         if(lives <= 0)
         {
@@ -228,5 +228,5 @@
         {
             int score = this->getPoints();
-            Highscore::getInstance().storeScore("Dodge Race", score, this->getPlayer()->getPlayer());
+            Highscore::getInstance().storeScore("Dodge Race", score, this->playerInfo_);
         }
         GSLevel::startMainMenu();
Index: /code/trunk/src/modules/dodgerace/DodgeRace.h
===================================================================
--- /code/trunk/src/modules/dodgerace/DodgeRace.h	(revision 11782)
+++ /code/trunk/src/modules/dodgerace/DodgeRace.h	(revision 11783)
@@ -103,5 +103,5 @@
 
             DodgeRaceShip* getPlayer();
-            WeakPtr<DodgeRaceShip> player;
+            WeakPtr<PlayerInfo> playerInfo_;
             std::vector<DodgeRaceCube*> cubeList;
             void toggleShowLevel(){bShowLevel = !bShowLevel;}
Index: /code/trunk/src/modules/flappyorx/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/flappyorx/CMakeLists.txt	(revision 11783)
+++ /code/trunk/src/modules/flappyorx/CMakeLists.txt	(revision 11783)
@@ -0,0 +1,17 @@
+SET_SOURCE_FILES(FlappyOrx_SRC_FILES
+BUILD_UNIT FlappyOrxBuildUnit.cc
+  FlappyOrx.cc
+  FlappyOrxShip.cc
+  FlappyOrxHUDinfo.cc
+END_BUILD_UNIT
+)
+
+ORXONOX_ADD_LIBRARY(flappyorx
+  PLUGIN
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    overlays
+    weapons
+  SOURCE_FILES ${FlappyOrx_SRC_FILES}
+)
Index: /code/trunk/src/modules/flappyorx/FlappyOrx.cc
===================================================================
--- /code/trunk/src/modules/flappyorx/FlappyOrx.cc	(revision 11783)
+++ /code/trunk/src/modules/flappyorx/FlappyOrx.cc	(revision 11783)
@@ -0,0 +1,279 @@
+/*
+ *   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:
+ *      Leo Merholz
+ *      Pascal Schärli
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file FlappyOrx.cc
+    @brief Implementation of the FlappyOrx class.
+*/
+
+#include "FlappyOrx.h"
+#include "Highscore.h"
+#include "core/CoreIncludes.h"
+
+
+#include "core/EventIncludes.h"
+#include "core/command/Executor.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "core/XMLPort.h"
+#include "gamestates/GSLevel.h"
+#include "chat/ChatManager.h"
+
+// ! HACK
+#include "infos/PlayerInfo.h"
+
+#include "FlappyOrxShip.h"
+
+#include "core/command/ConsoleCommand.h"
+#include "worldentities/ExplosionPart.h"
+#include <vector>
+
+namespace orxonox
+{
+    RegisterUnloadableClass(FlappyOrx);
+
+    FlappyOrx::FlappyOrx(Context* context) : Deathmatch(context)
+    {
+        RegisterObject(FlappyOrx);
+
+        point = 0;                          //number of cleared tubes
+        bIsDead = true;
+        firstGame = true;                   //needed for the HUD
+
+        speedBase = 0;
+        speedIncrease = 0;
+        tubeDistanceBase = 0;
+        tubeDistanceIncrease = 0;
+        tubeDistance = 200.0f;                  //distance between tubes
+        tubeOffsetX = 500.0f;                    //tube offset (so that we can't see them spawn)
+
+        circlesUsed=0;
+        setHUDTemplate("FlappyOrxHUD");
+        scoreboardTemplate_ = "";
+    }
+    
+    void FlappyOrx::updatePlayerPos(float x){
+
+        //Spawn a new Tube when the spawn distance is reached
+        if(this->tubes.size()==0||x-tubes.back()+tubeOffsetX>tubeDistance){
+            spawnTube();
+            this->tubes.push(x+tubeOffsetX);
+        }
+        //Delete Tubes when we pass through them
+        if(this->tubes.size()!=0&&x>this->tubes.front()){
+            this->tubes.pop();
+            levelUp();
+        }
+        //Delete Asteroids which are not visible anymore
+        while(this->asteroids.size()!=0&&(this->asteroids.front())->getPosition().x<x-tubeOffsetX){
+            MovableEntity* deleteMe = asteroids.front();
+            asteroids.pop();
+            deleteMe->destroy();
+        }
+    }
+
+    //Gets called when we pass through a Tube
+    void FlappyOrx::levelUp(){
+        point++;
+        tubeDistance = tubeDistanceBase-tubeDistanceIncrease*point;            //smaller spawn Distance
+        getPlayer()->setSpeed(speedBase+speedIncrease*point);    //increase speed
+    }
+
+    //Returns our Ship
+    FlappyOrxShip* FlappyOrx::getPlayer(){
+        if (player == nullptr){
+            for (FlappyOrxShip* ship : ObjectList<FlappyOrxShip>()) {
+                player = ship;
+            }
+        }
+        return player;
+    }
+
+    //Spawn new Tube
+    void FlappyOrx::spawnTube(){
+        if (getPlayer() == nullptr)
+            return;
+
+        float space = 130.0f;    //vertical space between top and bottom tube
+        float height = (rnd()-0.5f)*(280.0f-space);  //Randomize height
+           
+        Vector3 pos = player->getPosition();
+
+        //create the two Asteroid fields (Tubes)
+        asteroidField(pos.x+tubeOffsetX,height-space/2,0.8f);  //bottom
+        asteroidField(pos.x+tubeOffsetX,height+space/2,-0.8f); //top
+    }
+
+    //Creates a new asteroid Field
+    void FlappyOrx::asteroidField(float x, float y, float slope){
+        float r = 20.0f;     //Radius of added Asteroids
+        int noadd = 0;  //how many times we failed to add a new asteroid
+
+        clearCircles();   //Delete Circles (we use circles to make sure we don't spawn two asteroids on top of eachother)
+        Circle newAsteroid = Circle();
+        newAsteroid.x=x;
+        newAsteroid.y=y;
+        newAsteroid.r=r;
+        addIfPossible(newAsteroid); //Add Asteroid at peak
+
+        //Fill up triangle with asteroids
+        while(noadd<5&&circlesUsed<NUM_CIRCLES){
+            if(slope>0)
+                newAsteroid.y=rnd(150+y)-150;   //create asteroid on bottom
+            else
+                newAsteroid.y=rnd(150-y)+y;     //create asteroid on top
+            
+            newAsteroid.x=x+(rnd()-0.5f)*(y-newAsteroid.y)/slope;
+            newAsteroid.r=r;
+           
+            int i = addIfPossible(newAsteroid); //Add Asteroid if it doesn't collide
+            if(i==0)
+                noadd++;
+            else if(i==2)
+                noadd=5;
+        }
+    }
+
+    //Create a new Asteroid
+    void FlappyOrx::createAsteroid(Circle &c){
+        MovableEntity* newAsteroid = new MovableEntity(player->getContext());
+
+        //Add Model fitting the Size of the Asteroid
+        if(c.r<=5)
+            newAsteroid->addTemplate(Asteroid5[rand()%NUM_ASTEROIDS]);
+        else if(c.r<=10)
+            newAsteroid->addTemplate(Asteroid10[rand()%NUM_ASTEROIDS]);
+        else if(c.r<=15)
+            newAsteroid->addTemplate(Asteroid15[rand()%NUM_ASTEROIDS]);
+        else
+            newAsteroid->addTemplate(Asteroid20[rand()%NUM_ASTEROIDS]);
+        
+        //Set position
+        newAsteroid->setPosition(Vector3(c.x, 0, c.y));
+
+        //Randomize orientation
+        newAsteroid->setOrientation(Vector3::UNIT_Z, Degree(rnd(360)));
+        newAsteroid->setOrientation(Vector3::UNIT_Y, Degree(rnd(360)));
+
+        //add to Queue (so that we can delete it again)
+        asteroids.push(newAsteroid);
+    }
+
+    //Deletes Asteroids array which stores all the circles used to make sure no asteroids collide when spawning
+    void FlappyOrx::clearCircles(){
+        circlesUsed=0;
+        for(int i = 0; i<NUM_CIRCLES; i++){
+            circles[i].r=0;
+        }
+    }
+
+    //checks if two circles collide
+    bool FlappyOrx::circleCollision(Circle &c1, Circle &c2){
+        if(c1.r<=0 || c2.r<=0)
+            return false;
+        float x = c1.x - c2.x;
+        float y = c1.y - c2.y;
+        float r = c1.r + c2.r;
+
+        return x*x+y*y<r*r*1.5;
+    }
+
+    //Adds a circle if its not colliding
+    int FlappyOrx::addIfPossible(Circle c){
+        int i;
+        for(i=0; i<NUM_CIRCLES && this->circles[i].r!=0 && c.r>0;i++){
+            while(circleCollision(c,this->circles[i])){
+                c.r-=5; //when it collides, try to make it smaller
+            }
+        }
+        if(c.r<=0){
+            return 0;
+        }
+        circlesUsed++;
+        this->circles[i].x=c.x;
+        this->circles[i].y=c.y;
+        this->circles[i].r=c.r;
+        createAsteroid(c);
+        return 1;
+    }
+
+    bool FlappyOrx::isDead(){
+        return bIsDead;
+    }
+
+    void FlappyOrx::setDead(bool value){
+        bIsDead = value;
+        if(not value){
+            point = -1;
+            levelUp();
+        }
+    }
+
+    void FlappyOrx::start()
+    {
+        // Set variable to temporarily force the player to spawn.
+        this->bForceSpawn_ = true;
+
+        // Call start for the parent class.
+        Deathmatch::start();
+    }
+
+    //RIP
+    void FlappyOrx::death(){
+        bIsDead = true;
+        firstGame = false;
+        
+        //Set randomized deathmessages
+        if(point<7)         sDeathMessage = DeathMessage7[rand()%(DeathMessage7.size())];
+        else if(point<20)   sDeathMessage = DeathMessage20[rand()%(DeathMessage20.size())];
+        else if(point<30)   sDeathMessage = DeathMessage30[rand()%(DeathMessage30.size())];
+        else                sDeathMessage = DeathMessageover30[rand()%(DeathMessageover30.size())];
+        
+        //Update Highscore
+        if (Highscore::exists())
+        {
+            int score = this->getPoints();
+            Highscore::getInstance().storeScore("Flappy Orx", score, this->getPlayer()->getPlayer());
+        }
+
+        //Delete all Tubes and asteroids
+        while (!tubes.empty()){
+            tubes.pop();
+        }
+        while (!asteroids.empty()){
+            MovableEntity* deleteMe = asteroids.front();
+            asteroids.pop();
+            deleteMe->destroy();
+        }
+    }
+
+    void FlappyOrx::end()
+    {
+        GSLevel::startMainMenu();
+    }
+}
Index: /code/trunk/src/modules/flappyorx/FlappyOrx.h
===================================================================
--- /code/trunk/src/modules/flappyorx/FlappyOrx.h	(revision 11783)
+++ /code/trunk/src/modules/flappyorx/FlappyOrx.h	(revision 11783)
@@ -0,0 +1,173 @@
+/*
+ *   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:
+ *      Leo Merholz
+ *      Pascal Schärli
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file FlappyOrx.h
+    @brief Gametype.
+    @ingroup FlappyOrx
+*/
+
+#ifndef _FlappyOrx_H__
+#define _FlappyOrx_H__
+
+#include "flappyorx/FlappyOrxPrereqs.h"
+    
+
+#include "gametypes/Deathmatch.h"
+#include <vector>
+
+namespace orxonox
+{
+    struct Circle{
+        float r;
+        float x;
+        float y;
+        Circle(float new_r, float new_x, float new_y){
+            r=new_r;
+            x=new_x;
+            y=new_y;
+        }
+        Circle(){
+            r=0;
+            x=0;
+            y=0;
+        }
+    };
+
+    class _FlappyOrxExport FlappyOrx : public Deathmatch
+    {
+        public:
+            FlappyOrx(Context* context);
+
+            virtual void start() override;
+            virtual void end() override;
+            virtual void death();
+           
+            void updatePlayerPos(float x);
+            void createAsteroid(Circle &c);
+            void asteroidField(float x, float y, float slope);
+            void spawnTube();
+           
+            int getPoints(){return this->point;}
+            
+            void levelUp();
+            
+            bool isDead();
+            void setDead(bool value);
+
+            FlappyOrxShip* getPlayer();
+
+            inline void setSpeedBase(float speedBase){ this-> speedBase =  speedBase;}
+            inline float  getSpeedBase(){ return speedBase;}
+            inline void setSpeedIncrease(float speedIncrease){ this-> speedIncrease =  speedIncrease;}
+            inline float  getSpeedIncrease(){ return speedIncrease;}
+
+            inline void setTubeDistanceBase(float tubeDistanceBase){ this-> tubeDistanceBase =  tubeDistanceBase;}
+            inline float  getTubeDistanceBase(){ return tubeDistanceBase;}
+            inline void setTubeDistanceIncrease(float tubeDistanceIncrease){ this-> tubeDistanceIncrease =  tubeDistanceIncrease;}
+            inline float  getTubeDistanceIncrease(){ return tubeDistanceIncrease;}
+
+            
+            bool bIsDead;
+            bool firstGame;
+            std::string sDeathMessage;
+            
+        private:
+            void clearCircles();
+            bool circleCollision(Circle &c1, Circle &c2);
+            int addIfPossible(Circle c);
+
+            int point;
+
+            float speedBase;
+            float speedIncrease;
+
+            float tubeDistanceBase;
+            float tubeDistanceIncrease;
+            float tubeDistance;
+            float tubeOffsetX;
+
+            WeakPtr<FlappyOrxShip> player;
+            std::queue<float> tubes;                  //Saves Position of Tubes
+            std::queue<MovableEntity*> asteroids;   //Stores Asteroids which build up the tubes
+
+            const static int NUM_CIRCLES = 6;
+            int circlesUsed;
+            Circle circles[NUM_CIRCLES];
+
+            const static int NUM_ASTEROIDS = 5;
+
+            const std::string Asteroid5[5] = {"Asteroid3_1","Asteroid3_2","Asteroid3_3","Asteroid3_4","Asteroid3_5"};
+            const std::string Asteroid10[5] = {"Asteroid6_1","Asteroid6_2","Asteroid6_3","Asteroid6_4","Asteroid6_5"};
+            const std::string Asteroid15[5] = {"Asteroid9_1","Asteroid9_2","Asteroid9_3","Asteroid9_4","Asteroid9_5"};
+            const std::string Asteroid20[5] = {"Asteroid12_1","Asteroid12_2","Asteroid12_3","Asteroid12_4","Asteroid12_5"};
+           
+            const std::vector<std::string> DeathMessage7 = {
+                "You should really try that again",
+                "You can do better, can you?",
+                "Hey, maybe you get a participation award, that's good isn't it?",
+                "Congratulations, you get a medal, a wooden one",
+                "That was flappin bad!",
+                "Well, that was a waste of time",
+                "You suck!",
+                "Maybe try SuperOrxoBros. That game is not as hard.",
+                "Here's a tip: Try not to fly into these grey thingies.",
+                "We won't comment on that."};
+            const std::vector<std::string> DeathMessage20 = {
+                "Getting better!",
+                "Training has paid off, huh?",
+                "Good average!",
+                "That was somehow enjoyable to watch",
+                "Flappin average",
+                "Getting closer to something",
+                "That wasn't crap, not bad",
+                "Surprisingly not bad."};
+            const std::vector<std::string> DeathMessage30 = {
+                "Flappin great",
+                "Good job!",
+                "Okay, we give you a shiny medal, not a golden one, tough",
+                "Maybe you should do that professionally",
+                "That was really good,!",
+                "We are proud of you"};
+            const std::vector<std::string> DeathMessageover30 = {
+                "You're flappin amazing",
+                "Fucking great job",
+                "Wow, we're really impressed",
+                "We will honor you!",
+                "Please, please do that again!",
+                "Take that golden medal! You've earned it",
+                "We are completely speechless! That was magnificent"};
+            
+
+
+
+    };
+}
+
+#endif /* _FlappyOrx_H__ */
Index: /code/trunk/src/modules/flappyorx/FlappyOrxHUDinfo.cc
===================================================================
--- /code/trunk/src/modules/flappyorx/FlappyOrxHUDinfo.cc	(revision 11783)
+++ /code/trunk/src/modules/flappyorx/FlappyOrxHUDinfo.cc	(revision 11783)
@@ -0,0 +1,133 @@
+/*
+ *   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:
+ *      Leo Merholz
+ *      Pascal Schärli
+ *
+ *      Co-authors:
+ *      ...
+ */
+
+#include "FlappyOrxHUDinfo.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "FlappyOrx.h"
+
+namespace orxonox
+{
+    RegisterClass(FlappyOrxHUDinfo);
+
+    FlappyOrxHUDinfo::FlappyOrxHUDinfo(Context* context) : OverlayText(context)
+    {
+        RegisterObject(FlappyOrxHUDinfo);
+
+        this->FlappyOrxGame = nullptr;
+        this->bShowPoints_ = false;
+        this->bShowMessage_ = false;
+        this->messageID = 0;
+    }
+
+    void FlappyOrxHUDinfo::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(FlappyOrxHUDinfo, XMLPort, xmlelement, mode);
+
+        XMLPortParam(FlappyOrxHUDinfo, "showpoints",    setShowPoints,    getShowPoints,    xmlelement, mode).defaultValues(false);
+        XMLPortParam(FlappyOrxHUDinfo, "showmessage",   setShowMessage,   getShowMessage,   xmlelement, mode).defaultValues(false);
+        XMLPortParam(FlappyOrxHUDinfo, "messageID",     setMessageID,     getMessageID,     xmlelement, mode).defaultValues(0);
+       
+    
+    }
+
+    void FlappyOrxHUDinfo::tick(float dt)
+    {
+        SUPER(FlappyOrxHUDinfo, tick, dt);
+
+        if (this->FlappyOrxGame)
+        {
+            if(not this->FlappyOrxGame->isDead()){
+                if(this->bShowPoints_){
+                    const std::string& points = "Score: "+multi_cast<std::string>(this->FlappyOrxGame->getPoints());
+                    setTextSize(0.04);
+                    this->setCaption(points);
+                }
+                else if(this->bShowMessage_){
+                    setTextSize(0);
+                }
+            }
+            else{
+                if(this->bShowPoints_){
+                    setTextSize(0);
+                }
+                else if(this->bShowMessage_){
+                    if(this->FlappyOrxGame->firstGame){
+                        if(messageID==3){
+                            setTextSize(0.05);
+                            this->setCaption("First click, then press space to start");
+                        }
+                    }
+                    else{
+                        std::string message;
+                        setTextSize(0.05);
+                        switch(messageID){
+                            case 0:
+                                message = "Game Over";
+                                setTextSize(0.1);
+                                this->setCaption(message);
+                            break;
+                            case 1:
+                                message = this->FlappyOrxGame->sDeathMessage;
+                            break;
+                            case 2:
+                                message = "Your Score: "+multi_cast<std::string>(this->FlappyOrxGame->getPoints())+
+                                                        "  Local High Score: "+multi_cast<std::string>(Highscore::getInstance().getHighestScoreOfGame("Flappy Orx"));
+                            break;
+                            case 3:
+                                time_t time = this->FlappyOrxGame->getPlayer()->timeUntilRespawn();
+                                if(time<=0)
+                                    message = "Press space to restart.";
+                                else
+                                    message = "Please wait "+multi_cast<std::string>(time)+" seconds.";
+                            break;
+                        }
+                        this->setCaption(message);
+                    }
+                }
+            }   
+        }
+    }
+
+    void FlappyOrxHUDinfo::changedOwner()
+    {
+        SUPER(FlappyOrxHUDinfo, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+        {
+            this->FlappyOrxGame = orxonox_cast<FlappyOrx*>(this->getOwner()->getGametype());
+        }
+        else
+        {
+            this->FlappyOrxGame = nullptr;
+        }
+    }
+}
Index: /code/trunk/src/modules/flappyorx/FlappyOrxHUDinfo.h
===================================================================
--- /code/trunk/src/modules/flappyorx/FlappyOrxHUDinfo.h	(revision 11783)
+++ /code/trunk/src/modules/flappyorx/FlappyOrxHUDinfo.h	(revision 11783)
@@ -0,0 +1,71 @@
+/*
+ *   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:
+ *      Florian Zinggeler
+ *
+ */
+
+#ifndef _FlappyOrxHUDinfo_H__
+#define _FlappyOrxHUDinfo_H__
+
+#include "flappyorx/FlappyOrxPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+#include <cstring>
+
+namespace orxonox
+{
+    class _FlappyOrxExport FlappyOrxHUDinfo : public OverlayText, public Tickable
+    {
+        public:
+            FlappyOrxHUDinfo(Context* context);
+
+            virtual void tick(float dt) override;
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void changedOwner() override;
+
+            inline void setShowPoints(bool value)
+                { this->bShowPoints_ = value; }
+            inline bool getShowPoints() const
+                { return this->bShowPoints_; }
+
+            inline void setShowMessage(bool value){
+                bShowMessage_ = value;
+            }
+            inline bool getShowMessage() const
+                { return this->bShowMessage_; }
+
+            inline void setMessageID(int value){
+                messageID = value;
+            }
+            inline int getMessageID() const
+                { return messageID; }
+
+        private:
+            FlappyOrx* FlappyOrxGame;
+            bool bShowPoints_;
+            bool bShowMessage_;
+            int messageID;
+    };
+}
+#endif /* _FlappyOrxHUDinfo_H__ */
Index: /code/trunk/src/modules/flappyorx/FlappyOrxPrereqs.h
===================================================================
--- /code/trunk/src/modules/flappyorx/FlappyOrxPrereqs.h	(revision 11783)
+++ /code/trunk/src/modules/flappyorx/FlappyOrxPrereqs.h	(revision 11783)
@@ -0,0 +1,76 @@
+/*
+ *   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:
+ *      Leo Merholz
+ *      Pascal Schärli
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the FlappyOrx module
+*/
+
+#ifndef _FlappyOrxPrereqs_H__
+#define _FlappyOrxPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(FLAPPYORX_STATIC_BUILD)
+#  ifdef FLAPPYORX_SHARED_BUILD
+#    define _FlappyOrxExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _FlappyOrxExport
+#    else
+#      define _FlappyOrxExport __declspec(dllimport)
+#    endif
+#  endif
+#  define _FlappyOrxPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+#  define _FlappyOrxExport  __attribute__ ((visibility("default")))
+#  define _FlappyOrxPrivate __attribute__ ((visibility("hidden")))
+#else
+#  define _FlappyOrxExport
+#  define _FlappyOrxPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class FlappyOrx;
+    class FlappyOrxShip;
+    class FlappyOrxHUDinfo;
+}
+
+#endif /* _FlappyOrxPrereqs_H__ */
Index: /code/trunk/src/modules/flappyorx/FlappyOrxShip.cc
===================================================================
--- /code/trunk/src/modules/flappyorx/FlappyOrxShip.cc	(revision 11783)
+++ /code/trunk/src/modules/flappyorx/FlappyOrxShip.cc	(revision 11783)
@@ -0,0 +1,182 @@
+/*
+ *   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:
+ *      FLeo Merholz
+ *      Pascal Schärli
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file FlappyOrxShip.cc
+    @brief Implementation of the FlappyOrxShip class.
+*/
+
+#include "FlappyOrxShip.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "graphics/Camera.h"
+#include "graphics/ParticleSpawner.h"
+#include <math.h> 
+#include <ctime>
+
+namespace orxonox
+{
+    RegisterClass(FlappyOrxShip);
+
+    FlappyOrxShip::FlappyOrxShip(Context* context) : SpaceShip(context)
+    {
+        RegisterObject(FlappyOrxShip);
+
+        isFlapping = false;
+        isDead = true;
+        velocity = 0;
+        speed = 0;
+        upwardThrust = 0;
+        gravity = 0;
+        particleLifespan = 0.1;
+        particleAge = 0;
+        deathTime = 0;
+
+        particlespawner_ = NULL;
+        
+    }
+
+    void FlappyOrxShip::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {   
+        SUPER(FlappyOrxShip, XMLPort, xmlelement, mode);
+        XMLPortParam(FlappyOrxShip,"speedBase", setSpeedBase, getSpeedBase, xmlelement,mode);
+        XMLPortParam(FlappyOrxShip,"speedIncrease", setSpeedIncrease, getSpeedIncrease, xmlelement,mode);
+        XMLPortParam(FlappyOrxShip,"tubeDistanceBase", setTubeDistanceBase, getTubeDistanceBase, xmlelement,mode);
+        XMLPortParam(FlappyOrxShip,"tubeDistanceIncrease", setTubeDistanceIncrease, getTubeDistanceIncrease, xmlelement,mode);
+
+        XMLPortParam(FlappyOrxShip,"upwardThrust", setUpwardthrust, getUpwardthrust, xmlelement,mode);
+        XMLPortParam(FlappyOrxShip,"gravity", setGravity, getGravity, xmlelement,mode);
+    }
+
+    void FlappyOrxShip::tick(float dt)
+    {
+        SUPER(FlappyOrxShip, tick, dt);
+
+
+        particleAge+=dt;
+        //the particle spawner that generates the fire from the backpack when pressed
+        if (particlespawner_ == NULL) {
+            for (WorldEntity* object : this->getAttachedObjects())
+            {
+                if (object->isA(Class(ParticleSpawner)))
+                particlespawner_ = (ParticleSpawner*) object;
+            }
+        }
+        else if(particleAge>particleLifespan){
+            particlespawner_->setLifetime(1);
+        }
+
+
+        //Execute movement
+        if (this->hasLocalController())
+        {
+            if(getHealth()<0){
+                setHealth(1);
+                getGame()->death();
+                death();   
+            }
+            Vector3 pos = getPosition();
+
+            getGame()->updatePlayerPos(pos.x);
+            
+
+            if(not isDead){
+                velocity += gravity*dt;
+                if(isFlapping){
+                    isFlapping = false;
+                    if(pos.z > -150)
+                        velocity = -upwardThrust;
+                }
+
+                pos += Vector3(speed, 0, velocity) * dt;
+            }
+            
+                        
+            // Camera
+            Camera* camera = this->getCamera();
+            if (camera != nullptr)
+            {
+                camera->setPosition(pos.x,-100,0);
+                camera->setOrientation(Vector3::UNIT_Z, Degree(0));
+
+            }
+
+            
+            setPosition(pos);
+            setOrientation(Vector3::UNIT_Y, Degree(270-velocity/10));
+
+            if(pos.z > 150){
+                getGame()->death();
+                death();
+            }
+            
+        }
+    }
+
+    time_t FlappyOrxShip::timeUntilRespawn(){
+        return 2-time(0)+deathTime;
+    }
+
+    void FlappyOrxShip::boost(bool boost){
+
+        if(not isDead){
+            particleAge = 0;
+        }  
+    
+        if(isDead&&timeUntilRespawn()<=0){
+            isDead = false;
+            getGame()->setDead(false);
+        }
+        isFlapping=boost;
+    }
+
+  
+    FlappyOrx* FlappyOrxShip::getGame()
+    {
+        if (game == nullptr)
+        {
+            for (FlappyOrx* flappyOrx : ObjectList<FlappyOrx>())
+                game = flappyOrx;
+        }
+        return game;
+    }
+
+    void FlappyOrxShip::death()
+    {
+        isDead = true;
+
+        deathTime = time(0);
+        Vector3 pos = getPosition();
+        pos.x = 0;
+        pos.z = 0;
+        pos.y = 0;
+        velocity = 0;
+        setPosition(pos);
+    }
+}
Index: /code/trunk/src/modules/flappyorx/FlappyOrxShip.h
===================================================================
--- /code/trunk/src/modules/flappyorx/FlappyOrxShip.h	(revision 11783)
+++ /code/trunk/src/modules/flappyorx/FlappyOrxShip.h	(revision 11783)
@@ -0,0 +1,98 @@
+/*
+ *   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:
+ *      Leo Merholz
+ *      Pascal Schärli
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file FlappyOrxShip.h
+    @brief Declaration of the FlappyOrxShip class.
+*/
+
+#ifndef _FlappyOrxShip_H__
+#define _FlappyOrxShip_H__
+
+#include "flappyorx/FlappyOrxPrereqs.h"
+
+#include "weapons/WeaponsPrereqs.h"
+#include "worldentities/pawns/SpaceShip.h"
+#include "graphics/ParticleSpawner.h"
+#include "FlappyOrx.h"
+
+
+namespace orxonox
+{
+    class _FlappyOrxExport FlappyOrxShip : public SpaceShip
+    {
+        public:
+            FlappyOrxShip(Context* context);
+
+            virtual void tick(float dt) override;
+
+            // Starts or stops fireing
+            virtual void boost(bool bBoost) override;
+            
+            inline void  setSpeedBase(float speedBase){ getGame()->setSpeedBase(speedBase);}
+            inline float getSpeedBase(){ return getGame()->getSpeedBase();}
+            inline void  setSpeedIncrease(float speedIncrease){ getGame()->setSpeedIncrease(speedIncrease);}
+            inline float getSpeedIncrease(){ return getGame()->getSpeedIncrease();}
+
+            inline void setTubeDistanceBase(float tubeDistanceBase){ getGame()->setTubeDistanceBase(tubeDistanceBase);}
+            inline float  getTubeDistanceBase(){ return getGame()->getTubeDistanceBase();}
+            inline void setTubeDistanceIncrease(float tubeDistanceIncrease){ getGame()->setTubeDistanceIncrease(tubeDistanceIncrease);}
+            inline float  getTubeDistanceIncrease(){ return getGame()->getTubeDistanceIncrease();}
+
+            inline void  setUpwardthrust( float upwardThrust ){ this->upwardThrust = upwardThrust; }
+            inline float getUpwardthrust(){ return this->upwardThrust; }
+            inline void  setGravity( float gravity ){ this->gravity = gravity; }
+            inline float getGravity(){ return this->gravity; }
+
+            inline void setSpeed( float speed ){ this->speed = speed; }
+            inline float getSpeed( ){ return this->speed; }
+            
+   
+            virtual time_t timeUntilRespawn();
+            
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+
+        protected:
+            virtual void death() override;
+        private:
+            FlappyOrx* getGame();
+            WeakPtr<FlappyOrx> game;
+            ParticleSpawner* particlespawner_;
+            bool isFlapping;
+            bool isDead;
+            float velocity;
+            float speed, upwardThrust, gravity;
+            float particleAge, particleLifespan;
+            time_t deathTime;
+
+    };
+}
+
+#endif /* _FlappyOrxShip_H__ */
Index: /code/trunk/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/overlays/hud/CMakeLists.txt	(revision 11782)
+++ /code/trunk/src/modules/overlays/hud/CMakeLists.txt	(revision 11783)
@@ -26,3 +26,4 @@
   LastTeamStandingInfos.cc
   CountDown.cc
+  StoryModeHUD.cc
 )
Index: /code/trunk/src/modules/overlays/hud/StoryModeHUD.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/StoryModeHUD.cc	(revision 11783)
+++ /code/trunk/src/modules/overlays/hud/StoryModeHUD.cc	(revision 11783)
@@ -0,0 +1,198 @@
+/*
+ *   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.
+ *
+ *   
+ *   This HUD is used for the implementation of the campaign map.
+ *   So far it can only be used to give names to an object planet.
+ *
+ *   Author:
+ *      Nikola Bolt
+ *   Co-authors:
+ *      Claudio Fanconi
+ */
+
+
+// Header file of this cc file
+#include "StoryModeHUD.h"
+
+// Ogre stuff
+#include <OgreCamera.h>
+#include <OgreFontManager.h>
+#include <OgreOverlayManager.h>
+#include <OgreTextAreaOverlayElement.h>
+#include <OgrePanelOverlayElement.h>
+
+// Other stuff
+#include <typeinfo>
+
+#include "util/Convert.h"
+#include "core/command/ConsoleCommandIncludes.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "CameraManager.h"
+#include "graphics/Camera.h"
+#include "worldentities/pawns/Pawn.h"
+#include "worldentities/WorldEntity.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "tools/TextureGenerator.h"
+#include "controllers/NewHumanController.h"
+
+#include "worldentities/NameableStaticEntity.h"
+
+namespace orxonox
+{
+    RegisterClass ( StoryModeHUD );
+
+    // Constructor of the StoryMode HUD
+    StoryModeHUD::StoryModeHUD(Context* context) : OrxonoxOverlay(context)
+    {
+        RegisterObject(StoryModeHUD);
+
+        this->textSize_ = 1.0;
+    }
+
+    // Destructor of the StoryMode HUD
+    StoryModeHUD::~StoryModeHUD()
+    {
+        for(Ogre::TextAreaOverlayElement* text : texts)
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(text);
+    }
+
+    // Functions of the StoryMode HUD
+
+    // XML Port for Level construction.
+    void StoryModeHUD::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(StoryModeHUD, XMLPort, xmlelement, mode);
+
+        XMLPortParam(StoryModeHUD, "font", setFont, getFont, xmlelement, mode);
+        XMLPortParam(StoryModeHUD, "textSize", setTextSize, getTextSize, xmlelement, mode);
+    }
+
+    void StoryModeHUD::initialize(){
+        firstTick = false;
+        // Scales used for dimensions and text size
+        float xScale = this->getActualSize().x;
+        float yScale = this->getActualSize().y;
+
+        //Sets the Camera angle at 30 degrees above it, so levels can be seen better    
+        CameraManager::getInstance().getActiveCamera()->setOrientation(Vector3::UNIT_X, Degree(-30));
+
+        for(NameableStaticEntity* planet : ObjectList<NameableStaticEntity>()){
+
+
+            Ogre::TextAreaOverlayElement* text = static_cast<Ogre::TextAreaOverlayElement*>( Ogre::OverlayManager::getSingleton()
+                    .createOverlayElement("TextArea", "StoryModeHUD_navText_" + getUniqueNumberString()));
+
+            texts.push_back(text);
+            text->setDimensions(xScale, yScale);
+
+            //font name of the text needs to be set here, not in the xml setter function
+            text->setFontName(this->fontName_);
+            text->setCharHeight(this->textSize_ * yScale);
+
+            //set text
+            text->setCaption(planet->getLevelName());
+
+            text->hide();
+        
+            this->background_->addChild(text);
+        }
+    }
+
+    // Set the Font of this HUD.
+    void StoryModeHUD::setFont(const std::string& font)
+    {
+        const Ogre::ResourcePtr& fontPtr = Ogre::FontManager::getSingleton().getByName(font);
+        if (fontPtr.isNull())
+        {
+            this->fontName_ = "Monofur";
+            orxout(internal_warning) << "StoryModeHUD: Font '" << font << "' not found. Font has been set to Monofur." << endl;
+            return;
+        }
+        this->fontName_ = font;
+    }
+   
+    // Gets the Font of this HUD    
+    const std::string& StoryModeHUD::getFont() const
+    {
+        return this->fontName_;
+    }
+
+    // Set the size of the Text
+    void StoryModeHUD::setTextSize(float size)
+    {
+        if (size <= 0.0f)
+        {
+            this->textSize_ = 0.05f;
+            orxout(internal_warning) << "StoryModeHUD: Non positive font size not allowed. Font size has been set to 0.05" << endl;
+            return;
+        }
+        this->textSize_ = size;
+        
+    }
+
+    // returns the Size of the Text
+    float StoryModeHUD::getTextSize() const
+    {
+        return this->textSize_;
+    }
+
+    // Tick: this is the most important function. It's recalled every frame and makes sure things happen on the screen.
+    void StoryModeHUD::tick(float dt)
+    {
+        SUPER(StoryModeHUD, tick, dt);
+
+        if(firstTick)
+            this->initialize();
+
+        // cam is the pointer which represents your camera
+        Camera* cam = CameraManager::getInstance().getActiveCamera();
+        if (cam == nullptr)
+            return;
+
+        // camTransform is a Matrix, which converts 3D world of the game into 2D on your screen
+        const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
+
+        size_t i = 0;
+        for(NameableStaticEntity* planet : ObjectList<NameableStaticEntity>()){
+            if (i >= texts.size()) {
+                break;
+            }
+            Ogre::TextAreaOverlayElement* text = texts[i];
+            i++;
+
+            // Transform to screen coordinates
+            Vector3 pos = camTransform * planet->getWorldPosition();
+
+            // If you fly passed the description, it gets out of sight
+            if (!(pos.z > 1.0)){
+                    
+                // Position text
+                text->setLeft((pos.x+1)/2); // The (0,0) Coordinate is in the upper left corner.
+                text->setTop((-pos.y+1)/2);  // With those two calculations we set the desired positions
+
+                // Make sure the overlays are shown
+                text->show();
+            }
+        }
+    }
+}
Index: /code/trunk/src/modules/overlays/hud/StoryModeHUD.h
===================================================================
--- /code/trunk/src/modules/overlays/hud/StoryModeHUD.h	(revision 11783)
+++ /code/trunk/src/modules/overlays/hud/StoryModeHUD.h	(revision 11783)
@@ -0,0 +1,69 @@
+/*
+ *   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.  S
+ *   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:
+ *      Nikola Bolt
+ *   Co-authors:
+ *      Claudio Fanconi
+ *
+ */
+
+#ifndef _StoryModeHUD_H__
+#define _StoryModeHUD_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <string>
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OrxonoxOverlay.h"
+
+namespace orxonox
+{
+    class _OverlaysExport StoryModeHUD : public OrxonoxOverlay, public Tickable
+    {
+    public:
+            StoryModeHUD(Context* context);
+            virtual ~StoryModeHUD();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void tick(float dt) override;
+
+        private:
+            void initialize();
+
+            void setTextSize(float size);
+            float getTextSize() const;
+
+            void setFont(const std::string& font);
+            const std::string& getFont() const;
+
+            std::vector<Ogre::TextAreaOverlayElement*> texts;
+            std::string fontName_;
+            float textSize_;
+            bool firstTick = true;
+   
+    };
+}
+
+#endif /* _StoryModeHUD_H__ */
Index: /code/trunk/src/modules/pickup/PickupPrereqs.h
===================================================================
--- /code/trunk/src/modules/pickup/PickupPrereqs.h	(revision 11782)
+++ /code/trunk/src/modules/pickup/PickupPrereqs.h	(revision 11783)
@@ -72,5 +72,5 @@
     class Pickup;
     class PickupCollection;
-    class PickupInventoryContainer;
+    struct PickupInventoryContainer;
     class PickupManager;
     class PickupRepresentation;
Index: /code/trunk/src/modules/pickup/PickupSpawner.cc
===================================================================
--- /code/trunk/src/modules/pickup/PickupSpawner.cc	(revision 11782)
+++ /code/trunk/src/modules/pickup/PickupSpawner.cc	(revision 11783)
@@ -158,4 +158,6 @@
             for(Pawn* pawn : ObjectList<Pawn>())
             {
+                if(!(pawn->doesAcceptPickups())){continue;} // skip those pawns, e.g. AsteroidMinables. 
+
                 Vector3 distance = pawn->getWorldPosition() - this->getWorldPosition();
                 PickupCarrier* carrier = static_cast<PickupCarrier*>(pawn);
Index: /code/trunk/src/modules/pickup/PickupSpawner.h
===================================================================
--- /code/trunk/src/modules/pickup/PickupSpawner.h	(revision 11782)
+++ /code/trunk/src/modules/pickup/PickupSpawner.h	(revision 11783)
@@ -92,4 +92,10 @@
                 { return this->triggerDistance_; }
             /**
+            @brief Set the distance in which to trigger.
+            @param value The new distance in which to trigger.
+            */
+            inline void setTriggerDistance(float value)
+                { this->triggerDistance_ = value; }
+            /**
             @brief Get the time to respawn.
             @returns Returns the time after which this gets re-actived.
@@ -98,4 +104,10 @@
                 { return this->respawnTime_; }
             /**
+            @brief Set the time to respawn.
+            @param time New time after which this gets re-actived.
+            */
+            inline void setRespawnTime(float time)
+                { this->respawnTime_ = time; }
+            /**
             @brief Get the maximum number of items that will be spawned by this PickupSpawner.
             @return Returns the maximum number of items spawned by this PickupSpawner.
@@ -103,4 +115,6 @@
             inline int getMaxSpawnedItems(void) const
                 { return this->maxSpawnedItems_; }
+            void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
+
             /**
             @brief Returns the name of the template which is used to create a pickup for this spawner.
@@ -113,4 +127,7 @@
             inline Template* getPickupTemplate() const
                 {return this->pickupTemplate_; }
+
+            void setPickupTemplateName(const std::string& name);
+            void setPickupTemplate(Template* temp);
 
         private:
@@ -130,22 +147,4 @@
             void block(PickupCarrier* carrier, unsigned int time = DEFAULT_BLOCKED_TIME)
                 { this->blocked_.insert(std::pair<PickupCarrier*, std::time_t>(carrier, std::time(0)+time)); }
-
-            /**
-            @brief Set the distance in which to trigger.
-            @param value The new distance in which to trigger.
-            */
-            inline void setTriggerDistance(float value)
-                { this->triggerDistance_ = value; }
-            /**
-            @brief Set the time to respawn.
-            @param time New time after which this gets re-actived.
-            */
-            inline void setRespawnTime(float time)
-                { this->respawnTime_ = time; }
-
-            void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
-
-            void setPickupTemplateName(const std::string& name);
-            void setPickupTemplate(Template* temp);
 
             Pickupable* createPickup(void); //!< Creates a new Pickupable.
Index: /code/trunk/src/modules/superorxobros/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/superorxobros/CMakeLists.txt	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/CMakeLists.txt	(revision 11783)
@@ -9,7 +9,9 @@
   SOBHUDInfo.cc
   SOBGumba.cc
+  SOBFireball.cc
   SOBFlagstone.cc
   SOBCastlestone.cc
   SOBCoin.cc
+  SOBGumbaBoss.cc
 
 )
Index: de/trunk/src/modules/superorxobros/Orxo.cc
===================================================================
--- /code/trunk/src/modules/superorxobros/Orxo.cc	(revision 11782)
+++ 	(revision )
@@ -1,196 +1,0 @@
-/*
- *   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:
- *      Florian Zinggeler
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file InvaderShip.cc
-    @brief Implementation of the InvaderShip class.
-*/
-
-#include "Orxo.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-//#include "Invader.h"
-//#include "InvaderEnemy.h"
-#include "graphics/Camera.h"
-//#include "weapons/projectiles/Projectile.h"
-
-namespace orxonox
-{
-    RegisterClass(Orxo);
-
-    Orxo::Orxo(Context* context) : SpaceShip(context)
-    {
-        RegisterObject(Orxo);
-
-        speed = 500;
-        damping = 10;
-    }
-
-    void Orxo::tick(float dt)
-    {
-        /*Vector3 pos = getPosition();
-
-        //Movement calculation
-        lastTimeFront += dt * damping;
-        lastTimeLeft += dt * damping;
-        lastTime += dt;
-
-        velocity.x = interpolate(clamp(lastTimeLeft, 0.0f, 1.0f), desiredVelocity.x, 0.0f);
-        velocity.y = interpolate(clamp(lastTimeFront, 0.0f, 1.0f), desiredVelocity.y, 0.0f);
-
-        //Execute movement
-        if (this->hasLocalController())
-        {
-            float dist_y = velocity.y * dt;
-            float dist_x = velocity.x * dt;
-            if(dist_y + posforeward > -42*3 && dist_y + posforeward < 42*6)
-                posforeward += dist_y;
-            else
-            {
-                velocity.y = 0;
-                // restart if game ended
-                if (getGame())
-                    if (getGame()->bEndGame)
-                    {
-                        getGame()->start();
-                        return;
-                    }
-            }
-            if (pos.z + dist_x > 42*2.5 || pos.z + dist_x < -42*3)
-                velocity.x = 0;
-            pos += Vector3(1000 + velocity.y, 0, velocity.x) * dt;
-        }
-
-    
-        // Camera
-        Camera* camera = this->getCamera();
-        if (camera != nullptr)
-        {
-            camera->setPosition(Vector3(-pos.z, -posforeward, 0));
-            camera->setOrientation(Vector3::UNIT_Z, Degree(90));
-        }
-
-
-
-        // bring back on track!
-        if(pos.y != 0)
-            pos.y = 0;
-
-        setPosition(pos);
-        setOrientation(Vector3::UNIT_Y, Degree(270));
-
-        // Level up!
-        if (pos.x > 42000)
-        {
-            updateLevel();
-            setPosition(Vector3(0, 0, pos.z)); // pos - Vector3(30000, 0, 0)
-        }*/
-
-        SUPER(Orxo, tick, dt);
-    }
-
-    void Orxo::updateLevel()
-    {
-        lastTime = 0;
-        /*if (getGame())
-            getGame()->levelUp();*/
-    }
-
-    void Orxo::moveFrontBack(const Vector2& value)
-    {
-        Pawn::moveFrontBack(value);
-        lastTimeLeft = 0;
-        desiredVelocity.x = -value.x * speed;
-    }
-
-    void Orxo::moveRightLeft(const Vector2& value)
-    {
-        lastTimeFront = 0;
-        desiredVelocity.y = value.y * speed * 42;
-    }
-    void Orxo::boost(bool bBoost)
-    {
-       // isFireing = bBoost;
-    }
-    void Orxo::rotateRoll(const Vector2& value)
-    {/*
-        if (getGame())
-            if (getGame()->bEndGame)
-                getGame()->end();
-    */}
-    inline bool Orxo::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
-    {
-        /*// orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint;
-        InvaderEnemy* enemy = orxonox_cast<InvaderEnemy*>(otherObject);
-        Projectile* shot = orxonox_cast<Projectile*>(otherObject);
-        // ensure that this gets only called once per enemy.
-        if (enemy != nullptr && lastEnemy != enemy)
-        {
-            lastEnemy = enemy;
-
-            removeHealth(20);
-            if (getGame())
-            {
-                getGame()->multiplier = 1;                   
-            }
-        }
-        // was shot, decrease multiplier
-        else if (shot != nullptr  && lastShot != shot)
-        {
-            if (getGame() && orxonox_cast<InvaderEnemy*>(shot->getShooter()) != nullptr)
-            {
-                if (getGame()->multiplier > 1)
-                {
-                    lastShot = shot;
-                    getGame()->multiplier -= 1;     
-                }
-            }
-        }
-        return false;
-        // SUPER(InvaderShip, collidesAgainst, otherObject, contactPoint);
-        */
-        return false;
-    }
-
-    /*SOB* Orxo::getGame()
-    {
-        if (game == nullptr)
-        {
-            for (SOB* sob : ObjectList<SOB>())
-                game = sob;
-        }
-        return game;
-    }*/
-
-    void Orxo::death()
-    {
-        //getGame()->costLife();
-        Pawn::death();
-    }
-}
Index: de/trunk/src/modules/superorxobros/Orxo.h
===================================================================
--- /code/trunk/src/modules/superorxobros/Orxo.h	(revision 11782)
+++ 	(revision )
@@ -1,95 +1,0 @@
-/*
- *   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:
- *      Florian Zinggeler
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file InvaderShip.h
-    @brief Declaration of the InvaderShip class.
-*/
-
-#ifndef _Orxo_H__
-#define _Orxo_H__
-
-//#include "invader/InvaderPrereqs.h"
-
-//#include "weapons/WeaponsPrereqs.h"
-#include "worldentities/pawns/SpaceShip.h"
-
-namespace orxonox
-{
-    class Orxo : public SpaceShip
-    {
-    public:
-        Orxo(Context* context);
-
-        virtual void tick(float dt) override;
-
-
-            // overwrite for 2d movement
-        virtual void moveFrontBack(const Vector2& value) override;
-        virtual void moveRightLeft(const Vector2& value) override;
-
-            // Starts or stops fireing
-        virtual void boost(bool bBoost) override;
-
-            //no rotation!
-        virtual void rotateYaw(const Vector2& value) override{};
-        virtual void rotatePitch(const Vector2& value) override{};
-            //return to main menu if game has ended.
-        virtual void rotateRoll(const Vector2& value) override;
-
-        virtual void updateLevel();
-
-        virtual inline bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
-
-
-
-
-      
-
-
-    protected:
-        virtual void death() override;
-    private:
-            //SOB* getGame();
-            //WeakPtr<SOB> game;
-        Camera* camera;
-        float speed, damping, posforeward;
-        float lastTimeFront, lastTimeLeft, lastTime;
-        struct Velocity
-        {
-            float x;
-            float y;
-        } velocity, desiredVelocity;
-
-           // WeakPtr<InvaderEnemy> lastEnemy;
-            //WeakPtr<Projectile> lastShot;
-
-    };
-}
-
-#endif /* _InvaderShip_H__ */
Index: /code/trunk/src/modules/superorxobros/SOB.cc
===================================================================
--- /code/trunk/src/modules/superorxobros/SOB.cc	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOB.cc	(revision 11783)
@@ -44,4 +44,5 @@
 #include "SOBFigure.h"
 #include "graphics/Camera.h"
+#include "Highscore.h"
 
 
@@ -49,5 +50,5 @@
 namespace orxonox
 {
-
+    bool newHighscore=0;
     RegisterUnloadableClass(SOB);
 
@@ -59,5 +60,4 @@
     {
         RegisterObject(SOB);
-        camera = nullptr;
 
         this->center_ = nullptr;
@@ -68,4 +68,5 @@
         timeLeft_=400.0;
         done_ = true;
+        newHighscore = false;
         lvl_ = 1;
 
@@ -78,14 +79,5 @@
     SOB::~SOB()
     {
-        if (this->isInitialized())
-            this->cleanup();
     }
-
-    void SOB::cleanup()
-    {
-        camera = nullptr;
-    }
-
-
 
     void SOB::start()
@@ -99,5 +91,4 @@
             }
 
-            center_->attach(figure_);
             figure_->setPosition(0, 0, 0);
         }
@@ -112,21 +103,13 @@
         Gametype::start();
 
-        if (figure_ != nullptr)
-        {
-            camera = figure_->getCamera();
-        }
-
     }
 
     void SOB::end()
     {
-        cleanup();
         GSLevel::startMainMenu();
         Deathmatch::end();
-    }
+}
 
     void SOB::restart() {
-        cleanup();
-
         // HACK - only method I found to simply reload the level
         Game::getInstance().popState();
@@ -167,5 +150,10 @@
         if (this->figure_ != nullptr && figure_->lvlEnded_) {
             std::stringstream a;
-            a << "Nice! " << getPoints() << " Points in " << (400-getTimeLeft())/2 <<"s.\n\nPress <Space> to restart";
+            if(!newHighscore){
+                a << "Nice! " << getPoints() << " Points in " << (400-getTimeLeft())/2 <<"s.\n\nPress <Space> to restart";
+            }
+            else{
+                a << "Congrats, new Highscore! " << getPoints() << " Points in " << (400-getTimeLeft())/2 <<"s.\n\nPress <Space> to restart";
+            }
             info_ =a.str();
 
@@ -181,5 +169,5 @@
         //The time on the HUD
         if (!done_)
-            timeLeft_-=dt*2.5;
+            timeLeft_-=dt*2.5f;
     }
 
Index: /code/trunk/src/modules/superorxobros/SOB.h
===================================================================
--- /code/trunk/src/modules/superorxobros/SOB.h	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOB.h	(revision 11783)
@@ -76,9 +76,12 @@
                 points_+=100;
             }
+            void addGumbaBoss() {
+                points_+=5000;
+            }
             void addPoints(int poi) {
                 points_+=poi;
             }
             int getTimeLeft() {
-                return timeLeft_;
+                return (int) timeLeft_;
             }
             std::string getInfoText() {
@@ -103,11 +106,10 @@
 
             WeakPtr<SOBCenterpoint> center_;
+            bool newHighscore;
 
         protected:
 
 
-            void cleanup(); //!< Cleans up the Gametype 
             WeakPtr<SOBFigure> figure_;
-            WeakPtr<Camera> camera;
             int points_;
             int coins_;
Index: /code/trunk/src/modules/superorxobros/SOBCoin.cc
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBCoin.cc	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBCoin.cc	(revision 11783)
@@ -49,4 +49,6 @@
         setAngularFactor(0.0);
 
+        speed_ = 0;
+        lifetime_ = 0;
     }
 
@@ -67,5 +69,5 @@
         lifetime_-=dt;
 
-        if (lifetime_ <+ 0) {
+        if (lifetime_ < 0) {
             destroyLater();
         }
Index: /code/trunk/src/modules/superorxobros/SOBCoin.h
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBCoin.h	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBCoin.h	(revision 11783)
@@ -50,6 +50,4 @@
 
 
-        bool attachedToFigure_;
-
         void setLifetime(const float lt)
         { this->lifetime_ = lt; }
Index: /code/trunk/src/modules/superorxobros/SOBFigure.cc
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBFigure.cc	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBFigure.cc	(revision 11783)
@@ -23,4 +23,6 @@
  *      Julien Kindle
  *   Co-authors:
+ *      Noah Zarro
+ *      Theo von Arx
  *      
  *
@@ -39,10 +41,15 @@
 #include "graphics/Camera.h"
 #include "graphics/ParticleSpawner.h"
+#include <OgreMath.h>
 
 #include "SOBMushroom.h"
 #include "SOBGumba.h"
+#include "SOBGumbaBoss.h"
+#include "SOBFireball.h"
 #include "SOB.h"
 #include "SOBFlagstone.h"
 #include "SOBCastlestone.h"
+#include "SOBFireball.h"
+#include "Highscore.h"
 #include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
 
@@ -59,26 +66,34 @@
 
         //Vars for movement of player
-        moveUpPressed_ = false;
-        moveDownPressed_ = false;
-        moveLeftPressed_ = false;
-        moveDownPressed_ = false;
-        firePressed_ = false;
-        collDisZ_ = 0;
+        moveUpPressed_      = false;
+        moveDownPressed_    = false;
+        moveLeftPressed_    = false;
+        moveRightPressed_    = false;
+        firePressed_        = false;
+        collDisZ_           = 0;
+
         //Times and turning
-        timeSinceLastFire_ = 0.0;
-        lastSpeed_z = 0.0;
-        pitch_ = 0.0;
-        timeCounter_ = 0;
+        timeSinceLastFire_  = 0.0;
+        lastSpeed_z         = 0.0;
+        timeCounter_        = 0;
 
         //Properties of player
-        gotPowerUp_ = false;
-        isColliding_ = true;
-        particlespawner_ = NULL;
+
+        isColliding_        = true;
+        particlespawner_    = NULL;
 
         //Properties of players life
-        predead_ = false;
-        dead_ = false;
-        lvlEnded_ = false;
+        predead_            = false;
+        dead_               = false;
+        lvlEnded_           = false;
         reachedLvlEndState_ = 0;
+
+        // Properties concerning PowerUps and items
+        PowerUpCounter_     = 0;
+        maxPowerUp_         = 2;
+        FireballPower       = 2;
+        //Properties of fireing Fireballs, NOTE! fireballs are fired with the moveUP Key, not with the fire key
+        fireallowed_        = true;
+        firecooldown_       = 0;
 
         
@@ -97,39 +112,75 @@
 
         //Orxocast returns object with casted type if otherObject has that class, and if not a nullptr
-        SOBMushroom* mush = orxonox_cast<SOBMushroom*>(otherObject);
-        SOBGumba* gumba = orxonox_cast<SOBGumba*>(otherObject);
-        SOBFlagstone* flagstone = orxonox_cast<SOBFlagstone*>(otherObject);
-        SOBCastlestone* castlestone = orxonox_cast<SOBCastlestone*>(otherObject);
-
-        //Check if otherObject is a powerup
+        SOBMushroom*    mush        = orxonox_cast<SOBMushroom*>    (otherObject);
+        SOBGumba*       gumba       = orxonox_cast<SOBGumba*>       (otherObject);
+        SOBGumbaBoss*   gumbaBoss   = orxonox_cast<SOBGumbaBoss*>   (otherObject);
+        SOBFlagstone*   flagstone   = orxonox_cast<SOBFlagstone*>   (otherObject);
+        SOBCastlestone* castlestone = orxonox_cast<SOBCastlestone*> (otherObject);
+        SOBFireball*    fireball    = orxonox_cast<SOBFireball*>    (otherObject);
+        SOB* SOBGame                = orxonox_cast<SOB*>            (getGametype()); 
+
+
+        //Check if otherObject is a powerup-mushroom
         if (mush != nullptr && !(mush->hasCollided_)) {
             otherObject->destroyLater();
-            gotPowerUp_ = true;
-            SOB* SOBGame = orxonox_cast<SOB*>(getGametype()); //Get the Gametype
+
+            PowerUpCounter_++;
+            if(PowerUpCounter_ > maxPowerUp_)   PowerUpCounter_ = maxPowerUp_; // you had already the max
+            else                                this->changeClothes();
+
             SOBGame->addMushroom(); // Tell the gametype to increase points
             mush->hasCollided_ = true; // needed because of destroyLater takes some time and player should receive points only once
+            
+            
+        }
+
+        
 
         //Check if otherObject is a Gumba (that walking enemies)
-        } else if (gumba != nullptr && !(gumba->hasCollided_)) {
-
-            //If player jumps on its head, kill it, else, kill the player
+
+         else if (gumba != nullptr && gumbaBoss == nullptr && !(gumba->hasCollided_)) {
+
+            //If player jumps on its head, kill the Gumba, else, kill the player
             if (getVelocity().z >= -20) {
-              Vector3 vel = getVelocity();
-              vel.y = -80;
-              vel.z = 200;
-              setVelocity(vel);
-              predead_=true; 
-              SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
-              SOBGame->setDone(true);
+                // If player hasn't a power up, he dies. Else he shrinks and the gumba dies.
+                if(PowerUpCounter_ == 0){
+                    this->die();
+                } 
+                else{
+                    PowerUpCounter_--;
+                    this->changeClothes();
+
+                    gumba->destroyLater();
+                    gumba->hasCollided_ = true;
+                }
 
           } else {
             gumba->destroyLater();
             gumba->hasCollided_ = true;
-            SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
             SOBGame->addGumba();
 
 
-        }
-    }
+            }
+        }
+        else if (gumbaBoss != nullptr && !(gumbaBoss->hasCollided_)) {
+            if (getVelocity().z >= -20) {
+                // If player hasn't a power up, he dies. Else he dies directly.
+                this->die(); 
+            }
+
+            else {
+                gumbaBoss->destroyLater();
+                gumbaBoss->hasCollided_ = true;
+                SOBGame->addGumbaBoss();
+                }
+        }
+        else if (fireball != nullptr && !(fireball->hasCollided_)){
+            if(PowerUpCounter_ == 0){
+                    this->die();
+                } 
+            PowerUpCounter_--;
+            this->changeClothes();
+            fireball->destroyLater();
+        }
 
     //Purpose is that if player hits the flag, he should walk into the castle at the end of the level. For that we use SOBCastlestone
@@ -137,5 +188,5 @@
         flagstone->hasCollided_ = true;
         reachedLvlEndState_ = 1;
-        SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+
         SOBGame->setDone(true);
         SOBGame->addPoints(flagstone->getPoints());
@@ -159,4 +210,30 @@
 }
 
+//Function to spawn the Fireball
+void SOBFigure::spawnFireball() {
+        SOBCenterpoint* center_ = ((SOB*)getGametype())->center_;
+
+         SOBFireball* ball = new SOBFireball(center_->getContext());
+         Vector3 spawnpos = this->getWorldPosition();
+         spawnpos.z += 0;
+
+        if (ball != nullptr && center_ != nullptr)
+        {
+            ball->addTemplate("fireball");
+            bool direction = ((this->getWorldOrientation().getRoll().valueRadians())>-1.6&&(this->getWorldOrientation().getRoll().valueRadians()<1.6));
+            ball->setDirection(direction);
+            if(direction)
+            {
+                spawnpos.x+=10;
+            }
+            else
+            {
+                spawnpos.x-=10;
+            }
+            ball->setPosition(spawnpos);
+
+        }
+     }
+
 //For those of you who don't have an idea: the tick function is called about 50 times/sec
 void SOBFigure::tick(float dt)
@@ -166,4 +243,5 @@
 
     bool inputAllowed = true;
+    //SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
 
     //the particle spawner that generates the fire from the backpack when pressed
@@ -174,5 +252,7 @@
             particlespawner_ = object;
         }
-    }
+
+    }
+    
 
 
@@ -190,8 +270,8 @@
     //if input blocked, then cancel every movement operation
     if (!inputAllowed) {
-        moveUpPressed_ = false;
-        moveDownPressed_ = false;
-        moveLeftPressed_ = false;
-        moveRightPressed_ = false;
+        moveUpPressed_      = false;
+        moveDownPressed_    = false;
+        moveLeftPressed_    = false;
+        moveRightPressed_   = false;
     }
 
@@ -204,4 +284,5 @@
     if (hasLocalController())
     {
+        SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
         Vector3 velocity = getVelocity();
         Vector3 position = getPosition();
@@ -212,5 +293,4 @@
         if (position.z < -100) {
             dead_ = true;
-            SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
             SOBGame->setDone(true);
         }
@@ -221,5 +301,5 @@
             velocity.z = 0;
             setVelocity(velocity);
-            SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+           
             if (firePressed_)
                 SOBGame->restart();
@@ -242,10 +322,10 @@
         else
             particlespawner_->setVisible(false); 
-
+        
 
         //If player hits space and collides against an object under him then jump
-        if (inputAllowed && firePressed_ && isColliding_ && (collDisZ_ >= 7.75 && collDisZ_ <+ 8.25)) {
-            gravityAcceleration_ = 100.0;
-            velocity.z = 110; 
+        if (inputAllowed && firePressed_ && isColliding_ && (collDisZ_ >= 0 && collDisZ_ <+ 10)) {
+            gravityAcceleration_ = 350;
+            velocity.z = 175; 
         }
 
@@ -274,4 +354,21 @@
         }
 
+        //If moveUp pressed, fire a fireball
+        if(moveUpPressed_ && (PowerUpCounter_ >= FireballPower) && fireallowed_)
+        {
+            spawnFireball();
+            fireallowed_  = false;
+            firecooldown_ = 0;
+        }
+
+        //Increase the firecooldown
+        if(firecooldown_> 0.5)
+        {
+            fireallowed_ = true;
+        }
+        if(!fireallowed_)
+        {
+            firecooldown_ += dt;
+        }
 
         //Again another EndOfLevel behavior
@@ -283,6 +380,14 @@
             velocity.x = 0;
             velocity.y = 20;
+            setOrientation(Vector3::UNIT_Z, Degree(90));
         }
         if (reachedLvlEndState_ == 4) {
+            //Highscore
+            if (Highscore::exists())
+            {
+                int score = SOBGame->getPoints();
+                bool isHighScore = Highscore::getInstance().storeScore("Super Orxo Bros.", score, this->getPlayer());
+                SOBGame->newHighscore = isHighScore;
+            }
             lvlEnded_ = true;
             dead_ = true;
@@ -307,16 +412,11 @@
         }
 
-
-
-
-    }
-
-
+    }
 
     // Reset key variables
-    moveUpPressed_ = false;
-    moveDownPressed_ = false;
-    moveLeftPressed_ = false;
-    moveRightPressed_ = false;
+    moveUpPressed_      = false;
+    moveDownPressed_    = false;
+    moveLeftPressed_    = false;
+    moveRightPressed_   = false;
 
     isColliding_ = false;
@@ -364,3 +464,34 @@
 
 
-}
+
+// PRE: name is an existing name of a material. Example orxo_material for orxo_material.material in data_extern/materials
+//      !!! PowerUpCounter_ has to be modified before changing the clothes!!!
+// POST: clothes of body of player are changed to name
+void SOBFigure::changeClothes(){
+            // clothes: white (basic), red (one PowerUp), orange (Fireball enabled)
+            std::string clothes[] = {"orxo_material", "orxo_material_gross", "orxo_material_fire"};
+
+            std::set<WorldEntity*> attachedObjects = this->getAttachedObjects();
+            std::set<WorldEntity*>::iterator it;
+            for (it = attachedObjects.begin(); it != attachedObjects.end(); ++it)
+            {
+                Model* FiguresModel = orxonox_cast<Model*>(*it);
+                if (FiguresModel != nullptr)
+                {
+                    FiguresModel->setSubMaterial(clothes[PowerUpCounter_] , 4); // 4 is the body
+                }
+            }   
+}
+// PRE:
+// POST: Player jumps out of the game, game is finished and can be restarted.
+void SOBFigure::die(){
+    Vector3 vel = getVelocity();
+    vel.y = -80;
+    vel.z = 200;
+    setVelocity(vel);
+    predead_= true; 
+    SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+    SOBGame->setDone(true);
+}
+
+}
Index: /code/trunk/src/modules/superorxobros/SOBFigure.h
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBFigure.h	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBFigure.h	(revision 11783)
@@ -46,4 +46,7 @@
             virtual void boost(bool boost) override;
             virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+            void changeClothes();
+            void spawnFireball();
+            void die();
 
             bool dead_;
@@ -54,5 +57,6 @@
 
             //Soooo many declarations
-            bool gotPowerUp_;
+            bool fireallowed_;
+
             bool moveUpPressed_;
             bool moveDownPressed_;
@@ -63,8 +67,10 @@
             float timeSinceLastFire_;
             float lastSpeed_z;
-            SOBCenterpoint* sobcenterpoint;
-            float pitch_;
+            float firecooldown_;
             bool isColliding_;
             WorldEntity* particlespawner_;
+            int PowerUpCounter_;
+            int maxPowerUp_;
+            int FireballPower;
             int sgn(float x);
             int reachedLvlEndState_;
Index: /code/trunk/src/modules/superorxobros/SOBFireball.cc
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBFireball.cc	(revision 11783)
+++ /code/trunk/src/modules/superorxobros/SOBFireball.cc	(revision 11783)
@@ -0,0 +1,191 @@
+    /*
+ *   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:
+ *      Theo von Arx
+ *      Noah Zarro
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBFireball.cc
+    @brief Fireballs are the Projectile of the Fireflower Powerup
+*/
+
+#include "SOBFireball.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "SOBFigure.h"
+#include "SOBGumba.h"
+#include "SOBGumbaBoss.h"    
+#include "SOB.h"    
+#include "util/Output.h"
+#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
+#include "graphics/ParticleSpawner.h"
+
+
+
+
+namespace orxonox
+{
+    RegisterClass(SOBFireball);
+
+    SOBFireball::SOBFireball(Context* context) : MovableEntity(context)
+    {
+        RegisterObject(SOBFireball);
+
+        setAngularFactor(0.0);
+        this->enableCollisionCallback();
+        gravityAcceleration_ = 350.0;
+
+        speed_ = 0;
+        hasCollided_=false;
+        changeAllowed_ = true;
+        changedOn_ = 0.0;
+        goesRight_ = true;
+        hitCounter_ = 0;
+        particlespawner_ = NULL ;
+
+
+
+   
+
+    }
+
+    
+
+    void SOBFireball::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SOBFireball, XMLPort, xmlelement, mode);
+        XMLPortParam(SOBFireball, "speed", setSpeed, getSpeed, xmlelement, mode);
+
+
+    }
+
+    void SOBFireball::setDirection(const bool direction)
+    {
+        if(direction)
+        {
+            goesRight_=true;
+        }
+        else
+        {
+            goesRight_=false;
+        }
+    }
+
+    
+    bool SOBFireball::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) {
+        float collDisX_ = getPosition().x - contactPoint.getPositionWorldOnB().getX();
+        float collDisZ_ = getPosition().z - contactPoint.getPositionWorldOnB().getZ();
+
+        SOBGumba*       gumba       = orxonox_cast<SOBGumba*>       (otherObject);
+        SOBGumbaBoss*   gumbaBoss   = orxonox_cast<SOBGumbaBoss*>   (otherObject);
+
+        if(gumbaBoss != nullptr && !(gumba->hasCollided_))  //Fireballs can't destroy GumbaBosses, they get destroyed themselves instead
+        {
+            this->destroyLater();
+            this->hasCollided_ = true;
+        }
+
+
+        if(gumba!=nullptr && gumbaBoss == nullptr && !(gumba->hasCollided_)) //if other object is a Gumba, kill the Gumba and add score and destroy the fireball
+        {
+            gumba->destroyLater();
+            gumba->hasCollided_ = true;
+            SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+            SOBGame->addGumba();
+            this->destroyLater();
+            this->hasCollided_ = true;
+        }
+
+
+         //collision with either top or bottom of a block
+        else if(changeAllowed_ && (abs(collDisX_)<=abs(collDisZ_)))
+        {
+            changeAllowed_ = false;
+            Vector3 velocity = getVelocity();
+            velocity.z = -velocity.z;
+     
+
+            setVelocity(velocity);
+        }
+
+        //collision with the vertical side of a block 
+        else if(changeAllowed_ && (abs(collDisX_)>abs(collDisZ_))) 
+        {
+            changeAllowed_ = false;
+            goesRight_=!goesRight_;
+        }
+
+        hitCounter_++;
+        
+        return true;
+    }
+
+
+    void SOBFireball::tick(float dt)
+    {
+        SUPER(SOBFireball, tick, dt);
+
+        //the particle spawner that generates the fire from the backpack when pressed
+        if (particlespawner_ == NULL) {
+            for (WorldEntity* object : this->getAttachedObjects())
+            {
+               if (object->isA(Class(ParticleSpawner)))
+                particlespawner_ = object;
+            }
+
+        }
+
+        if(particlespawner_ != NULL)
+            particlespawner_->setVisible(true);
+        if (!changeAllowed_) {
+            changedOn_+= dt;
+            // After a collision, we don't listen for collisions for 200ms - that's because one wall can cause several collisions!
+            if (changedOn_> 0.2) {
+                changeAllowed_ = true;
+                changedOn_ = 0.0;
+
+            }
+        
+        }
+            int dir = 1;
+            if (!goesRight_)
+                dir = -1;
+
+            Vector3 velocity = getVelocity();
+            velocity.z -= gravityAcceleration_*dt;
+            velocity.x = dir*speed_;
+            velocity.y = 0;
+            if(hitCounter_ >= 3) velocity.y = 0.1f*speed_;
+            setVelocity(velocity);
+
+            if(abs(this->getPosition().z) > 1000) this->destroyLater();
+        
+    }
+    
+
+
+}
Index: /code/trunk/src/modules/superorxobros/SOBFireball.h
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBFireball.h	(revision 11783)
+++ /code/trunk/src/modules/superorxobros/SOBFireball.h	(revision 11783)
@@ -0,0 +1,74 @@
+/*
+ *   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:
+ *      Theo von Arx
+        Noah Zarro
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBFireball.h
+    @brief Declaration of the SOBFireball class. Fireballs are the Projectile of the Fireflower Powerup
+    @ingroup SOB
+*/
+
+#ifndef _SOBFireball_H__
+#define _SOBFireball_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _SOBExport SOBFireball : public MovableEntity
+    {
+        public:
+            SOBFireball(Context* context);
+            virtual ~SOBFireball() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+            virtual void tick(float dt) override;
+            void setDirection(const bool direction);
+          
+            void setSpeed(const float speed)
+                { this->speed_ = speed; }
+            float getSpeed() const
+                { return speed_; }
+
+            bool hasCollided_;
+        protected:
+            float gravityAcceleration_;
+            float speed_;
+            bool goesRight_;
+            bool changeAllowed_;
+            float changedOn_;
+            int hitCounter_;
+            WorldEntity* particlespawner_;
+           
+    };
+}
+
+#endif /* _SOBFireball_H__ */
Index: /code/trunk/src/modules/superorxobros/SOBFlagstone.cc
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBFlagstone.cc	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBFlagstone.cc	(revision 11783)
@@ -52,5 +52,5 @@
         
         hasCollided_=false;
-        
+        points_=0;
         
     }
Index: /code/trunk/src/modules/superorxobros/SOBFlagstone.h
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBFlagstone.h	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBFlagstone.h	(revision 11783)
@@ -29,5 +29,6 @@
 /**
     @file SOBFlagstone.h
-    @brief Declaration of the SOBFlagstone class. This class is used for the flag - for everz 10x10x10 stone we added a flagstone with different points. The higher you touch the flag, the more points you get.
+    @brief Declaration of the SOBFlagstone class. 
+            This class is used for the flag - for every 10x10x10 stone we added a flagstone with different points. The higher you touch the flag, the more points you get.
     @ingroup SOB
 */
Index: /code/trunk/src/modules/superorxobros/SOBGumba.cc
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBGumba.cc	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBGumba.cc	(revision 11783)
@@ -48,7 +48,5 @@
         RegisterObject(SOBGumba);
 
-        attachedToFigure_ = false;
         setAngularFactor(0.0);
-        figure_ = nullptr;
         this->enableCollisionCallback();
         gravityAcceleration_ = 350.0;
@@ -56,8 +54,9 @@
         hasCollided_=false;
         goesRight_ = true;
-        lastPos_ = getPosition();
-        lastPos_.x -= 20;
         changeAllowed_ = true;
         changedOn_ = 0.0;
+        creator_ = nullptr;
+        maxLifetime_ = 10;
+        lifetime_ = 0;
         
     }
@@ -86,10 +85,21 @@
 
 
-    void SOBGumba::setFigure(SOBFigure* newFigure)
+    void SOBGumba::setDirection(const bool direction)
     {
-        figure_ = newFigure;
+        if(direction)
+        {
+            goesRight_=true;
+        }
+        else
+        {
+            goesRight_=false;
+        }
     }
 
-
+    void SOBGumba::die(){
+        Vector3 velocity = this->getVelocity();
+        velocity.y = speed_;
+        this->setVelocity(velocity);
+    }
 
     void SOBGumba::tick(float dt)
@@ -100,5 +110,5 @@
             changedOn_+= dt;
             // After a collision, we don't listen for collisions for 200ms - that's because one wall can cause several collisions!
-            if (changedOn_> 0.200) {
+            if (changedOn_> 0.400) {
                 changeAllowed_ = true;
                 changedOn_ = 0.0;
@@ -106,5 +116,5 @@
             }
         }
-        
+    
 
         int dir = 1;
@@ -113,11 +123,23 @@
 
         Vector3 velocity = getVelocity();
+        if(velocity.z > -1 && velocity.z < 1)
+        {
+            velocity.x = dir*speed_;
+        }      
+
         velocity.z -= gravityAcceleration_*dt;
-        velocity.x = dir*speed_;
         setVelocity(velocity);
 
-        lastPos_ = getPosition();
+        if (creator_ != nullptr)
+        {
+            lifetime_ += dt;
+            if(lifetime_>maxLifetime_)
+            {
+                
+            }
+        }
+
+        if(abs(this->getPosition().z) > 1000) this->destroyLater();
+
     }
-
-
 }
Index: /code/trunk/src/modules/superorxobros/SOBGumba.h
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBGumba.h	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBGumba.h	(revision 11783)
@@ -47,11 +47,10 @@
             SOBGumba(Context* context);
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
-            virtual void setFigure(SOBFigure* newFigure);
             virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
             virtual void tick(float dt) override;
 
+            void setDirection(const bool direction);
+            void die();
           
-            bool attachedToFigure_;
-
             void setSpeed(const float speed)
                 { this->speed_ = speed; }
@@ -60,12 +59,14 @@
 
             bool hasCollided_;
+            SOBGumbaBoss* creator_;
         protected:
             float gravityAcceleration_;
             float speed_;
-            WeakPtr<SOBFigure> figure_;
             bool goesRight_;
-            Vector3 lastPos_;
             bool changeAllowed_;
             float changedOn_;
+            float maxLifetime_;
+            float lifetime_;
+
            
     };
Index: /code/trunk/src/modules/superorxobros/SOBGumbaBoss.cc
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBGumbaBoss.cc	(revision 11783)
+++ /code/trunk/src/modules/superorxobros/SOBGumbaBoss.cc	(revision 11783)
@@ -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:
+ *      Noah Zarro
+ *      Theo von Arx
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBGumbaBoss.cc
+    @brief A Boss Gumba, which shoots small Gumbas
+**/
+
+#include "SOB.h"
+#include "SOBGumba.h"
+#include "SOBGumbaBoss.h"
+#include "SOBFireball.h"
+#include "SOBFigure.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Output.h"
+#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
+
+
+
+namespace orxonox
+{
+    RegisterClass(SOBGumbaBoss);
+
+    SOBGumbaBoss::SOBGumbaBoss(Context* context) : SOBGumba(context)
+    {
+        RegisterObject(SOBGumbaBoss);
+
+        gumbaMaxTime_   = 1;  // time after which a Gumba is shot
+        gumbaTime_      = 0;  // time since last gumba was shot
+        maxGumbas_      = 50; // Max Gumbas spawnable by a Boss
+        jumpTimeMax_    = 5;  // time after which the gumba boss jumps
+        jumpTime_       = 0;  // time since last jump of gumba boss
+        
+    }
+
+    // PRE: otherObject collides with this.
+    // POST: collision is handled: velocity changed, small gumbas murdered
+    bool SOBGumbaBoss::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) {
+
+        SOBGumba*       gumba       = orxonox_cast<SOBGumba*>(otherObject);
+        SOBGumbaBoss*   gumbaBoss   = orxonox_cast<SOBGumbaBoss*>(otherObject);
+
+        // if boss collides with small gumbas, destroy them.
+        if (gumba != nullptr && gumbaBoss == nullptr && !(gumba->hasCollided_)) {
+            gumba->die();
+        }
+
+
+        //Every object with mass -1 does not change the direction of the GumbaBoss. For example the ground floor! The other objects switch the direction of the GumbaBoss.
+        else if (changeAllowed_ && otherObject->getMass() != -1) {
+            goesRight_ = !goesRight_;
+            changeAllowed_ = false;
+        }
+
+        return true;
+    }
+
+
+
+    // POST: done what was to do in a time dt
+    void SOBGumbaBoss::tick(float dt)
+    {
+        SUPER(SOBGumbaBoss, tick, dt);
+
+        // increase timers:
+        gumbaTime_ += dt;
+        jumpTime_  += dt; 
+
+        // set y-component of position of gumba boss to 0, so he doesn't fall in to the nothing
+        Vector3 position = getPosition();
+        position.y = 0;
+        setPosition(position);
+
+
+        if (!changeAllowed_) {
+            changedOn_+= dt;
+            // After a collision, we don't listen for collisions for 200ms - that's because one wall can cause several collisions!
+            if (changedOn_> 0.200) {
+                changeAllowed_ = true;
+                changedOn_ = 0.0;
+
+            }
+        }
+    
+
+        if(gumbaTime_ > gumbaMaxTime_){ //Spawn Gumba
+            int gumbaCounter=0;
+
+            for (SOBGumba*  gumbaInstance : ObjectList<SOBGumba>())
+            {
+                if (gumbaInstance != nullptr && gumbaInstance->creator_==this)
+                {
+                    gumbaCounter++;
+                }
+            } 
+
+
+            if(gumbaCounter<maxGumbas_){    //only maxGumbas are allowed at one time per Gumbaboss
+                spawnGumba();
+                gumbaTime_ = 0;
+            }
+        }
+
+        int dir = 1;
+        if (!goesRight_)
+            dir = -1;
+
+        // 
+        if(getPosition().x < 1640)
+            dir = 1;
+        else if (getPosition().x > 1750)
+            dir = -1;
+
+        //change velocity
+        Vector3 velocity = getVelocity();
+        if(jumpTime_ > jumpTimeMax_){ // jump if the time has come.
+            velocity.z = speed_*15;
+            jumpTime_ = 0;
+        }
+        else{
+            velocity.z -= gravityAcceleration_*dt;
+        }
+        velocity.x = dir*speed_;
+        setVelocity(velocity);
+
+    }
+
+    // spawn gumbas
+    void SOBGumbaBoss::spawnGumba() {
+        SOBCenterpoint* center_ = ((SOB*)getGametype())->center_;
+
+         SOBGumba* gumba = new SOBGumba(center_->getContext());
+         Vector3 spawnpos = this->getWorldPosition();
+         gumba->creator_=this;
+
+         // we can shoot a gumba!
+        if (gumba != nullptr && center_ != nullptr)
+        {
+            gumba->addTemplate("gumbaShootable");
+            gumba->setDirection(goesRight_);
+            if(goesRight_)
+            {
+                spawnpos.x+=20;
+            }
+            else
+            {
+                spawnpos.x-=20;
+            }
+            spawnpos.z+=15;
+            gumba->setPosition(spawnpos);
+
+        }
+
+        Vector3 velocity = gumba->getVelocity();
+        velocity.x += (2*goesRight_ -1) * 100;
+        velocity.z += 200;
+        gumba->setVelocity(velocity);
+     }
+}
Index: /code/trunk/src/modules/superorxobros/SOBGumbaBoss.h
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBGumbaBoss.h	(revision 11783)
+++ /code/trunk/src/modules/superorxobros/SOBGumbaBoss.h	(revision 11783)
@@ -0,0 +1,68 @@
+/*
+ *   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:
+ *      Noah Zarro
+ *      Theo von Arx
+ *   Co-authors:
+ *      
+ *
+ */
+
+/**
+    @file SOBGumbaBoss.h
+    @brief Declaration of the SOBGumbaBoss class. GumbaBosss are the enemie mushrooms - pretty sure it's written Goomba but, naaah
+    @ingroup SOB
+*/
+
+#ifndef _SOBGumbaBoss_H__
+#define _SOBGumbaBoss_H__
+
+#include "superorxobros/SOBPrereqs.h"
+#include "worldentities/MovableEntity.h"
+
+
+namespace orxonox
+{
+    class _SOBExport SOBGumbaBoss : public SOBGumba
+    {
+        public:
+            SOBGumbaBoss(Context* context);
+            virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+            virtual void tick(float dt) override;
+
+            void spawnGumba();
+
+
+        protected:
+            float gumbaTime_;
+            float gumbaMaxTime_;
+            float jumpTimeMax_;
+            float jumpTime_;
+            int maxGumbas_;
+
+
+
+           
+    };
+}
+
+#endif /* _SOBGumbaBoss_H__ */
Index: /code/trunk/src/modules/superorxobros/SOBMushroom.cc
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBMushroom.cc	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBMushroom.cc	(revision 11783)
@@ -48,7 +48,5 @@
         RegisterObject(SOBMushroom);
 
-        attachedToFigure_ = false;
         setAngularFactor(0.0);
-        figure_ = nullptr;
         this->enableCollisionCallback();
         gravityAcceleration_ = 350.0;
@@ -56,6 +54,4 @@
         hasCollided_=false;
         goesRight_ = true;
-        lastPos_ = getPosition();
-        lastPos_.x -= 20;
         changeAllowed_ = true;
         changedOn_ = 0.0;
@@ -86,11 +82,4 @@
 
 
-    void SOBMushroom::setFigure(SOBFigure* newFigure)
-    {
-        figure_ = newFigure;
-    }
-
-
-
     void SOBMushroom::tick(float dt)
     {
@@ -104,6 +93,6 @@
                 changedOn_ = 0.0;
 
+            }
         }
-    }
         
 
@@ -116,9 +105,5 @@
         velocity.x = dir*speed_;
         setVelocity(velocity);
-
-
-    
-        lastPos_ = getPosition();
-            }
+    }
 
 
Index: /code/trunk/src/modules/superorxobros/SOBMushroom.h
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBMushroom.h	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBMushroom.h	(revision 11783)
@@ -47,11 +47,8 @@
             SOBMushroom(Context* context);
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
-            virtual void setFigure(SOBFigure* newFigure);
             virtual  bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
             virtual void tick(float dt) override;
 
           
-            bool attachedToFigure_;
-
             void setSpeed(const float speed)
                 { this->speed_ = speed; }
@@ -63,7 +60,5 @@
             float gravityAcceleration_;
             float speed_;
-            WeakPtr<SOBFigure> figure_;
             bool goesRight_;
-            Vector3 lastPos_;
             bool changeAllowed_;
             float changedOn_;
Index: /code/trunk/src/modules/superorxobros/SOBPrereqs.h
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBPrereqs.h	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBPrereqs.h	(revision 11783)
@@ -76,4 +76,5 @@
     class SOBHUDInfo;
     class SOBGumba;
+    class SOBGumbaBoss;
     class SOBFlagstone;
     class SOBCastlestone;
Index: /code/trunk/src/modules/superorxobros/SOBQBlock.cc
===================================================================
--- /code/trunk/src/modules/superorxobros/SOBQBlock.cc	(revision 11782)
+++ /code/trunk/src/modules/superorxobros/SOBQBlock.cc	(revision 11783)
@@ -39,4 +39,6 @@
 #include "SOBMushroom.h"
 #include "SOBCoin.h"
+#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
+
 
 namespace orxonox
@@ -62,5 +64,6 @@
         //If you hit the QBlock, the visibility of all attached objects get inverted! Pretty easy way to create changing blocks :)
         float v_z = otherObject->getVelocity().z;
-        if (!used_ && v_z > 50.0) {
+        float collDisZ_ = getPosition().z - contactPoint.getPositionWorldOnB().getZ();
+        if (!used_ && v_z > 50.0 && collDisZ_ > 0) {
             used_ = true;
 
Index: /code/trunk/src/orxonox/Highscore.cc
===================================================================
--- /code/trunk/src/orxonox/Highscore.cc	(revision 11782)
+++ /code/trunk/src/orxonox/Highscore.cc	(revision 11783)
@@ -82,11 +82,15 @@
     /**
      * @brief stores a new highscore in the orxonox.ini file if the new score is better than the highest score so far.
+     * @returns true if the given score marks a new high score
      */
-    void Highscore::storeScore(const std::string& level, int points, PlayerInfo* player)
+    bool Highscore::storeScore(const std::string& level, int points, PlayerInfo* player)
     {
         if (points > this->getHighestScoreOfGame(level))
         {
             ModifyConfigValue(highscores_, add, player->getName() + "./." + level + "./." + multi_cast<std::string>(points));
+            return true;
         }
+        else
+            return false;
     }
 }
Index: /code/trunk/src/orxonox/Highscore.h
===================================================================
--- /code/trunk/src/orxonox/Highscore.h	(revision 11782)
+++ /code/trunk/src/orxonox/Highscore.h	(revision 11783)
@@ -49,5 +49,5 @@
             void setConfigValues(); // Inherited function
 
-            void storeScore(const std::string& level, int points, PlayerInfo* player);
+            bool storeScore(const std::string& level, int points, PlayerInfo* player);
             int getHighestScoreOfGame(const std::string& game);
 
Index: /code/trunk/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- /code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 11782)
+++ /code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 11783)
@@ -152,5 +152,4 @@
     // overlays
     class InGameConsole;
-    class Map;
     class OrxonoxOverlay;
     class OverlayGroup;
Index: /code/trunk/src/orxonox/controllers/ArrowController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/ArrowController.cc	(revision 11783)
+++ /code/trunk/src/orxonox/controllers/ArrowController.cc	(revision 11783)
@@ -0,0 +1,135 @@
+/*
+ *   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:
+ *      jostoffe
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ArrowController.h"
+#include "HumanController.h"
+#include "worldentities/ControllableEntity.h"
+
+#include "core/CoreIncludes.h"
+#include "util/Math.h"
+
+namespace orxonox
+{
+
+    RegisterClass(ArrowController);
+
+    ArrowController::ArrowController(Context* context) : Controller(context)
+    {
+
+        RegisterObject(ArrowController);
+
+        this->currentGPSPoint_ = 0;
+        this->accuracy_ = 1000.0f;
+    }
+
+    ArrowController::~ArrowController()
+    {
+      for (WorldEntity* gpspoint : this->gpspoints_)
+        {
+            if(gpspoint)
+                gpspoint->destroy();
+        }
+
+    }
+
+    //Set the distance you need to reach before the next waypoint will be selected
+    void ArrowController::setAccuracy(float accuracy){
+      this->accuracy_ = accuracy;
+    }
+
+    float ArrowController::getAccuracy(){
+      return this->accuracy_;
+    };
+    
+    void ArrowController::addGPSPoint(WorldEntity* gpspoint)
+    {
+        this->gpspoints_.push_back(gpspoint);
+    }
+
+    WorldEntity* ArrowController::getGPSPoint(unsigned int index) const
+    {
+        if (index < this->gpspoints_.size())
+            return this->gpspoints_[index];
+        else
+            return nullptr;
+    }
+
+    void ArrowController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ArrowController, XMLPort, xmlelement, mode);
+
+        XMLPortObject(ArrowController, WorldEntity, "gpspoints", addGPSPoint, getGPSPoint,  xmlelement, mode);
+        XMLPortParam(ArrowController, "accuracy", setAccuracy, getAccuracy, xmlelement, mode);
+    }
+
+    void ArrowController::tick(float dt)
+    {
+        if (!this->isActive())
+            return;
+
+        if (this->gpspoints_.size() == 0 || !this->getControllableEntity())
+            return;
+        //Set all waypoint to invisible at the beginning  
+        if (this->currentGPSPoint_ == 0){
+          for(unsigned int i = 0; i < this->gpspoints_.size(); i++ )
+            this->gpspoints_[i]->setVisible(false);
+        }
+        //Make the arrow inivisible as soon as you reached the last Waypoint, otherwise make the next waypoint visible 
+        if(currentGPSPoint_ >= gpspoints_.size()){
+          this->getControllableEntity()->setVisible(false);
+          return;
+        }
+        else this->gpspoints_[this->currentGPSPoint_]->setVisible(true);
+
+        //Set the next waypoint as target as soon as you reached the previous one
+        if (this->gpspoints_[this->currentGPSPoint_]->getWorldPosition().squaredDistance(this->getControllableEntity()->getPosition()) <= this->accuracy_){
+            this->gpspoints_[this->currentGPSPoint_]->setVisible(false);
+            this->currentGPSPoint_ = (this->currentGPSPoint_ + 1);
+            return;
+          }
+  
+        Vector3 target = gpspoints_[currentGPSPoint_]->getWorldPosition();
+        WorldEntity::TransformSpace trans = WorldEntity::TransformSpace::World;
+
+        //Get the position and orientation of the Spaceship
+        Vector3 spaceShipPosition = HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition();
+        Quaternion spaceShipOrientation = HumanController::getLocalControllerSingleton()->getControllableEntity()->getOrientation();
+        
+        //Calculate the new arrow position
+        Vector3 ss_y = spaceShipOrientation.yAxis();
+        spaceShipPosition.x += 20 * ss_y.x;
+        spaceShipPosition.y += 20 * ss_y.y;
+        spaceShipPosition.z += 20 * ss_y.z;
+        
+        //Update Arrow position and orientation  
+        this->getControllableEntity()->setPosition(spaceShipPosition);
+        this->getControllableEntity()->lookAt(target, trans, Vector3(0,0,1));
+        
+        
+    }
+}
Index: /code/trunk/src/orxonox/controllers/ArrowController.h
===================================================================
--- /code/trunk/src/orxonox/controllers/ArrowController.h	(revision 11783)
+++ /code/trunk/src/orxonox/controllers/ArrowController.h	(revision 11783)
@@ -0,0 +1,62 @@
+/*
+ *   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:
+ *      jostoffe
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ArrowController_H__
+#define _ArrowController_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "Controller.h"
+#include "tools/interfaces/Tickable.h"
+#include "worldentities/Arrow.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport ArrowController : public Controller, public Tickable
+    {
+        public:
+            ArrowController(Context* context);
+            virtual ~ArrowController();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            
+            void addGPSPoint(WorldEntity* gpspoint);
+            WorldEntity* getGPSPoint(unsigned int index) const;
+            void setAccuracy(float accuracy);
+            float getAccuracy();
+
+            virtual void tick(float dt); //!< The controlling happens here. This method defines what the controller has to do each tick.
+
+        private:
+            std::vector<WeakPtr<WorldEntity>> gpspoints_;
+            size_t currentGPSPoint_;
+            float accuracy_;
+    };
+}
+
+#endif /* _ArrowController_H__ */
Index: /code/trunk/src/orxonox/controllers/CMakeLists.txt
===================================================================
--- /code/trunk/src/orxonox/controllers/CMakeLists.txt	(revision 11782)
+++ /code/trunk/src/orxonox/controllers/CMakeLists.txt	(revision 11783)
@@ -19,3 +19,4 @@
   FightingController.cc
   MasterController.cc
+  ArrowController.cc
 )
Index: /code/trunk/src/orxonox/controllers/DroneController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/DroneController.cc	(revision 11782)
+++ /code/trunk/src/orxonox/controllers/DroneController.cc	(revision 11783)
@@ -49,4 +49,5 @@
         RegisterObject(DroneController);
 
+        this->setTeam(0);
         this->owner_ = nullptr;
         this->drone_ = nullptr;
@@ -164,4 +165,5 @@
             }
         }
+        
         SUPER(AIController, tick, dt);
     }
Index: /code/trunk/src/orxonox/controllers/HumanController.h
===================================================================
--- /code/trunk/src/orxonox/controllers/HumanController.h	(revision 11782)
+++ /code/trunk/src/orxonox/controllers/HumanController.h	(revision 11783)
@@ -90,6 +90,4 @@
                 { return HumanController::localController_s; }
             static Pawn* getLocalControllerEntityAsPawn();
-            //friend class, for mouselook
-            friend class Map;
 
         protected:
Index: /code/trunk/src/orxonox/graphics/Model.cc
===================================================================
--- /code/trunk/src/orxonox/graphics/Model.cc	(revision 11782)
+++ /code/trunk/src/orxonox/graphics/Model.cc	(revision 11783)
@@ -155,4 +155,11 @@
         this->mesh_.setMaterial(this->materialName_);
     }
+
+    // PRE: a valid  Ogre::Entity* entity with a valid subentity at index
+    // POST: changed material of subentity at index to name
+    void Model::setSubMaterial(const std::string& name, const int index){
+        this->mesh_.setSubMaterial(name, index);
+    }
+
 
     void Model::changedShadows()
Index: /code/trunk/src/orxonox/graphics/Model.h
===================================================================
--- /code/trunk/src/orxonox/graphics/Model.h	(revision 11782)
+++ /code/trunk/src/orxonox/graphics/Model.h	(revision 11783)
@@ -86,4 +86,6 @@
                 { return this->materialName_; }
 
+            void setSubMaterial(const std::string& name, const int index);
+
         protected:
             /**
Index: /code/trunk/src/orxonox/interfaces/RadarViewable.h
===================================================================
--- /code/trunk/src/orxonox/interfaces/RadarViewable.h	(revision 11782)
+++ /code/trunk/src/orxonox/interfaces/RadarViewable.h	(revision 11783)
@@ -151,5 +151,4 @@
             return this->uniqueId_;
         }
-        //friend class Map;
 
     private:
Index: /code/trunk/src/orxonox/worldentities/Arrow.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/Arrow.cc	(revision 11783)
+++ /code/trunk/src/orxonox/worldentities/Arrow.cc	(revision 11783)
@@ -0,0 +1,42 @@
+/*
+ *   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:
+ *      jostoffe
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Arrow.h"
+
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+
+    RegisterClass(Arrow);
+
+    Arrow::Arrow(Context* context) : ControllableEntity(context)
+    {
+        RegisterObject(Arrow);
+    }
+}
Index: /code/trunk/src/orxonox/worldentities/Arrow.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/Arrow.h	(revision 11783)
+++ /code/trunk/src/orxonox/worldentities/Arrow.h	(revision 11783)
@@ -0,0 +1,49 @@
+/*
+ *   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:
+ *      jostoffe
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Arrow_H__
+#define _Arrow_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/XMLPort.h"
+
+#include "ControllableEntity.h"
+
+namespace orxonox {
+
+    class _OrxonoxExport Arrow : public ControllableEntity
+    {
+        public:
+            Arrow(Context* context);
+            virtual ~Arrow() = default;
+    };
+
+}
+
+#endif // _Arrow_H__
Index: /code/trunk/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- /code/trunk/src/orxonox/worldentities/CMakeLists.txt	(revision 11782)
+++ /code/trunk/src/orxonox/worldentities/CMakeLists.txt	(revision 11783)
@@ -13,4 +13,6 @@
   ExplosionPart.cc
   Actionpoint.cc
+  NameableStaticEntity.cc
+  Arrow.cc
 )
 
Index: /code/trunk/src/orxonox/worldentities/NameableStaticEntity.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/NameableStaticEntity.cc	(revision 11783)
+++ /code/trunk/src/orxonox/worldentities/NameableStaticEntity.cc	(revision 11783)
@@ -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:
+ *      Bolt Nikola
+ *   Co-authors:
+ *      Claudio Fanconi
+ *
+ *
+ *   Authors' Note:
+ *   The following class inherits of its superclass planet
+ *   It is meant only for the Campaign Map
+ *   This subclass of planet has the addition, that they can be labeled ingame, just like bots are in a level gameplay (As it would be nice to see which level you can play)
+ *
+ */
+
+#include "NameableStaticEntity.h"
+
+namespace orxonox
+{
+    RegisterClass(NameableStaticEntity);
+
+
+    NameableStaticEntity::NameableStaticEntity(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(NameableStaticEntity);
+    }
+
+    NameableStaticEntity::~NameableStaticEntity()
+    {
+    }
+
+    void NameableStaticEntity::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+        SUPER(NameableStaticEntity, XMLPort, xmlelement, mode);
+        XMLPortParam(NameableStaticEntity, "levelName", setLevelName, getLevelName, xmlelement, mode);
+    }
+}
Index: /code/trunk/src/orxonox/worldentities/NameableStaticEntity.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/NameableStaticEntity.h	(revision 11783)
+++ /code/trunk/src/orxonox/worldentities/NameableStaticEntity.h	(revision 11783)
@@ -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:
+ *      Bolt Nikola
+ *   Co-authors:
+ *      Claudio Fanconi
+ *
+ *   This is the header of the NameableStaticEntity.cc file
+ *   In this file we define a constructor, destructor and additional function (which is important to name a planet)
+ *
+ */
+
+#ifndef _NameableStaticEntity_H__
+#define _NameableStaticEntity_H__
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{ 
+    class _OrxonoxExport NameableStaticEntity : public StaticEntity
+    {
+        public:
+            NameableStaticEntity(Context* context);
+            virtual ~NameableStaticEntity();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+            inline void setLevelName(const std::string& levelname)
+                { this->levelName_ = levelname; }
+
+            inline const std::string& getLevelName()
+                { return this->levelName_; }
+
+        private:
+            std::string levelName_;
+    };
+}
+#endif
Index: /code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt	(revision 11782)
+++ /code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt	(revision 11783)
@@ -7,3 +7,5 @@
   TeamBaseMatchBase.cc
   Destroyer.cc
+  StoryModePawn.cc
+  ShootableObstacle.cc
 )
Index: /code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 11782)
+++ /code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 11783)
@@ -84,4 +84,5 @@
         // set damage multiplier to default value 1, meaning nominal damage
         this->damageMultiplier_ = 1;
+        this->acceptsPickups_ = true;
 
         this->spawnparticleduration_ = 3.0f;
Index: /code/trunk/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 11782)
+++ /code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 11783)
@@ -199,4 +199,9 @@
                 { return this->damageMultiplier_; }
 
+            // Some pawns can-t harvest pickups (e.g. AsteroidMinables). Checked in PickupSpawner. 
+            inline void setPickupAcceptance(bool b)
+                { this->acceptsPickups_ = b; }
+            inline bool doesAcceptPickups()
+                { return this->acceptsPickups_;}
 
             virtual void startLocalHumanControl() override;
@@ -218,5 +223,7 @@
                 { return this->weaponSystem_; }
 
-            static void consoleCommand_debugDrawWeapons(bool bDraw);
+            static void consoleCommand_debugDrawWeapons(bool bDraw); 
+
+
 
         protected:
@@ -256,4 +263,5 @@
 
             float damageMultiplier_; ///< Used by the Damage Boost Pickup.
+            bool acceptsPickups_; // Added for the asteroidMinable class, avoid that they attempt to grab the resources
 
             WeakPtr<Pawn> lastHitOriginator_;
Index: /code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.cc	(revision 11783)
+++ /code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.cc	(revision 11783)
@@ -0,0 +1,63 @@
+/*
+ *   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:
+ *      Leon Rigoni
+ *
+ */
+
+#include "ShootableObstacle.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(ShootableObstacle);
+
+    ShootableObstacle::ShootableObstacle(Context* context) : Pawn(context)
+    {
+        RegisterObject(ShootableObstacle);
+        this->enableCollisionCallback();
+    }
+
+    bool ShootableObstacle::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
+    {
+        if (GameMode::isMaster() && enableCollisionDamage_)
+        {
+            Pawn* victim = orxonox_cast<Pawn*>(otherObject);
+            if (victim)
+            {
+                float damage = this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length();
+                victim->hit(nullptr, contactPoint, ownCollisionShape, damage);
+            }
+        }
+
+        return false;
+    }
+
+    void ShootableObstacle::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ShootableObstacle, XMLPort, xmlelement, mode);
+
+        XMLPortParam(ShootableObstacle, "enablecollisiondamage", setEnableCollisionDamage, getEnableCollisionDamage, xmlelement, mode).defaultValues(false);
+        XMLPortParam(ShootableObstacle, "collisiondamage", setCollisionDamage, getCollisionDamage, xmlelement, mode).defaultValues(1);
+    }
+
+}
Index: /code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.h	(revision 11783)
+++ /code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.h	(revision 11783)
@@ -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:
+ *      Leon Rigoni
+ *
+ */
+#ifndef _ShootableObstacle_H__
+#define _ShootableObstacle_H__
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox // tolua_export
+{
+    /**
+    @brief
+        This class encapsulates a pawn (so an object with health) with the addition, that it damages other objects when it hits them.
+    */
+
+    class _OrxonoxExport ShootableObstacle
+        : public Pawn
+    {
+        public:
+            ShootableObstacle(Context* context);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
+
+            inline void setCollisionDamage(float c)
+                    { this->collisionDamage_ = c; }
+
+            inline float getCollisionDamage()
+                { return this->collisionDamage_; }
+
+            inline void setEnableCollisionDamage(bool c)
+            {
+                this->enableCollisionDamage_ = c;
+                this->enableCollisionCallback();
+            }
+
+            inline bool getEnableCollisionDamage()
+                { return this->enableCollisionDamage_; }
+
+        private:
+            float collisionDamage_;
+            bool enableCollisionDamage_;
+    };
+}
+
+#endif
Index: /code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.cc	(revision 11783)
+++ /code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.cc	(revision 11783)
@@ -0,0 +1,94 @@
+/*
+ *   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:
+ *      Nikola Bolt
+ *   Co-Author:
+ *      Claudio Fanconi
+ *
+ */
+
+/**
+    @file StoryModePawn.cc
+    @brief Implementation of the StoryModePawn control
+*/
+
+#include "StoryModePawn.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "graphics/Camera.h"
+
+#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
+
+namespace orxonox
+{
+    RegisterClass(StoryModePawn);
+
+    StoryModePawn::StoryModePawn(Context* context) : SpaceShip(context)
+    {
+        RegisterObject(StoryModePawn);
+    }
+
+    void StoryModePawn::moveFrontBack(const Vector2& value)
+        {
+            //this->getCamera()->setOrientation(Vector3::UNIT_X, Degree(-30));
+            Vector3 newPos = this->getCamera()->getPosition();
+            newPos.z -= 5*value.x;
+            this->getCamera()->setPosition(newPos);
+        }
+
+    void StoryModePawn::moveRightLeft(const Vector2& value)
+        {   
+            Vector3 newPos = this->getCamera()->getPosition();
+            newPos.x += 5*value.x;
+            this->getCamera()->setPosition(newPos);
+        }
+
+    void StoryModePawn::moveUpDown(const Vector2& value) {}
+
+    void StoryModePawn::rotateYaw(const Vector2& value) {
+
+        Pawn::rotateYaw(value);
+    }
+
+    /**
+    @brief
+        Removed, does nothing.
+    @param value
+    */
+    void StoryModePawn::rotatePitch(const Vector2& value) { }
+
+    /**
+    @brief
+        Removed, does nothing.
+    @param value
+    */
+    void StoryModePawn::rotateRoll(const Vector2& value) { }
+
+    /**
+    @brief
+        Removed, does nothing
+    @param bBoost
+    */
+    void StoryModePawn::boost(bool bBoost) { }
+}
Index: /code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.h	(revision 11783)
+++ /code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.h	(revision 11783)
@@ -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:
+ *      Claudio Fanconi & Nikola Bolt
+ *
+ */
+
+/**
+    @file StoryModePawn.h
+    @brief Declaration of the StoryModePawn class.
+*/
+
+#ifndef _StoryModePawn_H__
+#define _StoryModePawn_H__
+
+#include "worldentities/pawns/SpaceShip.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport StoryModePawn : public SpaceShip
+    {
+        public:
+            StoryModePawn(Context* context);
+
+            virtual void moveFrontBack(const Vector2& value) override;
+
+            virtual void moveRightLeft(const Vector2& value) override;
+
+            virtual void moveUpDown(const Vector2& value) override;
+
+            virtual void rotateYaw(const Vector2& value) override;
+
+            virtual void rotatePitch(const Vector2& value) override;
+
+            virtual void rotateRoll(const Vector2& value) override;
+
+            virtual void boost(bool bBoost) override;
+
+    };
+}
+
+#endif /* _StoryModePawn_H__ */
