[Orxonox-commit 5244] r9907 - in code/branches/presentationHS13: . data/gui/layouts data/gui/scripts data/levels src/modules/docking src/modules/objects src/orxonox/infos
smerkli at orxonox.net
smerkli at orxonox.net
Mon Dec 16 14:22:46 CET 2013
Author: smerkli
Date: 2013-12-16 14:22:45 +0100 (Mon, 16 Dec 2013)
New Revision: 9907
Added:
code/branches/presentationHS13/data/gui/layouts/UndockingDialog.layout
code/branches/presentationHS13/data/gui/scripts/UndockingDialog.lua
code/branches/presentationHS13/data/levels/EntryTest.oxw
code/branches/presentationHS13/data/levels/dockingToASpaceStation.oxw
Modified:
code/branches/presentationHS13/
code/branches/presentationHS13/data/levels/FPSTest.oxw
code/branches/presentationHS13/data/levels/docking.oxw
code/branches/presentationHS13/src/modules/docking/Dock.cc
code/branches/presentationHS13/src/modules/docking/Dock.h
code/branches/presentationHS13/src/modules/docking/MoveToDockingTarget.cc
code/branches/presentationHS13/src/modules/objects/ForceField.cc
code/branches/presentationHS13/src/modules/objects/ForceField.h
code/branches/presentationHS13/src/orxonox/infos/PlayerInfo.cc
Log:
Merged spacestationentry branch
Property changes on: code/branches/presentationHS13
___________________________________________________________________
Modified: svn:mergeinfo
- /code/branches/Racingbot:9388-9513
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
/code/branches/bigships:8137-8588
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/core6:9552-9666
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/environment3:8887-8975
/code/branches/formation:8885-8991
/code/branches/formationupdate:9580-9624
/code/branches/fps:6591-7072
/code/branches/gamecontent:8893-8968
/code/branches/gameimmersion:8102-8577
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hud:8883-8986
/code/branches/hudelements:6584-6941
/code/branches/hudimprovements:7920-8672
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/invaders:9694-9896
/code/branches/ipv6:7293-7458
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/largeShip1:9384-9515
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/libs:9668-9674
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/masterserverfix:8933-8936
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/menue:8884-8976
/code/branches/miniprojects:2754-2824
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/newlevel2012:9033-9244
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/output:8739-8857
/code/branches/overlay:2117-2385
/code/branches/pCuts:9023-9284
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup2012:9029-9189
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/portals2:8460-8602
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786,8500-8705
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation2011:8974-9015
/code/branches/presentation2012:9189-9268
/code/branches/presentation2012merge:9266-9347
/code/branches/presentation3:6913-7162
/code/branches/presentationHS12:9481-9525
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/radarDreiD:9690-9901
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/shipSelection:9038-9206
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound2012:9205-9214
/code/branches/sound3:5941-6102
/code/branches/spaceNavigation:9381-9497
/code/branches/spaceboundaries:8085-8457
/code/branches/spaceboundaries2:8460-8613
/code/branches/spacerace:8182-8630
/code/branches/spaceraceTwo:8881-8996
/code/branches/steering:5949-6091,8140-8595
/code/branches/surfaceRace:9028-9199
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/turret:9380-9501
/code/branches/tutoriallevel:7827-8370
/code/branches/tutoriallevel2:8370-8452
/code/branches/tutoriallevel3:8453-8636
/code/branches/unity_build:8440-8716
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
+ /code/branches/Racingbot:9388-9513
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
/code/branches/bigships:8137-8588
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/core6:9552-9666
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/environment3:8887-8975
/code/branches/formation:8885-8991
/code/branches/formationupdate:9580-9624
/code/branches/fps:6591-7072
/code/branches/gamecontent:8893-8968
/code/branches/gameimmersion:8102-8577
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hud:8883-8986
/code/branches/hudelements:6584-6941
/code/branches/hudimprovements:7920-8672
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/invaders:9694-9896
/code/branches/ipv6:7293-7458
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/largeShip1:9384-9515
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/libs:9668-9674
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/masterserverfix:8933-8936
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/menue:8884-8976
/code/branches/miniprojects:2754-2824
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/newlevel2012:9033-9244
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/output:8739-8857
/code/branches/overlay:2117-2385
/code/branches/pCuts:9023-9284
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup2012:9029-9189
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/portals2:8460-8602
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786,8500-8705
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation2011:8974-9015
/code/branches/presentation2012:9189-9268
/code/branches/presentation2012merge:9266-9347
/code/branches/presentation3:6913-7162
/code/branches/presentationHS12:9481-9525
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/radarDreiD:9690-9901
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/shipSelection:9038-9206
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound2012:9205-9214
/code/branches/sound3:5941-6102
/code/branches/spaceNavigation:9381-9497
/code/branches/spaceboundaries:8085-8457
/code/branches/spaceboundaries2:8460-8613
/code/branches/spacerace:8182-8630
/code/branches/spaceraceTwo:8881-8996
/code/branches/spacestationentry:9699-9905
/code/branches/steering:5949-6091,8140-8595
/code/branches/surfaceRace:9028-9199
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/turret:9380-9501
/code/branches/tutoriallevel:7827-8370
/code/branches/tutoriallevel2:8370-8452
/code/branches/tutoriallevel3:8453-8636
/code/branches/unity_build:8440-8716
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
Copied: code/branches/presentationHS13/data/gui/layouts/UndockingDialog.layout (from rev 9905, code/branches/spacestationentry/data/gui/layouts/UndockingDialog.layout)
===================================================================
--- code/branches/presentationHS13/data/gui/layouts/UndockingDialog.layout (rev 0)
+++ code/branches/presentationHS13/data/gui/layouts/UndockingDialog.layout 2013-12-16 13:22:45 UTC (rev 9907)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+ <Window Type="MenuWidgets/StaticImage" Name="orxonox/Undocking/Background" >
+ <Property Name="FrameEnabled" Value="False" />
+ <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}}" />
+ <Property Name="BackgroundEnabled" Value="False" />
+ <Window Type="MenuWidgets/StaticText" Name="orxonox/Undocking/Title" >
+ <Property Name="Text" Value="Undocking" />
+ <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.25,0},{0.2875,0},{0.75,0},{0.7,0}}" />
+ <Window Type="MenuWidgets/Listbox" Name="orxonox/Undocking/Docks" >
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.85,0}}" />
+ </Window>
+ </Window>
+ <Window Type="MenuWidgets/Button" Name="orxonox/Undocking/DockButton" >
+ <Property Name="Text" Value="Undock" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.725,0},{0.4875,0},{0.775,0}}" />
+ <Event Name="Clicked" Function="UndockingDialog.undockButton_clicked"/>
+ </Window>
+ <Window Type="MenuWidgets/Button" Name="orxonox/Undocking/CancelButton" >
+ <Property Name="Text" Value="Cancel" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.725,0},{0.7125,0},{0.775,0}}" />
+ <Event Name="Clicked" Function="UndockingDialog.cancelButton_clicked"/>
+ </Window>
+ </Window>
+</GUILayout>
Copied: code/branches/presentationHS13/data/gui/scripts/UndockingDialog.lua (from rev 9905, code/branches/spacestationentry/data/gui/scripts/UndockingDialog.lua)
===================================================================
--- code/branches/presentationHS13/data/gui/scripts/UndockingDialog.lua (rev 0)
+++ code/branches/presentationHS13/data/gui/scripts/UndockingDialog.lua 2013-12-16 13:22:45 UTC (rev 9907)
@@ -0,0 +1,69 @@
+-- DockingDialog.lua
+
+local P = createMenuSheet("UndockingDialog")
+
+P.docks = {}
+
+function P.onLoad()
+
+ --button are arranged in a 1x2 matrix
+ P:setButton(1, 1, {
+ ["button"] = winMgr:getWindow("orxonox/Undocking/DockButton"),
+ ["callback"] = P.undockButton_clicked
+ })
+
+ P:setButton(1, 2, {
+ ["button"] = winMgr:getWindow("orxonox/Undocking/CancelButton"),
+ ["callback"] = P.cancelButton_clicked
+ })
+
+end
+
+function P.onShow()
+ orxonox.execute("setPause 1")
+ P.update()
+end
+
+function P.onHide()
+ orxonox.execute("setPause 0")
+end
+
+function P.update()
+ -- update dock list
+ P.docks = {}
+ local docks = orxonox.Dock:getNumberOfActiveDocks()
+ for i = 0, docks-1 do
+ table.insert(P.docks, orxonox.Dock:getActiveDockAtIndex(i))
+ end
+
+ local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/Undocking/Docks"))
+ listbox:resetList()
+
+ for k in pairs(P.docks) do
+ local item = CEGUI.createListboxTextItem("Dock " .. k)
+ item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+ listbox:addItem(item)
+ if k == 1 then
+ listbox:setItemSelectState(item, true)
+ end
+ end
+end
+
+function P.undockButton_clicked(e)
+ local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/Undocking/Docks"))
+ local choice = listbox:getFirstSelectedItem()
+ if choice ~= nil then
+ local index = listbox:getItemIndex(choice)
+ local dock = P.docks[index+1]
+ if dock ~= nil then
+ dock:undock()
+ end
+ end
+ hideMenuSheet(P.name)
+end
+
+function P.cancelButton_clicked(e)
+ hideMenuSheet(P.name)
+end
+
+return P
Copied: code/branches/presentationHS13/data/levels/EntryTest.oxw (from rev 9905, code/branches/spacestationentry/data/levels/EntryTest.oxw)
===================================================================
--- code/branches/presentationHS13/data/levels/EntryTest.oxw (rev 0)
+++ code/branches/presentationHS13/data/levels/EntryTest.oxw 2013-12-16 13:22:45 UTC (rev 9907)
@@ -0,0 +1,1135 @@
+<!-- -->
+<LevelInfo
+ name = "EntryTest"
+ description = "Test suite for Entry"
+ screenshot = "missionOne.png"
+ tags = "mission"
+/>
+
+<?lua
+ include("stats.oxo")
+ include("HUDTemplates3.oxo")
+ include("templates/lodInformation.oxt")
+ include("templates/spaceshipAssff.oxt")
+ include("templates/spaceshipPirate.oxt")
+ include("templates/spaceshipSpacecruiser.oxt")
+ include("templates/spaceshipTransporter.oxt")
+ include("templates/FPS.oxt")
+?>
+
+<?lua
+include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<Level
+ gametype = "Mission"
+>
+ <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.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"/>
+<!-- END OF INCLUDES & NECESSARITIES -->
+
+<!-- SPAWNPOINT & START OF QUESTS via spawntrigger -->
+ <EventMultiTrigger name=spawntrigger>
+ <events>
+ <trigger>
+ <TeamSpawnPoint team=0 position="-47000,-1000,1300" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff>
+ <EventTrigger invert=true>
+ <events>
+ <trigger>
+ <EventListener event="attack" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </TeamSpawnPoint>
+ </trigger>
+ </events>
+ </EventMultiTrigger>
+
+ <QuestEffectBeacon times=1>
+ <effects>
+ <AddQuest questId="missionOne.basicFlying" />
+ <!--AddQuestHint hintId ="quest1hint3" /-->
+ </effects>
+ <events>
+ <execute>
+ <EventListener event=spawntrigger />
+ </execute>
+ </events>
+ </QuestEffectBeacon>
+
+ <QuestEffectBeacon times=1>
+ <effects>
+ <CompleteQuest questId="missionOne.basicFlying" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event="flying4" />
+ </execute>
+ </events>
+ </QuestEffectBeacon>
+
+ <QuestEffectBeacon times=1>
+ <effects>
+ <CompleteQuest questId="missionOne.navigation" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event="navigationend" />
+ </execute>
+ </events>
+ </QuestEffectBeacon>
+
+<!--helper trigger to end the weaponsystemI quest -->
+ <DistanceTrigger name="boxend" position="0,0,0" distance=950 target="SpaceShip" stayActive="false" delay=0.1>
+ <EventTrigger>
+ <events>
+ <trigger>
+ <EventListener event="boxtrigger4" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </DistanceTrigger>
+
+ <QuestEffectBeacon times=1>
+ <effects>
+ <CompleteQuest questId="missionOne.weaponsystemI" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event="boxend" />
+ </execute>
+ </events>
+ </QuestEffectBeacon>
+
+<!--helper trigger to end the weaponsystemII quest -->
+ <DistanceTrigger name="piratesend" position="0,0,0" distance=2000 target="SpaceShip" stayActive="false" delay=0.1>
+ <EventTrigger>
+ <events>
+ <trigger>
+ <EventListener event="movingpirates2" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </DistanceTrigger>
+
+ <QuestEffectBeacon times=1>
+ <effects>
+ <CompleteQuest questId="missionOne.weaponsystemII" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event=piratesend />
+ </execute>
+ </events>
+ </QuestEffectBeacon>
+
+<!--helper trigger to end the DuBallStation quest -->
+ <DistanceTrigger name="duballend" position="-1000,-300,700" distance=2000 target="SpaceShip" stayActive="false" delay=0.1>
+ <EventTrigger>
+ <events>
+ <trigger>
+ <EventListener event="duball3" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </DistanceTrigger>
+
+
+ <QuestEffectBeacon times=1>
+ <effects>
+ <CompleteQuest questId="missionOne.DuballStation" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event=duballend />
+ </execute>
+ </events>
+ </QuestEffectBeacon>
+
+ <QuestEffectBeacon times=1> <!-- alternative quest end -->
+ <effects>
+ <CompleteQuest questId="missionOne.DuballStation" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event=toHydroFarmer />
+ </execute>
+ </events>
+ </QuestEffectBeacon>
+
+<!--helper trigger to end the getHelp quest -->
+ <DistanceTrigger name="getHelpEnd" position="-47000,-1000,1300" distance=1400 target="SpaceShip" stayActive="false" delay=0.1>
+ <EventTrigger>
+ <events>
+ <trigger>
+ <EventListener event="ondock" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </DistanceTrigger>
+
+ <QuestEffectBeacon times=1>
+ <effects>
+ <CompleteQuest questId="missionOne.getHelp" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event=getHelpEnd />
+ </execute>
+ </events>
+ </QuestEffectBeacon>
+
+<!--helper trigger to end the getHome quest -->
+ <DistanceTrigger name="getHomeEnd" position="0,0,0" distance=4000 target="SpaceShip" stayActive="false" delay=0.1>
+ <EventTrigger>
+ <events>
+ <trigger>
+ <EventListener event="attack" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </DistanceTrigger>
+
+ <QuestEffectBeacon times=1>
+ <effects>
+ <CompleteQuest questId="missionOne.getHome" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event=getHomeEnd />
+ </execute>
+ </events>
+ </QuestEffectBeacon>
+
+<!--helper trigger to end the defence quest -->
+ <DistanceTrigger name="defenceEnd" position="0,0,0" distance=4000 target="SpaceShip" stayActive="false" delay=0.1>
+ <EventTrigger>
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger6" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </DistanceTrigger>
+
+ <QuestEffectBeacon times=1>
+ <effects>
+ <CompleteQuest questId="missionOne.defence" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event=defenceEnd />
+ </execute>
+ </events>
+ </QuestEffectBeacon>
+
+<!-- End the quest after own destruction of spacecruiser -->
+ <QuestEffectBeacon position="-100,0,0" times=1>
+ <effects>
+ <FailQuest questId="missionOne.getHelp" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event="failQuest" />
+ </execute>
+ </events>
+ <attached>
+ <DistanceTrigger name="failQuest" position="-47000,-1000,1300" distance=2300 target="SpaceShip">
+ <EventTrigger>
+ <events>
+ <trigger>
+ <EventListener event="gameEnd" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </DistanceTrigger>
+ </attached>
+ </QuestEffectBeacon>
+
+
+
+
+ <LocalQuest id="missionOne.basicFlying">
+ <QuestDescription title="Flying" description="Can you see the blinking light straight ahead? Your goal is to fly through it.
+Use (W) to accelerate and steer with your mouse.
+
+Further flying moves:
+break (S)
+roll (Q) and (E)
+boost (Space)
+
+Whenever a new quest is added you can view it by pressing (F3). Quit this menu via (Esc)." failmessage="" completeMessage="" />
+ <complete-effects>
+ <AddQuest questId="missionOne.navigation" />
+ </complete-effects>
+ </LocalQuest>
+
+ <LocalQuest id="missionOne.navigation">
+ <QuestDescription title="Navigation" description="The next goal is to find and move towards the test targets for your weaponsystem. The three arrows that just appeared down in the right corner of your screen indicate in which direction you have to turn your spacefighter to find your next targets.
+
+Alternative navigation: There's a green circle in the left corner - the radar. The red dots on the radar represent your targets. If you manage to move your spaceship in a way such that a dot is at the center of the radar, you will be able to see the concerning object straight ahead." failmessage="" completeMessage="" />
+ <complete-effects>
+ <AddQuest questId="missionOne.weaponsystemI" />
+ </complete-effects>
+ </LocalQuest>
+
+ <LocalQuest id ="missionOne.weaponsystemI">
+ <QuestDescription title="Destroy the Boxes" description="Test your four different weapons on the four boxes:
+1. laser (left click)
+2. plasma (right click)
+3. target seeking rockets (middle click)
+4. manual rockets (T)
+
+Attention if you use manual rockets: Press (T) only once to start the rocket. If you miss your target you can get out of the rocket, by clicking or pressing (T) once more." failmessage="" completeMessage="" />
+ <hints>
+ <QuestHint id="missionOne.weaponsystem.laser">
+ <QuestDescription title="Laser" description="The laser is a standard weapon. It is fast and precise but does not deal much damage." />
+ </QuestHint>
+ <QuestHint id="missionOne.weaponsystem.lightningGun">
+ <QuestDescription title="Lightninggun" description="That was the lightning gun. Its plasma munition is quite slow, but a normal spaceship can't take more than three hits of such a strong weapon. That could be your favourite weapon for close range combat or if you want to hit a really slow enemy." />
+ </QuestHint>
+ <QuestHint id="missionOne.weaponsystem.targetSeekingRocket">
+ <QuestDescription title="Target Seeking Rocket" description="The target seeking rockets follow slow targets on their own." />
+ </QuestHint>
+ <QuestHint id="missionOne.weaponsystem.manualrocket">
+ <QuestDescription title="Manual Rocket" description="Manual rockets are your most powerful weapon. But since you have to steer it to your target yourself, you will leave your spaceship unprotected for a while. The total amount of both manual and target seeking rockets is limited to 10." />
+ </QuestHint>
+ </hints>
+ <complete-effects>
+ <AddQuest questId="missionOne.weaponsystemII" />
+ </complete-effects>
+ </LocalQuest>
+
+ <LocalQuest id="missionOne.weaponsystemII">
+ <QuestDescription title="Kill the pirates" description="Get rid of the patrolling pirates.
+Find out which weapon is best to tackle moving targets. Get close enough." failmessage="" completeMessage="" />
+ <complete-effects>
+ <AddQuest questId="missionOne.DuballStation" />
+ </complete-effects>
+ </LocalQuest>
+
+ <LocalQuest id="missionOne.DuballStation">
+ <QuestDescription title="Duball Space Station" description="Fly towards the Duball Space Station. The grey radar marker will lead you to its position." failmessage="" completeMessage="" />
+ <complete-effects>
+ <AddQuest questId="missionOne.getHelp" />
+ </complete-effects>
+ </LocalQuest>
+
+ <LocalQuest id="missionOne.getHelp">
+ <QuestDescription title="Get Help" description="There are several enemies approaching. You can't handle it on your own. Fortunately there's a shortcut to the next friendly unit. Use the portal (grey dot) to get near the Hydrogen Farmer.
+The Hydrogen Farmer is a large spaceship with three legs.
+There you might get help - as far as we know there should be a strong spaceruiser docked to the Hydrogen Farmer. In order to be able to use that stronger spaceship, you have to dock to the Hydrogen Farmer.
+Simply fly to the center of the Hydrogen Farmer, which is between its three legs.
+
+How to dock: Accept the dialogue, take your hands off the keyboard and watch." failmessage="" completeMessage="" />
+ <complete-effects>
+ <AddQuest questId="missionOne.getHome" />
+ </complete-effects>
+ </LocalQuest>
+
+ <LocalQuest id="missionOne.getHome">
+ <QuestDescription title="Return ASAP" description="So you managed to get the spacecruiser. Use the portal to return to the DuBall Space Station.
+Hurry! Your help is desperately needed." failmessage="" completeMessage="" />
+ <complete-effects>
+ <AddQuest questId="missionOne.defence" />
+ </complete-effects>
+ </LocalQuest>
+
+ <LocalQuest id="missionOne.defence">
+ <QuestDescription title="Defence" description="Seven enemies were detected that seem to launch a coordinated attack.
+Do not hesitate to fight or you will be the target.
+
+Always take care of the enemy that is the closest to you." failmessage="" completeMessage="Yeah! You did it." />
+ </LocalQuest>
+
+ <SimpleNotification message="Dock to the Hydrogen Farmer." broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=toHydroFarmer />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+<!-------------------------------------- PART FOUR : Get Help --------------------------------------->
+
+ <Trigger name="famer1" mode="and" stayActive="true">
+ <DistanceTrigger position="-48200,100,0" target="Pawn" distance=650 stayActive="true" delay=0 />
+ <EventTrigger name="notGameEnd" activations="1" invert="true">
+ <events>
+ <trigger>
+ <EventListener event="gameEnd" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </Trigger>
+
+ <Trigger name="famer2" mode="and" stayActive="true">
+ <DistanceTrigger position="-48200,100,0" target="Pawn" distance=650 stayActive="true" delay=4 />
+ <EventTrigger activations="1" invert="true">
+ <events>
+ <trigger>
+ <EventListener event="gameEnd" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </Trigger>
+
+ <SimpleNotification message="We just received a message from DuBall." broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=famer1 />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+
+ <SimpleNotification message="We will lend you our strongest ship." broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=famer2 />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+
+<!-- @Objects: HYDROGEN FARMER & DOCKING -->
+ <SpaceShip
+ team = 0
+ position = "-48900,100,0"
+ roll = 90 yaw=0 pitch=20
+ mass = 10000
+ health = 100000 initialhealth=100000 maxhealth="100000"
+ name = "HydroFarmer"
+ radarname = "Hydrogen Farmer" >
+ <attached>
+ <!-- Docking -->
+ <DistanceTriggerBeacon name="bcnDestroyer" />
+ <DockingTarget name="destroyer" />
+
+ <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
+ <!-- <Model mesh="cube.mesh" mass=10 position="-560,0,0" scale3D="115,100,245" />
+ <Model mesh="cube.mesh" mass=10 position="290,0,-480" scale3D="115,100,245" yaw=-120 />
+ <Model mesh="cube.mesh" mass=10 position="290,0,480" scale3D="115,100,245" yaw=-240 />
+ <Model mesh="cube.mesh" mass=10 position="-280,0,0" scale3D="163,50,50" />
+ <Model mesh="cube.mesh" mass=10 position="140,0,-240" scale3D="163,50,50" yaw=-120/>
+ <Model mesh="cube.mesh" mass=10 position="140,0,240" scale3D="163,50,50" yaw=-240/>
+ <Model mesh="cube.mesh" mass=10 position="0,530,0" scale3D="172,52,298" />
+ <Model mesh="cube.mesh" mass=10 position="0,530,0" scale3D="172,52,298" yaw=-120/>
+ <Model mesh="cube.mesh" mass=10 position="0,530,0" scale3D="172,52,298" yaw=-240/>
+ <Model mesh="cube.mesh" mass=10 position="0,400,0" scale3D="43,110,26" yaw=-30 />
+ <Model mesh="cube.mesh" mass=10 position="-200,100,0" scale3D="26,50,43" />
+ <Model mesh="cube.mesh" mass=10 position="100,100,-173" scale3D="43,50,26" yaw=-30/>
+ <Model mesh="cube.mesh" mass=10 position="100,100,173" scale3D="43,50,26" yaw=30/>
+ <Model mesh="cube.mesh" mass=10 position="-100,264,0" scale3D="26,105,43" roll=-49/>
+ <Model mesh="cube.mesh" mass=10 position="50,264,-87" scale3D="26,105,43" roll=-49 yaw=-120/>
+ <Model mesh="cube.mesh" mass=10 position="50,264,87" scale3D="26,105,43" roll=-49 yaw=-240/> -->
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
+ <BoxCollisionShape position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
+ <BoxCollisionShape position="290,0,480" halfExtents="115,100,245" yaw=-240 />
+ <BoxCollisionShape position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
+ <BoxCollisionShape position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
+ <BoxCollisionShape position="140,0,240" halfExtents="163,50,50" yaw=-240 />
+ <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
+ <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-120 />
+ <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-240 />
+ <BoxCollisionShape position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
+ <BoxCollisionShape position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
+ <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
+ <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=30 />
+ <BoxCollisionShape position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
+ <BoxCollisionShape position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
+ <BoxCollisionShape position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
+ </collisionShapes>
+ </SpaceShip>
+
+ <Dock position="-48900,0,0" roll=90 yaw=180 >
+ <animations>
+ <MoveToDockingTarget target="destroyer" />
+ </animations>
+ <effects>
+ <DockToShip target="spaceShip" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event="dockMe" />
+ </execute>
+ <activity>
+ <EventListener event=notGameEnd />
+ </activity>
+ </events>
+ <attached>
+ <DistanceTrigger position="10,-202, -42" distance="800" target="Pawn"
+ beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
+ />
+ </attached>
+
+ </Dock>
+
+<!-- at Objects: SpaceCruiser as docking target -->
+ <SpaceShip
+ template = "spaceshipspacecruiser"
+ team = "0"
+ position = "-48900,800,0"
+ orientation = "-0.14, 0.68, 0.68, 0.223"
+ health = "400"
+ initialhealth = "400"
+ maxhealth = "500"
+ shieldhealth = "80"
+ initialshieldhealth = "80"
+ maxshieldhealth = "120"
+ shieldabsorption = "0.8"
+ reloadrate = "1"
+ reloadwaittime = "1"
+ name = "cruiser"
+ radarname = "Spacecruiser" >
+ <!--FpsPlayer
+ spawnparticlesource = "Orxonox/fairytwirl"
+ spawnparticleduration = 3
+ explosionchunks = 6
+
+ health = 100
+ maxhealth = 200
+ initialhealth = 100
+
+ primaryThrust = 0;
+ auxilaryThrust = 0;
+ rotationThrust = 0;
+
+ collisionType = "dynamic"
+ mass = 100
+ linearDamping = 0.7
+ angularDamping = 0.9999999
+ friction = 0.01
+
+ weapon = "hs-w01.mesh"
+
+ radarname = "FPS"
+ -->
+ <attached>
+ <DockingTarget name="spaceShip" />
+ </attached>
+ </SpaceShip>
+
+
+<!-- cruiserKilled: if cuiser is killed & player hasn't taken control of spacecrusier -->
+ <Trigger name="cruiserKilled" mode="and" stayActive="true">
+ <EventTrigger stayActive="true">
+ <events>
+ <trigger>
+ <EventListener event="cruiser"/>
+ </trigger>
+ </events>
+ </EventTrigger>
+ <EventTrigger invert=true>
+ <events>
+ <trigger>
+ <EventListener event="ondock" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </Trigger>
+
+
+<!-- triggers when either hydrofarmer or cruiser is killed -->
+ <Trigger mode=or name="gameEnd">
+ <EventTrigger activations="1">
+ <events>
+ <trigger>
+ <EventListener event="HydroFarmer" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ <EventTrigger activations="1">
+ <events>
+ <trigger>
+ <EventListener event="cruiserKilled" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </Trigger>
+
+<!-- triggers delayed when either hydrofarmer or cruiser is killed -->
+ <EventTrigger delay=4 name="earlyEnd">
+ <events>
+ <trigger>
+ <EventListener event="gameEnd" />
+ </trigger>
+ </events>
+ <events>
+ <activity>
+ <EventListener event="movingpirates2" />
+ </activity>
+ </events>
+ </EventTrigger>
+
+
+ <SimpleNotification message="Oh no! You killed the Hydrogen Farmer!" broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="HydroFarmer" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="Oh no! You killed the SpaceCruiser!" broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="cruiserKilled" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="Press (Esc) and restart the mission." broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="earlyEnd" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+<!-- hydrogen farmer & docking END -->
+
+
+<!-- @Objects: Pickup - find better place !! -->
+ <PickupSpawner pickup=hugeshieldpickup position="-48650,700,100" triggerDistance="70" respawnTime="30" maxSpawnedItems="1" />
+
+
+ <DistanceTrigger name="pickup" position="-48650,700,100" target="Pawn" distance=60 stayActive="true" delay=0 />
+ <SimpleNotification message="This pickup protects your spaceship.">
+ <events>
+ <trigger>
+ <EventListener event=pickup />
+ </trigger>
+ </events>
+ </SimpleNotification>
+<!-- Pickup-->
+
+
+<!-- @Objects: planet && spaceboundaries -->
+ <Planet
+ position="-44000,0,0"
+ scale="2500"
+ 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 = "false"
+ >
+ <!--attached>
+ <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-50" />
+ </attached--> <!-- Forcefield kills HYDROGEN FARMER-->
+ <collisionShapes>
+ <SphereCollisionShape radius="2500" position="0,0,0" />
+ </collisionShapes>
+ </Planet>
+
+
+<!-------------------------------------- The attack --------------------------------------->
+<!-- TODO:
+ - update spaceshipTransporter
+ - bots do friendly fire (is drone function reusable?)
+-->
+
+<!-- Fallback Spawnpoint: on cruiserdeath caused by pirates. Unfortunately unstable behaviour concerning activity. -->
+ <TeamSpawnPoint team=0 position="2000,1500,-1500" direction="-1,-1,1" spawnclass=SpaceShip pawndesign=spaceshipspacecruiser>
+ <events>
+ <activity>
+ <EventListener event="attack" />
+ </activity>
+ </events>
+ </TeamSpawnPoint>
+
+<!-- @Triggers: toHydroFamer <-> first portal usage
+ ondock <-> successfull docking
+ attack <-> second portal usage -->
+
+ <DistanceTrigger name="attack" position="-1400,-500,800" target="Pawn" distance=100 stayActive="true" mode="and">
+ <EventTrigger name="ondock" activations="1" stayactive="true" delay=6>
+ <events>
+ <trigger>
+ <EventListener event="dockMe" />
+ </trigger>
+ </events>
+ <Trigger mode=and>
+ <DistanceTrigger name="toHydroFarmer" position="-47000,-1000,1300" target="Pawn" distance=100 stayActive="true" />
+ <EventTrigger activations="1" invert="true">
+ <events>
+ <trigger>
+ <EventListener event="gameEnd" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </Trigger>
+ </EventTrigger>
+ <EventTrigger activations="1" invert="true">
+ <events>
+ <trigger>
+ <EventListener event="earlyEnd" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </DistanceTrigger>
+
+ <SimpleNotification message="Return before it's too late. Boost with (Space)." broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=ondock />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="Several serious enemies are approaching!">
+ <events>
+ <trigger>
+ <EventListener event=attack />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+
+<!-- @Objects: 6 pirates, heading towards DuBall, attacking -->
+<!-- TODO: re-hide pirates on early end-->
+<!-- 1 -->
+ <SpaceShip position="3000,-4000,4000" lookat="-1300,-600,900" name="attacker"visible="true">
+ <events>
+ <visibility>
+ <EventListener event="ondock" />
+ </visibility>
+ </events>
+ <templates>
+ <Template link=spaceshippirate /> <!--spaceshipTransporter -->
+ </templates>
+ <controller>
+ <WaypointPatrolController alertnessradius=3129 team=1 active=false>
+ <waypoints>
+ <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" /> <!-- activates enemies-->
+ </activity>
+ </events>
+ </WaypointPatrolController>
+ </controller>
+ </SpaceShip>
+<!-- 2 -->
+ <SpaceShip position="3000,-4000,-4000" lookat="-1300,-600,900" name="attacker" visible="true">
+ <events>
+ <visibility>
+ <EventListener event="ondock" />
+ </visibility>
+ </events>
+ <templates>
+ <Template link=spaceshippirate /> <!--spaceshipTransporter -->
+ </templates>
+ <controller>
+ <WaypointPatrolController alertnessradius=3129 team=1 active=false>
+ <waypoints>
+ <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" /> <!-- activates enemies-->
+ </activity>
+ </events>
+ </WaypointPatrolController>
+ </controller>
+ </SpaceShip>
+<!-- 3 -->
+ <SpaceShip position="-4000,-3000,4000" lookat="-1300,-600,900" name="attacker" visible="true">
+ <events>
+ <visibility>
+ <EventListener event="ondock" />
+ </visibility>
+ </events>
+ <templates>
+ <Template link=spaceshippirate /> <!--spaceshipTransporter -->
+ </templates>
+ <controller>
+ <WaypointPatrolController alertnessradius=3129 team=1 active=false>
+ <waypoints>
+ <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" /> <!-- activates enemies-->
+ </activity>
+ </events>
+ </WaypointPatrolController>
+ </controller>
+ </SpaceShip>
+<!-- 4 -->
+ <SpaceShip position="-3000,-3000,-5000" lookat="-1300,-600,900" name="attacker" visible="true">
+ <events>
+ <visibility>
+ <EventListener event="ondock" />
+ </visibility>
+ </events>
+ <templates>
+ <Template link=spaceshippirate /> <!--spaceshipTransporter -->
+ </templates>
+ <controller>
+ <WaypointPatrolController alertnessradius=3129 team=1 active=false>
+ <waypoints>
+ <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" /> <!-- activates enemies-->
+ </activity>
+ </events>
+ </WaypointPatrolController>
+ </controller>
+ </SpaceShip>
+<!-- 5 -->
+ <SpaceShip position="4000,4000,3000" lookat="-1300,-600,900" name="attacker"visible="true">
+ <events>
+ <visibility>
+ <EventListener event="ondock" />
+ </visibility>
+ </events>
+ <templates>
+ <Template link=spaceshippirate /> <!--spaceshipTransporter -->
+ </templates>
+ <controller>
+ <WaypointPatrolController alertnessradius=3129 team=1 active=false>
+ <waypoints>
+ <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" /> <!-- activates enemies-->
+ </activity>
+ </events>
+ </WaypointPatrolController>
+ </controller>
+ </SpaceShip>
+<!-- 6 -->
+ <SpaceShip position="2000,-4000,5000" lookat="-1300,-600,900" name="attacker" visible="true">
+ <events>
+ <visibility>
+ <EventListener event="ondock" />
+ </visibility>
+ </events>
+ <templates>
+ <Template link=spaceshippirate /> <!--spaceshipTransporter -->
+ </templates>
+ <controller>
+ <WaypointPatrolController alertnessradius=3129 team=1 active=false>
+ <waypoints>
+ <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" /> <!-- activates enemies-->
+ </activity>
+ </events>
+ </WaypointPatrolController>
+ </controller>
+ </SpaceShip>
+
+
+<!-- @Triggers: attacktriggerX <-> X enemies destroyed , X is an element of [1,6] -->
+ <EventTrigger name="attacktrigger6" activations="1" stayactive="true">
+ <events>
+ <trigger>
+ <EventListener event="attacker" />
+ </trigger>
+ </events>
+ <EventTrigger name="attacktrigger5" activations="1" stayactive="true" delay=0.1>
+ <events>
+ <trigger>
+ <EventListener event="attacker" />
+ </trigger>
+ </events>
+ <EventTrigger name="attacktrigger4" activations="1" stayactive="true" delay=0.1>
+ <events>
+ <trigger>
+ <EventListener event="attacker" />
+ </trigger>
+ </events>
+ <EventTrigger name="attacktrigger3" activations="1" stayactive="true" delay=0.1>
+ <events>
+ <trigger>
+ <EventListener event="attacker" />
+ </trigger>
+ </events>
+ <EventTrigger name="attacktrigger2" activations="1" stayactive="true" delay=0.1>
+ <events>
+ <trigger>
+ <EventListener event="attacker" />
+ </trigger>
+ </events>
+ <EventTrigger name="attacktrigger1" activations="1" stayactive="true" delay=0.1>
+ <events>
+ <trigger>
+ <EventListener event="attacker" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ </EventTrigger>
+ </EventTrigger>
+ </EventTrigger>
+ </EventTrigger>
+ </EventTrigger>
+
+
+ <SimpleNotification message="5 enemies left!" broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger1" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="4 enemies left!" broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger2" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="3 enemies left!" broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger3" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="2 enemies left!" broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger4" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="One enemy left!" broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger5" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="Well done. You finished this tutorial." broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger6" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+<!-- @Triggers: postAttack <-> delayed attacktrigger6 -->
+ <EventTrigger name="postAttack1" activations="1" stayactive="true" delay=4.1>
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger6" />
+ </trigger>
+ </events>
+ </EventTrigger>
+
+ <EventTrigger name="postAttack2" activations="1" stayactive="true" delay=8.2>
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger6" />
+ </trigger>
+ </events>
+ </EventTrigger>
+
+ <SimpleNotification message="Either quit by pressing (Esc) or ..." broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="postAttack1" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="... stay here to learn some tricks." broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event="postAttack2" />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+<!-------------------------------------- |Bonus Part| --------------------------------------->
+<!-- @Triggers: "bonusX" <-> delayed "attacktrigger6" -->
+ <EventTrigger name="bonus1" activations="1" stayactive="true" delay=12.3>
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger6" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ <EventTrigger name="bonus2" activations="1" stayactive="true" delay=16.4>
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger6" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ <EventTrigger name="bonus3" activations="1" stayactive="true" delay=22>
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger6" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ <EventTrigger name="bonus4" activations="1" stayactive="true" delay=28.1>
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger6" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ <EventTrigger name="bonus5" activations="1" stayactive="true" delay=32.3>
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger6" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ <EventTrigger name="bonus6" activations="1" stayactive="true" delay=36.5>
+ <events>
+ <trigger>
+ <EventListener event="attacktrigger6" />
+ </trigger>
+ </events>
+ </EventTrigger>
+ <EventTrigger name="bonus7" activations="1" stayactive="true" delay=4.1>
+ <events>
+ <trigger>
+ <EventListener event="bonus6" />
+ </trigger>
+ </events>
+ </EventTrigger>
+
+
+
+ <SimpleNotification message="Rotate your ship. Press (Q) or (E). " broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=bonus1 />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="Switch the camera's position. Press (C). " broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=bonus2 />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="360° view: press (Ctrl) + use the mouse " broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=bonus3 />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="Have a look at the main menu's settings." broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=bonus4 />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="E.g: Settings > Miscellaneous > Nr. of bots" broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=bonus5 />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="You successfully finished Mission One!" broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=bonus6 />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+ <SimpleNotification message="Press (Esc) and return to the main menu." broadcast="true">
+ <events>
+ <trigger>
+ <EventListener event=bonus7 />
+ </trigger>
+ </events>
+ </SimpleNotification>
+
+
+ <!--Script code="addBots 3" onLoad="false">
+ <events>
+ <trigger>
+ <EventListener event=bonus6 />
+ </trigger>
+ </events>
+ </Script>
+
+ <Script code="artificialcontroller setbotlevel 0.1" onLoad="false">
+ <events>
+ <trigger>
+ <EventListener event=bonus6 />
+ </trigger>
+ </events>
+ </Script-->
+ <!-- Script code="artificialcontroller setbotlevel 0.1" /-->
+ </Scene>
+</Level>
+
+<!-- TODO:
+- Story & more precise Questmessages; more quest hints; fail-quest;
+- Colouring: Show who is friend or foe via the colour
+- Waypoints: show the player the way
+- Foolproof text messages (e.g. verspätete Nachrichten unterdrücken ~done )
+- End Tutorial, if either the Hydrogen Farmer or the SpaceCruiser gets destroyed. (~done)
+ -->
Modified: code/branches/presentationHS13/data/levels/FPSTest.oxw
===================================================================
--- code/branches/presentationHS13/data/levels/FPSTest.oxw 2013-12-16 13:17:42 UTC (rev 9906)
+++ code/branches/presentationHS13/data/levels/FPSTest.oxw 2013-12-16 13:22:45 UTC (rev 9907)
@@ -1,3 +1,4 @@
+<!-- -->
<LevelInfo
name = "FPS testlevel"
description = "Level to test First Person Shooter"
Modified: code/branches/presentationHS13/data/levels/docking.oxw
===================================================================
--- code/branches/presentationHS13/data/levels/docking.oxw 2013-12-16 13:17:42 UTC (rev 9906)
+++ code/branches/presentationHS13/data/levels/docking.oxw 2013-12-16 13:22:45 UTC (rev 9907)
@@ -1,3 +1,4 @@
+<!-- -->
<LevelInfo
name = "Transporter"
description = "Level with a Transporter. Demonstrates the docking system."
Copied: code/branches/presentationHS13/data/levels/dockingToASpaceStation.oxw (from rev 9905, code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw)
===================================================================
--- code/branches/presentationHS13/data/levels/dockingToASpaceStation.oxw (rev 0)
+++ code/branches/presentationHS13/data/levels/dockingToASpaceStation.oxw 2013-12-16 13:22:45 UTC (rev 9907)
@@ -0,0 +1,182 @@
+<!-- -->
+<LevelInfo
+ name = "Docking to a Space Station"
+ description = "Docking into a spacestation."
+ tags = "showcase"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+ include("stats.oxo")
+ include("HUDTemplates3.oxo")
+ include("templates/lodInformation.oxt")
+ include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<?lua
+ include("templates/spaceshipAssff.oxt")
+ include("templates/spaceshipPirate.oxt")
+ include("templates/spaceshipEscort.oxt")
+ include("templates/bigship.oxt")
+ include("templates/spaceshipTurret.oxt")
+ include("templates/spaceshipCollateralDamage.oxt")
+ include("templates/FPS.oxt")
+?>
+
+<Level
+ gametype = Deathmatch
+>
+ <templates>
+ <Template link=lodtemplate_default />
+ </templates>
+
+ <Scene
+ ambientlight = "0.5, 0.5, 0.5"
+ skybox = "Orxonox/Starbox"
+ negativeWorldRange = "-100000, -100000, -100000"
+ positiveWorldRange = " 100000, 100000, 100000"
+ gravity = "0,0,0"
+ hasPhysics = true
+ >
+
+ <?lua
+ include("includes/pickups.oxi")
+ ?>
+
+ <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0,1.0,1.0,0.5" specular="1.0, 0.9, 0.9, 1.0"/>
+ <SpawnPoint team=0 position="3200,0,0" lookat="2800,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+
+ <StaticEntity position = "2800,0,0" mass=10000 collisionType=static >
+ <attached>
+ <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
+ <BoxCollisionShape position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
+ <BoxCollisionShape position="290,0,480" halfExtents="115,100,245" yaw=-240 />
+ <BoxCollisionShape position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
+ <BoxCollisionShape position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
+ <BoxCollisionShape position="140,0,240" halfExtents="163,50,50" yaw=-240 />
+ <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
+ <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-120 />
+ <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-240 />
+ <BoxCollisionShape position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
+ <BoxCollisionShape position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
+ <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
+ <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=30 />
+ <BoxCollisionShape position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
+ <BoxCollisionShape position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
+ <BoxCollisionShape position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
+ </collisionShapes>
+ </StaticEntity>
+
+<!-- Docking -->
+ <Dock position="2830,20,50" roll=0 yaw=0 >
+ <animations>
+ <MoveToDockingTarget target="destroyer" />
+ </animations>
+ <effects>
+ <DockToShip target="spaceShip" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event="dockMe" />
+ </execute>
+
+ <undocking>
+ <EventListener event="undockMe" />
+ </undocking>
+
+ <activity>
+ <EventListener event=notGameEnd />
+ </activity>
+ </events>
+ <attached>
+ <!-- Trigger for docking with billboard -->
+ <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
+ <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
+ beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
+ />
+ <!-- Trigger for undocking with billboard -->
+ <Billboard position="-2630,-19970,150" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
+ <DistanceTrigger position="-2630,-19970,150" distance="50" target="Pawn"
+ beaconMode="identify" targetname="bcnDestroyer" name="undockMe"
+ />
+ </attached>
+
+ </Dock>
+
+<!-- FPS Player as destination of the dock -->
+<FpsPlayer template = "fps" radarname = "First Person Player" position = "0,-19900,0" >
+ <attached>
+ <DockingTarget name="spaceShip" />
+ <DistanceTriggerBeacon name="bcnDestroyer" />
+ <DockingTarget name="destroyer" />
+ </attached>
+</FpsPlayer>
+
+
+<!-- Cube as test SpaceStation
+
+The station can either be hidden outside of the skybox, within the hull of the space station if it is big enough or within a planet.
+Complex spacestations can be placed very far away from the spaceship so it is rendered at low resolution while the player uses the space ship.
+
+-->
+ <StaticEntity position="0,-20000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
+ <attached>
+ <Model position="0,0,0" mesh="crate.mesh" scale3D="80,80,5" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="400,400,25" />
+ </collisionShapes>
+ </StaticEntity>
+
+<!-- Homogenous gravitationfield to simulate local gravity (activating the normal gravity will affect the spaceship terribly) -->
+<ForceField position="0,-20000,0" mode="homogen" diameter="2000" forcedirection = "0,-500,0" />
+
+
+<!-- Some more stuff -->
+
+ <!-- triple large belt around the planet -->
+ <?lua
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
+ ?>
+ <?lua
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
+ ?>
+ <?lua
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
+ ?>
+
+ <Planet
+ position="15000,0,-1000"
+ scale="5000"
+ collisionType="dynamic"
+ linearDamping="0.8"
+ angularDamping="0"
+ mass="10000000"
+ pitch="0"
+ mesh="planets/ganymede.mesh"
+ atmosphere="atmosphere1"
+ rotationaxis="1,0,0"
+ rotationrate="1.0"
+ atmospheresize="80.0f"
+ imagesize="1024.0f"
+ collisiondamage = 2
+ enablecollisiondamage = true
+ >
+ <attached>
+ <ForceField position="5000,0,0" mode="sphere" diameter="10000" velocity="-50" />
+ </attached>
+ <collisionShapes>
+ <SphereCollisionShape radius="5000" position="0,0,0" />
+ </collisionShapes>
+ </Planet>
+
+ </Scene>
+
+</Level>
+
Modified: code/branches/presentationHS13/src/modules/docking/Dock.cc
===================================================================
--- code/branches/presentationHS13/src/modules/docking/Dock.cc 2013-12-16 13:17:42 UTC (rev 9906)
+++ code/branches/presentationHS13/src/modules/docking/Dock.cc 2013-12-16 13:22:45 UTC (rev 9907)
@@ -68,6 +68,8 @@
XMLPortObject(Dock, DockingEffect, "effects", addEffect, getEffect, xmlelement, mode);
XMLPortObject(Dock, DockingAnimation, "animations", addAnimation, getAnimation, xmlelement, mode);
XMLPortEventSink(Dock, BaseObject, "execute", execute, xmlelement, mode);
+ XMLPortEventSink(Dock, BaseObject, "undocking", undocking, xmlelement, mode);
+
}
void Dock::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
@@ -75,8 +77,56 @@
SUPER(Dock, XMLEventPort, xmlelement, mode);
XMLPortEventSink(Dock, BaseObject, "execute", execute, xmlelement, mode);
+
+ XMLPortEventSink(Dock, BaseObject, "undocking", undocking, xmlelement, mode);
}
+
+ bool Dock::undocking(bool bTriggered, BaseObject* trigger)
+ {
+
+ PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
+ PlayerInfo* player = NULL;
+
+ // Check whether it is a player trigger and extract pawn from it
+ if(pTrigger != NULL)
+ {
+ if(!pTrigger->isForPlayer()) { // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
+ orxout(verbose, context::docking) << "Docking:execute PlayerTrigger was not triggered by a player.." << endl;
+ return false;
+ }
+ player = pTrigger->getTriggeringPlayer();
+ }
+ else
+ {
+ orxout(verbose, context::docking) << "Docking::execute Not a player trigger, can't extract pawn from it.." << endl;
+ return false;
+ }
+ if(player == NULL)
+ {
+ orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
+ return false;
+ }
+
+ if(bTriggered)
+ {
+ // Add player to this Docks candidates
+ candidates_.insert(player);
+
+ // Show docking dialog
+ this->showUndockingDialogHelper(player);
+ }
+ else
+ {
+ // Remove player from candidates list
+ candidates_.erase(player);
+ }
+
+ return true;
+ }
+
+
+
bool Dock::execute(bool bTriggered, BaseObject* trigger)
{
PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
@@ -119,6 +169,24 @@
return true;
}
+
+ void Dock::showUndockingDialogHelper(PlayerInfo* player)
+ {
+ assert(player);
+
+ if(!player->isHumanPlayer())
+ return;
+
+ if(GameMode::isMaster())
+ {
+ if(GameMode::showsGraphics())
+ GUIManager::showGUI("UndockingDialog");
+ }
+ else
+ callStaticNetworkFunction(Dock::showDockingDialog, player->getClientID());
+
+ }
+
void Dock::showDockingDialogHelper(PlayerInfo* player)
{
assert(player);
@@ -176,6 +244,7 @@
if (animations_.empty())
return dockingAnimationFinished(player);
+
else
DockingAnimation::invokeAnimation(true, player, animations_);
Modified: code/branches/presentationHS13/src/modules/docking/Dock.h
===================================================================
--- code/branches/presentationHS13/src/modules/docking/Dock.h 2013-12-16 13:17:42 UTC (rev 9906)
+++ code/branches/presentationHS13/src/modules/docking/Dock.h 2013-12-16 13:22:45 UTC (rev 9907)
@@ -61,6 +61,7 @@
// Trigger interface
bool execute(bool bTriggered, BaseObject* trigger);
+ bool undocking(bool bTriggered, BaseObject* trigger);
// XML interface
virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
@@ -84,6 +85,8 @@
// tolua_begin
void dock()
{ this->dock(HumanController::getLocalControllerSingleton()->getPlayer()); }
+ void undock()
+ { this->undock(HumanController::getLocalControllerSingleton()->getPlayer()); }
static unsigned int getNumberOfActiveDocks();
static Dock* getActiveDockAtIndex(unsigned int index);
// tolua_end
@@ -94,6 +97,7 @@
// Network functions
void showDockingDialogHelper(PlayerInfo* player);
+ void showUndockingDialogHelper(PlayerInfo* player);
static void showDockingDialog();
private:
Modified: code/branches/presentationHS13/src/modules/docking/MoveToDockingTarget.cc
===================================================================
--- code/branches/presentationHS13/src/modules/docking/MoveToDockingTarget.cc 2013-12-16 13:17:42 UTC (rev 9906)
+++ code/branches/presentationHS13/src/modules/docking/MoveToDockingTarget.cc 2013-12-16 13:22:45 UTC (rev 9907)
@@ -65,8 +65,11 @@
bool MoveToDockingTarget::release(PlayerInfo *player)
{
//TODO: Investigate strange things...
- this->parent_->detach((WorldEntity*)player->getControllableEntity());
+ //this->parent_->detach((WorldEntity*)player->getControllableEntity());
+ //TODO: Check the issue with this detach call.
+ //I have removed the line because the detach call only caused a warning and terminated. And because I didn't find a attach call either.
+ //Didn't find the need for the line.
this->parent_->undockingAnimationFinished(player);
return true;
}
Modified: code/branches/presentationHS13/src/modules/objects/ForceField.cc
===================================================================
--- code/branches/presentationHS13/src/modules/objects/ForceField.cc 2013-12-16 13:17:42 UTC (rev 9906)
+++ code/branches/presentationHS13/src/modules/objects/ForceField.cc 2013-12-16 13:22:45 UTC (rev 9907)
@@ -44,10 +44,14 @@
/*static*/ const std::string ForceField::modeTube_s = "tube";
/*static*/ const std::string ForceField::modeSphere_s = "sphere";
/*static*/ const std::string ForceField::modeInvertedSphere_s = "invertedSphere";
+
+ /*static*/ const std::string ForceField::modeHomogen_s = "homogen";
+
/*static*/ const std::string ForceField::modeNewtonianGravity_s = "newtonianGravity";
/*static*/ const float ForceField::gravConstant_ = 6.673e-11;
/*static*/ const float ForceField::attenFactor_ = 1;
+
/**
@brief
Constructor. Registers the object and initializes some values.
@@ -88,6 +92,7 @@
XMLPortParam(ForceField, "massDiameter", setMassDiameter, getMassDiameter, xmlelement, mode).defaultValues(0);
XMLPortParam(ForceField, "length", setLength , getLength , xmlelement, mode).defaultValues(2000);
XMLPortParam(ForceField, "mode", setMode, getMode, xmlelement, mode);
+ XMLPortParam(ForceField, "forcedirection", setForceDirection, getForceDirection, xmlelement, mode).defaultValues(Vector3(0,-400,0));
}
void ForceField::registerVariables()
@@ -195,6 +200,21 @@
}
}
}
+ else if(this->mode_ == forceFieldMode::homogen)
+ {
+ // Iterate over all objects that could possibly be affected by the ForceField.
+ for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
+ {
+ Vector3 distanceVector = it->getWorldPosition() - this->getWorldPosition();
+ float distance = distanceVector.length();
+ if (distance < this->radius_ && distance > this->massRadius_)
+ {
+ // Add a Acceleration in forceDirection_.
+ // Vector3(0,0,0) is the direction, where the force should work.
+ it->addAcceleration(forceDirection_ , Vector3(0,0,0));
+ }
+ }
+ }
}
/**
@@ -213,6 +233,10 @@
this->mode_ = forceFieldMode::invertedSphere;
else if(mode == ForceField::modeNewtonianGravity_s)
this->mode_ = forceFieldMode::newtonianGravity;
+
+ else if(mode == ForceField::modeHomogen_s)
+ this->mode_ = forceFieldMode::homogen;
+
else
{
orxout(internal_warning) << "Wrong mode '" << mode << "' in ForceField. Setting to 'tube'." << endl;
@@ -238,6 +262,10 @@
return ForceField::modeInvertedSphere_s;
case forceFieldMode::newtonianGravity:
return ForceField::modeNewtonianGravity_s;
+
+ case forceFieldMode::homogen:
+ return ForceField::modeHomogen_s;
+
default:
return ForceField::modeTube_s;
}
Modified: code/branches/presentationHS13/src/modules/objects/ForceField.h
===================================================================
--- code/branches/presentationHS13/src/modules/objects/ForceField.h 2013-12-16 13:17:42 UTC (rev 9906)
+++ code/branches/presentationHS13/src/modules/objects/ForceField.h 2013-12-16 13:22:45 UTC (rev 9907)
@@ -1,3 +1,4 @@
+
/*
* ORXONOX - the hottest 3D action shooter ever to exist
* > www.orxonox.net <
@@ -56,7 +57,8 @@
tube, //!< The ForceField has a tube shape.
sphere, //!< The ForceField has a spherical shape.
invertedSphere, //!< The ForceField has a spherical shape but "inverted" behavior.
- newtonianGravity //!< The ForceField imitates Newtonian gravitation for use in stellar bodies.
+ newtonianGravity, //!< The ForceField imitates Newtonian gravitation for use in stellar bodies.
+ homogen //!< Local homogenous Force field with changeable direction for the Space Station
};
}
@@ -65,6 +67,7 @@
Implements a force field, that applies a force to any @ref orxonox::MobileEntity "MobileEntity" that enters its range.
The following parameters can be set to specify the behavior of the ForceField.
+ - @b forcedirection The direction and the strength of the homogenous force field. Default is 0,-400,0.
- @b velocity The amount of force the ForceField excerts. Default is 100.
- @b diameter The diameter of the ForceField. Default is 500.
- @b length The length of the ForceField. Default is 2000.
@@ -146,6 +149,13 @@
inline float getLength()
{ return this->halfLength_*2; }
+ inline void setForceDirection(Vector3 forcedir)
+ { this->forceDirection_ = forcedir; }
+
+ inline Vector3 getForceDirection()
+ { return this->forceDirection_; }
+
+
void setMode(const std::string& mode); //!< Set the mode of the ForceField.
const std::string& getMode(void); //!< Get the mode of the ForceField.
@@ -156,6 +166,8 @@
static const std::string modeInvertedSphere_s;
static const std::string modeNewtonianGravity_s;
+ static const std::string modeHomogen_s;
+
float velocity_; //!< The velocity of the ForceField.
float radius_; //!< The radius of the ForceField.
float massRadius_; //!< The radius of the stellar body for the Newtonian ForceField.
@@ -166,6 +178,7 @@
static const float gravConstant_;
//! Attenuation factor for Newtonian ForceFields
static const float attenFactor_;
+ Vector3 forceDirection_;
};
}
Modified: code/branches/presentationHS13/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/branches/presentationHS13/src/orxonox/infos/PlayerInfo.cc 2013-12-16 13:17:42 UTC (rev 9906)
+++ code/branches/presentationHS13/src/orxonox/infos/PlayerInfo.cc 2013-12-16 13:22:45 UTC (rev 9907)
@@ -228,7 +228,13 @@
if (!entity)
return;
- this->controllableEntity_->getController()->setActive(false);
+ Controller* tmp =this->controllableEntity_->getController();
+ if (tmp == NULL)
+ {
+ orxout(verbose) << "PlayerInfo: pauseControl, Controller is NULL " << endl;
+ return;
+ }
+ tmp->setActive(false);
//this->controllableEntity_->getController()->setControllableEntity(NULL);
this->controllableEntity_->setController(0);
}
More information about the Orxonox-commit
mailing list