[Orxonox-commit 7166] r11783 - in code/trunk: . data/gui/layouts data/gui/scripts data/levels data/levels/includes data/levels/templates data/overlays data/particle src/libraries/tools src/modules src/modules/dodgerace src/modules/overlays/hud src/modules/pickup src/modules/superorxobros src/modules/weapons/munitions src/modules/weapons/projectiles src/modules/weapons/weaponmodes src/orxonox src/orxonox/controllers src/orxonox/gametypes src/orxonox/graphics src/orxonox/interfaces src/orxonox/worldentities src/orxonox/worldentities/pawns

landauf at orxonox.net landauf at orxonox.net
Tue Feb 20 00:14:40 CET 2018


Author: landauf
Date: 2018-02-20 00:14:40 +0100 (Tue, 20 Feb 2018)
New Revision: 11783

Added:
   code/trunk/data/gui/layouts/Dialog.layout
   code/trunk/data/gui/scripts/Dialog.lua
   code/trunk/data/levels/ArrowLevel.oxw
   code/trunk/data/levels/AsteroidFarming.oxw
   code/trunk/data/levels/Asteroids2D.oxw
   code/trunk/data/levels/DialogShowcase.oxw
   code/trunk/data/levels/FlappyOrx.oxw
   code/trunk/data/levels/NC_StoryModeLevel.oxw
   code/trunk/data/levels/ProtectBoss.oxw
   code/trunk/data/levels/includes/asteroids2DWeapon.oxi
   code/trunk/data/levels/templates/StoryModeEscort.oxt
   code/trunk/data/levels/templates/asteroidsAsteroids2D.oxt
   code/trunk/data/levels/templates/enemyFlappyOrx.oxt
   code/trunk/data/levels/templates/spaceshipAsteroids2D.oxt
   code/trunk/data/levels/templates/spaceshipFlappyOrx.oxt
   code/trunk/data/overlays/Asteroids2DHUD.oxo
   code/trunk/data/overlays/FlappyOrxHUD.oxo
   code/trunk/data/overlays/StoryModeHUD2.oxo
   code/trunk/src/modules/asteroidmining/
   code/trunk/src/modules/asteroids2D/
   code/trunk/src/modules/dialog/
   code/trunk/src/modules/flappyorx/
   code/trunk/src/modules/overlays/hud/StoryModeHUD.cc
   code/trunk/src/modules/overlays/hud/StoryModeHUD.h
   code/trunk/src/modules/superorxobros/SOBFireball.cc
   code/trunk/src/modules/superorxobros/SOBFireball.h
   code/trunk/src/modules/superorxobros/SOBGumbaBoss.cc
   code/trunk/src/modules/superorxobros/SOBGumbaBoss.h
   code/trunk/src/orxonox/controllers/ArrowController.cc
   code/trunk/src/orxonox/controllers/ArrowController.h
   code/trunk/src/orxonox/worldentities/Arrow.cc
   code/trunk/src/orxonox/worldentities/Arrow.h
   code/trunk/src/orxonox/worldentities/NameableStaticEntity.cc
   code/trunk/src/orxonox/worldentities/NameableStaticEntity.h
   code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.cc
   code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.h
   code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.cc
   code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.h
Removed:
   code/trunk/data/gui/layouts/Dialogue.layout
   code/trunk/data/gui/scripts/Dialogue.lua
   code/trunk/data/levels/DialogueShowcase.oxw
   code/trunk/src/modules/dialogue/
   code/trunk/src/modules/superorxobros/Orxo.cc
   code/trunk/src/modules/superorxobros/Orxo.h
Modified:
   code/trunk/
   code/trunk/data/gui/layouts/HighscoreMenu.layout
   code/trunk/data/gui/scripts/HighscoreMenu.lua
   code/trunk/data/gui/scripts/TestDialogButttons.lua
   code/trunk/data/levels/Endurancefinal.oxw
   code/trunk/data/levels/MilleniumFalconTest.oxw
   code/trunk/data/levels/SOB.oxw
   code/trunk/data/levels/StoryModeMap.oxw
   code/trunk/data/levels/includes/MFalconWeapon.oxi
   code/trunk/data/levels/newnewnewspacerace.oxw
   code/trunk/data/levels/templates/MFalcon.oxt
   code/trunk/data/levels/templates/StoryMode.oxt
   code/trunk/data/levels/templates/endurancetest_template.oxt
   code/trunk/data/levels/templates/fastship.oxt
   code/trunk/data/overlays/HUDTemplates3.oxo
   code/trunk/data/overlays/HUDTemplatesFPS.oxo
   code/trunk/data/overlays/SOBHUD.oxo
   code/trunk/data/overlays/StoryModeHUD.oxo
   code/trunk/data/particle/fire3.particle
   code/trunk/src/libraries/tools/Mesh.cc
   code/trunk/src/libraries/tools/Mesh.h
   code/trunk/src/modules/CMakeLists.txt
   code/trunk/src/modules/dodgerace/DodgeRace.cc
   code/trunk/src/modules/dodgerace/DodgeRace.h
   code/trunk/src/modules/overlays/hud/CMakeLists.txt
   code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc
   code/trunk/src/modules/overlays/hud/HUDPickupSystem.h
   code/trunk/src/modules/pickup/PickupPrereqs.h
   code/trunk/src/modules/pickup/PickupSpawner.cc
   code/trunk/src/modules/pickup/PickupSpawner.h
   code/trunk/src/modules/superorxobros/CMakeLists.txt
   code/trunk/src/modules/superorxobros/SOB.cc
   code/trunk/src/modules/superorxobros/SOB.h
   code/trunk/src/modules/superorxobros/SOBCastlestone.cc
   code/trunk/src/modules/superorxobros/SOBCastlestone.h
   code/trunk/src/modules/superorxobros/SOBCenterpoint.cc
   code/trunk/src/modules/superorxobros/SOBCenterpoint.h
   code/trunk/src/modules/superorxobros/SOBCoin.cc
   code/trunk/src/modules/superorxobros/SOBCoin.h
   code/trunk/src/modules/superorxobros/SOBFigure.cc
   code/trunk/src/modules/superorxobros/SOBFigure.h
   code/trunk/src/modules/superorxobros/SOBFlagstone.cc
   code/trunk/src/modules/superorxobros/SOBFlagstone.h
   code/trunk/src/modules/superorxobros/SOBGumba.cc
   code/trunk/src/modules/superorxobros/SOBGumba.h
   code/trunk/src/modules/superorxobros/SOBHUDInfo.cc
   code/trunk/src/modules/superorxobros/SOBHUDInfo.h
   code/trunk/src/modules/superorxobros/SOBItem.cc
   code/trunk/src/modules/superorxobros/SOBItem.h
   code/trunk/src/modules/superorxobros/SOBMushroom.cc
   code/trunk/src/modules/superorxobros/SOBMushroom.h
   code/trunk/src/modules/superorxobros/SOBPrereqs.h
   code/trunk/src/modules/superorxobros/SOBQBlock.cc
   code/trunk/src/modules/superorxobros/SOBQBlock.h
   code/trunk/src/modules/weapons/munitions/FlameMunition.cc
   code/trunk/src/modules/weapons/munitions/FlameMunition.h
   code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.cc
   code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.h
   code/trunk/src/modules/weapons/weaponmodes/FlameGun.cc
   code/trunk/src/modules/weapons/weaponmodes/FlameGun.h
   code/trunk/src/orxonox/Highscore.cc
   code/trunk/src/orxonox/Highscore.h
   code/trunk/src/orxonox/OrxonoxPrereqs.h
   code/trunk/src/orxonox/controllers/CMakeLists.txt
   code/trunk/src/orxonox/controllers/DroneController.cc
   code/trunk/src/orxonox/controllers/HumanController.h
   code/trunk/src/orxonox/gametypes/StoryMode.cc
   code/trunk/src/orxonox/gametypes/StoryMode.h
   code/trunk/src/orxonox/graphics/Model.cc
   code/trunk/src/orxonox/graphics/Model.h
   code/trunk/src/orxonox/interfaces/RadarViewable.h
   code/trunk/src/orxonox/worldentities/CMakeLists.txt
   code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt
   code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
   code/trunk/src/orxonox/worldentities/pawns/Pawn.h
Log:
merged Presentation_HS17_merge back to trunk

Index: code/trunk
===================================================================
--- code/trunk	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk
___________________________________________________________________
Modified: svn:mergeinfo
## -1,16 +1,25 ##
 /code/branches/AI_HS15:10640-10832
 /code/branches/Alejandro_FS17:11369-11447
+/code/branches/AsteroidMining_HS17:11461-11729
+/code/branches/Asteroid_HS17:11456-11724
 /code/branches/BigShip_HS16:11213-11356
+/code/branches/CampaignMap_HS17:11458-11742
+/code/branches/Dialog_HS17:11455-11746
 /code/branches/Dialogue_FS17:11360-11450
+/code/branches/FlappyOrx_HS17:11460-11751
 /code/branches/HUD_HS16:11212-11390,11392-11699
 /code/branches/Highscore_HS16:11226-11355
 /code/branches/ParticleEffectsFS15:10309-10612
+/code/branches/Presentation_HS17_merge:11723-11782
+/code/branches/ProtectBoss_HS17:11457-11763
 /code/branches/Racingbot:9388-9513
+/code/branches/SOBv2_HS17:11459-11765
 /code/branches/SciptableControllerFS15:10308-10613
 /code/branches/ScriptableController:9999-10075
 /code/branches/SpaceRace_HS16:11214-11357
 /code/branches/StoryModeMap_HS16:11221-11358
 /code/branches/SuperOrxoBros_FS17:11365-11448
+/code/branches/Waypoints_HS17:11496-11773
 /code/branches/ai:6592-7033
 /code/branches/ai2:8721-8880
 /code/branches/bigships:8137-8588
Copied: code/trunk/data/gui/layouts/Dialog.layout (from rev 11782, code/branches/Presentation_HS17_merge/data/gui/layouts/Dialog.layout)
===================================================================
--- code/trunk/data/gui/layouts/Dialog.layout	                        (rev 0)
+++ code/trunk/data/gui/layouts/Dialog.layout	2018-02-19 23:14:40 UTC (rev 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>
\ No newline at end of file

Deleted: code/trunk/data/gui/layouts/Dialogue.layout
===================================================================
--- code/trunk/data/gui/layouts/Dialogue.layout	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/gui/layouts/Dialogue.layout	2018-02-19 23:14:40 UTC (rev 11783)
@@ -1,26 +0,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>
\ No newline at end of file

Index: code/trunk/data/gui/layouts/HighscoreMenu.layout
===================================================================
--- code/trunk/data/gui/layouts/HighscoreMenu.layout	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/gui/layouts/HighscoreMenu.layout	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/gui/layouts/HighscoreMenu.layout
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/data/gui/scripts/Dialog.lua (from rev 11782, code/branches/Presentation_HS17_merge/data/gui/scripts/Dialog.lua)
===================================================================
--- code/trunk/data/gui/scripts/Dialog.lua	                        (rev 0)
+++ code/trunk/data/gui/scripts/Dialog.lua	2018-02-19 23:14:40 UTC (rev 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

Deleted: code/trunk/data/gui/scripts/Dialogue.lua
===================================================================
--- code/trunk/data/gui/scripts/Dialogue.lua	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/gui/scripts/Dialogue.lua	2018-02-19 23:14:40 UTC (rev 11783)
@@ -1,144 +0,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/gui/scripts/HighscoreMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/HighscoreMenu.lua	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/gui/scripts/HighscoreMenu.lua	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/gui/scripts/HighscoreMenu.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/data/gui/scripts/TestDialogButttons.lua
===================================================================
--- code/trunk/data/gui/scripts/TestDialogButttons.lua	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/gui/scripts/TestDialogButttons.lua	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/gui/scripts/TestDialogButttons.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/data/levels/ArrowLevel.oxw (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/ArrowLevel.oxw)
===================================================================
--- code/trunk/data/levels/ArrowLevel.oxw	                        (rev 0)
+++ code/trunk/data/levels/ArrowLevel.oxw	2018-02-19 23:14:40 UTC (rev 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>
+

Copied: code/trunk/data/levels/AsteroidFarming.oxw (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/AsteroidFarming.oxw)
===================================================================
--- code/trunk/data/levels/AsteroidFarming.oxw	                        (rev 0)
+++ code/trunk/data/levels/AsteroidFarming.oxw	2018-02-19 23:14:40 UTC (rev 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>

Copied: code/trunk/data/levels/Asteroids2D.oxw (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/Asteroids2D.oxw)
===================================================================
--- code/trunk/data/levels/Asteroids2D.oxw	                        (rev 0)
+++ code/trunk/data/levels/Asteroids2D.oxw	2018-02-19 23:14:40 UTC (rev 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>
\ No newline at end of file

Copied: code/trunk/data/levels/DialogShowcase.oxw (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/DialogShowcase.oxw)
===================================================================
--- code/trunk/data/levels/DialogShowcase.oxw	                        (rev 0)
+++ code/trunk/data/levels/DialogShowcase.oxw	2018-02-19 23:14:40 UTC (rev 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>

Deleted: code/trunk/data/levels/DialogueShowcase.oxw
===================================================================
--- code/trunk/data/levels/DialogueShowcase.oxw	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/DialogueShowcase.oxw	2018-02-19 23:14:40 UTC (rev 11783)
@@ -1,79 +0,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/Endurancefinal.oxw
===================================================================
--- code/trunk/data/levels/Endurancefinal.oxw	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/Endurancefinal.oxw	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/levels/Endurancefinal.oxw
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/data/levels/FlappyOrx.oxw (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/FlappyOrx.oxw)
===================================================================
--- code/trunk/data/levels/FlappyOrx.oxw	                        (rev 0)
+++ code/trunk/data/levels/FlappyOrx.oxw	2018-02-19 23:14:40 UTC (rev 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/MilleniumFalconTest.oxw
===================================================================
--- code/trunk/data/levels/MilleniumFalconTest.oxw	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/MilleniumFalconTest.oxw	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/levels/MilleniumFalconTest.oxw
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/data/levels/NC_StoryModeLevel.oxw (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/NC_StoryModeLevel.oxw)
===================================================================
--- code/trunk/data/levels/NC_StoryModeLevel.oxw	                        (rev 0)
+++ code/trunk/data/levels/NC_StoryModeLevel.oxw	2018-02-19 23:14:40 UTC (rev 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>
+

Copied: code/trunk/data/levels/ProtectBoss.oxw (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/ProtectBoss.oxw)
===================================================================
--- code/trunk/data/levels/ProtectBoss.oxw	                        (rev 0)
+++ code/trunk/data/levels/ProtectBoss.oxw	2018-02-19 23:14:40 UTC (rev 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>
+

Modified: code/trunk/data/levels/SOB.oxw
===================================================================
--- code/trunk/data/levels/SOB.oxw	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/SOB.oxw	2018-02-19 23:14:40 UTC (rev 11783)
@@ -6,8 +6,6 @@
 	/>
 
 	<?lua
-	include("HUDTemplates3.oxo")  
-	include("jumpHUD.oxo")
 	include("stats.oxo")
 	include("templates/lodInformation.oxt")
 	include("overlays/SOBHUD.oxo")
@@ -14,6 +12,7 @@
 	?>
 
 
+
 	<Template name=mushroom defaults=0>
 		<SOBMushroom collisionType="dynamic" speed=30>
 			<attached>
@@ -47,7 +46,6 @@
 
 
 
-
 	<Template name=sobFigureTemplate>
 		<SOBFigure camerapositiontemplate=sobfigurecameras collisionType="dynamic" position="0,0,30">
 			<attached>
@@ -56,13 +54,40 @@
 			</attached>
 
 			<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
 		plugins = "superorxobros"
 		gametype = "SOB"
@@ -94,8 +119,11 @@
 			</MovableEntity>
 
 
-					<!--Gumba-->
 
+
+
+
+
 					<SOBGumba collisionType="dynamic" speed=40 position = "240,0,0">
 						<attached>
 							<Model mesh="Goomba.mesh" position="0,0,1" scale=3 pitch=90/> 
@@ -105,6 +133,7 @@
 							<BoxCollisionShape position="0,0,0" halfExtents="5,5,3" /> 			
 						</collisionShapes>
 					</SOBGumba>
+
 					<SOBGumba collisionType="dynamic" speed=30 position = "420,0,0">
 						<attached>
 							<Model mesh="Goomba.mesh" position="0,0,21" scale=3 pitch=90/> 
@@ -192,27 +221,18 @@
 						</collisionShapes>
 					</SOBGumba>
 
-					<SOBGumba collisionType="dynamic" speed=30 position = "1750,0,0">
+					<!--GumbaBoss-->
+					<SOBGumbaBoss collisionType="dynamic" speed=20 position = "1750,0,0">
 						<attached>
-							<Model mesh="Goomba.mesh" position="0,0,21" scale=3 pitch=90/> 
+							<Model mesh="Goomba.mesh" position="0,0,21" scale=6 pitch=90/> 
 							
 						</attached>
 						<collisionShapes>
-							<BoxCollisionShape position="0,0,20" halfExtents="5,5,3" /> 			
+							<BoxCollisionShape position="0,0,20" halfExtents="10,10,6" /> 			
 						</collisionShapes>
-					</SOBGumba>
+					</SOBGumbaBoss>
+x	
 
-					<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>
-
-
 					<!--CollisionShape for Gumba-->
 					<StaticEntity collisionType="static">
 						<collisionShapes>
@@ -226,11 +246,6 @@
 					</StaticEntity>
 
 
-
-					
-
-
-
 					<!-- Boden 1 -->
 					<Model mesh="Cube2.12.mesh" position="0,0,-30" scale=10 Pitch=90/> 					<!-- B1.1 -->
 					<Model mesh="Cube2.12.mesh" position="120,0,-30" scale=10 Pitch=90/> 				<!-- B1.2-->
@@ -580,25 +595,10 @@
 
 
 
-					<!-- 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 -->
 
@@ -605,7 +605,7 @@
 
 
 
-					<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 -->
 					<Model mesh="Fundament.mesh" position="1990,0,-10" scale=10 yaw=180/>					<!-- L4.9 -->
@@ -681,19 +681,6 @@
 
 
 
-
-					<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>
-
-
 					<StaticEntity collisionType="static">
 						<collisionShapes>
 


Property changes on: code/trunk/data/levels/SOB.oxw
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/data/levels/StoryModeMap.oxw
===================================================================
--- code/trunk/data/levels/StoryModeMap.oxw	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/StoryModeMap.oxw	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/levels/StoryModeMap.oxw
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/data/levels/includes/MFalconWeapon.oxi
===================================================================
--- code/trunk/data/levels/includes/MFalconWeapon.oxi	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/includes/MFalconWeapon.oxi	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/levels/includes/MFalconWeapon.oxi
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/data/levels/includes/asteroids2DWeapon.oxi (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/includes/asteroids2DWeapon.oxi)
===================================================================
--- code/trunk/data/levels/includes/asteroids2DWeapon.oxi	                        (rev 0)
+++ code/trunk/data/levels/includes/asteroids2DWeapon.oxi	2018-02-19 23:14:40 UTC (rev 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/newnewnewspacerace.oxw
===================================================================
--- code/trunk/data/levels/newnewnewspacerace.oxw	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/newnewnewspacerace.oxw	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/levels/newnewnewspacerace.oxw
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/data/levels/templates/MFalcon.oxt
===================================================================
--- code/trunk/data/levels/templates/MFalcon.oxt	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/templates/MFalcon.oxt	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/levels/templates/MFalcon.oxt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/data/levels/templates/StoryMode.oxt
===================================================================
--- code/trunk/data/levels/templates/StoryMode.oxt	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/templates/StoryMode.oxt	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/levels/templates/StoryMode.oxt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/data/levels/templates/StoryModeEscort.oxt (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/templates/StoryModeEscort.oxt)
===================================================================
--- code/trunk/data/levels/templates/StoryModeEscort.oxt	                        (rev 0)
+++ code/trunk/data/levels/templates/StoryModeEscort.oxt	2018-02-19 23:14:40 UTC (rev 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>

Copied: code/trunk/data/levels/templates/asteroidsAsteroids2D.oxt (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/templates/asteroidsAsteroids2D.oxt)
===================================================================
--- code/trunk/data/levels/templates/asteroidsAsteroids2D.oxt	                        (rev 0)
+++ code/trunk/data/levels/templates/asteroidsAsteroids2D.oxt	2018-02-19 23:14:40 UTC (rev 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>
\ No newline at end of file

Index: code/trunk/data/levels/templates/endurancetest_template.oxt
===================================================================
--- code/trunk/data/levels/templates/endurancetest_template.oxt	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/templates/endurancetest_template.oxt	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/levels/templates/endurancetest_template.oxt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/data/levels/templates/enemyFlappyOrx.oxt (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/templates/enemyFlappyOrx.oxt)
===================================================================
--- code/trunk/data/levels/templates/enemyFlappyOrx.oxt	                        (rev 0)
+++ code/trunk/data/levels/templates/enemyFlappyOrx.oxt	2018-02-19 23:14:40 UTC (rev 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/fastship.oxt
===================================================================
--- code/trunk/data/levels/templates/fastship.oxt	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/levels/templates/fastship.oxt	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/levels/templates/fastship.oxt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/data/levels/templates/spaceshipAsteroids2D.oxt (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/templates/spaceshipAsteroids2D.oxt)
===================================================================
--- code/trunk/data/levels/templates/spaceshipAsteroids2D.oxt	                        (rev 0)
+++ code/trunk/data/levels/templates/spaceshipAsteroids2D.oxt	2018-02-19 23:14:40 UTC (rev 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>
\ No newline at end of file

Copied: code/trunk/data/levels/templates/spaceshipFlappyOrx.oxt (from rev 11782, code/branches/Presentation_HS17_merge/data/levels/templates/spaceshipFlappyOrx.oxt)
===================================================================
--- code/trunk/data/levels/templates/spaceshipFlappyOrx.oxt	                        (rev 0)
+++ code/trunk/data/levels/templates/spaceshipFlappyOrx.oxt	2018-02-19 23:14:40 UTC (rev 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>
+

Copied: code/trunk/data/overlays/Asteroids2DHUD.oxo (from rev 11782, code/branches/Presentation_HS17_merge/data/overlays/Asteroids2DHUD.oxo)
===================================================================
--- code/trunk/data/overlays/Asteroids2DHUD.oxo	                        (rev 0)
+++ code/trunk/data/overlays/Asteroids2DHUD.oxo	2018-02-19 23:14:40 UTC (rev 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>
\ No newline at end of file

Copied: code/trunk/data/overlays/FlappyOrxHUD.oxo (from rev 11782, code/branches/Presentation_HS17_merge/data/overlays/FlappyOrxHUD.oxo)
===================================================================
--- code/trunk/data/overlays/FlappyOrxHUD.oxo	                        (rev 0)
+++ code/trunk/data/overlays/FlappyOrxHUD.oxo	2018-02-19 23:14:40 UTC (rev 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>

Modified: code/trunk/data/overlays/HUDTemplates3.oxo
===================================================================
--- code/trunk/data/overlays/HUDTemplates3.oxo	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/overlays/HUDTemplates3.oxo	2018-02-19 23:14:40 UTC (rev 11783)
@@ -46,8 +46,8 @@
 
 <Template name="spaceshiphud">
   <OverlayGroup name = "spaceshiphud" scale = "1, 1">
-    <Map />
 
+
     <HUDHealthBar
      name              = "HealthBar1"
      background        = "Orxonox/HealthBarBackground"
@@ -216,8 +216,8 @@
     />
 
     <GUIOverlay
-      name = "Dialogue"
-      guiname = "Dialogue"
+      name = "Dialog"
+      guiname = "Dialog"
       visible = "false"
     />
 

Modified: code/trunk/data/overlays/HUDTemplatesFPS.oxo
===================================================================
--- code/trunk/data/overlays/HUDTemplatesFPS.oxo	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/overlays/HUDTemplatesFPS.oxo	2018-02-19 23:14:40 UTC (rev 11783)
@@ -1,7 +1,5 @@
 <Template name="fpshud">
   <OverlayGroup name = "fpshud" scale = "1, 1">
-    <Map />
-
     <HUDHealthBar
      name              = "HealthBar1"
      background        = "Orxonox/HealthBarBackground"

Index: code/trunk/data/overlays/SOBHUD.oxo
===================================================================
--- code/trunk/data/overlays/SOBHUD.oxo	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/overlays/SOBHUD.oxo	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/data/overlays/SOBHUD.oxo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/data/overlays/StoryModeHUD.oxo
===================================================================
--- code/trunk/data/overlays/StoryModeHUD.oxo	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/overlays/StoryModeHUD.oxo	2018-02-19 23:14:40 UTC (rev 11783)
@@ -1,9 +1,7 @@
 
 <Template name="StoryModeMap">
   <OverlayGroup name = "spaceshiphud" scale = "1, 1">
-    <Map />
 
-
      <GUIOverlay
       name = "CampaignMenu"
       guiname = "CampaignMenu"


Property changes on: code/trunk/data/overlays/StoryModeHUD.oxo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/data/overlays/StoryModeHUD2.oxo (from rev 11782, code/branches/Presentation_HS17_merge/data/overlays/StoryModeHUD2.oxo)
===================================================================
--- code/trunk/data/overlays/StoryModeHUD2.oxo	                        (rev 0)
+++ code/trunk/data/overlays/StoryModeHUD2.oxo	2018-02-19 23:14:40 UTC (rev 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>

Modified: code/trunk/data/particle/fire3.particle
===================================================================
--- code/trunk/data/particle/fire3.particle	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/data/particle/fire3.particle	2018-02-19 23:14:40 UTC (rev 11783)
@@ -64,9 +64,6 @@
 		time2	0.4
 		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
+		
 	}
 }

Modified: code/trunk/src/libraries/tools/Mesh.cc
===================================================================
--- code/trunk/src/libraries/tools/Mesh.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/libraries/tools/Mesh.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -99,6 +99,17 @@
             this->entity_->setMaterialName(name);
     }
 
+    // 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
     {
         if (this->entity_)

Modified: code/trunk/src/libraries/tools/Mesh.h
===================================================================
--- code/trunk/src/libraries/tools/Mesh.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/libraries/tools/Mesh.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -50,6 +50,8 @@
             void setMaterial(const std::string& name);
             const std::string& getMaterial() const;
 
+            void setSubMaterial(const std::string& name, const int index);
+
             void setVisible(bool bVisible);
             bool isVisible() const;
 

Modified: code/trunk/src/modules/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/CMakeLists.txt	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/CMakeLists.txt	2018-02-19 23:14:40 UTC (rev 11783)
@@ -25,7 +25,8 @@
 
 ################ Sub Directories ################
 
-ADD_SUBDIRECTORY(dialogue)
+ADD_SUBDIRECTORY(asteroidmining)
+ADD_SUBDIRECTORY(dialog)
 ADD_SUBDIRECTORY(designtools)
 ADD_SUBDIRECTORY(gametypes)
 ADD_SUBDIRECTORY(notifications)
@@ -45,3 +46,5 @@
 ADD_SUBDIRECTORY(dodgerace)
 ADD_SUBDIRECTORY(hover)
 ADD_SUBDIRECTORY(superorxobros)
+ADD_SUBDIRECTORY(asteroids2D)
+ADD_SUBDIRECTORY(flappyorx)

Modified: code/trunk/src/modules/dodgerace/DodgeRace.cc
===================================================================
--- code/trunk/src/modules/dodgerace/DodgeRace.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/dodgerace/DodgeRace.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -36,6 +36,7 @@
 #include "DodgeRaceCube.h"
 #include "core/CoreIncludes.h"
 #include "Highscore.h"
+#include "infos/PlayerInfo.h"
 
 namespace orxonox
 {
@@ -89,13 +90,14 @@
 
     void DodgeRace::tick(float dt)
     {
-        if (getPlayer() != nullptr)
+        DodgeRaceShip* player = this->getPlayer();
+        if (player != nullptr)
         {
-            currentPosition = getPlayer()->getWorldPosition().x;
+            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++)
             {
@@ -122,7 +124,7 @@
 
                     }
 
-                    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);
                 }
 
@@ -138,14 +140,11 @@
 
     DodgeRaceShip* DodgeRace::getPlayer()
     {
-        if (player == nullptr)
+        for (DodgeRaceShip* ship : ObjectList<DodgeRaceShip>())
         {
-            for (DodgeRaceShip* ship : ObjectList<DodgeRaceShip>())
-            {
-                player = ship;
-            }
+            return ship;
         }
-        return player;
+        return nullptr;
     }
 
     void DodgeRace::costLife()
@@ -189,6 +188,7 @@
 
     void DodgeRace::playerPreSpawn(PlayerInfo* player)
     {
+        this->playerInfo_ = player;
         if(lives <= 0)
         {
             this->end();
@@ -227,7 +227,7 @@
         if (Highscore::exists())
         {
             int score = this->getPoints();
-            Highscore::getInstance().storeScore("Dodge Race", score, this->getPlayer()->getPlayer());
+            Highscore::getInstance().storeScore("Dodge Race", score, this->playerInfo_);
         }
         GSLevel::startMainMenu();
     }

Modified: code/trunk/src/modules/dodgerace/DodgeRace.h
===================================================================
--- code/trunk/src/modules/dodgerace/DodgeRace.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/dodgerace/DodgeRace.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -102,7 +102,7 @@
             Timer endGameTimer;
 
             DodgeRaceShip* getPlayer();
-            WeakPtr<DodgeRaceShip> player;
+            WeakPtr<PlayerInfo> playerInfo_;
             std::vector<DodgeRaceCube*> cubeList;
             void toggleShowLevel(){bShowLevel = !bShowLevel;}
             void addPoints(int numPoints);

Modified: code/trunk/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/overlays/hud/CMakeLists.txt	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/overlays/hud/CMakeLists.txt	2018-02-19 23:14:40 UTC (rev 11783)
@@ -25,4 +25,5 @@
   PauseNotice.cc
   LastTeamStandingInfos.cc
   CountDown.cc
+  StoryModeHUD.cc
 )

Index: code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/overlays/hud/HUDPickupSystem.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/overlays/hud/HUDPickupSystem.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDPickupSystem.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/overlays/hud/HUDPickupSystem.h	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/overlays/hud/HUDPickupSystem.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/src/modules/overlays/hud/StoryModeHUD.cc (from rev 11782, code/branches/Presentation_HS17_merge/src/modules/overlays/hud/StoryModeHUD.cc)
===================================================================
--- code/trunk/src/modules/overlays/hud/StoryModeHUD.cc	                        (rev 0)
+++ code/trunk/src/modules/overlays/hud/StoryModeHUD.cc	2018-02-19 23:14:40 UTC (rev 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();
+            }
+        }
+    }
+}

Copied: code/trunk/src/modules/overlays/hud/StoryModeHUD.h (from rev 11782, code/branches/Presentation_HS17_merge/src/modules/overlays/hud/StoryModeHUD.h)
===================================================================
--- code/trunk/src/modules/overlays/hud/StoryModeHUD.h	                        (rev 0)
+++ code/trunk/src/modules/overlays/hud/StoryModeHUD.h	2018-02-19 23:14:40 UTC (rev 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__ */

Modified: code/trunk/src/modules/pickup/PickupPrereqs.h
===================================================================
--- code/trunk/src/modules/pickup/PickupPrereqs.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/pickup/PickupPrereqs.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -71,7 +71,7 @@
     class CollectiblePickup;
     class Pickup;
     class PickupCollection;
-    class PickupInventoryContainer;
+    struct PickupInventoryContainer;
     class PickupManager;
     class PickupRepresentation;
     class PickupSpawner;

Modified: code/trunk/src/modules/pickup/PickupSpawner.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupSpawner.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/pickup/PickupSpawner.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -157,6 +157,8 @@
             // Iterate trough all Pawns.
             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);
                 // If a PickupCarrier, that fits the target-range of the Pickupable spawned by this PickupSpawner, is in trigger-distance and the carrier is not blocked.

Modified: code/trunk/src/modules/pickup/PickupSpawner.h
===================================================================
--- code/trunk/src/modules/pickup/PickupSpawner.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/pickup/PickupSpawner.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -91,6 +91,12 @@
             inline float getTriggerDistance() const
                 { 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.
             */
@@ -97,11 +103,19 @@
             inline float getRespawnTime() const
                 { 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.
             */
             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,6 +127,9 @@
             inline Template* getPickupTemplate() const
                 {return this->pickupTemplate_; }
 
+            void setPickupTemplateName(const std::string& name);
+            void setPickupTemplate(Template* temp);
+
         private:
             void initialize(void);
 
@@ -130,24 +147,6 @@
             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.
             void setPickupable(Pickupable* pickup); //!< Sets a Pickupable for the PickupSpawner to spawn.
 

Modified: code/trunk/src/modules/superorxobros/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/superorxobros/CMakeLists.txt	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/CMakeLists.txt	2018-02-19 23:14:40 UTC (rev 11783)
@@ -8,9 +8,11 @@
   SOBMushroom.cc
   SOBHUDInfo.cc
   SOBGumba.cc
+  SOBFireball.cc
   SOBFlagstone.cc
   SOBCastlestone.cc
   SOBCoin.cc
+  SOBGumbaBoss.cc
 
 )
 


Property changes on: code/trunk/src/modules/superorxobros/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: code/trunk/src/modules/superorxobros/Orxo.cc
===================================================================
--- code/trunk/src/modules/superorxobros/Orxo.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/Orxo.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -1,196 +0,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();
-    }
-}

Deleted: code/trunk/src/modules/superorxobros/Orxo.h
===================================================================
--- code/trunk/src/modules/superorxobros/Orxo.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/Orxo.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -1,95 +0,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__ */

Modified: code/trunk/src/modules/superorxobros/SOB.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOB.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOB.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -43,12 +43,13 @@
 #include "SOBCenterpoint.h"
 #include "SOBFigure.h"
 #include "graphics/Camera.h"
+#include "Highscore.h"
 
 
 
 namespace orxonox
 {
-
+    bool newHighscore=0;
     RegisterUnloadableClass(SOB);
 
     /**
@@ -58,7 +59,6 @@
     SOB::SOB(Context* context) : Deathmatch(context)
     {
         RegisterObject(SOB);
-        camera = nullptr;
 
         this->center_ = nullptr;
         figure_ = nullptr;
@@ -67,6 +67,7 @@
         points_=0;
         timeLeft_=400.0;
         done_ = true;
+        newHighscore = false;
         lvl_ = 1;
 
     }
@@ -77,17 +78,8 @@
     */
     SOB::~SOB()
     {
-        if (this->isInitialized())
-            this->cleanup();
     }
 
-    void SOB::cleanup()
-    {
-        camera = nullptr;
-    }
-
-
-
     void SOB::start()
     {
         if (center_ != nullptr) // There needs to be a SOBCenterpoint, i.e. the area the game takes place.
@@ -98,7 +90,6 @@
                 figure_->addTemplate(center_->getFigureTemplate());
             }
 
-            center_->attach(figure_);
             figure_->setPosition(0, 0, 0);
         }
         else // If no centerpoint was specified, an error is thrown and the level is exited.
@@ -111,23 +102,15 @@
         // Call start for the parent class.
         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();
         Game::getInstance().popState();
@@ -166,7 +149,12 @@
         //If player has reached end of level
         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();
 
         //If player has died
@@ -180,7 +168,7 @@
             this->figure_->dead_ = true;
         //The time on the HUD
         if (!done_)
-            timeLeft_-=dt*2.5;
+            timeLeft_-=dt*2.5f;
     }
 
 


Property changes on: code/trunk/src/modules/superorxobros/SOB.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOB.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOB.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOB.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -75,11 +75,14 @@
             void addGumba() {
                 points_+=100;
             }
+            void addGumbaBoss() {
+                points_+=5000;
+            }
             void addPoints(int poi) {
                 points_+=poi;
             }
             int getTimeLeft() {
-                return timeLeft_;
+                return (int) timeLeft_;
             }
             std::string getInfoText() {
                 return info_;
@@ -102,13 +105,12 @@
             }  
 
             WeakPtr<SOBCenterpoint> center_;
+            bool newHighscore;
 
         protected:
 
 
-            void cleanup(); //!< Cleans up the Gametype 
             WeakPtr<SOBFigure> figure_;
-            WeakPtr<Camera> camera;
             int points_;
             int coins_;
             float timeLeft_;


Property changes on: code/trunk/src/modules/superorxobros/SOB.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/superorxobros/SOBCastlestone.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOBCastlestone.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBCastlestone.cc	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/superorxobros/SOBCastlestone.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/superorxobros/SOBCastlestone.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBCastlestone.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBCastlestone.h	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/superorxobros/SOBCastlestone.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/superorxobros/SOBCenterpoint.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOBCenterpoint.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBCenterpoint.cc	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/superorxobros/SOBCenterpoint.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/superorxobros/SOBCenterpoint.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBCenterpoint.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBCenterpoint.h	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/superorxobros/SOBCenterpoint.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBCoin.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOBCoin.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBCoin.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -48,6 +48,8 @@
         RegisterObject(SOBCoin);
         setAngularFactor(0.0);
 
+        speed_ = 0;
+        lifetime_ = 0;
     }
 
     
@@ -66,7 +68,7 @@
 
         lifetime_-=dt;
 
-        if (lifetime_ <+ 0) {
+        if (lifetime_ < 0) {
             destroyLater();
         }
 


Property changes on: code/trunk/src/modules/superorxobros/SOBCoin.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBCoin.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBCoin.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBCoin.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -49,8 +49,6 @@
         virtual void tick(float dt) override;
 
 
-        bool attachedToFigure_;
-
         void setLifetime(const float lt)
         { this->lifetime_ = lt; }
         float getLifetime() const


Property changes on: code/trunk/src/modules/superorxobros/SOBCoin.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBFigure.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOBFigure.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBFigure.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -22,6 +22,8 @@
  *   Author:
  *      Julien Kindle
  *   Co-authors:
+ *      Noah Zarro
+ *      Theo von Arx
  *      
  *
  */
@@ -38,12 +40,17 @@
 #include "graphics/Model.h"
 #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>
 
 namespace orxonox
@@ -58,29 +65,37 @@
         gravityAcceleration_ = 350.0;
 
         //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;
+
         
         setAngularFactor(0.0); //Means player doesn't turn on collision, so he doesn't fall over while walking over the ground
         this->enableCollisionCallback(); // Turns on that on every collision function collidesAgainst is executed
@@ -96,47 +111,83 @@
 
 
         //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);
+        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
+
+        //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
     if (reachedLvlEndState_ == 0 && flagstone != nullptr && !(flagstone->hasCollided_)) {
         flagstone->hasCollided_ = true;
         reachedLvlEndState_ = 1;
-        SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+
         SOBGame->setDone(true);
         SOBGame->addPoints(flagstone->getPoints());
         
@@ -158,6 +209,32 @@
     return 1;
 }
 
+//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)
 {
@@ -165,6 +242,7 @@
 
 
     bool inputAllowed = true;
+    //SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
 
     //the particle spawner that generates the fire from the backpack when pressed
     if (particlespawner_ == NULL) {
@@ -173,7 +251,9 @@
            if (object->isA(Class(ParticleSpawner)))
             particlespawner_ = object;
         }
+
     }
+    
 
 
     //Behavior on level end - this is like described above for the movement from the player when hit the flag. He moves then into the castle
@@ -189,10 +269,10 @@
 
     //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;
     }
 
     //set the gravityto standard 350
@@ -203,6 +283,7 @@
 
     if (hasLocalController())
     {
+        SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
         Vector3 velocity = getVelocity();
         Vector3 position = getPosition();
 
@@ -211,7 +292,6 @@
         //If player falls in a hole
         if (position.z < -100) {
             dead_ = true;
-            SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
             SOBGame->setDone(true);
         }
 
@@ -220,7 +300,7 @@
             velocity.x = 0;
             velocity.z = 0;
             setVelocity(velocity);
-            SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
+           
             if (firePressed_)
                 SOBGame->restart();
             return;
@@ -241,12 +321,12 @@
             particlespawner_->setVisible(true); 
         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; 
         }
 
 
@@ -273,7 +353,24 @@
             velocity.x /= 1.1;
         }
 
+        //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
         if (reachedLvlEndState_ == 1)
             velocity.x = -2;
@@ -282,8 +379,16 @@
         if (reachedLvlEndState_ == 3) {
             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;
         }
@@ -306,18 +411,13 @@
             cam->setPosition(campos);
         }
 
-
-
-
     }
 
-
-
     // Reset key variables
-    moveUpPressed_ = false;
-    moveDownPressed_ = false;
-    moveLeftPressed_ = false;
-    moveRightPressed_ = false;
+    moveUpPressed_      = false;
+    moveDownPressed_    = false;
+    moveLeftPressed_    = false;
+    moveRightPressed_   = false;
 
     isColliding_ = false;
     collDisZ_ = 0;
@@ -363,4 +463,35 @@
 }
 
 
+
+// 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);
+}
+
+}


Property changes on: code/trunk/src/modules/superorxobros/SOBFigure.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBFigure.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBFigure.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBFigure.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -45,6 +45,9 @@
             virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the figure up and down.
             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_;
             bool predead_;
@@ -53,7 +56,8 @@
         private:
 
             //Soooo many declarations
-            bool gotPowerUp_;
+            bool fireallowed_;
+
             bool moveUpPressed_;
             bool moveDownPressed_;
             bool moveLeftPressed_;
@@ -62,10 +66,12 @@
             float gravityAcceleration_;
             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_;
             float timeCounter_;


Property changes on: code/trunk/src/modules/superorxobros/SOBFigure.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/src/modules/superorxobros/SOBFireball.cc (from rev 11782, code/branches/Presentation_HS17_merge/src/modules/superorxobros/SOBFireball.cc)
===================================================================
--- code/trunk/src/modules/superorxobros/SOBFireball.cc	                        (rev 0)
+++ code/trunk/src/modules/superorxobros/SOBFireball.cc	2018-02-19 23:14:40 UTC (rev 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();
+        
+    }
+    
+
+
+}

Copied: code/trunk/src/modules/superorxobros/SOBFireball.h (from rev 11782, code/branches/Presentation_HS17_merge/src/modules/superorxobros/SOBFireball.h)
===================================================================
--- code/trunk/src/modules/superorxobros/SOBFireball.h	                        (rev 0)
+++ code/trunk/src/modules/superorxobros/SOBFireball.h	2018-02-19 23:14:40 UTC (rev 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__ */

Modified: code/trunk/src/modules/superorxobros/SOBFlagstone.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOBFlagstone.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBFlagstone.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -51,8 +51,8 @@
         this->enableCollisionCallback();
         
         hasCollided_=false;
+        points_=0;
         
-        
     }
 
     


Property changes on: code/trunk/src/modules/superorxobros/SOBFlagstone.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBFlagstone.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBFlagstone.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBFlagstone.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -28,7 +28,8 @@
 
 /**
     @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
 */
 


Property changes on: code/trunk/src/modules/superorxobros/SOBFlagstone.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBGumba.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOBGumba.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBGumba.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -47,18 +47,17 @@
     {
         RegisterObject(SOBGumba);
 
-        attachedToFigure_ = false;
         setAngularFactor(0.0);
-        figure_ = nullptr;
         this->enableCollisionCallback();
         gravityAcceleration_ = 350.0;
         speed_ = 0.0;
         hasCollided_=false;
         goesRight_ = true;
-        lastPos_ = getPosition();
-        lastPos_.x -= 20;
         changeAllowed_ = true;
         changedOn_ = 0.0;
+        creator_ = nullptr;
+        maxLifetime_ = 10;
+        lifetime_ = 0;
         
     }
 
@@ -85,13 +84,24 @@
     }
 
 
-    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)
     {
         SUPER(SOBGumba, tick, dt);
@@ -99,13 +109,13 @@
         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) {
+            if (changedOn_> 0.400) {
                 changeAllowed_ = true;
                 changedOn_ = 0.0;
 
             }
         }
-        
+    
 
         int dir = 1;
         if (!goesRight_)
@@ -112,12 +122,24 @@
             dir = -1;
 
         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();
 
+    }
 }


Property changes on: code/trunk/src/modules/superorxobros/SOBGumba.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBGumba.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBGumba.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBGumba.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -46,13 +46,12 @@
         public:
             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; }
             float getSpeed() const
@@ -59,14 +58,16 @@
                 { return speed_; }
 
             bool hasCollided_;
+            SOBGumbaBoss* creator_;
         protected:
             float gravityAcceleration_;
             float speed_;
-            WeakPtr<SOBFigure> figure_;
             bool goesRight_;
-            Vector3 lastPos_;
             bool changeAllowed_;
             float changedOn_;
+            float maxLifetime_;
+            float lifetime_;
+
            
     };
 }


Property changes on: code/trunk/src/modules/superorxobros/SOBGumba.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Copied: code/trunk/src/modules/superorxobros/SOBGumbaBoss.cc (from rev 11782, code/branches/Presentation_HS17_merge/src/modules/superorxobros/SOBGumbaBoss.cc)
===================================================================
--- code/trunk/src/modules/superorxobros/SOBGumbaBoss.cc	                        (rev 0)
+++ code/trunk/src/modules/superorxobros/SOBGumbaBoss.cc	2018-02-19 23:14:40 UTC (rev 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);
+     }
+}

Copied: code/trunk/src/modules/superorxobros/SOBGumbaBoss.h (from rev 11782, code/branches/Presentation_HS17_merge/src/modules/superorxobros/SOBGumbaBoss.h)
===================================================================
--- code/trunk/src/modules/superorxobros/SOBGumbaBoss.h	                        (rev 0)
+++ code/trunk/src/modules/superorxobros/SOBGumbaBoss.h	2018-02-19 23:14:40 UTC (rev 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/SOBHUDInfo.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOBHUDInfo.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBHUDInfo.cc	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/superorxobros/SOBHUDInfo.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/superorxobros/SOBHUDInfo.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBHUDInfo.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBHUDInfo.h	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/superorxobros/SOBHUDInfo.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/superorxobros/SOBItem.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOBItem.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBItem.cc	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/superorxobros/SOBItem.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/superorxobros/SOBItem.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBItem.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBItem.h	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/superorxobros/SOBItem.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBMushroom.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOBMushroom.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBMushroom.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -47,16 +47,12 @@
     {
         RegisterObject(SOBMushroom);
 
-        attachedToFigure_ = false;
         setAngularFactor(0.0);
-        figure_ = nullptr;
         this->enableCollisionCallback();
         gravityAcceleration_ = 350.0;
         speed_ = 0.0;
         hasCollided_=false;
         goesRight_ = true;
-        lastPos_ = getPosition();
-        lastPos_.x -= 20;
         changeAllowed_ = true;
         changedOn_ = 0.0;
        
@@ -85,13 +81,6 @@
     }
 
 
-    void SOBMushroom::setFigure(SOBFigure* newFigure)
-    {
-        figure_ = newFigure;
-    }
-
-
-
     void SOBMushroom::tick(float dt)
     {
         SUPER(SOBMushroom, tick, dt);
@@ -103,8 +92,8 @@
                 changeAllowed_ = true;
                 changedOn_ = 0.0;
 
+            }
         }
-    }
         
 
         int dir = 1;
@@ -115,11 +104,7 @@
         velocity.z -= gravityAcceleration_*dt;
         velocity.x = dir*speed_;
         setVelocity(velocity);
+    }
 
 
-    
-        lastPos_ = getPosition();
-            }
-
-
 }


Property changes on: code/trunk/src/modules/superorxobros/SOBMushroom.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBMushroom.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBMushroom.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBMushroom.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -46,13 +46,10 @@
         public:
             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; }
             float getSpeed() const
@@ -62,9 +59,7 @@
         protected:
             float gravityAcceleration_;
             float speed_;
-            WeakPtr<SOBFigure> figure_;
             bool goesRight_;
-            Vector3 lastPos_;
             bool changeAllowed_;
             float changedOn_;
            


Property changes on: code/trunk/src/modules/superorxobros/SOBMushroom.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBPrereqs.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBPrereqs.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBPrereqs.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -75,6 +75,7 @@
     class SOBMushroom;
     class SOBHUDInfo;
     class SOBGumba;
+    class SOBGumbaBoss;
     class SOBFlagstone;
     class SOBCastlestone;
     class SOBCoin;


Property changes on: code/trunk/src/modules/superorxobros/SOBPrereqs.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/modules/superorxobros/SOBQBlock.cc
===================================================================
--- code/trunk/src/modules/superorxobros/SOBQBlock.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBQBlock.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -38,7 +38,9 @@
 #include "SOB.h"
 #include "SOBMushroom.h"
 #include "SOBCoin.h"
+#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
 
+
 namespace orxonox
 {
     RegisterClass(SOBQBlock);
@@ -61,7 +63,8 @@
 
         //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;
 
             for (WorldEntity* object : this->getAttachedObjects())


Property changes on: code/trunk/src/modules/superorxobros/SOBQBlock.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/superorxobros/SOBQBlock.h
===================================================================
--- code/trunk/src/modules/superorxobros/SOBQBlock.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/superorxobros/SOBQBlock.h	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/superorxobros/SOBQBlock.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/weapons/munitions/FlameMunition.cc
===================================================================
--- code/trunk/src/modules/weapons/munitions/FlameMunition.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/weapons/munitions/FlameMunition.cc	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/weapons/munitions/FlameMunition.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/weapons/munitions/FlameMunition.h
===================================================================
--- code/trunk/src/modules/weapons/munitions/FlameMunition.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/weapons/munitions/FlameMunition.h	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/weapons/munitions/FlameMunition.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.cc	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.h
===================================================================
--- code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.h	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/weapons/projectiles/FlameGunProjectile.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/weapons/weaponmodes/FlameGun.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/FlameGun.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/weapons/weaponmodes/FlameGun.cc	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/weapons/weaponmodes/FlameGun.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/modules/weapons/weaponmodes/FlameGun.h
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/FlameGun.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/modules/weapons/weaponmodes/FlameGun.h	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/modules/weapons/weaponmodes/FlameGun.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/orxonox/Highscore.cc
===================================================================
--- code/trunk/src/orxonox/Highscore.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/Highscore.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -81,12 +81,16 @@
 
     /**
      * @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;
     }
 }


Property changes on: code/trunk/src/orxonox/Highscore.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/orxonox/Highscore.h
===================================================================
--- code/trunk/src/orxonox/Highscore.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/Highscore.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -48,7 +48,7 @@
             Highscore();              // Constructor
             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);
 
             // tolua_begin


Property changes on: code/trunk/src/orxonox/Highscore.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxPrereqs.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/OrxonoxPrereqs.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -151,7 +151,6 @@
 
     // overlays
     class InGameConsole;
-    class Map;
     class OrxonoxOverlay;
     class OverlayGroup;
 

Copied: code/trunk/src/orxonox/controllers/ArrowController.cc (from rev 11782, code/branches/Presentation_HS17_merge/src/orxonox/controllers/ArrowController.cc)
===================================================================
--- code/trunk/src/orxonox/controllers/ArrowController.cc	                        (rev 0)
+++ code/trunk/src/orxonox/controllers/ArrowController.cc	2018-02-19 23:14:40 UTC (rev 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));
+        
+        
+    }
+}

Copied: code/trunk/src/orxonox/controllers/ArrowController.h (from rev 11782, code/branches/Presentation_HS17_merge/src/orxonox/controllers/ArrowController.h)
===================================================================
--- code/trunk/src/orxonox/controllers/ArrowController.h	                        (rev 0)
+++ code/trunk/src/orxonox/controllers/ArrowController.h	2018-02-19 23:14:40 UTC (rev 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__ */

Modified: code/trunk/src/orxonox/controllers/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/controllers/CMakeLists.txt	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/controllers/CMakeLists.txt	2018-02-19 23:14:40 UTC (rev 11783)
@@ -18,4 +18,5 @@
   FlyingController.cc
   FightingController.cc
   MasterController.cc
+  ArrowController.cc
 )

Modified: code/trunk/src/orxonox/controllers/DroneController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/DroneController.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/controllers/DroneController.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -48,6 +48,7 @@
     {
         RegisterObject(DroneController);
 
+        this->setTeam(0);
         this->owner_ = nullptr;
         this->drone_ = nullptr;
         this->isShooting_ = false;
@@ -163,6 +164,7 @@
                 this->isShooting_ = false;
             }
         }
+        
         SUPER(AIController, tick, dt);
     }
 

Modified: code/trunk/src/orxonox/controllers/HumanController.h
===================================================================
--- code/trunk/src/orxonox/controllers/HumanController.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/controllers/HumanController.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -89,8 +89,6 @@
             static inline HumanController* getLocalControllerSingleton()
                 { return HumanController::localController_s; }
             static Pawn* getLocalControllerEntityAsPawn();
-            //friend class, for mouselook
-            friend class Map;
 
         protected:
             static HumanController* localController_s;

Index: code/trunk/src/orxonox/gametypes/StoryMode.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/StoryMode.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/gametypes/StoryMode.cc	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/orxonox/gametypes/StoryMode.cc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: code/trunk/src/orxonox/gametypes/StoryMode.h
===================================================================
--- code/trunk/src/orxonox/gametypes/StoryMode.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/gametypes/StoryMode.h	2018-02-19 23:14:40 UTC (rev 11783)

Property changes on: code/trunk/src/orxonox/gametypes/StoryMode.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: code/trunk/src/orxonox/graphics/Model.cc
===================================================================
--- code/trunk/src/orxonox/graphics/Model.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/graphics/Model.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -155,6 +155,13 @@
         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()
     {
         this->mesh_.setCastShadows(this->bCastShadows_);

Modified: code/trunk/src/orxonox/graphics/Model.h
===================================================================
--- code/trunk/src/orxonox/graphics/Model.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/graphics/Model.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -85,6 +85,8 @@
             inline const std::string& getMaterial() const
                 { return this->materialName_; }
 
+            void setSubMaterial(const std::string& name, const int index);
+
         protected:
             /**
             @brief

Modified: code/trunk/src/orxonox/interfaces/RadarViewable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/RadarViewable.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/interfaces/RadarViewable.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -150,7 +150,6 @@
         {
             return this->uniqueId_;
         }
-        //friend class Map;
 
     private:
         void validate(const WorldEntity* object) const;

Copied: code/trunk/src/orxonox/worldentities/Arrow.cc (from rev 11782, code/branches/Presentation_HS17_merge/src/orxonox/worldentities/Arrow.cc)
===================================================================
--- code/trunk/src/orxonox/worldentities/Arrow.cc	                        (rev 0)
+++ code/trunk/src/orxonox/worldentities/Arrow.cc	2018-02-19 23:14:40 UTC (rev 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);
+    }
+}

Copied: code/trunk/src/orxonox/worldentities/Arrow.h (from rev 11782, code/branches/Presentation_HS17_merge/src/orxonox/worldentities/Arrow.h)
===================================================================
--- code/trunk/src/orxonox/worldentities/Arrow.h	                        (rev 0)
+++ code/trunk/src/orxonox/worldentities/Arrow.h	2018-02-19 23:14:40 UTC (rev 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__

Modified: code/trunk/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/worldentities/CMakeLists.txt	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/worldentities/CMakeLists.txt	2018-02-19 23:14:40 UTC (rev 11783)
@@ -12,6 +12,8 @@
   TeamSpawnPoint.cc
   ExplosionPart.cc
   Actionpoint.cc
+  NameableStaticEntity.cc
+  Arrow.cc
 )
 
-ADD_SUBDIRECTORY(pawns)
+ADD_SUBDIRECTORY(pawns)
\ No newline at end of file

Copied: code/trunk/src/orxonox/worldentities/NameableStaticEntity.cc (from rev 11782, code/branches/Presentation_HS17_merge/src/orxonox/worldentities/NameableStaticEntity.cc)
===================================================================
--- code/trunk/src/orxonox/worldentities/NameableStaticEntity.cc	                        (rev 0)
+++ code/trunk/src/orxonox/worldentities/NameableStaticEntity.cc	2018-02-19 23:14:40 UTC (rev 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);
+    }
+}

Copied: code/trunk/src/orxonox/worldentities/NameableStaticEntity.h (from rev 11782, code/branches/Presentation_HS17_merge/src/orxonox/worldentities/NameableStaticEntity.h)
===================================================================
--- code/trunk/src/orxonox/worldentities/NameableStaticEntity.h	                        (rev 0)
+++ code/trunk/src/orxonox/worldentities/NameableStaticEntity.h	2018-02-19 23:14:40 UTC (rev 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

Modified: code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/worldentities/pawns/CMakeLists.txt	2018-02-19 23:14:40 UTC (rev 11783)
@@ -6,4 +6,6 @@
   ModularSpaceShip.cc
   TeamBaseMatchBase.cc
   Destroyer.cc
+  StoryModePawn.cc
+  ShootableObstacle.cc
 )

Modified: code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	2018-02-19 23:14:40 UTC (rev 11783)
@@ -83,6 +83,7 @@
 
         // set damage multiplier to default value 1, meaning nominal damage
         this->damageMultiplier_ = 1;
+        this->acceptsPickups_ = true;
 
         this->spawnparticleduration_ = 3.0f;
 

Modified: code/trunk/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.h	2018-02-19 23:09:09 UTC (rev 11782)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.h	2018-02-19 23:14:40 UTC (rev 11783)
@@ -198,6 +198,11 @@
             inline float getDamageMultiplier() const
                 { 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;
 
@@ -217,8 +222,10 @@
             inline const WeaponSystem* getWeaponSystem() const
                 { return this->weaponSystem_; }
 
-            static void consoleCommand_debugDrawWeapons(bool bDraw);
+            static void consoleCommand_debugDrawWeapons(bool bDraw); 
 
+
+
         protected:
             virtual void preDestroy() override;
 
@@ -255,6 +262,7 @@
             float shieldRechargeWaitCountdown_;
 
             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_;
 

Copied: code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.cc (from rev 11782, code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/ShootableObstacle.cc)
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.cc	                        (rev 0)
+++ code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.cc	2018-02-19 23:14:40 UTC (rev 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);
+    }
+
+}
\ No newline at end of file

Copied: code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.h (from rev 11782, code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/ShootableObstacle.h)
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.h	                        (rev 0)
+++ code/trunk/src/orxonox/worldentities/pawns/ShootableObstacle.h	2018-02-19 23:14:40 UTC (rev 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

Copied: code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.cc (from rev 11782, code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/StoryModePawn.cc)
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.cc	                        (rev 0)
+++ code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.cc	2018-02-19 23:14:40 UTC (rev 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) { }
+}

Copied: code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.h (from rev 11782, code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/StoryModePawn.h)
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.h	                        (rev 0)
+++ code/trunk/src/orxonox/worldentities/pawns/StoryModePawn.h	2018-02-19 23:14:40 UTC (rev 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__ */



More information about the Orxonox-commit mailing list