[Orxonox-commit 5963] r10622 - in code/trunk: . data/defaultConfig data/gui/scripts data/levels data/levels/includes data/levels/templates data/particle src/libraries/network src/libraries/network/packet src/modules/objects src/modules/objects/controllers src/modules/tetris src/modules/towerdefense src/modules/weapons src/modules/weapons/munitions src/modules/weapons/projectiles src/modules/weapons/weaponmodes src/orxonox/controllers src/orxonox/worldentities/pawns

landauf at orxonox.net landauf at orxonox.net
Sun Oct 4 15:45:58 CEST 2015


Author: landauf
Date: 2015-10-04 15:45:56 +0200 (Sun, 04 Oct 2015)
New Revision: 10622

Added:
   code/trunk/data/gui/scripts/presentation.lua
   code/trunk/data/levels/clangenb.oxw
   code/trunk/data/levels/includes/weaponSettingsFS15.oxi
   code/trunk/data/levels/includes/weaponSettingsHeartAttack.oxi
   code/trunk/data/levels/includes/weaponSettingsRing.oxi
   code/trunk/data/levels/presentationFS15.oxw
   code/trunk/data/levels/simone.oxw
   code/trunk/data/levels/templates/orbStation.oxt
   code/trunk/data/levels/templates/spaceshipFS15.oxt
   code/trunk/data/levels/templates/spaceshipHeartAttack.oxt
   code/trunk/data/levels/templates/spaceshipRing.oxt
   code/trunk/data/levels/templates/towerdefensetower.oxt
   code/trunk/data/particle/FieldExplosion.particle
   code/trunk/data/particle/GravityBombField.particle
   code/trunk/data/particle/orxonox_explosionAfterglow.particle
   code/trunk/data/particle/orxonox_explosionFlame.particle
   code/trunk/data/particle/orxonox_explosionFlame2.particle
   code/trunk/data/particle/orxonox_explosionFlash.particle
   code/trunk/data/particle/orxonox_explosionFlash2.particle
   code/trunk/data/particle/orxonox_explosionShockwave.particle
   code/trunk/data/particle/orxonox_explosionShockwave2.particle
   code/trunk/data/particle/orxonox_explosionSparks.particle
   code/trunk/data/particle/orxonox_explosionSparks2.particle
   code/trunk/data/particle/orxonox_explosionStreak1.particle
   code/trunk/data/particle/orxonox_explosionStreak2.particle
   code/trunk/src/modules/towerdefense/TowerDefenseSelecter.cc
   code/trunk/src/modules/towerdefense/TowerDefenseSelecter.h
   code/trunk/src/modules/weapons/munitions/GravityBombMunition.cc
   code/trunk/src/modules/weapons/munitions/GravityBombMunition.h
   code/trunk/src/modules/weapons/projectiles/GravityBomb.cc
   code/trunk/src/modules/weapons/projectiles/GravityBomb.h
   code/trunk/src/modules/weapons/projectiles/GravityBombField.cc
   code/trunk/src/modules/weapons/projectiles/GravityBombField.h
   code/trunk/src/modules/weapons/projectiles/RocketOld.cc
   code/trunk/src/modules/weapons/projectiles/RocketOld.h
   code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.cc
   code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.h
   code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.cc
   code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.h
Removed:
   code/trunk/data/levels/templates/tower.oxt
   code/trunk/src/modules/towerdefense/Tower.cc
   code/trunk/src/modules/towerdefense/Tower.h
   code/trunk/src/modules/towerdefense/TowerTurret.cc
   code/trunk/src/modules/towerdefense/TowerTurret.h
Modified:
   code/trunk/
   code/trunk/data/defaultConfig/keybindings.ini
   code/trunk/data/gui/scripts/MultiplayerMenu.lua
   code/trunk/data/gui/scripts/testscript.lua
   code/trunk/data/levels/includes/weaponSettingsAssff.oxi
   code/trunk/data/levels/scriptController.oxw
   code/trunk/data/levels/templates/enemytowerdefense.oxt
   code/trunk/data/levels/towerDefense.oxw
   code/trunk/src/libraries/network/GamestateManager.h
   code/trunk/src/libraries/network/LANDiscoverable.cc
   code/trunk/src/libraries/network/LANDiscoverable.h
   code/trunk/src/libraries/network/LANDiscovery.cc
   code/trunk/src/libraries/network/LANDiscovery.h
   code/trunk/src/libraries/network/MasterServer.cc
   code/trunk/src/libraries/network/MasterServer.h
   code/trunk/src/libraries/network/MasterServerProtocol.h
   code/trunk/src/libraries/network/PeerList.cc
   code/trunk/src/libraries/network/PeerList.h
   code/trunk/src/libraries/network/Server.cc
   code/trunk/src/libraries/network/Server.h
   code/trunk/src/libraries/network/ServerList.cc
   code/trunk/src/libraries/network/ServerList.h
   code/trunk/src/libraries/network/WANDiscoverable.cc
   code/trunk/src/libraries/network/WANDiscoverable.h
   code/trunk/src/libraries/network/WANDiscovery.cc
   code/trunk/src/libraries/network/WANDiscovery.h
   code/trunk/src/libraries/network/packet/ServerInformation.cc
   code/trunk/src/libraries/network/packet/ServerInformation.h
   code/trunk/src/modules/objects/ForceField.h
   code/trunk/src/modules/objects/Turret.cc
   code/trunk/src/modules/objects/Turret.h
   code/trunk/src/modules/objects/controllers/TurretController.cc
   code/trunk/src/modules/tetris/Tetris.h
   code/trunk/src/modules/towerdefense/CMakeLists.txt
   code/trunk/src/modules/towerdefense/TDCoordinate.cc
   code/trunk/src/modules/towerdefense/TDCoordinate.h
   code/trunk/src/modules/towerdefense/TowerDefense.cc
   code/trunk/src/modules/towerdefense/TowerDefense.h
   code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc
   code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h
   code/trunk/src/modules/towerdefense/TowerDefenseEnemy.cc
   code/trunk/src/modules/towerdefense/TowerDefenseTower.cc
   code/trunk/src/modules/towerdefense/TowerDefenseTower.h
   code/trunk/src/modules/weapons/WeaponsPrereqs.h
   code/trunk/src/modules/weapons/munitions/CMakeLists.txt
   code/trunk/src/modules/weapons/projectiles/CMakeLists.txt
   code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.cc
   code/trunk/src/modules/weapons/projectiles/Rocket.cc
   code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt
   code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc
   code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc
   code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc
   code/trunk/src/orxonox/controllers/ControllerDirector.cc
   code/trunk/src/orxonox/controllers/ControllerDirector.h
   code/trunk/src/orxonox/controllers/FormationController.cc
   code/trunk/src/orxonox/controllers/ScriptController.cc
   code/trunk/src/orxonox/controllers/ScriptController.h
   code/trunk/src/orxonox/controllers/testscript.lua
   code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
Log:
merged branch presentationFS15merge back to trunk


Property changes on: code/trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /code/branches/Racingbot:9388-9513
/code/branches/ScriptableController:9999-10075
/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/hudHS14:10083-10241
/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/keckslevelHS14:10082-10222
/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/levelElias:9697-9921
/code/branches/levelKaan:9695-9921
/code/branches/levelMichael:9696-9921
/code/branches/leveljoemeHS14:10087-10223
/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/minigame4DHS14:10081-10230
/code/branches/miniprojects:2754-2824
/code/branches/modularships:9994-10071
/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/pickupsFS14:10000-10259
/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/presentationFS14:10069-10215
/code/branches/presentationHS12:9481-9525
/code/branches/presentationHS13:9891-9938
/code/branches/presentationHS14merge:10222-10257
/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/sfxThilo:9691-9917
/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/storymodeHS14:10085-10254
/code/branches/surfaceRace:9028-9199
/code/branches/surfaceraceHS14:10080-10236
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/towerdefenseHS14:10086-10247
/code/branches/turret:9380-9501
/code/branches/turretFS14:9998-10070
/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/weaponupdateHS14:10084-10237
   + /code/branches/ParticleEffectsFS15:10309-10612
/code/branches/Racingbot:9388-9513
/code/branches/SciptableControllerFS15:10308-10613
/code/branches/ScriptableController:9999-10075
/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/clangenb:10385-10609
/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/core7:10350
/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/formationFS15:10320-10610
/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/hudHS14:10083-10241
/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/keckslevelHS14:10082-10222
/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/levelElias:9697-9921
/code/branches/levelKaan:9695-9921
/code/branches/levelMichael:9696-9921
/code/branches/leveljoemeHS14:10087-10223
/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/minigame4DHS14:10081-10230
/code/branches/miniprojects:2754-2824
/code/branches/modularships:9994-10071
/code/branches/multiplayerFS15:10324-10611
/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/pickupsFS14:10000-10259
/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/presentationFS14:10069-10215
/code/branches/presentationFS15:10499
/code/branches/presentationFS15merge:10595-10621
/code/branches/presentationHS12:9481-9525
/code/branches/presentationHS13:9891-9938
/code/branches/presentationHS14merge:10222-10257
/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/sfxThilo:9691-9917
/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/storymodeHS14:10085-10254
/code/branches/surfaceRace:9028-9199
/code/branches/surfaceraceHS14:10080-10236
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/towerdefenseFS15:10283-10614
/code/branches/towerdefenseHS14:10086-10247
/code/branches/turret:9380-9501
/code/branches/turretFS14:9998-10070
/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/weaponFS15:10302-10615
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
/code/branches/weaponupdateHS14:10084-10237

Modified: code/trunk/data/defaultConfig/keybindings.ini
===================================================================
--- code/trunk/data/defaultConfig/keybindings.ini	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/data/defaultConfig/keybindings.ini	2015-10-04 13:45:56 UTC (rev 10622)
@@ -141,7 +141,7 @@
 KeyWebSearch=
 KeyWebStop=
 KeyX="selectClosest"
-KeyY=
+KeyY="onpress fire 4"
 KeyYen=
 KeyZ="selectNext"
 

Modified: code/trunk/data/gui/scripts/MultiplayerMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/MultiplayerMenu.lua	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/data/gui/scripts/MultiplayerMenu.lua	2015-10-04 13:45:56 UTC (rev 10622)
@@ -69,7 +69,7 @@
     local destination = nil
     if choice then
         local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID()
-        destination = P.serverList[index][2]
+        destination = P.serverList[index][1]
     else
         return
     end
@@ -92,6 +92,8 @@
         local index = 0
         local servername = ""
         local serverip = ""
+        local serverrtt = ""
+        local playernumber = ""
         while true do
             servername = discovery:getServerListItemName(index)
             if servername == "" then
@@ -101,12 +103,15 @@
             if serverip == "" then
                 break
             end
-            table.insert(P.serverList, {servername, serverip})
+            --serverrtt = discovery:getServerListItemRTT(index)
+            playernumber = discovery:getServerListItemPlayerNumber(index)
+
+            table.insert(P.serverList, {serverip, servername, playernumber})
             index = index + 1
         end
         index = 1
         for k,v in pairs(P.serverList) do
-            local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] )
+            local item = CEGUI.createListboxTextItem("IP: " .. v[1] .. " Name: " .. v[2] .. " Players: " .. v[3])
             item:setID(index)
             index = index + 1
             item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
@@ -124,6 +129,8 @@
         local index = 0
         local servername = ""
         local serverip = ""
+        local serverrtt = ""
+        local playernumber = ""
         while true do
             servername = discovery:getServerListItemName(index)
             if servername == "" then
@@ -133,12 +140,15 @@
             if serverip == "" then
                 break
             end
-            table.insert(P.serverList, {servername, serverip})
+            --serverrtt = discovery:getServerListItemRTT(index)
+            playernumber = discovery:getServerListItemPlayerNumber(index)
+
+            table.insert(P.serverList, {serverip, servername, playernumber})
             index = index + 1
         end
         index = 1
         for k,v in pairs(P.serverList) do
-            local item = CEGUI.createListboxTextItem( v[1] .. ": " .. v[2] )
+            local item = CEGUI.createListboxTextItem("IP: " .. v[1] .. " Name: " .. v[2] .. " Players: " .. v[3])
             item:setID(index)
             index = index + 1
             item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
@@ -149,4 +159,3 @@
 end
 
 return P
-

Copied: code/trunk/data/gui/scripts/presentation.lua (from rev 10621, code/branches/presentationFS15merge/data/gui/scripts/presentation.lua)
===================================================================
--- code/trunk/data/gui/scripts/presentation.lua	                        (rev 0)
+++ code/trunk/data/gui/scripts/presentation.lua	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,37 @@
+-- Set some test variables
+x0 = 0
+y0 = 500
+z0 = 500
+
+xo = 2000 
+yo = 0
+zo = 0
+
+x1 = 3000
+y1 = 0 
+z1 = 0
+
+x2 = 2000
+y2 = 2000 
+z2 = 0
+
+-- Get a local pointer to a scriptcontroller
+local ctrl = orxonox.ScriptController:getScriptController()
+
+-- If it worked, call its "movetoposition" function
+if ctrl ~= nil then
+
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("chl", x0, y0, z0, xo, yo, zo, 2)
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("mal", x2, y2, z2, xo, yo, zo, 2)
+  ctrl:eventScheduler("mal", x1, y1, z1, xo, yo, zo, 2)
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("ral", xo, yo, zo, 3, 1000, 0, 5)
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("ral", xo, yo, zo, 2, 1000, 0, 5)
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("ral", xo, yo, zo, 1, 1000, 0, 5)
+  ctrl:eventScheduler("idle", 1)
+
+end
\ No newline at end of file

Modified: code/trunk/data/gui/scripts/testscript.lua
===================================================================
--- code/trunk/data/gui/scripts/testscript.lua	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/data/gui/scripts/testscript.lua	2015-10-04 13:45:56 UTC (rev 10622)
@@ -21,72 +21,20 @@
 
 -- If it worked, call its "movetoposition" function
 if ctrl ~= nil then
-  -- Move to the starting point at (xl+3000,yl,zl) while looking 
-  -- at xl,yl,zl over the time span of 3 seconds
-  ctrl:eventScheduler("mal", xl+3000,yl,zl, xl,yl,zl, 1, 0)
 
-  -- From there, perform a rotation around the harvester placed there
-  -- in 100 steps
-  dt = math.pi/100
-  for t = 0,math.pi,dt do
-    xt = math.cos(t)
-    yt = math.sin(t)
+  ctrl:eventScheduler("mal", xl,yl,zl, xl,yl,zl, 2)
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("ral", xl, yl, zl, 3, 3000, 0, math.pi)
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3)
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("chl", xl, yl, zl, xr, yr, zr, 2)
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("mal", xr + 600,yr,zr, xr,yr,zr, 4)
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("chl", xr, yr, zr, xl, yl, zl, 3)
+  ctrl:eventScheduler("idle", 1)
+  ctrl:eventScheduler("spi", xm,ym,zm, 0,0,0, 4)
+  ctrl:eventScheduler("idle", 1)
 
-    ctrl:eventScheduler("mal", xl+3000*xt, yl+3000*yt, zl, xl, yl, zl, dt, t+0.9)
-  end
-
-
-  -- Update absolute time
-  Tabs = math.pi + 0.9
-
-  
-
-  -- Move away again, still looking at the station
-  ctrl:eventScheduler("mal", 0,0,1000, xl,yl,zl, 3, Tabs+0.4)
-
-
-
-  -- Update absolute time
-  Tabs = Tabs + 0.4 + 3
-
-  
-
-  
-
-  -- Transition the look from (xl,yl,zl) to (3500,0,0) in 3 seconds
-  ctrl:eventScheduler("chl", xl, yl, zl, xr, yr, zr, 2, Tabs+0.2)
-
-  Tabs = Tabs + 2 + 0.2
-
-   ctrl:eventScheduler("mal", xr + 600,yr,zr, xr,yr,zr, 4, Tabs+0)
-
-   Tabs = Tabs + 4 
-
-  for t = 0,math.pi,dt do
-    xt = math.cos(t)
-    zt = math.sin(t)
-
-    ctrl:eventScheduler("mal", xr+600*xt, yr, zr+600*zt, xr, yr, zr, dt, Tabs+t)
-  end
-
-  Tabs = Tabs + math.pi
-
-  ctrl:eventScheduler("chl", xr, yr, zr, xl, yl, zl, 3, Tabs+0.2)
-
-  Tabs = Tabs + 3 + 0.2
-
-  ctrl:eventScheduler("mal", xm,ym,zm, xl,yl,zl, 4, Tabs+2.5)
-
-
-end
-
-
-
--- Output the newctrlid variable we set from the C++ code
-if newctrlid ~= nil then
-  orxonox.execute("orxout message test " .. newctrlid)
-end
-
---orxonox.execute("setPause 1")
-
-
+end
\ No newline at end of file

Copied: code/trunk/data/levels/clangenb.oxw (from rev 10621, code/branches/presentationFS15merge/data/levels/clangenb.oxw)
===================================================================
--- code/trunk/data/levels/clangenb.oxw	                        (rev 0)
+++ code/trunk/data/levels/clangenb.oxw	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,55 @@
+<LevelInfo
+ name = "clangenb"
+ description = "A level with absolutely nothing in it."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff2.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipHeartAttack.oxt")
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipHeartAttack />
+    <SpaceShip position="0,2000,200" lookat="0,0,0" name="movingtarget" radarname="Pirate">
+                            <events>
+                                <visibility>
+                                    <EventListener event="boxtrigger4" />
+                                </visibility>
+                            </events>
+                    <templates>
+                      <Template link=spaceshippirate />
+                    </templates>
+                    <controller>
+                      <WaypointController team=1>
+                         <waypoints>
+                          <Model mesh="cube.mesh" scale=8 position="  0,1700,-200" />
+                          <Model mesh="cube.mesh" scale=8 position="  0,1700,-700" />
+                          <Model mesh="cube.mesh" scale=8 position="500,1700,-700" />
+                          <Model mesh="cube.mesh" scale=8 position="500,1700,-200" />
+                       </waypoints>
+                    </WaypointController>
+                  </controller>
+                </SpaceShip>
+  </Scene>
+</Level>
+

Modified: code/trunk/data/levels/includes/weaponSettingsAssff.oxi
===================================================================
--- code/trunk/data/levels/includes/weaponSettingsAssff.oxi	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/data/levels/includes/weaponSettingsAssff.oxi	2015-10-04 13:45:56 UTC (rev 10622)
@@ -24,6 +24,7 @@
             <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-76" yaw="-90" position="-1.5,1,0.3" scale=0.6 />
           </attached>
           <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare" muzzleoffset="2,-0.2,-1" />
           <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
         </Weapon>
@@ -38,7 +39,7 @@
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
         </Weapon>
         <Weapon>
-          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
+          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
           <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
         </Weapon>
       </WeaponPack>

Copied: code/trunk/data/levels/includes/weaponSettingsFS15.oxi (from rev 10621, code/branches/presentationFS15merge/data/levels/includes/weaponSettingsFS15.oxi)
===================================================================
--- code/trunk/data/levels/includes/weaponSettingsFS15.oxi	                        (rev 0)
+++ code/trunk/data/levels/includes/weaponSettingsFS15.oxi	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,51 @@
+<weaponslots>
+  <WeaponSlot position=" 0, 0, 0" />
+  <WeaponSlot position=" 0, 0, 0" />
+  <WeaponSlot position=" 0, 0, 0" />
+  <WeaponSlot position=" 0, 0, 0" />
+</weaponslots>
+<weaponsets>
+  <WeaponSet firemode=0 />
+  <WeaponSet firemode=1 />
+  <WeaponSet firemode=2 />
+  <WeaponSet firemode=3 />
+  <WeaponSet firemode=4 />
+</weaponsets>
+<weapons>
+  <WeaponPack>
+    <links>
+      <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+      <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+      <DefaultWeaponmodeLink firemode=2 weaponmode=2 />
+      <DefaultWeaponmodeLink firemode=3 weaponmode=3 />
+      <DefaultWeaponmodeLink firemode=4 weaponmode=4 />
+    </links>
+    <Weapon>
+      <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -11.4, 0, -5" />
+      <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -11.4, 0, -5" />
+      <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 11.4, 0, -5" />
+      <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 11.4, 0, -5" />
+    </Weapon>
+    <Weapon>
+      <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -15, 1.6, -2" />
+      <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -15, 1.6, -2" />
+      <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 15, 1.6, -2" />
+      <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 15, 1.6, -2" />
+    </Weapon>
+    <Weapon>
+      <LaserFire mode=1 munitionpershot=0 muzzleoffset="2.2,6,16" damage=30 shielddamage=20 />
+      <LaserFire mode=1 munitionpershot=0 muzzleoffset="-2.2,6,16" damage=30 shielddamage=20 />
+      <GravityBombFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
+      <RocketFireOld mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+      <RocketFire mode=4 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+    </Weapon>
+  </WeaponPack>
+  <WeaponPack>
+    <links>
+      <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
+    </links>
+    <!--Weapon>
+      <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
+    </Weapon-->
+  </WeaponPack>
+</weapons>
\ No newline at end of file

Copied: code/trunk/data/levels/includes/weaponSettingsHeartAttack.oxi (from rev 10621, code/branches/presentationFS15merge/data/levels/includes/weaponSettingsHeartAttack.oxi)
===================================================================
--- code/trunk/data/levels/includes/weaponSettingsHeartAttack.oxi	                        (rev 0)
+++ code/trunk/data/levels/includes/weaponSettingsHeartAttack.oxi	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,50 @@
+    <weaponslots>
+      <WeaponSlot position=" 0, 0, 0" />
+      <WeaponSlot position=" 0, 0, 0" />
+      <WeaponSlot position=" 0, 0, 0" />
+      <WeaponSlot position=" 0, 0, 0" />
+    </weaponslots>
+    <weaponsets>
+      <WeaponSet firemode=0 />
+      <WeaponSet firemode=1 />
+      <WeaponSet firemode=2 />
+      <WeaponSet firemode=3 />
+    </weaponsets>
+    <weapons>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+          <DefaultWeaponmodeLink firemode=2 weaponmode=2 />
+          <DefaultWeaponmodeLink firemode=3 weaponmode=3 />
+        </links>
+        <Weapon>
+          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -11.4, 0, -5" />
+          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -11.4, 0, -5" />
+          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 11.4, 0, -5" />
+          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 11.4, 0, -5" />
+        </Weapon>
+        <Weapon>
+          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -15, 1.6, -2" />
+          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -15, 1.6, -2" />
+          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 15, 1.6, -2" />
+          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 15, 1.6, -2" />
+        </Weapon>
+        <Weapon>
+          <LaserFire mode=1 munitionpershot=0 muzzleoffset="2.2,6,16" damage=30 shielddamage=20 />
+          <LaserFire mode=1 munitionpershot=0 muzzleoffset="-2.2,6,16" damage=30 shielddamage=20 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+          <GravityBombFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
+        </Weapon>
+        <Weapon>
+        </Weapon>
+      </WeaponPack>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
+        </links>
+        <!--Weapon>
+          <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
+        </Weapon-->
+      </WeaponPack>
+    </weapons>

Copied: code/trunk/data/levels/includes/weaponSettingsRing.oxi (from rev 10621, code/branches/presentationFS15merge/data/levels/includes/weaponSettingsRing.oxi)
===================================================================
--- code/trunk/data/levels/includes/weaponSettingsRing.oxi	                        (rev 0)
+++ code/trunk/data/levels/includes/weaponSettingsRing.oxi	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,22 @@
+<weaponslots>
+  <WeaponSlot position="11,0,-7" />
+  <WeaponSlot position="-11,0,-7" />
+</weaponslots>
+<weaponsets>
+  <WeaponSet firemode=0 />
+  <WeaponSet firemode=1 />
+</weaponsets>
+<weapons>
+  <WeaponPack>
+    <links>
+      <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+      <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+    </links>
+    <Weapon>
+      <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.4,-3" projectileMesh="LaserBeam2.mesh" />
+    </Weapon>
+    <Weapon>
+      <HsW01 mode=0 munitionpershot=0 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset="0.1, 1.4, -3" projectileMesh="LaserBeam2.mesh" />
+    </Weapon>
+  </WeaponPack>
+</weapons>

Copied: code/trunk/data/levels/presentationFS15.oxw (from rev 10621, code/branches/presentationFS15merge/data/levels/presentationFS15.oxw)
===================================================================
--- code/trunk/data/levels/presentationFS15.oxw	                        (rev 0)
+++ code/trunk/data/levels/presentationFS15.oxw	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,103 @@
+<LevelInfo
+ name = "Presentation FS15"
+ description = "Level for Presentation."
+ tags = "presentation"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipRing.oxt")
+  include("templates/spaceshipFS15.oxt")
+  include("templates/orbStation.oxt")
+  include("templates/spaceshipSwallow.oxt")
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint team=0 position="-500,0,0" lookat="-1000,0,0" spawnclass=SpaceShip pawndesign=spaceshipfs15/>
+
+    <?lua for i=0,4,1 do ?>
+      <SpaceShip position="-3000,<?lua print(i*200)?>,0" lookat="-500,0,0" visible="true">
+        <templates>
+          <Template link=spaceshipswallow />
+        </templates>
+      </SpaceShip>
+    <?lua end ?>
+
+
+    <!-- Docking  -->
+    <Dock position="-2000,0,-1000" roll=0 yaw=0 >
+      <attached>
+        <Billboard position="0,0,0" material="Alien" scale=5/>
+        <DistanceTrigger position="0,0,0" distance="200" target="Pawn" beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"/>
+      </attached>
+      <animations>
+        <MoveToDockingTarget target="destroyer" />
+      </animations>
+      <effects>
+        <DockToShip target="destroyer" />
+      </effects>
+      <events>
+        <execute>
+          <EventListener event="dockMe" />
+        </execute>
+      </events>
+    </Dock>
+
+    <SpaceShip position="0,0,0" lookat="0,1000,1000" >
+      <attached>
+        <DistanceTriggerBeacon name="bcnDestroyer" />
+        <DockingTarget name="destroyer" />
+      </attached>
+      <templates>
+        <Template link=spaceshipring />
+      </templates>
+      <events>
+        <visibility>
+          <EventListener event="dockMe" />
+        </visibility>
+      </events>
+    </SpaceShip>
+
+    <MovableEntity position="2000,0,0" >
+      <templates>
+        <Template link=orbStation/>
+      </templates>
+      <events>
+        <visibility>
+          <EventListener event="dockMe" />
+        </visibility>
+      </events>
+    </MovableEntity>
+
+    <Billboard position="0,500,500" material="Flares/ringflare2" colour="0.8,0.4,0.2" scale=1 />
+    <DistanceTrigger position="0,500,500" distance="20" target="Pawn" name="takeControl"/>
+    
+    <ControllerDirector position="0,500,500" scriptname="presentation">
+      <events>
+        <takeControl>
+          <EventListener event="takeControl" />
+        </takeControl>
+      </events>
+    </ControllerDirector>
+
+
+  </Scene>
+</Level>
+

Modified: code/trunk/data/levels/scriptController.oxw
===================================================================
--- code/trunk/data/levels/scriptController.oxw	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/data/levels/scriptController.oxw	2015-10-04 13:45:56 UTC (rev 10622)
@@ -1,7 +1,7 @@
 <!-- First levelFile of mkronig and samuezu. It was copied from dockingToASpaceStation.oxw and modified a little bit -->
 <LevelInfo
- name = "Fancy orxout tests"
- description = "Docking into a spacestation."
+ name = "Scriptable Controller"
+ description = "Showcase for Scriptable Controller"
  tags = "showcase"
  screenshot = "emptylevel.png"
 />
@@ -10,17 +10,10 @@
   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
@@ -39,160 +32,36 @@
     hasPhysics   = true
   >
 
-    <?lua
-      include("includes/pickups.oxi")
-    ?>
-
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0,1.0,1.0,0.5" specular="1.0, 0.9, 0.9, 1.0"/>
+
     <SpawnPoint team=0 position="3200,0,0" lookat="2800,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
 
-    <StaticEntity position  = "2800,0,0" mass=10000 collisionType=static >
-      <attached>
-        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
-      </attached>
-      <collisionShapes>
-        <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
-        <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
-        <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
-        <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
-        <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
-        <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
-        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
-        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
-        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
-        <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
-        <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
-        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
-        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
-        <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
-        <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
-        <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
-      </collisionShapes>
-    </StaticEntity>
-
-<!-- Docking  -->
-    <Dock position="2830,20,50" roll=0 yaw=0 >
-        <animations>
-            <MoveToDockingTarget target="destroyer" />
-        </animations>
-        <effects>
-            <DockToShip target="spaceShip" />
-        </effects>
-        <events>
-            <execute>
-                <EventListener event="dockMe" />
-            </execute>
-
-	    <undocking>
-		<EventListener event="undockMe" />
-	    </undocking>
-	
-            <activity>
-                <EventListener event=notGameEnd />
-            </activity>
-        </events>
-        <attached>
-	<!-- Trigger for docking with billboard -->
-
-		<!-- removed -->
-
-	<!-- Trigger for undocking with billboard -->
-	    <!-- <Billboard position="-2630,-19970,150" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 /> -->
-	    <DistanceTrigger position="-2630,-19970,150" distance="50" target="Pawn"
-                beaconMode="identify" targetname="bcnDestroyer" name="undockMe"
-            />
-        </attached>
-    </Dock>
-
-    <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=100 />
-    <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
-      beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
+    <Billboard position="2500,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=10 />
+    <DistanceTrigger position="2500,0,0" distance="200" target="Pawn"
+      beaconMode="exclude" targetname="bcnDestroyer" name="takeControl"
     />
 
-
-<!-- Object, which orxouts the message "hello Universe!". EVENT NOT WORKING  -->
-    <ScriptController position="0,0,0">
-        <events>
-            <party>
-                <EventListener event="dockMe" />
-            </party>
-
-        </events>
-
-    </ScriptController>
-
-
-<!-- FPS Player as destination of the dock -->
-<FpsPlayer template = "fps" radarname = "First Person Player" position = "0,-19900,0" >
+    <StaticEntity position  = "2000,500,2000" mass=10000 collisionType=static >
       <attached>
-        <DockingTarget name="spaceShip" />
-        <DistanceTriggerBeacon name="bcnDestroyer" />
-        <DockingTarget name="destroyer" />
+        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=10 />
       </attached>
-</FpsPlayer>
+    </StaticEntity>
 
-
-<!-- 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 >
+    <StaticEntity position  = "-1000,3000,-1000" mass=10000 collisionType=static >
       <attached>
-        <Model position="0,0,0" mesh="crate.mesh" scale3D="80,80,5" />
+        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=80 />
       </attached>
-      <collisionShapes>
-        <BoxCollisionShape position="0,0,0" halfExtents="400,400,25" />
-      </collisionShapes>
-  </StaticEntity>
+    </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" />
+<!-- ControllerDirector waits for the event takeControl to attach a new Controller -->
+    <ControllerDirector position="0,0,0" scriptname="presentation">
+        <events>
+            <takeControl>
+                <EventListener event="takeControl" />
+            </takeControl>
+        </events>
+    </ControllerDirector>
 
-
-<!-- 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>
 

Copied: code/trunk/data/levels/simone.oxw (from rev 10621, code/branches/presentationFS15merge/data/levels/simone.oxw)
===================================================================
--- code/trunk/data/levels/simone.oxw	                        (rev 0)
+++ code/trunk/data/levels/simone.oxw	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,37 @@
+<LevelInfo
+ name = "Simone"
+ description = "A level with absolutely nothing in it."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff2.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipRing.oxt")
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipring />
+    <Model position="0,0,0" mesh="ship.mesh" scale="3"/>
+    
+  </Scene>
+</Level>
+

Modified: code/trunk/data/levels/templates/enemytowerdefense.oxt
===================================================================
--- code/trunk/data/levels/templates/enemytowerdefense.oxt	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/data/levels/templates/enemytowerdefense.oxt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -166,7 +166,7 @@
    health            = 100
    maxhealth         = 200
    initialhealth     = 100
-
+   
    shieldhealth        = 30
    initialshieldhealth = 30
    maxshieldhealth     = 50

Copied: code/trunk/data/levels/templates/orbStation.oxt (from rev 10621, code/branches/presentationFS15merge/data/levels/templates/orbStation.oxt)
===================================================================
--- code/trunk/data/levels/templates/orbStation.oxt	                        (rev 0)
+++ code/trunk/data/levels/templates/orbStation.oxt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,64 @@
+<Template name=orbStation>
+  <MovableEntity>
+    <attached>
+      
+
+      <MovableEntity rotationaxis = "0,1,0" rotationrate="50,0,0">
+        <attached>
+          <Model position=“0,0,0“ yaw = 0 mesh="OrbStation_Sphere.mesh" scale="40"/>
+        </attached>
+      </MovableEntity>
+
+      <MovableEntity rotationaxis = "1,1,1" rotationrate="50,0,0">
+        <attached>
+          <Model position=“0,0,0“ mesh="OrbStation_Ring_2.mesh" scale="40" />
+        </attached>
+      </MovableEntity>
+
+      <MovableEntity rotationaxis = "1,1,-1" rotationrate="50,0,0">
+        <attached>
+           <Model position=“0,0,0“ mesh="OrbStation_Ring_3.mesh" scale="40" />
+        </attached>
+      </MovableEntity>
+
+      <MovableEntity rotationaxis = "-1,1,1" rotationrate="50,0,0">
+        <attached>
+          <Model position=“0,0,0“ mesh="OrbStation_Ring_4.mesh" scale="40" />
+        </attached>
+      </MovableEntity>
+
+      <MovableEntity rotationaxis = "-1,1,-1" rotationrate="50,0,0">
+        <attached>
+          <Model position=“0,0,0“ mesh="OrbStation_Ring_5.mesh" scale="40"/>
+        </attached>
+      </MovableEntity>
+
+      <MovableEntity rotationaxis = "0,1,0" rotationrate="1,0,0">
+        <attached>
+          
+          
+          <Model position=“0,0,0“ mesh="OrbStation_Ring_1.mesh" scale="40" />
+
+          <Model position= "180,0,0" yaw = 0 mesh="OrbStation_Platform.mesh" scale="40"/>
+          <Model position= "0,0,180" yaw = -90 mesh="OrbStation_Platform.mesh" scale="40"/>
+          <Model position= "0,0,-180" yaw = -90 mesh="OrbStation_OpenPlat.mesh" scale="40"/>
+          
+          <Model position= "-200,0,0" yaw = 90 mesh="OrbStation_Antenna.mesh" scale="40"/>          
+          <MovableEntity position= "-305,0,0" rotationaxis = "1,0,0" rotationrate="50,0,0">
+            <attached>
+              <Model position= "0,0,0" yaw = 90 mesh="OrbStation_Parabola.mesh" scale="40"/>
+            </attached>
+          </MovableEntity>
+          
+
+        </attached>
+      </MovableEntity>
+
+
+      <Backlight position="0,0,0" scale=10 colour="0.2, 0.4, 0.8" width=100 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
+
+    </attached>
+  </MovableEntity>
+</Template>
+  
+

Copied: code/trunk/data/levels/templates/spaceshipFS15.oxt (from rev 10621, code/branches/presentationFS15merge/data/levels/templates/spaceshipFS15.oxt)
===================================================================
--- code/trunk/data/levels/templates/spaceshipFS15.oxt	                        (rev 0)
+++ code/trunk/data/levels/templates/spaceshipFS15.oxt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,125 @@
+<Template name=spaceshipfs15>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipfs15cameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 6
+
+   health            = 200
+   maxhealth         = 300
+   initialhealth     = 150
+
+   shieldhealth        = 50
+   initialshieldhealth = 50
+   maxshieldhealth     = 800
+   shieldabsorption    = 0.8
+   reloadrate          = 1
+   reloadwaittime      = 1
+
+   primaryThrust     = 40
+   auxilaryThrust    = 30
+   rotationThrust    = 35
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 15
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 9
+
+   collisionType     = "dynamic"
+   mass              = 100
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+
+   explosionSound = "sounds/Explosion2.ogg"
+  >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 19" template=spaceshipfs15engine />
+      <MultiStateEngine position="-7.6, 0, 19" template=spaceshipfs15engine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=0 roll=0 scale=4 mesh="HeartAttack.mesh" />
+      <!--BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
+      <BlinkingBillboard position="-17,-1.5,0" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude=0.1 frequency=0.5 phase=180 quadratic=1 /-->
+    </attached>
+    <collisionShapes>
+        <BoxCollisionShape position="0,0.8,6"      halfExtents="12, 3, 10" />
+        <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
+  <BoxCollisionShape position="4.7,1,-8"      halfExtents="2, 3, 5" />
+  <BoxCollisionShape position="-4.7,1,-8"      halfExtents="2, 3, 5" />
+        <BoxCollisionShape position="13.5,1,5"  halfExtents="1.4, 3, 7" />
+  <BoxCollisionShape position="-13.5,1,5"  halfExtents="1.4, 3, 7" />
+  <BoxCollisionShape position="16,2,4"  halfExtents="1.4, 1.5, 4" />
+  <BoxCollisionShape position="-16,2,4"  halfExtents="1.4, 1.5, 4" />
+  <BoxCollisionShape position="-2.8,5,4"  halfExtents="1.4, 1.5, 2" />
+  <BoxCollisionShape position="2.8,5,4"  halfExtents="1.4, 1.5, 2" />
+  <BoxCollisionShape position="5,5,4.3"  halfExtents="1.4, 1.5, 1.4" />
+  <BoxCollisionShape position="-5,5,4.3"  halfExtents="1.4, 1.5, 1.4" />
+    </collisionShapes>
+<?lua
+  include("../includes/weaponSettingsFS15.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipfs15cameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,12, 48" drag=true mouselook=true />
+      <CameraPosition position="0,20, 80" drag=true mouselook=true />
+      <CameraPosition position="0,30,120" drag=true mouselook=true />
+    </camerapositions>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipfs15engine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2
+
+   speedfront     = 150
+   speedback      =  50
+   speedleftright =  50
+   speedupdown    =  50
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+   
+   accelerationfront     = 420
+   accelerationbrake     = 420
+   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.1 position="4, 1.9, 19" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.1 position="-4, 1.9, 19" colour="0.2, 0.65, 1.0, 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.4 name=bltest position=" 4, 1.9, 19" colour="0.6, 0.2, 0, 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.4 name=bltest position="-4, 1.9, 19" colour="0.6, 0.2, 0, 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.4 name=bltest position=" 4, 1.9, 19" colour="1, 0, 0, 0.5" width=20 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-4, 1.9, 19" colour="1, 0, 0, 1" width=20 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+    </EffectContainer>
+   <EffectContainer condition="brake">
+      <FadingBillboard mainstate=activity active=false scale=0.3 position=" 4, 1.9, 19" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.3 position="-4, 1.9, 19" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.15 position=" 4, 1.9, 19" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.15 position="-4, 1.9, 19" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+
+  </MultiStateEngine>
+</Template>

Copied: code/trunk/data/levels/templates/spaceshipHeartAttack.oxt (from rev 10621, code/branches/presentationFS15merge/data/levels/templates/spaceshipHeartAttack.oxt)
===================================================================
--- code/trunk/data/levels/templates/spaceshipHeartAttack.oxt	                        (rev 0)
+++ code/trunk/data/levels/templates/spaceshipHeartAttack.oxt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,125 @@
+<Template name=spaceshipHeartAttack>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipheartattackcameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 6
+
+   health            = 200
+   maxhealth         = 300
+   initialhealth     = 150
+
+   shieldhealth        = 50
+   initialshieldhealth = 50
+   maxshieldhealth     = 800
+   shieldabsorption    = 0.8
+   reloadrate          = 1
+   reloadwaittime      = 1
+
+   primaryThrust     = 40
+   auxilaryThrust    = 30
+   rotationThrust    = 35
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 15
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 9
+
+   collisionType     = "dynamic"
+   mass              = 100
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+
+   explosionSound = "sounds/Explosion2.ogg"
+  >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 19" template=spaceshipheartattackengine />
+      <MultiStateEngine position="-7.6, 0, 19" template=spaceshipheartattackengine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=0 roll=0 scale=4 mesh="HeartAttack.mesh" />
+      <!--BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
+      <BlinkingBillboard position="-17,-1.5,0" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude=0.1 frequency=0.5 phase=180 quadratic=1 /-->
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0,0.8,6"      halfExtents="12, 3, 10" />
+      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
+      <BoxCollisionShape position="4.7,1,-8"      halfExtents="2, 3, 5" />
+      <BoxCollisionShape position="-4.7,1,-8"      halfExtents="2, 3, 5" />
+      <BoxCollisionShape position="13.5,1,5"  halfExtents="1.4, 3, 7" />
+      <BoxCollisionShape position="-13.5,1,5"  halfExtents="1.4, 3, 7" />
+      <BoxCollisionShape position="16,2,4"  halfExtents="1.4, 1.5, 4" />
+      <BoxCollisionShape position="-16,2,4"  halfExtents="1.4, 1.5, 4" />
+      <BoxCollisionShape position="-2.8,5,4"  halfExtents="1.4, 1.5, 2" />
+      <BoxCollisionShape position="2.8,5,4"  halfExtents="1.4, 1.5, 2" />
+      <BoxCollisionShape position="5,5,4.3"  halfExtents="1.4, 1.5, 1.4" />
+      <BoxCollisionShape position="-5,5,4.3"  halfExtents="1.4, 1.5, 1.4" />
+    </collisionShapes>
+<?lua
+  include("../includes/weaponSettingsHeartAttack.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipheartattackcameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,12, 48" drag=true mouselook=true />
+      <CameraPosition position="0,20, 80" drag=true mouselook=true />
+      <CameraPosition position="0,30,120" drag=true mouselook=true />
+    </camerapositions>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipheartattackengine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2
+
+   speedfront     = 150
+   speedback      =  50
+   speedleftright =  50
+   speedupdown    =  50
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+   
+   accelerationfront     = 420
+   accelerationbrake     = 420
+   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.1 position="4, 1.9, 19" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.1 position="-4, 1.9, 19" colour="0.2, 0.65, 1.0, 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.4 name=bltest position=" 4, 1.9, 19" colour="0.6, 0.2, 0, 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.4 name=bltest position="-4, 1.9, 19" colour="0.6, 0.2, 0, 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.4 name=bltest position=" 4, 1.9, 19" colour="1, 0, 0, 0.5" width=20 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-4, 1.9, 19" colour="1, 0, 0, 1" width=20 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+    </EffectContainer>
+   <EffectContainer condition="brake">
+      <FadingBillboard mainstate=activity active=false scale=0.3 position=" 4, 1.9, 19" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.3 position="-4, 1.9, 19" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.15 position=" 4, 1.9, 19" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.15 position="-4, 1.9, 19" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+
+  </MultiStateEngine>
+</Template>

Copied: code/trunk/data/levels/templates/spaceshipRing.oxt (from rev 10621, code/branches/presentationFS15merge/data/levels/templates/spaceshipRing.oxt)
===================================================================
--- code/trunk/data/levels/templates/spaceshipRing.oxt	                        (rev 0)
+++ code/trunk/data/levels/templates/spaceshipRing.oxt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,110 @@
+<Template name=spaceshipring>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipringcameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 4
+
+   health            = 80
+   maxhealth         = 200
+   initialhealth     = 80
+
+   shieldhealth        = 35
+   initialshieldhealth = 35
+   maxshieldhealth     = 60
+   shieldabsorption    = 0.9
+   reloadrate          = 1
+   reloadwaittime      = 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, 0" template=spaceshipringengine />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipringengine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=0 roll=0 scale=4 mesh="ship.mesh" />
+      <Model position="11,1,-9" yaw=-90 pitch=0 roll=90 scale=0.15 mesh="ringWeapon.mesh" />
+      <Model position="-11,1,-9" yaw=-90 pitch=0 roll=90 scale=0.15 mesh="ringWeapon.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/weaponSettingsRing.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipringcameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,15, 60" drag=true mouselook=true />
+      <CameraPosition position="0,20, 90" drag=true mouselook=true />
+      <CameraPosition position="0,30,120" drag=true mouselook=true />
+    </camerapositions>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipringengine 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="13, 0, 16" 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="-13, 0, 16" 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.4 name=bltest position=" 0, 2, 16" colour="0.2, 1.0, 0.65, 1.0" width=25 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=" 13, 0, 16" colour="0.2, 1.0, 0.65, 1.0" width=20 length=1000
+ 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=" -13, 0, 16" colour="0.2, 1.0, 0.65, 1.0" width=20 length=1000 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=" 0, 2, 16" colour="0.6, 0.8, 0.75, 0.7" width=35 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+    </EffectContainer>
+
+  </MultiStateEngine>
+</Template>

Deleted: code/trunk/data/levels/templates/tower.oxt
===================================================================
--- code/trunk/data/levels/templates/tower.oxt	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/data/levels/templates/tower.oxt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -1,128 +0,0 @@
-<Template name=tower>
-  <TowerDefenseTower
-
-
-   explosionchunks        = 6
-
-   reloadrate          = 3
-   reloadwaittime      = 1
-
-   collisionType     = "dynamic"
-   team = 2
-
-
-  >
-    <controller>
-        <WaypointPatrolController alertnessradius=1000 team=5>
-            <waypoints>
-                <Model mesh="cube.mesh" scale=0 position=" 700, 200, 100" />
-            </waypoints>
-        </WaypointPatrolController>
-    </controller>
-    
-
-
-    <attached>
-        <Model position="0,0,0" scale=45 mesh="Tower.mesh" />
-        
-        
-    </attached>
-
-    <!--collisionShapes>
-
-    </collisionShapes-->
-
-<?lua
-  include("../includes/towerWeaponSettings.oxi")
-?>
-  </TowerDefenseTower>
-</Template>
-
-
-
-<Template name=towerturret>
-  <TowerDefenseTower
-
-
-   explosionchunks        = 6
-
-   reloadrate          = 10
-   reloadwaittime      = 5
-
-   collisionType     = "dynamic"
-   team = 1
-
-
-  >
-  <attached>
-
-    <Model position="0,0,0" scale=45 mesh="Tower.mesh" />
-
-    <Turret reloadrate=10 reloadwaittime=5 collisionType="dynamic" position="0,0,10" direction="0,0,1" pitch="0" yaw="0" roll="0" angularDamping=0.999999 mass=100 maxPitch=90 maxYaw=90 maxAttackRadius=1000 minAttackRadius=30>
-
-      <controller>
-        <TurretController/>
-      </controller>
-      <?lua
-        include("../includes/weaponSettingsTurret.oxi")
-      ?>
-    </Turret>
-    
-  </attached>
-    
-
-
-
-    <!--collisionShapes>
-
-    </collisionShapes-->
-
-<?lua
-  include("../includes/towerWeaponSettings.oxi")
-?>
-  </TowerDefenseTower>
-</Template>
-
-
-
-<Template name=towerturret1>
-  <TowerDefenseTower
-
-
-   explosionchunks        = 6
-
-   reloadrate          = 10
-   reloadwaittime      = 5
-
-   collisionType     = "dynamic"
-   team = 1
-
-
-  >
-  <attached>
-
-
-    <Turret reloadrate=10 reloadwaittime=5 collisionType="dynamic" position="0,0,10" direction="0,0,1" pitch="0" yaw="0" roll="0" angularDamping=0.999999 mass=100 maxPitch=90 maxYaw=90 maxAttackRadius=1000 minAttackRadius=30>
-
-      <controller>
-        <TurretController/>
-      </controller>
-      <?lua
-        include("../includes/weaponSettingsTurret1.oxi")
-      ?>
-    </Turret>
-    
-  </attached>
-    
-
-
-
-    <!--collisionShapes>
-
-    </collisionShapes-->
-
-<?lua
-  include("../includes/towerWeaponSettings.oxi")
-?>
-  </TowerDefenseTower>
-</Template>
\ No newline at end of file

Copied: code/trunk/data/levels/templates/towerdefensetower.oxt (from rev 10621, code/branches/presentationFS15merge/data/levels/templates/towerdefensetower.oxt)
===================================================================
--- code/trunk/data/levels/templates/towerdefensetower.oxt	                        (rev 0)
+++ code/trunk/data/levels/templates/towerdefensetower.oxt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,38 @@
+<Template name=towerdefensetower>
+  <TowerDefenseTower
+
+
+   	explosionchunks        = 6
+	reloadrate=10 
+	reloadwaittime=5 
+	collisionType="none" 
+	pitch="0" 
+	yaw="0" 
+	roll="0" 
+	maxPitch=90 
+	maxYaw=90 
+	maxAttackRadius=1000 
+	minAttackRadius=30
+   	team = 0
+
+
+  >
+  
+     <controller>
+     <TurretController team = 0/>
+  </controller>
+  
+    
+
+
+
+    <!--collisionShapes>
+
+    </collisionShapes-->
+
+
+    <?lua
+      include("../includes/weaponSettingsTurret.oxi")
+    ?>
+  </TowerDefenseTower>
+</Template>
\ No newline at end of file

Modified: code/trunk/data/levels/towerDefense.oxw
===================================================================
--- code/trunk/data/levels/towerDefense.oxw	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/data/levels/towerDefense.oxw	2015-10-04 13:45:56 UTC (rev 10622)
@@ -19,43 +19,31 @@
 <?lua
   include("templates/spaceshipAssff.oxt")
   include("templates/spaceshipPirate.oxt")
-  include("templates/tower.oxt")
+  include("templates/towerdefensetower.oxt")
   include("templates/enemytowerdefense.oxt")
   include("templates/standardTurret.oxt")
 ?>
 
-<!-- Specify the position of the camera -->
-<Template name=centerpointmarkcamera defaults=0>
-  <Pawn team=1>
+
+<Template name=selectercameras defaults=0>
+  <TowerDefenseSelecter>
     <camerapositions>
-      <CameraPosition position="0,0,1500"/>
+      <CameraPosition position="0,0,1400" lookat="0,0,0" absolute=true />
     </camerapositions>
-  </Pawn>
+  </TowerDefenseSelecter>
 </Template>
 
-<!-- Loads a mesh to mark the center-->
-<Template name=centerpointmark>
-  <Pawn team=1 camerapositiontemplate=centerpointmarkcamera>
+<Template name=selectertemplate>
+  <TowerDefenseSelecter team=0 camerapositiontemplate=selectercameras>
     <attached>
-      <Model position="0,0,0" mesh="cylinder.mesh" scale3D="1,1,1" /> <!-- the camera is attached to this -->
+      <Model pitch=90 position="0,0,-30" mesh="TD_Selection.mesh" scale=30 />
     </attached>
-  </Pawn>
+  </TowerDefenseSelecter>
 </Template>
 
 
-<!-- Template for a tower   EDIT: new towertemplate is included with "templates/tower" -->
-<!--Template name=towertemplate>
-  <Tower>
-    <attached>
-      <Model position="0,0,0" scale=0.25 mesh="Tower_ME.mesh" />
-    </attached>
-  </Tower>
-</Template-->
 
 
-
-
-
 <Level gametype = "TowerDefense">
   <templates>
     <Template link=lodtemplate_default />
@@ -71,55 +59,30 @@
     <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"/>
 
     <!-- Spawns the camera, attached to a crate -->
-    <SpawnPoint team=1 position="0,0,0" spawnclass=Pawn pawndesign=centerpointmark />
-    <!--TeamSpawnPoint team=1 position="-7,7,4" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff /-->
+    <SpawnPoint team=0 position="0,0,0"/> 
 
-    <!--SpawnPoint team=1 position="0,0,10" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff  /-->
-    <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
-
-
-
-
-    <!--invisible entity to attach towers to, since playfield is static and towers are dynamic-->
-    <StaticEntity team =1 position=0,0,0>
-
-        <attached>
-            <Model position="-50,-50,0" mesh="Playfield_ME.mesh" scale=80 />
-            <!-- Base -->
-            <Model position="500,700,100" mesh="sphere.mesh" scale=80 />
-            <!--Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /--> <!-- Only temporary needed to help align the collisionshape -->
-            <!-- This was used to mark the playfield, let's let it be here for now -->
-            <!--Model position="-8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
-            <!--Model position="-8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
-            <!--Model position="8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
-            <!--Model position="8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
-        </attached>
-        <collisionShapes> <!-- The collisionshape forbids other worldentities that have a collisionShape to fly through it.
-
-                               TODO: Find correct size for the collisionshape; since a collisionShape is invisible
-                               I added the crate wich currently has the same dimensions as the collisionshape.
-                               You have to adjust the crate's scale3D as well as the collisionshape's halfExtens to
-                               find the proper shape. -->
-           <BoxCollisionShape position="0,0,0" halfExtents="400,400,100" />
-        </collisionShapes>
-    </StaticEntity>
-
-
-
-
     <!-- PlayField -->
     <TowerDefenseCenterpoint
     name=towerdefensecenter
+
+    selecterTemplate=selectertemplate
+
     width=16
     height=16
     tileScale=100
-    towerTemplate=tower
     position="0,0,0"
     direction="0,0,0"
     collisionType=dynamic
     mass=100000
-    team=1
-    />
+    >
+        <attached>
+            <Model position="-50,-50,0" mesh="Playfield_ME.mesh" scale=80 />
+            <Model position="500,700,100" mesh="sphere.mesh" scale=80 />
+        </attached>
+        <camerapositions>
+      <CameraPosition position="0,0,1500" lookat="0,0,0" absolute=true/>
+    </camerapositions>
+    </TowerDefenseCenterpoint>
 
   </Scene>
 </Level>

Copied: code/trunk/data/particle/FieldExplosion.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/FieldExplosion.particle)
===================================================================
--- code/trunk/data/particle/FieldExplosion.particle	                        (rev 0)
+++ code/trunk/data/particle/FieldExplosion.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,84 @@
+particle_system Orxonox/FieldExplosion
+
+{
+	material PE/lensflare
+	particle_width 152.940002441406
+	particle_height 154.119995117188
+	quota 2000
+	cull_each false
+	sorted false
+	local_space false
+	iteration_interval 0.0
+	nonvisible_update_timeout 0.0
+	billboard_type point
+	billboard_origin center
+	billboard_rotation_type texcoord
+	point_rendering false
+	accurate_facing false
+
+	emitter Point
+	{
+		position 0.0 0.0 0.0
+		direction 1.0 0.0 0.0
+		angle 0.0
+		emission_rate 200.0
+		velocity_min -1000.0
+		velocity_max 1000.0
+		time_to_live_min 2.0
+		time_to_live_max 4.0
+		duration_min 0.0
+		duration_max 0.0
+		repeat_delay_min 0.0
+		repeat_delay_max 0.0
+		colour_range_start 1 1 1 1
+		colour_range_end 0.666667 0 0 1
+	}
+
+	emitter Point
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 0.0 1.0
+		angle 0.0
+		emission_rate 200.0
+		velocity_min -1000.0
+		velocity_max 1000.0
+		time_to_live_min 2.0
+		time_to_live_max 4.0
+		duration_min 0.0
+		duration_max 0.0
+		repeat_delay_min 0.0
+		repeat_delay_max 0.0
+		colour_range_start 1 1 1 1
+		colour_range_end 0.333333 0 1 1
+	}
+
+	emitter Point
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 1.0 0.0
+		angle 0.0
+		emission_rate 200.0
+		velocity_min -1000.0
+		velocity_max 1000.0
+		time_to_live_min 2.0
+		time_to_live_max 4.0
+		duration_min 0.0
+		duration_max 0.0
+		repeat_delay_min 0.0
+		repeat_delay_max 0.0
+		colour_range_start 1 1 1 1
+		colour_range_end 0 1 0.498039 1
+	}
+
+	affector LinearForce
+	{
+		force_vector 0.0 -45.62 0.0
+		force_application add
+	}
+
+	affector Scaler
+	{
+		rate 16.47
+	}
+	
+}

Copied: code/trunk/data/particle/GravityBombField.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/GravityBombField.particle)
===================================================================
--- code/trunk/data/particle/GravityBombField.particle	                        (rev 0)
+++ code/trunk/data/particle/GravityBombField.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,65 @@
+particle_system Orxonox/GravityBombField
+{
+	material PE/lensflare
+	particle_width 33.6500015258789
+	particle_height 1.91999995708466
+	quota 2000
+	cull_each false
+	sorted false
+	local_space true
+	iteration_interval 0.0
+	nonvisible_update_timeout 0.0
+	billboard_type point
+	billboard_origin center
+	billboard_rotation_type vertex
+	point_rendering false
+	accurate_facing false
+
+	emitter HollowEllipsoid
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 1.0 0.0
+		angle 180
+		width 350
+		height 350
+		depth 350
+		inner_width 0.99
+		inner_height 0.99
+		inner_depth 0.99
+		emission_rate 2000
+		velocity_min 0
+		velocity_max 5
+		time_to_live_min 2
+		time_to_live_max 5
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 1 0.666667 0 1
+		colour_range_end 1 0 0 1
+	}
+
+	affector Rotator
+	{
+		rotation_speed_range_start 0
+		rotation_speed_range_end 0
+		rotation_range_start 0
+		rotation_range_end 180
+	}
+
+	affector ColourInterpolator
+	{
+		time0 0
+		colour0 1 0.666667 0 1
+		time1 0.2
+		colour1 1 0.584314 0 1
+		time2 0.4
+		colour2 1 0 0 1
+		time3 0.6
+		colour3 1 0 0 1
+		time4 0.8
+		colour4 0.666667 0 0 1
+		time5 1
+		colour5 0 0 0 1
+	}
+}

Copied: code/trunk/data/particle/orxonox_explosionAfterglow.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionAfterglow.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionAfterglow.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionAfterglow.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,47 @@
+
+particle_system orxonox/explosion_afterglow
+{
+	quota	200
+	material	PE/Flare
+	particle_width	40
+	particle_height	40
+	cull_each	false
+	renderer	billboard
+	billboard_type	oriented_self
+
+	emitter Point
+	{
+		angle	180
+		colour	0.664063 0.917969 0.925781 1
+		colour_range_start	0.664063 0.917969 0.925781 1
+		colour_range_end	0.0820313 0.757813 0.980469 1
+		direction	0 1 0
+		emission_rate	700
+		position	0 0 0
+		velocity	20
+		velocity_min	20
+		velocity_max	75
+		time_to_live	0.2
+		time_to_live_min	0.2
+		time_to_live_max	5
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	20
+		repeat_delay_min	20
+		repeat_delay_max	20
+	}
+
+	affector ColourFader
+	{
+		red	-0.7273
+		green	-0.7049
+		blue	-0.6216
+		alpha	0
+	}
+
+	affector Scaler
+	{
+		rate	20
+	}
+}

Copied: code/trunk/data/particle/orxonox_explosionFlame.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionFlame.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionFlame.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionFlame.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,58 @@
+
+particle_system orxonox/explosion_flame
+{
+	quota	500
+	material	PE/bigFlame
+	particle_width	20.52
+	particle_height	20.25
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter Box
+	{
+		angle	180
+		colour	1 0.533333 0.0631577 1
+		colour_range_start	1 0.533333 0.0631577 1
+		colour_range_end	0.441667 0 0 1
+		direction	1 0 0
+		emission_rate	2000
+		position	0 0 0
+		velocity	30
+		velocity_min	30
+		velocity_max	80
+		time_to_live	0.2
+		time_to_live_min	0.2
+		time_to_live_max	3
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	20
+		repeat_delay_min	20
+		repeat_delay_max	20
+		width	2
+		height	2
+		depth	2
+	}
+
+	affector Scaler
+	{
+		rate	20
+	}
+
+	affector ColourFader
+	{
+		red	-1
+		green	-1
+		blue	-1
+		alpha	-1
+	}
+
+	affector Rotator
+	{
+		rotation_speed_range_start	-360
+		rotation_speed_range_end	360
+		rotation_range_start	0
+		rotation_range_end	360
+	}
+}
\ No newline at end of file

Copied: code/trunk/data/particle/orxonox_explosionFlame2.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionFlame2.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionFlame2.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionFlame2.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,58 @@
+
+particle_system orxonox/explosion_flame2
+{
+	quota	500
+	material	PE/bigFlame
+	particle_width	20.52
+	particle_height	20.25
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter Box
+	{
+		angle	180
+		colour	1 0.566667 0.5 1
+		colour_range_start	1 0.566667 0.5 1
+		colour_range_end	1 0.566667 0.5 1
+		direction	1 0 0
+		emission_rate	2000
+		position	0 0 0
+		velocity	30
+		velocity_min	30
+		velocity_max	80
+		time_to_live	1
+		time_to_live_min	1
+		time_to_live_max	3
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	20
+		repeat_delay_min	20
+		repeat_delay_max	20
+		width	2
+		height	2
+		depth	2
+	}
+
+	affector Scaler
+	{
+		rate	20
+	}
+
+	affector ColourFader
+	{
+		red	-1
+		green	-1
+		blue	-0.7027
+		alpha	-1
+	}
+
+	affector Rotator
+	{
+		rotation_speed_range_start	-360
+		rotation_speed_range_end	360
+		rotation_range_start	0
+		rotation_range_end	360
+	}
+}

Copied: code/trunk/data/particle/orxonox_explosionFlash.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionFlash.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionFlash.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionFlash.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,55 @@
+
+particle_system orxonox/explosion_flash
+{
+	quota	50
+	material	orxonox/explosion_flash
+	particle_width	50
+	particle_height	50
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter Point
+	{
+		angle	180
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 1 1 1
+		direction	0 0 0
+		emission_rate	10
+		position	0 0 0
+		velocity	0
+		velocity_min	0
+		velocity_max	0
+		time_to_live	0.05
+		time_to_live_min	0.05
+		time_to_live_max	0.05
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	100000
+		repeat_delay_min	100000
+		repeat_delay_max	100000
+	}
+
+	affector Rotator
+	{
+		rotation_speed_range_start	0
+		rotation_speed_range_end	0
+		rotation_range_start	0
+		rotation_range_end	360
+	}
+
+	affector Scaler
+	{
+		rate	1000
+	}
+	
+	affector ColourFader
+	{
+		red	-1
+		green	-1
+		blue	-1
+		alpha	-1
+	}
+}

Copied: code/trunk/data/particle/orxonox_explosionFlash2.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionFlash2.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionFlash2.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionFlash2.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,47 @@
+
+particle_system orxonox/explosion_flash2
+{
+	quota	50
+	material	orxonox/explosion_flash
+	particle_width	50
+	particle_height	50
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter Point
+	{
+		angle	180
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 1 1 1
+		direction	0 0 0
+		emission_rate	10
+		position	0 0 0
+		velocity	0
+		velocity_min	0
+		velocity_max	0
+		time_to_live	0.05
+		time_to_live_min	0.05
+		time_to_live_max	0.05
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	20
+		repeat_delay_min	20
+		repeat_delay_max	20
+	}
+
+	affector Rotator
+	{
+		rotation_speed_range_start	0
+		rotation_speed_range_end	0
+		rotation_range_start	0
+		rotation_range_end	360
+	}
+
+	affector Scaler
+	{
+		rate	100
+	}
+}

Copied: code/trunk/data/particle/orxonox_explosionShockwave.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionShockwave.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionShockwave.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionShockwave.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,48 @@
+
+particle_system orxonox/explosion_shockwave
+{
+	quota	4000
+	material	orxonox/explosion_shockwave
+	particle_width	20
+	particle_height	20
+	cull_each	false
+	renderer	billboard
+	billboard_type	oriented_common
+	common_direction	0 0.25 0.5
+
+	emitter Point
+	{
+		angle	0
+		colour	0.441667 0.441667 0.441667 1
+		colour_range_start	0.441667 0.441667 0.441667 1
+		colour_range_end	0.441667 0.441667 0.441667 1
+		direction	0 1 0
+		emission_rate	10
+		position	0 0 0
+		velocity	0
+		velocity_min	0
+		velocity_max	0
+		time_to_live	1
+		time_to_live_min	1
+		time_to_live_max	1
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	100000
+		repeat_delay_min	100000
+		repeat_delay_max	100000
+	}
+
+	affector Scaler
+	{
+		rate	500
+	}
+
+	affector ColourFader
+	{
+		red	-1
+		green	-1
+		blue	-1
+		alpha	0
+	}
+}

Copied: code/trunk/data/particle/orxonox_explosionShockwave2.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionShockwave2.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionShockwave2.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionShockwave2.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,48 @@
+
+particle_system orxonox/explosion_shockwave2
+{
+	quota	4000
+	material	orxonox/explosion_shockwave
+	particle_width	20
+	particle_height	20
+	cull_each	false
+	renderer	billboard
+	billboard_type	oriented_common
+	common_direction	0 0.25 0.5
+
+	emitter Point
+	{
+		angle	0
+		colour	0.85 0.85 1 1
+		colour_range_start	0.85 0.85 1 1
+		colour_range_end	0.85 0.85 1 1
+		direction	0 1 0
+		emission_rate	10
+		position	0 0 0
+		velocity	0
+		velocity_min	0
+		velocity_max	0
+		time_to_live	1
+		time_to_live_min	1
+		time_to_live_max	1
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	20
+		repeat_delay_min	20
+		repeat_delay_max	20
+	}
+
+	affector Scaler
+	{
+		rate	500
+	}
+
+	affector ColourFader
+	{
+		red	-1
+		green	-1
+		blue	-1
+		alpha	0
+	}
+}

Copied: code/trunk/data/particle/orxonox_explosionSparks.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionSparks.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionSparks.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionSparks.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,42 @@
+
+particle_system orxonox/explosion_sparks
+{
+	quota	2000
+	material	PE/explosion
+	particle_width	1.5
+	particle_height	12.33
+	cull_each	false
+	renderer	billboard
+	billboard_type	oriented_self
+
+	emitter Point
+	{
+		angle	180
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 1 1 1
+		direction	-0.684313 -0.325257 0.652628
+		emission_rate	1000
+		position	0 0 0
+		velocity	100
+		velocity_min	100
+		velocity_max	200
+		time_to_live	0.2
+		time_to_live_min	0.2
+		time_to_live_max	0.5
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	100000
+		repeat_delay_min	100000
+		repeat_delay_max	100000
+	}
+
+	affector ColourFader
+	{
+		red	0.2432
+		green	-1
+		blue	-1
+		alpha	-1
+	}
+}

Copied: code/trunk/data/particle/orxonox_explosionSparks2.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionSparks2.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionSparks2.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionSparks2.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,42 @@
+
+particle_system orxonox/explosion_sparks2
+{
+	quota	2000
+	material	PE/explosion
+	particle_width	1.5
+	particle_height	13.98
+	cull_each	false
+	renderer	billboard
+	billboard_type	oriented_self
+
+	emitter Point
+	{
+		angle	180
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 1 1 1
+		direction	-0.684313 -0.325257 0.652628
+		emission_rate	1000
+		position	0 0 0
+		velocity	150
+		velocity_min	150
+		velocity_max	200
+		time_to_live	0.2
+		time_to_live_min	0.2
+		time_to_live_max	0.75
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	20
+		repeat_delay_min	20
+		repeat_delay_max	20
+	}
+
+	affector ColourFader
+	{
+		red	0.2432
+		green	-1
+		blue	-1
+		alpha	-1
+	}
+}

Copied: code/trunk/data/particle/orxonox_explosionStreak1.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionStreak1.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionStreak1.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionStreak1.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,42 @@
+
+particle_system orxonox/explosion_streak1
+{
+	quota	4000
+	material	orxonox/explosion_streak1
+	particle_width	12.15
+	particle_height	82.13
+	cull_each	false
+	renderer	billboard
+	billboard_type	oriented_self
+
+	emitter Point
+	{
+		angle	180
+		colour	0.191667 0.191667 0.191667 1
+		colour_range_start	0.191667 0.191667 0.191667 1
+		colour_range_end	0.191667 0.191667 0.191667 1
+		direction	0 1 0
+		emission_rate	400
+		position	0 0 0
+		velocity	30
+		velocity_min	30
+		velocity_max	100
+		time_to_live	1
+		time_to_live_min	1
+		time_to_live_max	2
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	20
+		repeat_delay_min	20
+		repeat_delay_max	20
+	}
+
+	affector ColourFader
+	{
+		red	-0.2
+		green	-0.2
+		blue	-0.2
+		alpha	0
+	}
+}

Copied: code/trunk/data/particle/orxonox_explosionStreak2.particle (from rev 10621, code/branches/presentationFS15merge/data/particle/orxonox_explosionStreak2.particle)
===================================================================
--- code/trunk/data/particle/orxonox_explosionStreak2.particle	                        (rev 0)
+++ code/trunk/data/particle/orxonox_explosionStreak2.particle	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,47 @@
+
+particle_system orxonox/explosion_streak2
+{
+	quota	4000
+	material	orxonox/explosion_streak1
+	particle_width	14
+	particle_height	75
+	cull_each	false
+	renderer	billboard
+	billboard_type	oriented_self
+
+	emitter Point
+	{
+		angle	180
+		colour	0.466667 0.341667 0.216667 1
+		colour_range_start	0.466667 0.341667 0.216667 1
+		colour_range_end	0.466667 0.341667 0.216667 1
+		direction	0 1 0
+		emission_rate	400
+		position	0 0 0
+		velocity	50
+		velocity_min	50
+		velocity_max	80
+		time_to_live	1
+		time_to_live_min	1
+		time_to_live_max	2
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	20
+		repeat_delay_min	20
+		repeat_delay_max	20
+	}
+
+	affector ColourFader
+	{
+		red	-0.3
+		green	-0.25
+		blue	-0.2
+		alpha	0
+	}
+
+	affector Scaler
+	{
+		rate	10
+	}
+}

Modified: code/trunk/src/libraries/network/GamestateManager.h
===================================================================
--- code/trunk/src/libraries/network/GamestateManager.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/GamestateManager.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -1,4 +1,4 @@
-/*
+  /*
  *   ORXONOX - the hottest 3D action shooter ever to exist
  *                    > www.orxonox.net <
  *
@@ -77,9 +77,9 @@
       bool      isSynched;
       std::map< uint32_t, packet::Gamestate* > gamestates;
     };
-    
+
   public:
-    
+
     GamestateManager();
     ~GamestateManager();
 
@@ -87,7 +87,7 @@
     virtual bool      ackGamestate(unsigned int gamestateID, unsigned int peerID);
     virtual uint32_t  getLastReceivedGamestateID( unsigned int peerID );
     virtual uint32_t  getCurrentGamestateID(){ if( currentGamestate_) return currentGamestate_->getID(); else return GAMESTATEID_INITIAL; }
-    
+
     bool processGamestates();
     bool sendAck(unsigned int gamestateID, uint32_t peerID);
     bool update();

Modified: code/trunk/src/libraries/network/LANDiscoverable.cc
===================================================================
--- code/trunk/src/libraries/network/LANDiscoverable.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/LANDiscoverable.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -34,7 +34,10 @@
 
 #include "util/Output.h"
 #include "packet/ServerInformation.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "core/CoreIncludes.h"
 
+
 namespace orxonox
 {
   const char* LAN_DISCOVERY_MESSAGE = "Orxonox Client";
@@ -42,11 +45,23 @@
 
   LANDiscoverable::LANDiscoverable()
   {
+    /* register object in orxonox */
+    RegisterObject(LANDiscoverable);
+
+    this->setConfigValues();
+    //     this->setActivity(true);
     this->host_ = 0;
     this->bActive_ = false;
-//     this->setActivity(true);
   }
 
+  void LANDiscoverable::setConfigValues()
+  {
+    /* update ownName string from orxonox.ini config file, if it
+     * has changed.
+     */
+    SetConfigValueExternal(ownName, "Discovery", "ownName", "OrxServer");
+  }
+
   LANDiscoverable::~LANDiscoverable()
   {
     if( this->host_ )
@@ -60,7 +75,7 @@
   {
     if( bActive == this->bActive_ )        // no change
       return;
-    
+
     if( bActive )
     {
       ENetAddress bindAddress;
@@ -83,11 +98,11 @@
   void LANDiscoverable::update()
   {
     ENetEvent event;
-    
+
     if( this->bActive_==false )
       return;
     assert(this->host_);
-    
+
     while( enet_host_service( this->host_, &event, 0 ) > 0 )
     {
       switch(event.type)
@@ -103,7 +118,8 @@
           {
             orxout(internal_info, context::network) << "Received LAN discovery message from client " << event.peer->host->receivedAddress << endl;
             packet::ServerInformation info;
-            info.setServerName("Orxonox Server");
+            info.setServerName(this->ownName);
+            info.setClientNumber(this->clientNumber);
             info.send(event.peer);
 //             ENetPacket* packet = enet_packet_create( LAN_DISCOVERY_ACK, strlen(LAN_DISCOVERY_ACK)+1, ENET_PACKET_FLAG_RELIABLE );
 //             enet_peer_send(event.peer, 0, packet );

Modified: code/trunk/src/libraries/network/LANDiscoverable.h
===================================================================
--- code/trunk/src/libraries/network/LANDiscoverable.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/LANDiscoverable.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -30,21 +30,28 @@
 #define _LANDISCOVERABLE_H__
 
 #include "NetworkPrereqs.h"
+#include "core/config/Configurable.h"
 
 namespace orxonox
 {
 
-  class LANDiscoverable
+  class LANDiscoverable: public Configurable
   {
     public:
       LANDiscoverable();
       virtual ~LANDiscoverable();
       void setActivity( bool bActive );
       void update();
+      void updateClientNumber(int clientNumber) {this->clientNumber = clientNumber;}
+;
+      /** Function used for the configuration file parameter update */
+      void setConfigValues();
 
     private:
       bool            bActive_;
       ENetHost*       host_;
+      std::string     ownName;
+      int             clientNumber;
   };
 
 }

Modified: code/trunk/src/libraries/network/LANDiscovery.cc
===================================================================
--- code/trunk/src/libraries/network/LANDiscovery.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/LANDiscovery.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -88,7 +88,10 @@
         case ENET_EVENT_TYPE_RECEIVE:
           {
             packet::ServerInformation info(&event);
-            orxout(internal_info, context::network) << "Received LAN discovery server information; Name: " << info.getServerName() << ", Address: " << info.getServerIP() << ", RTT: " << info.getServerRTT() << endl;
+            std::string payload = info.getServerName();
+            info.setServerName(payload.substr(0,payload.length()-2));
+            info.setClientNumber( Ogre::StringConverter::parseInt(payload.substr(payload.length()-1)));
+            orxout(internal_info, context::network) << "Received LAN discovery server information; Name: " << info.getServerName() << ", Address: " << info.getServerIP() << ", Players: " << info.getClientNumber() << ", RTT: " << info.getServerRTT() << endl;
             std::vector<packet::ServerInformation>::iterator it;
             for( it=this->servers_.begin(); it!=this->servers_.end(); ++it )
             {
@@ -123,5 +126,23 @@
       return this->servers_[index].getServerIP();
   }
 
+  std::string LANDiscovery::getServerListItemRTT(unsigned int index)
+  {
+    if( index >= this->servers_.size() )
+      return BLANKSTRING;
+    else{
+      uint32_t serverrtt = this->servers_[index].getServerRTT();
+      return Ogre::StringConverter::toString(serverrtt);
+    }
+  }
 
+  std::string LANDiscovery::getServerListItemPlayerNumber(unsigned int index)
+  {
+    if( index >= this->servers_.size() )
+      return BLANKSTRING;
+    else{
+      int playerNumber = this->servers_[index].getClientNumber();
+      return Ogre::StringConverter::toString(playerNumber);
+    }
+  }
 } // namespace orxonox

Modified: code/trunk/src/libraries/network/LANDiscovery.h
===================================================================
--- code/trunk/src/libraries/network/LANDiscovery.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/LANDiscovery.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -32,6 +32,7 @@
 #include "NetworkPrereqs.h"
 #include "packet/ServerInformation.h"
 #include "util/Singleton.h"
+#include <OgreStringConverter.h>
 
 #include <vector>
 
@@ -50,8 +51,10 @@
       void discover(); // tolua_export
       std::string getServerListItemName( unsigned int index ); // tolua_export
       std::string getServerListItemIP( unsigned int index ); // tolua_export
+      std::string getServerListItemRTT( unsigned int index ); // tolua_export
+      std::string getServerListItemPlayerNumber( unsigned int index ); // tolua_export
       static LANDiscovery& getInstance(){ return Singleton<LANDiscovery>::getInstance(); } // tolua_export
-      
+
     private:
       static LANDiscovery* singletonPtr_s;
       ENetHost* host_;

Modified: code/trunk/src/libraries/network/MasterServer.cc
===================================================================
--- code/trunk/src/libraries/network/MasterServer.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/MasterServer.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -33,7 +33,7 @@
 #include "core/CorePrereqs.h"
 #include "util/Output.h"
 
-namespace orxonox 
+namespace orxonox
 {
   /*** MACROS ***/
   /* commands for the terminal interface */
@@ -44,11 +44,8 @@
   /* forward declaration so the linker doesn't complain */
   MasterServer *MasterServer::instance = NULL;
 
-
-
-
   /* command: list servers */
-  void 
+  void
   MasterServer::listServers( void )
   {
     /* get an iterator */
@@ -58,8 +55,8 @@
     orxout(user_info) << "List of connected servers" << std::endl;
 
     /* loop through list elements */
-    for( i = MasterServer::getInstance()->mainlist.serverlist.begin(); 
-      i != MasterServer::getInstance()->mainlist.serverlist.end(); ++i ) 
+    for( i = MasterServer::getInstance()->mainlist.serverlist.begin();
+      i != MasterServer::getInstance()->mainlist.serverlist.end(); ++i )
     {
       orxout(user_info) << "  " << (*i).ServerInfo.getServerIP() << std::endl;
     }
@@ -69,15 +66,15 @@
       " servers connected." << std::endl;
   }
 
-  void 
+  void
   MasterServer::delServer( std::string todeladdr )
   {
     /* tell the user we're now removing the entry from the server list */
-    orxout(user_info) << "MS: Deleting server \"" << todeladdr << "\"..." 
+    orxout(user_info) << "MS: Deleting server \"" << todeladdr << "\"..."
       << std::endl;
 
     /* see if we actually have that server on our list */
-    ServerListSearchResult shandle = 
+    ServerListSearchResult shandle =
       MasterServer::getInstance()->mainlist.findServerByAddress(todeladdr);
 
     if( !shandle.success )
@@ -85,7 +82,7 @@
       return;
     }
 
-    /* force-disconnect the server */  
+    /* force-disconnect the server */
     enet_peer_disconnect( shandle.result.peer, 0 );
 
     /* actually remove the entry from the server list by address */
@@ -97,16 +94,16 @@
 
 
   /* helpers */
-  static void 
+  static void
   helper_output_debug( ENetEvent *event, char *addrconv )
   {
     orxout(verbose, context::master_server)
-      << "A packet of length" 
+      << "A packet of length"
       << event->packet->dataLength
       << " containing "
       << (const char*)event->packet->data
       << " was received from "
-      << addrconv 
+      << addrconv
       << " on channel "
       << event->channelID << endl;
   }
@@ -121,23 +118,23 @@
     ENetPacket *reply;
 
     /* loop through list elements */
-    for( i = mainlist.serverlist.begin(); i 
-        != mainlist.serverlist.end(); ++i ) 
+    for( i = mainlist.serverlist.begin(); i
+        != mainlist.serverlist.end(); ++i )
     {
       /* send this particular server */
       /* build reply string */
-      char *tosend = (char *)calloc( (*i).ServerInfo.getServerIP().length() 
-          + MSPROTO_SERVERLIST_ITEM_LEN + 2,1 );
-      if( !tosend ) 
+      int packetlen = MSPROTO_SERVERLIST_ITEM_LEN + 1 + (*i).ServerInfo.getServerIP().length() + 1 + (*i).ServerInfo.getServerName().length() + 1 + sizeof((*i).ServerInfo.getClientNumber()) + 1;
+      char *tosend = (char *)calloc(packetlen ,1 );
+      if( !tosend )
       { orxout(internal_warning, context::master_server) << "Masterserver.cc: Memory allocation failed." << endl;
         continue;
-      } 
-      sprintf( tosend, "%s %s", MSPROTO_SERVERLIST_ITEM, 
-          (*i).ServerInfo.getServerIP().c_str() );
+      }
+      sprintf( tosend, "%s %s %s %u", MSPROTO_SERVERLIST_ITEM,
+          (*i).ServerInfo.getServerIP().c_str(), (*i).ServerInfo.getServerName().c_str(), (*i).ServerInfo.getClientNumber());
 
       /* create packet from it */
       reply = enet_packet_create( tosend,
-          strlen( tosend ) + 1, 
+          strlen( tosend ) + 1,
           ENET_PACKET_FLAG_RELIABLE);
 
       /* Send the reply to the peer over channel id 0. */
@@ -148,7 +145,7 @@
 
       /* free the tosend buffer */
       free( tosend );
-    } 
+    }
 
     /* create end-of-list packet */
     reply = enet_packet_create( MSPROTO_SERVERLIST_END,
@@ -162,40 +159,40 @@
     enet_host_flush( this->server );
   }
 
-  /* maybe the two methods below can be merged into one and 
-   * made to use ENet's RTT functionality to check for disconnected 
+  /* maybe the two methods below can be merged into one and
+   * made to use ENet's RTT functionality to check for disconnected
    * servers.
    */
-  void 
+  void
   MasterServer::helper_cleanupServers( void )
   {
     /* get an iterator */
     std::list<ServerListElem>::iterator i;
-     
+
     if( mainlist.serverlist.size() == 0 )
       return;
 
     /* loop through list elements */
-    for( i = mainlist.serverlist.begin(); i 
-        != mainlist.serverlist.end(); ++i ) 
+    for( i = mainlist.serverlist.begin(); i
+        != mainlist.serverlist.end(); ++i )
     { /* see if we have a disconnected peer */
-      if( (*i).peer && 
+      if( (*i).peer &&
          ((*i).peer->state == ENET_PEER_STATE_DISCONNECTED ||
           (*i).peer->state == ENET_PEER_STATE_ZOMBIE ))
-      { 
+      {
         /* Remove it from the list */
         orxout(internal_warning) << (char*)(*i).peer->data << " timed out.\n";
         mainlist.delServerByName( (*i).ServerInfo.getServerName() );
 
         /* stop iterating, we manipulated the list */
         /* TODO note: this only removes one dead server per loop
-         * iteration. not beautiful, but one iteration is ~100ms, 
+         * iteration. not beautiful, but one iteration is ~100ms,
          * so not really relevant for the moment.
          */
         break;
       }
     }
- 
+
   }
 
 
@@ -203,7 +200,7 @@
 
   /***** EVENTS *****/
   /* connect event */
-  int 
+  int
   MasterServer::eventConnect( ENetEvent *event )
   { /* check for bad parameters */
     if( !event )
@@ -216,20 +213,20 @@
     enet_address_get_host_ip( &(event->peer->address), addrconv, 49 );
 
     /* output debug info */
-    orxout(verbose, context::master_server) << "A new client connected from " 
-      << addrconv 
-      << " on port " 
+    orxout(verbose, context::master_server) << "A new client connected from "
+      << addrconv
+      << " on port "
       << event->peer->address.port << endl;
 
     /* store string form of address here */
-    event->peer->data = addrconv; 
+    event->peer->data = addrconv;
 
     /* all fine. */
     return 0;
   }
 
   /* disconnect event */
-  int 
+  int
   MasterServer::eventDisconnect( ENetEvent *event )
   { /* check for bad parameters */
     if( !event )
@@ -254,68 +251,87 @@
   }
 
   /* data event */
-  int 
+  int
   MasterServer::eventData( ENetEvent *event )
   { /* validate packet */
     if( !event || !(event->packet) || !(event->peer) )
     { orxout(internal_warning, context::master_server) << "No complete event given." << endl;
       return -1;
     }
-     
+
     /* generate address in readable form */
     char *addrconv = (char *) calloc( 50, 1 );
     enet_address_get_host_ip( &(event->peer->address), addrconv, 49 );
+    /* convert to string */
+    std::string ip = std::string( addrconv );
+    /* delete addrconv */
+    if( addrconv ) free( addrconv );
 
+    /* pointer to full packet data */
+    char * packetdata = (char *)event->packet->data;
+
     /* output debug info about the data that has come */
     helper_output_debug( event, addrconv );
 
     /* GAME SERVER OR CLIENT CONNECTION? */
-    if( !strncmp( (char *)event->packet->data, MSPROTO_GAME_SERVER, 
-      MSPROTO_GAME_SERVER_LEN ) )
+    if( !strncmp(packetdata, MSPROTO_GAME_SERVER, MSPROTO_GAME_SERVER_LEN ) )
     { /* Game server */
 
-      if( !strncmp( (char *)event->packet->data 
-        + MSPROTO_GAME_SERVER_LEN+1, 
-        MSPROTO_REGISTER_SERVER, MSPROTO_REGISTER_SERVER_LEN ) )
+      if( !strncmp( packetdata + MSPROTO_GAME_SERVER_LEN+1, MSPROTO_REGISTER_SERVER, MSPROTO_REGISTER_SERVER_LEN ) )
       { /* register new server */
-        mainlist.addServer( packet::ServerInformation( event ),
-          event->peer );
-        
+        mainlist.addServer( packet::ServerInformation( event ), event->peer );
+
         /* tell people we did so */
-        orxout(internal_info, context::master_server) << "Added new server to list: " << 
+        orxout(internal_info, context::master_server) << "Added new server to list: " <<
           packet::ServerInformation( event ).getServerIP() << endl;
       }
 
-      else if( !strncmp( (char *)event->packet->data
-        + MSPROTO_GAME_SERVER_LEN+1,
-        MSPROTO_SERVERDC, MSPROTO_SERVERDC_LEN ) )
-      {
+      else if( !strncmp( packetdata + MSPROTO_GAME_SERVER_LEN+1, MSPROTO_SERVERDC, MSPROTO_SERVERDC_LEN ) )
+      { /* disconnect server */
+
+        /* remove the server from the list it belongs to */
+        this->mainlist.delServerByAddress( ip );
+
+        /* tell the user */
+        orxout(internal_info, context::master_server) << "Removed server " << ip << " from list." << endl;
+      }
+      /* TODO add hook for disconnect here */
+
+      else if( !strncmp( packetdata + MSPROTO_GAME_SERVER_LEN+1, MSPROTO_SET_NAME, MSPROTO_SET_NAME_LEN ) )
+      { /* save server name */
         /* create string from peer data */
-        std::string name = std::string( addrconv );
+        std::string data (event->packet->data,event->packet->data + event->packet->dataLength );
+        std::string name = data.substr(MSPROTO_GAME_SERVER_LEN+1 + MSPROTO_SET_NAME_LEN + 1);
 
         /* remove the server from the list it belongs to */
-        this->mainlist.delServerByAddress( name );
+        this->mainlist.setNameByAddress( ip, name );
 
         /* tell the user */
-        orxout(internal_info, context::master_server) << "Removed server " << name << " from list." << endl;
+        orxout(internal_info, context::master_server) << "Updated server " << ip << " with new name " << name << endl;
       }
 
-      /* TODO add hook for disconnect here */
+      else if( !strncmp( packetdata + MSPROTO_GAME_SERVER_LEN+1, MSPROTO_SET_CLIENTS, MSPROTO_SET_CLIENTS_LEN ) )
+      { /* save client count from server */
+        /* create string from peer data */
+        std::string data (event->packet->data,event->packet->data + event->packet->dataLength );
+        std::string textform= data.substr(MSPROTO_GAME_SERVER_LEN + 1 + MSPROTO_SET_CLIENTS_LEN + 1);
+        int clientNumber = Ogre::StringConverter::parseInt(textform);
+
+        this->mainlist.setClientsByAddress( ip, clientNumber);
+
+        /* tell the user */
+        orxout(internal_info, context::master_server) << "Updated server " << ip << " with new client number " << clientNumber << endl;
+      }
     }
-    else if( !strncmp( (char *)event->packet->data, MSPROTO_CLIENT, 
-      MSPROTO_CLIENT_LEN) )
+    else if( !strncmp( packetdata, MSPROTO_CLIENT, MSPROTO_CLIENT_LEN) )
     { /* client */
-      if( !strncmp( (char *)event->packet->data + MSPROTO_CLIENT_LEN+1,
-        MSPROTO_REQ_LIST, MSPROTO_REQ_LIST_LEN ) )
+      if( !strncmp( packetdata + MSPROTO_CLIENT_LEN+1, MSPROTO_REQ_LIST, MSPROTO_REQ_LIST_LEN ) )
         /* send server list */
         helper_sendlist( event );
     }
     else
-    { /* bad message, don't do anything. */ } 
+    { /* bad message, don't do anything. */ }
 
-    /* delete addrconv */
-    if( addrconv ) free( addrconv );
-
     /* Clean up the packet now that we're done using it. */
     enet_packet_destroy( event->packet );
     return 0;
@@ -323,13 +339,13 @@
 
 
   /**** MAIN ROUTINE *****/
-  int 
+  int
   MasterServer::run()
   {
     /***** ENTER MAIN LOOP *****/
     ENetEvent *event = (ENetEvent *)calloc(sizeof(ENetEvent), sizeof(char));
     if( event == NULL )
-    { 
+    {
       orxout(user_error, context::master_server) << "Could not create ENetEvent structure, exiting." << endl;
       exit( EXIT_FAILURE );
     }
@@ -344,11 +360,11 @@
     /* check what type of event it is and react accordingly */
     switch (event->type)
     { /* new connection */
-      case ENET_EVENT_TYPE_CONNECT: 
+      case ENET_EVENT_TYPE_CONNECT:
         eventConnect( event ); break;
 
         /* disconnect */
-      case ENET_EVENT_TYPE_DISCONNECT: 
+      case ENET_EVENT_TYPE_DISCONNECT:
         eventDisconnect( event ); break;
 
         /* incoming data */
@@ -357,8 +373,9 @@
     }
 
     /* done */
+    free(event);
     return 0;
-  } 
+  }
 
   /* constructor */
   MasterServer::MasterServer()
@@ -379,15 +396,15 @@
     this->address.host = ENET_HOST_ANY;
     this->address.port = ORX_MSERVER_PORT;
 
-    /* create a host with the above settings (the last two 0 mean: accept 
+    /* create a host with the above settings (the last two 0 mean: accept
      * any input/output bandwidth */
-    this->server = enet_host_create( &this->address, ORX_MSERVER_MAXCONNS, 
+    this->server = enet_host_create( &this->address, ORX_MSERVER_MAXCONNS,
         ORX_MSERVER_MAXCHANS, 0, 0 );
     assert(this->server);
 
     /* see if creation worked */
     if( !this->server )
-    { orxout(user_error, context::master_server) << 
+    { orxout(user_error, context::master_server) <<
         "An error occurred while trying to create an ENet server host." << endl;
       exit( EXIT_FAILURE );
     }

Modified: code/trunk/src/libraries/network/MasterServer.h
===================================================================
--- code/trunk/src/libraries/network/MasterServer.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/MasterServer.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -48,7 +48,10 @@
 /* c compatibility */
 #include <cstdio>
 
-namespace orxonox 
+#include <OgreStringConverter.h>
+
+
+namespace orxonox
 {
   /* singleton */
   class _NetworkExport MasterServer
@@ -62,11 +65,11 @@
 
       /* static pointer for commands */
       static MasterServer *instance;
-      static MasterServer *getInstance() 
+      static MasterServer *getInstance()
         { return instance; }
-      static void setInstance( MasterServer *setto ) 
+      static void setInstance( MasterServer *setto )
         { instance = setto;  }
-      
+
       /* functions for commands */
       static void listServers( void );
       static void delServer( std::string todeladdr );

Modified: code/trunk/src/libraries/network/MasterServerProtocol.h
===================================================================
--- code/trunk/src/libraries/network/MasterServerProtocol.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/MasterServerProtocol.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -36,15 +36,13 @@
 /*** CLIENT COMMUNICATIONS ***/
 /* Client token (shows that the party sending data is a client */
 #define MSPROTO_CLIENT "CL"
-#define MSPROTO_CLIENT_LEN 2 
+#define MSPROTO_CLIENT_LEN 2
 
 /* Request: Serverlist (requiest made from client to master server */
 #define MSPROTO_REQ_LIST "REQ:LIST"
 #define MSPROTO_REQ_LIST_LEN 8
 
 
-
-
 /*** GAME SERVER COMMUNICATIONS ***/
 /* Game server token (shows that the party sending data is a game server) */
 #define MSPROTO_GAME_SERVER "GS"
@@ -66,7 +64,7 @@
 
 /* ping request from server */
 #define MSPROTO_PING_GAMESERVER "PING"
-#define MSPROTO_PING_GAMESERVER_LEN 4 
+#define MSPROTO_PING_GAMESERVER_LEN 4
 
 /* server disconnect */
 #define MSPROTO_SERVERDC "DC"
@@ -74,10 +72,18 @@
 
 /* ping reply */
 #define MSPROTO_ACK "ACK"
-#define MSPROTO_ACK_LEN 3 
+#define MSPROTO_ACK_LEN 3
 
+/* server name */
+#define MSPROTO_SET_NAME "NAM"
+#define MSPROTO_SET_NAME_LEN 3
 
+/* server number of clients */
+#define MSPROTO_SET_CLIENTS "CLI"
+#define MSPROTO_SET_CLIENTS_LEN 3
 
+#define SERVER_NAME_MAXLEN 7
+
 /* default master server port */
 #define ORX_MSERVER_PORT 55557
 

Modified: code/trunk/src/libraries/network/PeerList.cc
===================================================================
--- code/trunk/src/libraries/network/PeerList.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/PeerList.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -37,10 +37,10 @@
   PeerList::PeerList() { }
   PeerList::~PeerList() { }
 
-  int 
+  int
   PeerList::addPeer( ENetPeer *toadd )
   { /* error correction */
-    if( toadd == NULL ) 
+    if( toadd == NULL )
     { orxout(internal_error, context::master_server) << "PeerList::addPeer: empty peer given." << endl;
       return -1;
     }
@@ -51,7 +51,7 @@
   }
 
   bool sub_compAddr( ENetAddress addr1, ENetAddress addr2 )
-  { 
+  {
     for( int i = 0; i < 16; ++i )
       if( addr1.host.addr[i] < addr2.host.addr[i] )
         return -i;
@@ -60,15 +60,15 @@
 
     return 0;
   }
-    
 
+
   bool
   PeerList::remPeerByAddr( ENetAddress addr )
   { /* get an iterator */
     std::list<ENetPeer *>::iterator i;
 
     /* loop through list elements */
-    for( i = peerlist.begin(); i != peerlist.end(); ++i ) 
+    for( i = peerlist.begin(); i != peerlist.end(); ++i )
       if( !sub_compAddr((*i)->address, addr ) )
       { /* found this name, remove and quit */
         this->peerlist.remove( *i );
@@ -85,7 +85,7 @@
     std::list<ENetPeer *>::iterator i;
 
     /* loop through list elements */
-    for( i = peerlist.begin(); i != peerlist.end(); ++i ) 
+    for( i = peerlist.begin(); i != peerlist.end(); ++i )
       if( !sub_compAddr((*i)->address, addr ) )
         /* found this name, remove and quit */
         return *i;
@@ -94,5 +94,9 @@
     return NULL;
   }
 
+  int
+  PeerList::count(){
+    return this->peerlist.size();
+  }
+
 }
-

Modified: code/trunk/src/libraries/network/PeerList.h
===================================================================
--- code/trunk/src/libraries/network/PeerList.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/PeerList.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -34,12 +34,12 @@
 #include <enet/enet.h>
 
 /* peer list */
-namespace orxonox 
+namespace orxonox
 {
-  /** This class keeps a list of open connections 
+  /** This class keeps a list of open connections
    * and some info about them.
    */
-  class PeerList 
+  class PeerList
   { public:
       /** constructor */
       PeerList();
@@ -49,24 +49,30 @@
 
       /** \param toadd The peer to add
        * \return 0 for success, -1 for error.
-       * 
-       * Add new peer to list 
+       *
+       * Add new peer to list
        */
       int addPeer( ENetPeer *toadd );
 
       /** \param addr Address to look for
        * \return if the peer was found or not
-       * 
-       * Remove peer from list by address 
+       *
+       * Remove peer from list by address
        */
       bool remPeerByAddr( ENetAddress addr );
 
       /** \param addr The address to find by
-       * 
-       * Find a connection by address */
+       *
+       * Find a connection by address
+       */
       ENetPeer *findPeerByAddr( ENetAddress addr );
 
-      /* NOTE: making this list public so it can easily 
+      /**
+       * Count current peers
+       */
+       int count();
+
+      /* NOTE: making this list public so it can easily
        * be iterated. This makes sense since iterating it
        * will happen all the time, and using getter methods
        * for the next in list would slow things down unnecessarily.

Modified: code/trunk/src/libraries/network/Server.cc
===================================================================
--- code/trunk/src/libraries/network/Server.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/Server.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -76,7 +76,13 @@
     this->setPort( port );
     this->timeSinceLastUpdate_=0;
   }
-
+/*
+  Server::Server(int port, const std::string name)
+  {
+    this->setPort( port );
+    this->timeSinceLastUpdate_=0;
+    this->serverName_=name;
+  }*/
   /**
   * Constructor
   * @param port Port to listen on
@@ -107,9 +113,11 @@
 
     /* make discoverable on LAN */
     LANDiscoverable::setActivity(true);
+    LANDiscoverable::updateClientNumber(0);
 
     /* make discoverable on WAN */
     WANDiscoverable::setActivity(true);
+    WANDiscoverable::updateClientNumber(0);
 
     /* done */
     return;
@@ -282,12 +290,16 @@
 
     // inform all the listeners
     this->clientIDs_.push_back(peerID);
+    WANDiscoverable::updateClientNumber(this->clientIDs_.size());
+    LANDiscoverable::updateClientNumber(this->clientIDs_.size());
+
     ClientConnectionListener::broadcastClientConnected(peerID);
     GamestateManager::addPeer(peerID);
 
 //     ++newid;
 
     orxout(internal_info, context::network) << "Server: added client id: " << peerID << endl;
+
     createClient(peerID);
 }
 
@@ -308,6 +320,9 @@
       break;
     }
   }
+  WANDiscoverable::updateClientNumber(this->clientIDs_.size());
+  LANDiscoverable::updateClientNumber(this->clientIDs_.size());
+
   ClientConnectionListener::broadcastClientDisconnected(peerID);
   GamestateManager::removePeer(peerID);
       //ServerConnection::disconnectClient( client );

Modified: code/trunk/src/libraries/network/Server.h
===================================================================
--- code/trunk/src/libraries/network/Server.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/Server.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -66,6 +66,9 @@
     unsigned int getRTT(unsigned int clientID);
     virtual void printRTT();
     float getPacketLoss(unsigned int clientID);
+    int getClientCount() { return this->clientIDs_.size();}
+    std::string getServerName() { return this->serverName_;}
+
   protected:
     void updateGamestate();
   private:
@@ -88,6 +91,7 @@
     float timeSinceLastUpdate_;
     std::deque<packet::Packet*> packetQueue_;
     std::vector<uint32_t>       clientIDs_;
+    std::string                 serverName_;
   };
 
 

Modified: code/trunk/src/libraries/network/ServerList.cc
===================================================================
--- code/trunk/src/libraries/network/ServerList.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/ServerList.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -29,7 +29,7 @@
 #include "ServerList.h"
 
 namespace orxonox
-{ 
+{
   ServerList::ServerList()
   { /* create a new list */ }
 
@@ -38,26 +38,26 @@
     serverlist.clear();
   }
 
-  int 
+  int
   ServerList::addServer( packet::ServerInformation toadd,
     ENetPeer *peer )
-  { 
+  {
     ServerListElem toAdd;
     toAdd.ServerInfo = toadd;
     toAdd.peer = peer;
 
-    this->serverlist.push_back( toAdd ); 
+    this->serverlist.push_back( toAdd );
     return 0;
   }
 
-  bool 
+  bool
   ServerList::delServerByName( std::string name )
-  { 
+  {
     /* get an iterator */
     std::list<ServerListElem>::iterator i;
 
     /* loop through list elements */
-    for( i = serverlist.begin(); i != serverlist.end(); ++i ) 
+    for( i = serverlist.begin(); i != serverlist.end(); ++i )
       if( (*i).ServerInfo.getServerName() == name )
       { /* found this name, remove and quit */
         this->serverlist.erase( i );
@@ -67,12 +67,12 @@
   }
 
   bool ServerList::delServerByAddress( std::string address )
-  { 
+  {
     /* get an iterator */
     std::list<ServerListElem>::iterator i;
 
     /* loop through list elements */
-    for( i = serverlist.begin(); i != serverlist.end(); ++i ) 
+    for( i = serverlist.begin(); i != serverlist.end(); ++i )
       if( (*i).ServerInfo.getServerIP() == address )
       { /* found this name, remove and quit */
         this->serverlist.erase( i );
@@ -89,7 +89,7 @@
     std::list<ServerListElem>::iterator i;
 
     /* loop through list elements */
-    for( i = serverlist.begin(); i != serverlist.end(); ++i ) 
+    for( i = serverlist.begin(); i != serverlist.end(); ++i )
       if( (*i).ServerInfo.getServerIP() == address )
       { /* found the target, return it */
         ServerListSearchResult res = { (*i), true };
@@ -109,9 +109,9 @@
 
     /* iterate, return when name found */
     /* loop through list elements */
-    for( i = serverlist.begin(); i != serverlist.end(); ++i ) 
+    for( i = serverlist.begin(); i != serverlist.end(); ++i )
       if( (*i).ServerInfo.getServerName() == name )
-      { 
+      {
         ServerListSearchResult res = { (*i), true };
         return res;
       }
@@ -123,25 +123,53 @@
 
   /* SORTING */
   /* sort by name */
-  bool sub_compare_names( ServerListElem no1, 
+  bool sub_compare_names( ServerListElem no1,
     ServerListElem no2 )
   { return no1.ServerInfo.getServerName() > no2.ServerInfo.getServerName(); }
 
   void ServerList::sortByName()
-  { 
-    this->serverlist.sort( sub_compare_names ); 
+  {
+    this->serverlist.sort( sub_compare_names );
   }
-  
+
   /* sort by ping */
-  bool sub_compare_pings( ServerListElem no1, 
+  bool sub_compare_pings( ServerListElem no1,
     ServerListElem no2 )
-  { 
-    return no1.ServerInfo.getServerName() > no2.ServerInfo.getServerName();
+  {
+    return no1.ServerInfo.getServerRTT() > no2.ServerInfo.getServerRTT();
   }
 
   void ServerList::sortByPing()
   {
-    this->serverlist.sort( sub_compare_pings ); 
+    this->serverlist.sort( sub_compare_pings );
   }
 
+  bool ServerList::setNameByAddress( std::string address, std::string name  ){
+    /* get an iterator */
+    std::list<ServerListElem>::iterator i;
+
+    /* loop through list elements */
+    for( i = serverlist.begin(); i != serverlist.end(); ++i )
+      if( (*i).ServerInfo.getServerIP() == address )
+      { /* found this adress, rename and quit */
+        (*i).ServerInfo.setServerName( name );
+        return true;
+      }
+    return false;
+  };
+
+  bool ServerList::setClientsByAddress( std::string address, int clientNumber ){
+    /* get an iterator */
+    std::list<ServerListElem>::iterator i;
+
+    /* loop through list elements */
+    for( i = serverlist.begin(); i != serverlist.end(); ++i )
+      if( (*i).ServerInfo.getServerIP() == address )
+      { /* found this adress, rename and quit */
+        (*i).ServerInfo.setClientNumber( clientNumber );
+        return true;
+      }
+    return false;
+  };
+
 }

Modified: code/trunk/src/libraries/network/ServerList.h
===================================================================
--- code/trunk/src/libraries/network/ServerList.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/ServerList.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -34,10 +34,10 @@
 #include <network/packet/ServerInformation.h>
 
 /* methods necessary */
-namespace orxonox 
-{ 
+namespace orxonox
+{
   /* HELPER STRUCTURES */
-  struct ServerListElem 
+  struct ServerListElem
   {
     /* server information (name, IP, etc) */
     packet::ServerInformation ServerInfo;
@@ -62,7 +62,7 @@
   /** This class is keeps a list of game servers
    * and some info about them.
    */
-  class ServerList 
+  class ServerList
   { public:
       /** constructor */
       ServerList();
@@ -73,43 +73,44 @@
 
       /* BASIC MANIPULATION */
       /** \param toadd the server to add.
-       * 
+       *
        * Add server to the game server list
        */
       int addServer( packet::ServerInformation toadd,
         ENetPeer *peer );
 
       /** \param name Name of the server to remove
-       * 
-       * Remove server by name 
+       *
+       * Remove server by name
        */
       bool delServerByName( std::string name );
 
       /** \param address IP address of the server to remove
-       * 
+       *
        * Remove server by address
        */
       bool delServerByAddress( std::string address );
 
+      bool setNameByAddress( std::string address, std::string name  );
 
+      bool setClientsByAddress( std::string address, int clientNumber );
 
-
       /* SEARCHING */
-      /* \param address The address of the server that is to be 
+      /* \param address The address of the server that is to be
        *  found
        * \return A struct containing a result of the search and a boolean
        *  that is only true if the search was successful
-       * 
+       *
        * Find and return the list handle of a given address.
        */
       ServerListSearchResult
       findServerByAddress( std::string address );
 
 
-      /* \param name The name of the server that is to be 
+      /* \param name The name of the server that is to be
        *  found
        * \return The struct containing the list entry of the server
-       * 
+       *
        * Find and return the list handle of a given name.
        */
       ServerListSearchResult
@@ -119,7 +120,7 @@
       /* SORTING */
       /** sort by name  */
       void sortByName();
-      
+
       /** sort by ping */
       void sortByPing();
 

Modified: code/trunk/src/libraries/network/WANDiscoverable.cc
===================================================================
--- code/trunk/src/libraries/network/WANDiscoverable.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/WANDiscoverable.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -43,35 +43,35 @@
   {
     /* debugging output */
     orxout(verbose, context::master_server) << "Creating WANDiscoverable." << endl;
-  
+
     /* register object in orxonox */
     RegisterObject(WANDiscoverable);
 
     /* check for the masterserver address option in orxonox.ini */
     this->setConfigValues();
-    
+
   }
 
   void WANDiscoverable::setConfigValues()
   {
-    /* update msaddress string from orxonox.ini config file, if it 
-     * has changed. 
+    /* update msaddress string from orxonox.ini config file, if it
+     * has changed.
      */
-    SetConfigValueExternal(msaddress, "WANDiscovery", "msaddress", "orxonox.net");
-//     SetConfigValue( msaddress, "orxonox.net");
-  } 
+    SetConfigValueExternal(msaddress, "Discovery", "msaddress", "orxonox.net");
+    SetConfigValueExternal(ownName, "Discovery", "ownName", "OrxServer");
+  }
 
   WANDiscoverable::~WANDiscoverable()
   {
     if( this->bActive_ )
       this->disconnect();
   }
-  
+
   void WANDiscoverable::setActivity(bool bActive)
   {
     if( bActive==this->bActive_ )
       return;
-    
+
     if( bActive )
     {
       if( this->connect() )
@@ -83,7 +83,7 @@
       this->bActive_ = false;
     }
   }
-  
+
   bool WANDiscoverable::connect()
   {
     /* initialize it and see if it worked */
@@ -92,22 +92,25 @@
       orxout(internal_error, context::master_server) << "Could not initialize master server communications!" << endl;
       return false;
     }
-    
+
     /* connect and see if it worked */
     if( msc.connect( this->msaddress.c_str(), ORX_MSERVER_PORT ) )
     {
-      orxout(internal_error, context::master_server) << "Could not connect to master server at " 
+      orxout(internal_error, context::master_server) << "Could not connect to master server at "
                  << this->msaddress << endl;
       return false;
     }
-                 
+
     /* debugging output */
     orxout(verbose, context::master_server) << "Initialization of WANDiscoverable complete." << endl;
-    
-    
+
     // Now register the server at the master server
     this->msc.sendRequest( MSPROTO_GAME_SERVER " " MSPROTO_REGISTER_SERVER );
-    
+
+    std::string request = MSPROTO_GAME_SERVER " " MSPROTO_SET_NAME " ";
+    request += this->ownName;
+    this->msc.sendRequest( request );
+
     return true;
   }
 
@@ -117,7 +120,16 @@
     msc.disconnect();
   }
 
+  void WANDiscoverable::updateClientNumber(int clientNumber)
+  {
+    orxout(verbose, context::master_server) << "Sending new number of clients: " << clientNumber << endl;
+    std::string request = MSPROTO_GAME_SERVER " " MSPROTO_SET_CLIENTS " ";
+    request += Ogre::StringConverter::toString(clientNumber);
 
+    this->msc.sendRequest( request );
+  }
 
-  
+
+
+
 } // namespace orxonox

Modified: code/trunk/src/libraries/network/WANDiscoverable.h
===================================================================
--- code/trunk/src/libraries/network/WANDiscoverable.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/WANDiscoverable.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -31,6 +31,7 @@
 #include "NetworkPrereqs.h"
 #include "core/config/Configurable.h"
 #include "MasterServerComm.h"
+#include <OgreStringConverter.h>
 
 namespace orxonox
 {
@@ -45,30 +46,33 @@
       ~WANDiscoverable();
 
       /** \return Address of the master server
-       * 
-       * Get the master server address 
+       *
+       * Get the master server address
        */
       std::string getMSAddress()
       { return this->msaddress; }
 
       /** Function used for the configuration file parameter update */
       void setConfigValues();
-      
+
       /** Function used to set the activity/discoverability */
       void setActivity( bool bActive );
 
+      void updateClientNumber(int clientNumber);
+
       /** Master server communications object */
       MasterServerComm msc;
-      
+
     private:
       /** Function used to connect to the master server */
       bool connect();
-      
+
       /** Function used to disconnect from the master server */
       void disconnect();
-      
+
       /** master server address */
       std::string msaddress;
+      std::string ownName;
       bool        bActive_;
 
   };

Modified: code/trunk/src/libraries/network/WANDiscovery.cc
===================================================================
--- code/trunk/src/libraries/network/WANDiscovery.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/WANDiscovery.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -40,7 +40,7 @@
   {
     /* debugging output */
     orxout(verbose, context::master_server) << "Creating WANDiscovery." << endl;
-  
+
     /* register object in orxonox */
     RegisterObject(WANDiscovery);
 
@@ -53,7 +53,7 @@
 
     /* connect and see if it worked */
     if( msc.connect( this->msaddress.c_str(), ORX_MSERVER_PORT ) )
-      orxout(internal_error, context::master_server) << "Could not connect to master server at " 
+      orxout(internal_error, context::master_server) << "Could not connect to master server at "
         << this->msaddress << endl;
 
     /* debugging output */
@@ -62,21 +62,21 @@
 
   void WANDiscovery::setConfigValues()
   {
-    /* update msaddress string from orxonox.ini config file, if it 
-     * has changed. 
+    /* update msaddress string from orxonox.ini config file, if it
+     * has changed.
      */
     SetConfigValue( msaddress, "master.orxonox.net");
-  } 
+  }
 
   WANDiscovery::~WANDiscovery()
-  { 
+  {
     /* clear server list */
-    this->servers_.clear();  
+    this->servers_.clear();
   }
 
   /* callback for the network reply poller */
   int WANDiscovery::rhandler( char *addr, ENetEvent *ev )
-  { 
+  {
     /* error recognition */
     if( !ev || !ev->packet || !ev->packet->data )
     { orxout(internal_warning, context::master_server) << "Bad arguments received in WANDiscovery's reply handler." << endl;
@@ -87,33 +87,37 @@
     /* if a list entry arrives add to list */
     if( !strncmp( (char*)ev->packet->data, MSPROTO_SERVERLIST_ITEM,
       MSPROTO_SERVERLIST_ITEM_LEN ) )
-    { 
+    {
       /* create server structure from that item */
       packet::ServerInformation toadd;
 
       /* fill in data, -1 for the index: index should be length -1 */
-      toadd.setServerName( std::string((char*)ev->packet->data + 
-        MSPROTO_SERVERLIST_ITEM_LEN+1) );
-      toadd.setServerIP( std::string((char*)ev->packet->data + 
-        MSPROTO_SERVERLIST_ITEM_LEN+1) );
+      std::string datastr = std::string((char*)ev->packet->data + MSPROTO_SERVERLIST_ITEM_LEN+1);
+      int separator = datastr.find(" ");
+      toadd.setServerIP(datastr.substr(0,separator));
+      int secondsep = datastr.find(" ", separator + 1);
+      toadd.setServerName(datastr.substr(separator + 1, secondsep - separator - 1));
+      toadd.setClientNumber(Ogre::StringConverter::parseInt(datastr.substr(secondsep+1)));
 
+      orxout(internal_info, context::network) << "Received WAN discovery server information; Name: " << toadd.getServerName() << ", Address: " << toadd.getServerIP() << ", Players: " << toadd.getClientNumber() << ", RTT: " << toadd.getServerRTT() << endl;
+
       /* add to list */
       this->servers_.push_back( toadd );
     }
     else if( !strncmp( (char*)ev->packet->data, MSPROTO_SERVERLIST_END,
       MSPROTO_SERVERLIST_END_LEN ) )
-    { 
+    {
       /* this is the only case where 2 should be returned,
        * as 1 is used to signal that we're done receiving
        * the list
        */
-      return 2; 
+      return 2;
     }
 
     /* done handling, return all ok code 0 */
     return 1;
   }
- 
+
   void WANDiscovery::discover()
   {
     /* clear list */
@@ -130,7 +134,7 @@
       switch( this->msc.pollForReply( this, 500 ) )
       { case 0: /* no event occured, decrease timeout */
           --i; break;
-        case 1: /* got a list element, continue */ 
+        case 1: /* got a list element, continue */
           break;
         case 2: /* done. */
           i = 0; break;
@@ -158,5 +162,24 @@
       return this->servers_[index].getServerIP();
   }
 
+  std::string WANDiscovery::getServerListItemRTT(unsigned int index)
+  {
+    if( index >= this->servers_.size() )
+      return BLANKSTRING;
+    else{
+      uint32_t serverrtt = this->servers_[index].getServerRTT();
+      return Ogre::StringConverter::toString(serverrtt);
+    }
 
+  }
+  std::string WANDiscovery::getServerListItemPlayerNumber(unsigned int index)
+  {
+    if( index >= this->servers_.size() )
+      return BLANKSTRING;
+    else{
+      int playerNumber = this->servers_[index].getClientNumber();
+      return Ogre::StringConverter::toString(playerNumber);
+    }
+  }
+
 } // namespace orxonox

Modified: code/trunk/src/libraries/network/WANDiscovery.h
===================================================================
--- code/trunk/src/libraries/network/WANDiscovery.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/WANDiscovery.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -34,6 +34,7 @@
 #include "core/config/ConfigValueIncludes.h"
 #include "MasterServerComm.h"
 #include "MasterServerProtocol.h"
+#include <OgreStringConverter.h>
 
 #include <vector>
 
@@ -55,8 +56,8 @@
       ~WANDiscovery();
 
       /** \return Address of the master server
-       * 
-       * Get the master server address 
+       *
+       * Get the master server address
        */
       std::string getMSAddress()
       { return this->msaddress; }
@@ -64,22 +65,36 @@
       /** ask server for server list  */
       void discover(); // tolua_export
 
-      /** \param index Index to get the name of 
+      /** \param index Index to get the name of
        * \return The name of the server
-       * 
-       * Get the name of the server at index index. 
+       *
+       * Get the name of the server at index index.
        */
       std::string getServerListItemName( unsigned int index ); // tolua_export
 
-      /** \param index Index to get the IP of 
+      /** \param index Index to get the IP of
        * \return The IP of the server
-       * 
-       * Get the IP of the server at index index. 
+       *
+       * Get the IP of the server at index index.
        */
       std::string getServerListItemIP( unsigned int index ); // tolua_export
 
+      /** \param index Index to get the RTT of
+       * \return The RTT of the server
+       *
+       * Get the RTT of the server at index index.
+       */
+      std::string getServerListItemRTT( unsigned int index ); // tolua_export
+
+      /** \param index Index to get the RTT of
+       * \return The number of players on the server
+       *
+       * Get the number of players on the server
+       */
+      std::string getServerListItemPlayerNumber( unsigned int index ); // tolua_export
+
       /* todo: might make this private and use getter/setter methods
-       * at some later time. 
+       * at some later time.
        */
       /** game server list */
       std::vector<packet::ServerInformation> servers_;
@@ -91,7 +106,7 @@
       MasterServerComm msc;
 
       int rhandler( char *addr, ENetEvent *ev );
-      
+
     private:
       /** master server address */
       std::string msaddress;

Modified: code/trunk/src/libraries/network/packet/ServerInformation.cc
===================================================================
--- code/trunk/src/libraries/network/packet/ServerInformation.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/packet/ServerInformation.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -38,12 +38,11 @@
 {
   namespace packet
   {
-    
+
     ServerInformation::ServerInformation()
     {
-      
     }
-    
+
     ServerInformation::ServerInformation(ENetEvent* event)
     {
       char serverIP[64];
@@ -68,22 +67,23 @@
 
     ServerInformation::~ServerInformation()
     {
-      
+
     }
 
     void ServerInformation::send(ENetPeer* peer)
     {
-      uint32_t size = returnSize((char*&)LAN_DISCOVERY_ACK) + returnSize(this->serverName_);
+      std::string payload = this->serverName_ + Ogre::StringConverter::toString(this->clientNumber_);
+      uint32_t size = returnSize((char*&)LAN_DISCOVERY_ACK) + returnSize(payload);
       uint8_t* temp = new uint8_t[size];
       uint8_t* temp2 = temp;
       saveAndIncrease((char*&)LAN_DISCOVERY_ACK, temp2);
-      saveAndIncrease(this->serverName_, temp2);
+      saveAndIncrease(payload, temp2);
       ENetPacket* packet = enet_packet_create( temp, size, 0 );
       enet_peer_send(peer, 0, packet);
-      
+
       delete[] temp;
     }
-  
+
   } // namespace packet
 
   std::ostream& operator<<(std::ostream& out, const ENetAddress& address)
@@ -94,4 +94,3 @@
       return out;
   }
 } // namespace orxonox
-

Modified: code/trunk/src/libraries/network/packet/ServerInformation.h
===================================================================
--- code/trunk/src/libraries/network/packet/ServerInformation.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/libraries/network/packet/ServerInformation.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -29,7 +29,9 @@
 #include "../NetworkPrereqs.h"
 
 #include <string>
+#include <OgreStringConverter.h>
 
+
 #ifndef SERVERINFORMATION_H
 #define SERVERINFORMATION_H
 
@@ -44,16 +46,19 @@
         ServerInformation();
         ServerInformation(ENetEvent* event);
         ~ServerInformation();
-        
+
         void          send( ENetPeer* peer );
-        std::string   getServerIP() { return this->serverIP_; }
+        void          setServerName(std::string name) { this->serverName_ = name; }
         std::string   getServerName() { return this->serverName_; }
-        void          setServerName(std::string name) { this->serverName_ = name; }
         void          setServerIP( std::string IP ) { this->serverIP_ = IP; }
+        std::string   getServerIP() { return this->serverIP_; }
+        void          setClientNumber( int clientNumber ) { this->clientNumber_ = clientNumber; }
+        int           getClientNumber() { return this->clientNumber_; }
         uint32_t      getServerRTT() { return this->serverRTT_; }
-        
+
       private:
         std::string   serverName_;
+        int           clientNumber_;
         std::string   serverIP_;
         uint32_t      serverRTT_;
     };

Modified: code/trunk/src/modules/objects/ForceField.h
===================================================================
--- code/trunk/src/modules/objects/ForceField.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/objects/ForceField.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -159,15 +159,14 @@
             void setMode(const std::string& mode); //!< Set the mode of the ForceField.
             const std::string& getMode(void); //!< Get the mode of the ForceField.
 
-        private:
             //! Strings to represent the modes.
             static const std::string modeTube_s;
             static const std::string modeSphere_s;
             static const std::string modeInvertedSphere_s;
             static const std::string modeNewtonianGravity_s;
-
             static const std::string modeHomogen_s;
 
+        private:
             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.

Modified: code/trunk/src/modules/objects/Turret.cc
===================================================================
--- code/trunk/src/modules/objects/Turret.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/objects/Turret.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -222,6 +222,7 @@
         XMLPortParam(Turret, "minAttackRadius", setMinAttackRadius, getMinAttackRadius, xmlelement, mode);
         XMLPortParam(Turret, "maxYaw", setMaxYaw, getMaxYaw, xmlelement, mode);
         XMLPortParam(Turret, "maxPitch", setMaxPitch, getMaxPitch, xmlelement, mode);
+        XMLPortParam(Turret, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);
     }
 
     /**
@@ -281,4 +282,4 @@
         }
 
     }
-}
\ No newline at end of file
+}

Modified: code/trunk/src/modules/objects/Turret.h
===================================================================
--- code/trunk/src/modules/objects/Turret.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/objects/Turret.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -101,6 +101,12 @@
             inline float getMaxYaw() const
                 { return this->maxYaw_; }
 
+            inline void setRotationThrust(float rotationthrust)
+            	{ this->rotationThrust_ = rotationthrust; }
+
+            inline float getRotationThrust()
+            	{ return this->rotationThrust_; }
+
         protected:
             Vector3 startDir_; //!< The initial facing direction, in local coordinates.
             Vector3 localZ_; //!< The local z-axis, includes for the parent's rotation and rotations done in xml.

Modified: code/trunk/src/modules/objects/controllers/TurretController.cc
===================================================================
--- code/trunk/src/modules/objects/controllers/TurretController.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/objects/controllers/TurretController.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -103,7 +103,7 @@
         for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
         {
             Pawn* entity = orxonox_cast<Pawn*>(*it);
-            if (!entity || FormationController::sameTeam(this->getControllableEntity(), entity, this->getGametype()))
+            if (!entity || FormationController::sameTeam(turret, entity, this->getGametype()))
                 continue;
             tempScore = turret->isInRange(entity);
             if(tempScore != -1.f)
@@ -195,6 +195,7 @@
             turret->aimAtPosition(target_->getWorldPosition());
             if(this->isLookingAtTargetNew(Degree(5).valueRadians()))
             {
+
                 this->getControllableEntity()->fire(0);
             }
         }

Modified: code/trunk/src/modules/tetris/Tetris.h
===================================================================
--- code/trunk/src/modules/tetris/Tetris.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/tetris/Tetris.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -89,7 +89,6 @@
             void findFullRows(void);
             void clearRow(unsigned int row);
 
-
             PlayerInfo* player_;
 
             WeakPtr<TetrisCenterpoint> center_; //!< The playing field.

Modified: code/trunk/src/modules/towerdefense/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/towerdefense/CMakeLists.txt	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/CMakeLists.txt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -1,13 +1,12 @@
 SET_SOURCE_FILES(TOWERDEFENSE_SRC_FILES
   TowerDefense.cc
   TowerDefenseTower.cc
-  TowerTurret.cc
   TowerDefenseCenterpoint.cc
   TowerDefenseHUDController.cc
   TowerDefensePlayerStats.cc
   TDCoordinate.cc
   TowerDefenseEnemy.cc
-
+  TowerDefenseSelecter.cc
 )
 
 ORXONOX_ADD_LIBRARY(towerdefense
@@ -16,5 +15,6 @@
   LINK_LIBRARIES
     orxonox
     overlays
+    objects
   SOURCE_FILES ${TOWERDEFENSE_SRC_FILES}
 )

Modified: code/trunk/src/modules/towerdefense/TDCoordinate.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TDCoordinate.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TDCoordinate.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -16,25 +16,62 @@
     TDCoordinate::TDCoordinate()
     {
         //RegisterObject(TDCoordinate);
-        x=0;
-        y=0;
+        Set(0,0);
 
     }
 
     TDCoordinate::TDCoordinate(int x, int y)
-    {
-        this->x=x;
-        this->y=y;
+    {        
+        Set(x,y);
     }
 
+    void TDCoordinate::Set(int x, int y)
+    {        
+        if (x < 0)
+        {
+            _x = 0;
+        }
+        else if (x > 15)
+        {
+            _x = 15;
+        }
+        else
+        {
+            _x = x;
+        }
 
+        if (y < 0)
+        {
+            _y = 0;
+        }
+        else if (y > 15)
+        {
+            _y = 15;
+        }
+        else
+        {
+            _y = y;
+        }
+    }
+
+    int TDCoordinate::GetX()
+    {        
+        return _x;
+    }
+
+    int TDCoordinate::GetY()
+    {        
+        return _y;
+    }
+
+
     Vector3 TDCoordinate::get3dcoordinate()
     {
         float tileScale = 100;
 
         Vector3 *coord = new Vector3();
-        coord->x= (x-8) * tileScale;
-        coord->y= (y-8) * tileScale;
+        coord->x= (_x-8) * tileScale;
+        coord->y= (_y-8) * tileScale;
         coord->z=100;
 
         return *coord;

Modified: code/trunk/src/modules/towerdefense/TDCoordinate.h
===================================================================
--- code/trunk/src/modules/towerdefense/TDCoordinate.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TDCoordinate.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -15,16 +15,17 @@
     class _TowerDefenseExport TDCoordinate : public OrxonoxClass
     {
         public:
-            int x;
-            int y;
-
             TDCoordinate();
-
-            Vector3 get3dcoordinate();
-
+            TDCoordinate(int x, int y);
             virtual ~TDCoordinate() {};
+            virtual void Set(int x, int y);
+            virtual int GetX();
+            virtual int GetY();
+            virtual Vector3 get3dcoordinate(); 
 
-            TDCoordinate(int x, int y);
+        private:
+            int _x;
+            int _y;
     };
 
 }

Deleted: code/trunk/src/modules/towerdefense/Tower.cc
===================================================================
--- code/trunk/src/modules/towerdefense/Tower.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/Tower.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -1,113 +0,0 @@
-//
-//  Tower.cc
-//  Orxonox
-//
-//  Created by Fabian Mentzer on 29.04.12.
-//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
-
-/* Not implemented fully */
-
-#include "Tower.h"
-
-#include "core/CoreIncludes.h"
-//#include "core/XMLPort.h"
-
-namespace orxonox
-{
-    RegisterClass(Tower);
-
-    /**
-    @brief
-        Constructor. Registers and initializes the object.
-    */
-    Tower::Tower(Context* context) : Pawn(context)
-    {
-        RegisterObject(Tower);
-
-        this->setCollisionType(WorldEntity::Dynamic);
-
-        //this->removeAllEngines();
-
-        /*
-        this->size_ = 10.0f;
-        this->delay_ = false;
-        this->delayTimer_.setTimer(0.2f, false, createExecutor(createFunctor(&TetrisStone::enableMovement, this)));
-        */
-    }
-
-    void Tower::setOrientation(const Quaternion& orientation)
-    {
-        static int ori;
-        //orxout() << "orientation " << ++ori << endl;
-    }
-
-    void Tower::rotateYaw(const Vector2& value)
-    {
-        static int yaw;
-        //orxout() << "rotateYaw " << ++yaw << endl;
-    }
-
-    void Tower::rotatePitch(const Vector2& value)
-    {
-        static int pitch;
-        //orxout() << "rotatePitch " << ++pitch << endl;
-    }
-
-    void Tower::rotateRoll(const Vector2& value)
-    {
-        static int roll;
-        //orxout() << "rotateRoll" << ++roll << endl;
-    }
-
-    // This function is called whenever a player presses the up or the down key.
-    // You have to implement what happens when the up or the down key is pressed.
-    // value.x < 0 means: down key is pressed.
-    // I suggest to create a new class which is a controllable entity I will refer to as "TowerMover". This is the controllable entity that the
-    // player controls in order to move the tower along the centerpoint and in order to place the tower at the appropriate position.
-    //
-
-    // The tower itsself is controlled by a WayPointPatroController at the instance you place it on the centerpoint.
-    //(don't forget to set the team_ parameter such that all tower are in the same team)
-
-    //How to move a tower: simply attach the tower to the TowerMover
-    //How to place a tower: detach the tower from the TowerMover
-
-    /**
-    @brief
-        Overloaded the function to rotate the stone.
-    @param value
-        A vector whose first component is the angle by which to rotate.
-    */
-    /*
-    void Tower::moveFrontBack(const Vector2& value)
-    {
-        //orxout() << "frontBack.x: " << value.x << endl;
-    }
-    */
-
-    /**
-    @brief
-        Overloaded the function to steer the stone right and left
-    @param value
-        A vector whose first component is the direction in which we want to steer the stone.
-    */
-    /*
-    void Tower::moveRightLeft(const Vector2& value)
-    {
-        //orxout() << "rightLeft.x: " << value.x << endl;
-
-        if(!this->delay_)
-        {
-            const Vector3& position = this->getPosition();
-            Vector3 newPos = Vector3(position.x+value.x/abs(value.x)*this->size_, position.y, position.z);
-            if(!this->tetris_->isValidMove(this, newPos))
-                return;
-
-            this->setPosition(newPos);
-            this->delay_ = true;
-            this->delayTimer_.startTimer();
-        }
-    }
-    */
-}

Deleted: code/trunk/src/modules/towerdefense/Tower.h
===================================================================
--- code/trunk/src/modules/towerdefense/Tower.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/Tower.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -1,52 +0,0 @@
-//
-//  Tower.h
-//  Orxonox
-//
-//  Created by Fabian Mentzer on 29.04.12.
-//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
-
-/**
- at brief
-See TowerDefenseReadme.txt for Information.
-
- at ingroup TowerDefense
-*/
-
-
-#ifndef Orxonox_Tower_h
-#define Orxonox_Tower_h
-
-#include "towerdefense/TowerDefensePrereqs.h"
-#include "worldentities/pawns/SpaceShip.h"
-
-
-namespace orxonox
-{
-    class _TowerDefenseExport Tower : public Pawn
-    {
-    public:
-        Tower(Context* context);
-        virtual ~Tower() {};
-
-        // Maybe later override these to move towers with cursor keys
-        /*
-        virtual void moveFrontBack(const Vector2& value);
-        virtual void moveRightLeft(const Vector2& value);
-        */
-
-        // Overriding these to stop towers from spasing out
-        void setOrientation(const Quaternion& orientation);
-        virtual void rotateYaw(const Vector2& value);
-        virtual void rotatePitch(const Vector2& value);
-        virtual void rotateRoll(const Vector2& value);
-
-        void setGame(TowerDefense* towerdefense)
-        { assert(towerdefense); game_ = towerdefense; }
-    private:
-        TowerDefense* game_;
-    };
-}
-
-
-#endif

Modified: code/trunk/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefense.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TowerDefense.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -36,7 +36,6 @@
  * playerScored() // kann man aufrufen um dem Spieler Punkte zu vergeben.
  *
  *
- *
  *TIPP: Eclipse hilft euch schnell auf bereits vorhanden Funktionen zuzugreifen:
  * einfach "this->" eingeben und kurz warten. Dann tauch eine Liste mit Vorschlägen auf. Wenn ihr jetzt weiter
  * tippt, werden die Vorschläge entsprechend gefiltert.
@@ -76,7 +75,6 @@
 #include "TowerDefenseTower.h"
 #include "TowerDefenseCenterpoint.h"
 //#include "TDCoordinate.h"
-#include "TowerTurret.h"
 #include "worldentities/SpawnPoint.h"
 #include "worldentities/pawns/Pawn.h"
 #include "worldentities/pawns/SpaceShip.h"
@@ -87,12 +85,26 @@
 #include "core/CoreIncludes.h"
 /* Part of a temporary hack to allow the player to add towers */
 #include "core/command/ConsoleCommand.h"
+#include <cmath>
 
+
 namespace orxonox
 {
+    static const std::string __CC_addTower_name  = "addTower";
+    static const std::string __CC_upgradeTower_name = "upgradeTower";
+    static const int upgradeCost = 20;
+    static const int towerCost = 20;
+    unsigned int maxspaceships = 30;
+    int maxspaceshipsstandard = 30;
+
+
+
+    SetConsoleCommand("TowerDefense", __CC_addTower_name,  &TowerDefense::addTower ).addShortcut().defaultValues(1);
+    SetConsoleCommand("TowerDefense", __CC_upgradeTower_name, &TowerDefense::upgradeTower).addShortcut().defaultValues(0);
+
     RegisterUnloadableClass(TowerDefense);
 
-    TowerDefense::TowerDefense(Context* context) : Deathmatch(context)
+    TowerDefense::TowerDefense(Context* context) : TeamDeathmatch(context)
     {
         RegisterObject(TowerDefense);
 /*
@@ -102,13 +114,25 @@
             }
         }*/
 
+        //Timer for the waves (10 seconds between the waves)
+        selecter = NULL;
+        this->player_ = NULL;        
         this->setHUDTemplate("TowerDefenseHUD");
+        this->nextwaveTimer_.setTimer(10, false, createExecutor(createFunctor(&TowerDefense::nextwave, this)));
+        this->nextwaveTimer_.stopTimer();
+        this->waves_ = 0;
+        this->time = 0;
+        this->credit_ = 0;
+        this->lifes_ = 0;
+        this->timeSetTower_ = 0;
+        spaceships =15;
+        eggs=3;
+        ufos=7;
+        randomships=5;
 
-        //this->stats_ = new TowerDefensePlayerStats();
 
-        /* Temporary hack to allow the player to add towers and upgrade them */
-        this->dedicatedAddTower_ = createConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) );
-        this->dedicatedUpgradeTower_ = createConsoleCommand( "upgradeTower", createExecutor( createFunctor(&TowerDefense::upgradeTower, this) ) );
+        ModifyConsoleCommand(__CC_addTower_name).setObject(this);
+        ModifyConsoleCommand(__CC_upgradeTower_name).setObject(this);
     }
 
     TowerDefense::~TowerDefense()
@@ -116,8 +140,8 @@
         /* Part of a temporary hack to allow the player to add towers */
         if (this->isInitialized())
         {
-            if( this->dedicatedAddTower_ )
-                delete this->dedicatedAddTower_;
+            ModifyConsoleCommand(__CC_addTower_name).setObject(NULL);
+            ModifyConsoleCommand(__CC_upgradeTower_name).setObject(NULL);
         }
     }
 
@@ -130,40 +154,72 @@
 
     void TowerDefense::start()
     {
+        if (center_ != NULL) // There needs to be a TowerDefenseCenterpoint, i.e. the area the game takes place.
+        {
+            if (selecter == NULL)
+            {
+                selecter = new TowerDefenseSelecter(this->center_->getContext());                
+            }
+            selecter->addTemplate(center_->getSelecterTemplate());
+            center_->attach(selecter);
+        }
+        else // If no centerpoint was specified, an error is thrown and the level is exited.
+        {
+            orxout(internal_error) << "Jump: No Centerpoint specified." << endl;
+            return;
+        }
 
-        Deathmatch::start();
+        TeamDeathmatch::start();
 
-// Waypoints: [1,3] [10,3] [10,11] [13,11] -> add the points to a matrix so the player cant place towers on the path
-        for (int i=0; i < 16 ; i++){
-            for (int j = 0; j< 16 ; j++){
-                towermatrix[i][j] = false;
+        // Waypoints: [1,3] [10,3] [10,11] [13,11] -> add the points to a matrix so the player cant place towers on the path
+        for (int i=0; i < 16 ; i++)
+        {
+            for (int j = 0; j< 16 ; j++)
+            {
+                towerModelMatrix[i][j] = NULL;
+                towerTurretMatrix[i][j] = NULL;
             }
         }
 
+        
+
+        if (player_ != NULL)
+        {
+            //this->player_->startControl(selecter);
+        }
+        else
+        {
+            orxout() << "player=NULL" << endl;
+        }
+
+
+        Model* dummyModel = new Model(this->center_->getContext());
+
+        //the path of the spacehips has to be blocked, so that no towers can be build there
         for (int k=0; k<3; k++)
-            towermatrix[1][k]=true;
+            towerModelMatrix[1][k]=dummyModel;
         for (int l=1; l<11; l++)
-            towermatrix[l][3]=true;
+        	towerModelMatrix[l][3]=dummyModel;
         for (int m=3; m<12; m++)
-            towermatrix[10][m]=true;
+        	towerModelMatrix[10][m]=dummyModel;
         for (int n=10; n<14; n++)
-            towermatrix[n][11]=true;
+        	towerModelMatrix[n][11]=dummyModel;
         for (int o=13; o<16; o++)
-            towermatrix[13][o]=true;
+        	towerModelMatrix[13][o]=dummyModel;
 
+
         //set initial credits, lifes and WaveNumber
-        this->setCredit(200);
-        this->setLifes(50);
+        this->setCredit(100);
+        this->setLifes(100);
         this->setWaveNumber(0);
         time=0.0;
 
+        /*
         //adds initial towers
         for (int i=0; i <7; i++){
             addTower(i+3,4);
-        }/*
-        for (int j=0; j < 7; j++){
-            addTower(9,j+5);
-        }*/
+        }
+		*/
     }
 
     // Generates a TowerDefenseEnemy. Uses Template "enemytowerdefense". Sets position at first waypoint of path.
@@ -177,25 +233,31 @@
         case 1 :
             en1->addTemplate("enemytowerdefense1");
             en1->setScale(3);
-            en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
+            en1->lookAt(Vector3(0,0,100000));
+            en1->setHealth(en1->getHealth() +50 + this->getWaveNumber()*4);
             break;
 
         case 2 :
             en1->addTemplate("enemytowerdefense2");
             en1->setScale(2);
-            en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
+            en1->lookAt(Vector3(0,0,100000));
+            en1->roll(Degree(120));
+            en1->setHealth(en1->getHealth() -30 + this->getWaveNumber()*4);
             //  en1->setShieldHealth(en1->getShield() = this->getWaveNumber()*2))
             break;
 
         case 3 :
             en1->addTemplate("enemytowerdefense3");
             en1->setScale(1);
-            en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
+            en1->lookAt(Vector3(0,0,100000));
+            en1->roll(Degree(120));
+            en1->setHealth(en1->getHealth() -10 + this->getWaveNumber()*4);
             break;
         }
 
+        en1->setTeam(2);
         en1->getController();
-        en1->setPosition(path.at(0)->get3dcoordinate());
+        en1->setPosition(path.at(0)->get3dcoordinate());        
         TowerDefenseEnemyvector.push_back(en1);
 
         for(unsigned int i = 0; i < path.size(); ++i)
@@ -208,15 +270,42 @@
     void TowerDefense::end()
     {
 
-        Deathmatch::end();
+        TeamDeathmatch::end();
         ChatManager::message("Match is over! Gameover!");
 
     }
 
+    void TowerDefense::spawnPlayer(PlayerInfo* player)
+    {
+        assert(player);
+        this->player_ = player;
+
+        if (selecter->getPlayer() == NULL)
+        {
+            this->player_ = player;
+            player->startControl(selecter);
+            players_[player].state_ = PlayerState::Alive;
+        } 
+    }
+
+    /**
+    @brief
+        Get the player.
+    @return
+        Returns a pointer to the player. If there is no player, NULL is returned.
+    */
+    PlayerInfo* TowerDefense::getPlayer(void) const
+    {
+        return this->player_;
+    }
+
     //not working yet
     void TowerDefense::upgradeTower(int x,int y)
-    {/*
-        const int upgradeCost = 20;
+    {
+        TDCoordinate* coord = new TDCoordinate(x,y);
+        x = coord->GetX();
+        y = coord->GetY();
+        
 
         if (!this->hasEnoughCreditForTower(upgradeCost))
         {
@@ -224,7 +313,10 @@
             return;
         }
 
-        if (towermatrix [x][y] == NULL)
+
+        Model* dummyModel2 = new Model(this->center_->getContext());
+
+        if (towerModelMatrix [x][y] == NULL || (towerModelMatrix [x][y])->getMeshSource() == dummyModel2->getMeshSource())
         {
             orxout() << "no tower on this position" << endl;
             return;
@@ -232,25 +324,47 @@
 
         else
         {
-            (towermatrix [x][y])->upgradeTower();
-        }*/
+            (towerTurretMatrix [x][y])->upgradeTower();
+            switch(towerTurretMatrix[x][y]->upgrade)
+                   {
+                   case 1 :
+                	   towerModelMatrix[x][y]->setMeshSource("TD_T2.mesh");
+                	   break;
+
+                   case 2 :
+                	   towerModelMatrix[x][y]->setMeshSource("TD_T3.mesh");
+                	   break;
+                   case 3 :
+                	   towerModelMatrix[x][y]->setMeshSource("TD_T4.mesh");
+                	   break;
+                   case 4 :
+                	   towerModelMatrix[x][y]->setMeshSource("TD_T5.mesh");
+                	   break;
+
+                   }
+
+            this->buyTower(upgradeCost);
+        }
     }
 
     /*adds Tower at Position (x,y) and reduces credit and adds the point to the towermatrix. template ("towerturret")
     so towers have ability if the turrets
+    */
 
-    */
     void TowerDefense::addTower(int x, int y)
-    {
-        const int towerCost = 20;
+    {        
+        TDCoordinate* coord = new TDCoordinate(x,y);
+        x = coord->GetX();
+        y = coord->GetY();
 
+
         if (!this->hasEnoughCreditForTower(towerCost))
         {
             orxout() << "not enough credit: " << (this->getCredit()) << " available, " << towerCost << " needed.";
             return;
         }
 
-        if (towermatrix [x][y]==true)
+        if (towerModelMatrix [x][y]!=NULL)
         {
             orxout() << "not possible to put tower here!!" << endl;
             return;
@@ -263,26 +377,36 @@
 
         int tileScale = (int) this->center_->getTileScale();
 
-        if (x > 15 || y > 15 || x < 0 || y < 0)
+        /*if (x > 15 || y > 15 || x < 0 || y < 0)
         {
             //Hard coded: TODO: let this depend on the centerpoint's height, width and fieldsize (fieldsize doesn't exist yet)
             orxout() << "Can not add Tower: x and y should be between 0 and 15" << endl;
             return;
-        }
+        }*/
 
-        orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl;
+        //orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl;
+        orxout() << "Will add tower at (" << x << "," << y << ")" << endl;
 
-       //Reduce credit
-        this->buyTower(towerCost);
-        towermatrix [x][y]=true;
 
+        //Create Model
+        Model* newTowerModel = new Model(this->center_->getContext());
+        newTowerModel->setMeshSource("TD_T1.mesh");
+        newTowerModel->setScale(30);
+        newTowerModel->pitch(Degree(90));
+        newTowerModel->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 80);
+
         //Creates tower
         TowerDefenseTower* towernew = new TowerDefenseTower(this->center_->getContext());
-        towernew->addTemplate("towerturret");
-        towernew->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75);
+        towernew->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 275);
         towernew->setGame(this);
-    }
+        towernew->setTeam(1);
 
+        //Reduce credit
+         this->buyTower(towerCost);
+         towerModelMatrix [x][y]= newTowerModel;
+         towerTurretMatrix [x][y]= towernew;
+    }    
+
     bool TowerDefense::hasEnoughCreditForTower(int towerCost)
     {
         return ((this->getCredit()) >= towerCost);
@@ -295,28 +419,146 @@
     }
 
  
+    void TowerDefense::nextwave()
+    {
+
+    	orxout() << "newwave" << endl;
+    	TowerDefenseEnemyvector.clear();
+    	waves_++;
+        //maxspaceships = round(maxspaceshipsstandard + 0.25*(waves_));
+    	time=0;
+
+    	int helpnumber = 40 -(waves_);
+    	if(helpnumber <= 0) {helpnumber =1;}
+        float numSpaceships = std::abs((rand() % 100)*5.0f*(helpnumber));
+        float numEggs = std::abs((rand() % 100)*1.0f*(waves_));
+        float numUfos = std::abs((rand() % 100)*1.5f*(0.5f*(waves_))) ;
+
+        float totalnumber = (numSpaceships + numEggs + numUfos)*1.3f;
+
+        int newspaceships = (int)(maxspaceships* numSpaceships / totalnumber);
+        int neweggs = (int)(maxspaceships*numEggs / totalnumber);
+        int newufos = (int)(maxspaceships*numUfos / totalnumber);
+        int newrandomships = maxspaceships -newspaceships - neweggs - newufos;
+        spaceships =newspaceships;
+        eggs=neweggs;
+        ufos=newufos;
+        randomships=newrandomships;
+
+        orxout() << spaceships << endl;
+        orxout() << eggs << endl;
+        orxout() << ufos << endl;
+        orxout() << randomships << endl;
+
+
+
+
+
+    }
+
     void TowerDefense::tick(float dt)
     {
         SUPER(TowerDefense, tick, dt);
         time +=dt;
+        timeSetTower_ +=dt;
 
+        //Check if tower has to be set (because TowerDefenseSelecter asks for it)
+        if(timeSetTower_ >= 0.25)
+        {
+        	timeSetTower_ =0;
+			if(selecter != NULL && selecter->firePressed_)
+			{
+
+				int x = selecter->selectedPos_->GetX();
+				int y = selecter->selectedPos_->GetY();
+				Model* dummyModel2 = new Model(this->center_->getContext());
+
+
+
+				if(towerModelMatrix[x][y] == NULL)
+				{
+					addTower(x,y);
+				}
+				else
+				{
+					if(!((towerModelMatrix [x][y])->getMeshSource() == dummyModel2->getMeshSource()))
+					{
+						towerTurretMatrix[x][y]->upgradeTower();
+				        if(towerTurretMatrix[x][y]->upgrade < towerTurretMatrix[x][y]->upgradeMax)
+				        {
+				        	int specificupgradecost = (int)(upgradeCost*(std::pow(1.5,towerTurretMatrix[x][y]->upgrade)));
+				        	if(this->credit_ >= specificupgradecost)
+				        	{
+					        	this->buyTower(specificupgradecost);
+								switch(towerTurretMatrix[x][y]->upgrade)
+							   {
+								   case 1 :
+									   towerModelMatrix[x][y]->setMeshSource("TD_T2.mesh");
+									   break;
+
+								   case 2 :
+									   towerModelMatrix[x][y]->setMeshSource("TD_T3.mesh");
+									   break;
+				                   case 3 :
+				                	   towerModelMatrix[x][y]->setMeshSource("TD_T4.mesh");
+				                	   break;
+				                   case 4 :
+				                	   towerModelMatrix[x][y]->setMeshSource("TD_T5.mesh");
+				                	   break;
+
+							   }
+				        	}
+
+
+				        }
+					}
+				}
+				selecter->firePressed_ = false;
+			}
+        }
+
         TDCoordinate* coord1 = new TDCoordinate(1,1);
         std::vector<TDCoordinate*> path;
         path.push_back(coord1);
-        if(time>1 && TowerDefenseEnemyvector.size() < 30)
-        {
-            //adds different types of enemys depending on the WaveNumber
-            addTowerDefenseEnemy(path, this->getWaveNumber() % 3 +1 );
-            time = time-1;
-        }
 
+
+
+
+
+        if(time>=TowerDefenseEnemyvector.size() && TowerDefenseEnemyvector.size() < maxspaceships)
+		{
+
+        	//adds different types of enemys depending on the WaveNumber progressively making the combination of enemys more difficult
+        	if(spaceships>0)
+        	{
+    			addTowerDefenseEnemy(path, 1);
+    			spaceships--;
+
+        	}else if(ufos>0)
+        	{
+    			addTowerDefenseEnemy(path, 3);
+    			ufos--;
+        	}else if(eggs>0)
+        	{
+    			addTowerDefenseEnemy(path, 2);
+    			eggs--;
+        	}else if(randomships>0)
+        	{
+    			addTowerDefenseEnemy(path, rand() % 3 +1);
+    			randomships--;
+
+        	}
+
+		}
+
+
         Vector3* endpoint = new Vector3(500, 700, 150);
         //if ships are at the end they get destroyed
         for(unsigned int i =0; i < TowerDefenseEnemyvector.size(); ++i)
         {
             if(TowerDefenseEnemyvector.at(i) != NULL && TowerDefenseEnemyvector.at(i)->isAlive())
             {
-                //destroys enemys at the end of teh path and reduces the life by 1. no credits gifted
+                //destroys enemys at the end of the path and reduces the life by 1. no credits gifted
 
                 Vector3 ship = TowerDefenseEnemyvector.at(i)->getRVWorldPosition();
                 float distance = ship.distance(*endpoint);
@@ -332,6 +574,7 @@
                 }
             }
         }
+
         //goes thorugh vector to see if an enemy is still alive. if not next wave is launched
         int count= 0;
         for(unsigned int i =0; i < TowerDefenseEnemyvector.size(); ++i)
@@ -342,9 +585,12 @@
             }
         }
 
+        if (count == 0 && !this->nextwaveTimer_.isActive())
+            this->nextwaveTimer_.startTimer();
+
+/*            time2 +=dt;
         if(count== 0)
         {
-            time2 +=dt;
             if(time2 > 10)
             {
                 TowerDefenseEnemyvector.clear();
@@ -353,10 +599,11 @@
                 time2=0;
             }
         }
+*/
 
-
     }
 
+
     // Function to test if we can add waypoints using code only. Doesn't work yet
 
     // THE PROBLEM: WaypointController's getControllableEntity() returns null, so it won't track. How do we get the controlableEntity to NOT BE NULL???
@@ -398,7 +645,7 @@
     /*
     void TowerDefense::playerEntered(PlayerInfo* player)
     {
-        Deathmatch::playerEntered(player);
+        TeamDeathmatch::playerEntered(player);
 
         const std::string& message = player->getName() + " entered the game";
         ChatManager::message(message);
@@ -406,7 +653,7 @@
 
     bool TowerDefense::playerLeft(PlayerInfo* player)
     {
-        bool valid_player = Deathmatch::playerLeft(player);
+        bool valid_player = TeamDeathmatch::playerLeft(player);
 
         if (valid_player)
         {
@@ -436,7 +683,7 @@
             ChatManager::message(message);
         }
 
-        Deathmatch::pawnKilled(victim, killer);
+        TeamDeathmatch::pawnKilled(victim, killer);
     }
 
     void TowerDefense::playerScored(PlayerInfo* player, int score)

Modified: code/trunk/src/modules/towerdefense/TowerDefense.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefense.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TowerDefense.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -37,29 +37,33 @@
 #ifndef _TowerDefense_H__
 #define _TowerDefense_H__
 #include "TDCoordinate.h"
+#include "TowerDefenseSelecter.h"
 #include "towerdefense/TowerDefensePrereqs.h"
-#include "gametypes/Deathmatch.h"
+#include "gametypes/TeamDeathmatch.h"
 #include "TowerDefenseEnemy.h"
 #include "util/Output.h"
 #include "core/object/WeakPtr.h"
+#include "TowerDefenseSelecter.h"
+#include "graphics/Camera.h"    
 
+
 namespace orxonox
 {
-    class _TowerDefenseExport TowerDefense : public Deathmatch
+    class _TowerDefenseExport TowerDefense : public TeamDeathmatch
     {
     public:
         TowerDefense(Context* context);
         virtual ~TowerDefense();
 
         std::vector<orxonox::WeakPtr<TowerDefenseEnemy> > TowerDefenseEnemyvector;
-        bool towermatrix[16][16];
+        Model* towerModelMatrix[16][16];
+        TowerDefenseTower* towerTurretMatrix[16][16];
         void addTowerDefenseEnemy(std::vector<TDCoordinate*> path, int templatenr);
         virtual void start(); //<! The function is called when the gametype starts
         virtual void end();
         virtual void tick(float dt);
-        //virtual void playerEntered(PlayerInfo* player);
-        //virtual bool playerLeft(PlayerInfo* player);
-        //Player Stats (set,get, reduce)
+        virtual void spawnPlayer(PlayerInfo* player);
+        PlayerInfo* getPlayer(void) const;
         int getCredit(){ return this->credit_; }
         int getLifes(){ return this->lifes_; }
         int getWaveNumber(){ return this->waves_; }
@@ -68,9 +72,15 @@
         void setWaveNumber(int wavenumber){ waves_=wavenumber; }
         void buyTower(int cost){ credit_ -= cost;}
         void addCredit(int credit) { credit_+=credit; }
-        void nextwave(){ waves_++;}
+        void nextwave();
         int reduceLifes(int NumberofLifes){ return lifes_-=NumberofLifes; }
+        TowerDefenseSelecter* selecter;
+        int spaceships;
+        int eggs;
+        int ufos;
+        int randomships;
 
+
         //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
         //virtual void playerScored(PlayerInfo* player, int score);
 
@@ -82,11 +92,7 @@
 
         /* Adds a tower at x, y in the playfield */
         void addTower(int x, int y);
-
         void upgradeTower(int x, int y);
-        /* Part of a temporary hack to allow the player to add towers */
-        ConsoleCommand* dedicatedAddTower_;
-        ConsoleCommand* dedicatedUpgradeTower_;
 
         //TODO: void spawnNewWave()
         //TODO: create a timer which regularly calls the spawnNewWave function  (time driven)
@@ -95,19 +101,18 @@
 
     private:
         TowerDefenseCenterpoint *center_;
+        PlayerInfo* player_;
         float time;
-        float time2;
+        float timeSetTower_;
+//        float time2;
         int credit_;
         int waves_;
         int lifes_;
+        Timer nextwaveTimer_;
 
         /* handles stats */
         bool hasEnoughCreditForTower(int towerCost);
         bool hasEnoughCreditForUpgrade();
-
-
-
-        std::vector<TowerTurret*> towers_;
     };
 }
 

Modified: code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -52,7 +52,6 @@
 
         this->width_ = 15;
         this->height_ = 15;
-        this->towerTemplate_ = "";
 
         //this->setCollisionType(Static);
 
@@ -71,7 +70,7 @@
         XMLPortParam(TowerDefenseCenterpoint, "width", setWidth, getWidth, xmlelement, mode);
         XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, getHeight, xmlelement, mode);
         XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode);
-        XMLPortParam(TowerDefenseCenterpoint, "towerTemplate", setTowerTemplate, getTowerTemplate, xmlelement, mode);
+        XMLPortParam(TowerDefenseCenterpoint, "selecterTemplate", setSelecterTemplate, getSelecterTemplate, xmlelement, mode);
 
         //TODO: add XMLPortObject(TowerDefenseCenterpoint, WorldEntity, "waypoints", addWaypoint, getWaypoint,  xmlelement, mode);
         // This was copied and shightly modified from WaypointController.cc ; there are no getters and setters and no membervariable yet

Modified: code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TowerDefenseCenterpoint.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -59,16 +59,16 @@
             */
             void setWidth(unsigned int width)
                 { this->width_ = width; }
-
             unsigned int getWidth(void) const
                 { return this->width_; }
-
             void setHeight(unsigned int height)
                 { this->height_ = height; }
-
             unsigned int getHeight(void) const
                 { return this->height_; }
-
+            void setSelecterTemplate(const std::string& newTemplate)
+                { this->selecterTemplate_ = newTemplate; }
+            const std::string& getSelecterTemplate() const
+                { return this->selecterTemplate_; }   
             /**
                 @brief How to convert to world coordinates, e.g. that 0,15 is not at -8,-8 but at -80,-80 (if scale would be 10)
             */
@@ -78,24 +78,13 @@
             unsigned int getTileScale(void) const
                 { return this->tileScale_; }
 
-            /**
-            @brief Set the template for the towers.
-            @param template The template name to be applied to each tower.
-            */
-            void setTowerTemplate(const std::string& templateName)
-                { this->towerTemplate_ = templateName; }
-
-            const std::string& getTowerTemplate(void) const
-                { return this->towerTemplate_; }
-
         private:
             void checkGametype();
 
+            std::string selecterTemplate_;
             unsigned int width_;
             unsigned int height_;
             unsigned int tileScale_;
-
-            std::string towerTemplate_;
     };
 }
 

Modified: code/trunk/src/modules/towerdefense/TowerDefenseEnemy.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseEnemy.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TowerDefenseEnemy.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -34,7 +34,11 @@
     }
     //add credit if enemy is destroyed
     TowerDefenseEnemy::~TowerDefenseEnemy(){
-        //this->td->addCredit(1);
+
+    	if (this->isInitialized())
+    	{
+    		getGame()->addCredit(1);
+    	}
     }
 
     void TowerDefenseEnemy::addWaypoint(TDCoordinate* coord)
@@ -63,10 +67,14 @@
         Pawn::damage(damage, healthdamage, shielddamage, originator);
         if (getGame() && once_ == false && getHealth() <= 0)
         {
+        	orxout() << "damagefunctionIF" << endl;
             getGame()->addCredit(1);
             once_ = true;
         }
+        orxout() << "damagefunction" << endl;
+
     }
+
 /*
     void TowerDefenseEnemy::popWaypoint()
     {

Copied: code/trunk/src/modules/towerdefense/TowerDefenseSelecter.cc (from rev 10621, code/branches/presentationFS15merge/src/modules/towerdefense/TowerDefenseSelecter.cc)
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseSelecter.cc	                        (rev 0)
+++ code/trunk/src/modules/towerdefense/TowerDefenseSelecter.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,184 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file TowerDefenseSelecter.cc
+    @brief This class represents your figure when you play the minigame. Here the movement of the figure, activating items, ... are handled.
+*/
+
+#include "TowerDefenseSelecter.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "graphics/Model.h"
+
+namespace orxonox
+{
+    RegisterClass(TowerDefenseSelecter);
+
+    TowerDefenseSelecter::TowerDefenseSelecter(Context* context) : ControllableEntity(context)
+    {
+        RegisterObject(TowerDefenseSelecter);
+
+        // initialize variables
+        moveUpPressed_ = false;
+        moveDownPressed_ = false;
+        moveLeftPressed_ = false;
+        moveRightPressed_ = false;
+        firePressed_ = false;
+        setSelectedPosition(6,6);
+        timerSetFire_=0;
+    }
+
+    TowerDefenseSelecter::~TowerDefenseSelecter()
+    {
+
+    }
+
+    void TowerDefenseSelecter::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(TowerDefenseSelecter, XMLPort, xmlelement, mode);
+    }
+
+    void TowerDefenseSelecter::tick(float dt)
+    {
+        SUPER(TowerDefenseSelecter, tick, dt);
+
+
+        if (hasLocalController())
+        {
+        	timerSetFire_ +=dt;
+
+        	if(timerSetFire_ >= 0.25)
+        	{
+        		timerSetFire_ = 0;
+
+        		int selecterPosX = selectedPos_->GetX();
+				int selecterPosY = selectedPos_->GetY();
+
+				if (moveUpPressed_ == true)
+				{
+					moveUpPressed_ = false;
+					selectedPos_->Set(selecterPosX, selecterPosY + 1);
+					updatePosition();
+				}
+				if (moveDownPressed_ == true)
+				{
+					moveDownPressed_ = false;
+					selectedPos_->Set(selecterPosX, selecterPosY - 1);
+					updatePosition();
+				}
+
+				if (moveLeftPressed_ == true)
+				{
+					moveLeftPressed_ = false;
+					selectedPos_->Set(selecterPosX - 1, selecterPosY);
+					updatePosition();
+				}
+				if (moveRightPressed_ == true)
+				{
+					moveRightPressed_ = false;
+					selectedPos_->Set(selecterPosX + 1, selecterPosY);
+					updatePosition();
+				}
+
+
+			}
+
+
+
+        }
+     }
+
+
+    void TowerDefenseSelecter::moveFrontBack(const Vector2& value)
+    {
+        if (value.x > 0)
+        {
+            moveUpPressed_ = true;
+            moveDownPressed_ = false;
+        }
+        else
+        {
+            moveUpPressed_ = false;
+            moveDownPressed_ = true;
+        }
+    }
+
+    void TowerDefenseSelecter::moveRightLeft(const Vector2& value)
+    {
+        if (value.x > 0)
+        {
+            moveLeftPressed_ = false;
+            moveRightPressed_ = true;
+        }
+        else
+        {
+            moveLeftPressed_ = true;
+            moveRightPressed_ = false;
+        }
+    }
+
+    void TowerDefenseSelecter::rotateYaw(const Vector2& value)
+    {
+    }
+
+    void TowerDefenseSelecter::rotatePitch(const Vector2& value)
+    {
+    }
+
+    void TowerDefenseSelecter::rotateRoll(const Vector2& value)
+    {
+    }
+
+
+    void TowerDefenseSelecter::boost(bool bBoost)
+    {
+        firePressed_ = true;
+        orxout() << "boost" << endl;
+    }
+
+
+    void TowerDefenseSelecter::updatePosition()
+    {
+        setPosition(selectedPos_->get3dcoordinate());
+    }
+
+    void TowerDefenseSelecter::setSelectedPosition(TDCoordinate* newPos)
+    {
+        selectedPos_ = newPos;
+        updatePosition();
+    }
+
+    void TowerDefenseSelecter::setSelectedPosition(int x,  int y)
+    {
+        setSelectedPosition(new TDCoordinate(x,y));
+    }
+
+
+}

Copied: code/trunk/src/modules/towerdefense/TowerDefenseSelecter.h (from rev 10621, code/branches/presentationFS15merge/src/modules/towerdefense/TowerDefenseSelecter.h)
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseSelecter.h	                        (rev 0)
+++ code/trunk/src/modules/towerdefense/TowerDefenseSelecter.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,67 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _TowerDefenseSelecter_H__
+#define _TowerDefenseSelecter_H__
+
+#include "towerdefense/TowerDefensePrereqs.h"
+#include "worldentities/ControllableEntity.h"
+#include "TDCoordinate.h"
+
+namespace orxonox
+{
+class _TowerDefenseExport TowerDefenseSelecter : public ControllableEntity
+    {
+        public:
+            TowerDefenseSelecter(Context* context); //!< Constructor. Registers and initializes the object.
+            virtual ~TowerDefenseSelecter();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);         
+            virtual void tick(float dt);            
+            virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
+            virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
+            virtual void rotateYaw(const Vector2& value);
+            virtual void rotatePitch(const Vector2& value);
+            virtual void rotateRoll(const Vector2& value);
+            virtual void boost(bool bBoost);
+            virtual void setSelectedPosition(TDCoordinate* newPos);
+            virtual void setSelectedPosition(int x, int y);
+            bool firePressed_;
+            TDCoordinate* selectedPos_;
+
+
+        private:            
+            virtual void updatePosition();
+            float timerSetFire_;
+            bool moveUpPressed_;
+            bool moveDownPressed_;
+            bool moveLeftPressed_;
+            bool moveRightPressed_;            
+    };
+}
+
+#endif /* _TowerDefenseSelecter_H__ */

Modified: code/trunk/src/modules/towerdefense/TowerDefenseTower.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseTower.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TowerDefenseTower.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -21,13 +21,17 @@
     @brief
         Constructor. Registers and initializes the object.
     */
-    TowerDefenseTower::TowerDefenseTower(Context* context) : Pawn(context)
+    TowerDefenseTower::TowerDefenseTower(Context* context) : Turret(context)
     {
         RegisterObject(TowerDefenseTower);
-
-        this->setCollisionType(WorldEntity::Dynamic);
+        game_ =NULL;
+        this->setCollisionType(WorldEntity::None);
         upgrade = 0;
+        this->addTemplate("towerdefensetower");
 
+        upgradeMax = 5;
+
+
         //this->removeAllEngines();
 
         /*
@@ -37,6 +41,7 @@
         */
     }
 
+    /*
     void TowerDefenseTower::setOrientation(const Quaternion& orientation)
     {
     }
@@ -52,21 +57,22 @@
     void TowerDefenseTower::rotateRoll(const Vector2& value)
     {
     }
+    */
 
     bool TowerDefenseTower::upgradeTower()
     {
-        if(upgrade < 3)
+        if(upgrade < upgradeMax)
         {
             upgrade++;
             float reloadrate = getReloadRate();
             float reloadwaittime = getReloadWaitTime();
-            this->setDamageMultiplier(5000);
-
-            reloadrate = 0.5f*reloadrate;
-            reloadwaittime = 0.5f*reloadwaittime;
+            this->setDamageMultiplier((upgrade+1)*1.5f);
+            this->setRotationThrust(2*this->getRotationThrust());
+            reloadrate = 0.7f*reloadrate;
+            reloadwaittime = 0.7f*reloadwaittime;
             setReloadRate(reloadrate);
             setReloadWaitTime(reloadwaittime);
-            this->addTemplate("towerturret1");
+            //this->addTemplate("towerturret1");
         }
         else
         {

Modified: code/trunk/src/modules/towerdefense/TowerDefenseTower.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefenseTower.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TowerDefenseTower.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -19,11 +19,12 @@
 
 #include "towerdefense/TowerDefensePrereqs.h"
 #include "worldentities/pawns/SpaceShip.h"
+#include "objects/Turret.h"
 
 
 namespace orxonox
 {
-    class _TowerDefenseExport TowerDefenseTower : public Pawn
+    class _TowerDefenseExport TowerDefenseTower : public Turret
     {
     public:
         TowerDefenseTower(Context* context);
@@ -36,18 +37,22 @@
         */
 
         // Overriding these to stop TowerDefenseTowers from spasing out
+        /*
         void setOrientation(const Quaternion& orientation);
         virtual void rotateYaw(const Vector2& value);
         virtual void rotatePitch(const Vector2& value);
         virtual void rotateRoll(const Vector2& value);
+        */
         virtual bool upgradeTower();
 
 
         void setGame(TowerDefense* Towerdefense)
         { assert(Towerdefense); game_ = Towerdefense; }
+        int upgrade;
+        int upgradeMax;
     private:
         TowerDefense* game_;
-        int upgrade;
+
     };
 }
 

Deleted: code/trunk/src/modules/towerdefense/TowerTurret.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerTurret.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TowerTurret.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -1,41 +0,0 @@
-//
-//  Tower.cc
-//  Orxonox
-//
-//  Created by Fabian Mentzer on 29.04.12.
-//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
-
-/* Not implemented fully */
-
-//#include "Tower.h"
-#include "TowerTurret.h"
-
-#include "core/CoreIncludes.h"
-//#include "core/XMLPort.h"
-
-namespace orxonox
-{
-    RegisterClass(TowerTurret);
-
-    /**
-    @brief
-        Constructor. Registers and initializes the object.
-    */
-    TowerTurret::TowerTurret(Context* context) : StaticEntity(context)
-    {
-        RegisterObject(TowerTurret);
-
-        this->setCollisionType(WorldEntity::Static);
-
-
-    }
-
-    void TowerTurret::setOrientation(const Quaternion& orientation)
-    {
-        static int ori;
-        orxout() << "orientation " << ++ori << endl;
-    }
-
-
-}

Deleted: code/trunk/src/modules/towerdefense/TowerTurret.h
===================================================================
--- code/trunk/src/modules/towerdefense/TowerTurret.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/towerdefense/TowerTurret.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -1,53 +0,0 @@
-//
-//  Tower.h
-//  Orxonox
-//
-//  Created by Fabian Mentzer on 29.04.12.
-//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
-
-/**
- at brief
-See TowerDefenseReadme.txt for Information.
-
- at ingroup TowerDefense
-*/
-
-
-#ifndef Orxonox_Tower_h
-#define Orxonox_Tower_h
-
-#include "towerdefense/TowerDefensePrereqs.h"
-#include "worldentities/pawns/SpaceShip.h"
-#include "worldentities/StaticEntity.h"
-
-
-namespace orxonox
-{
-    class _TowerDefenseExport TowerTurret : public StaticEntity
-    {
-    public:
-        TowerTurret(Context* context);
-        virtual ~TowerTurret() {};
-
-        // Maybe later override these to move towers with cursor keys
-        /*
-        virtual void moveFrontBack(const Vector2& value);
-        virtual void moveRightLeft(const Vector2& value);
-        */
-
-        // Overriding these to stop towers from spasing out
-        void setOrientation(const Quaternion& orientation);
-        //virtual void rotateYaw(const Vector2& value);
-        //virtual void rotatePitch(const Vector2& value);
-        //virtual void rotateRoll(const Vector2& value);
-
-        void setGame(TowerDefense* towerdefense)
-        { assert(towerdefense); game_ = towerdefense; }
-    private:
-        TowerDefense* game_;
-    };
-}
-
-
-#endif

Modified: code/trunk/src/modules/weapons/WeaponsPrereqs.h
===================================================================
--- code/trunk/src/modules/weapons/WeaponsPrereqs.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/weapons/WeaponsPrereqs.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -74,6 +74,7 @@
     class LaserMunition;
     class ReplenishingMunition;
     class RocketMunition;
+    class GravityBombMuntion;
 
     // projectiles
     class BillboardProjectile;
@@ -81,7 +82,9 @@
     class ParticleProjectile;
     class Projectile;
     class Rocket;
+    class RocketOld;
     class SimpleRocket;
+    class GravityBomb;
 
     // weaponmodes
     class EnergyDrink;
@@ -90,7 +93,9 @@
     class LaserFire;
     class LightningGun;
     class RocketFire;
+    class RocketFireOld;
     class SimpleRocketFire;
+    class GravityBombFire;
 }
 
 #endif /* _WeaponsPrereqs_H__ */

Modified: code/trunk/src/modules/weapons/munitions/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/weapons/munitions/CMakeLists.txt	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/weapons/munitions/CMakeLists.txt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -3,4 +3,5 @@
   LaserMunition.cc
   FusionMunition.cc
   RocketMunition.cc
+  GravityBombMunition.cc
 )

Copied: code/trunk/src/modules/weapons/munitions/GravityBombMunition.cc (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/munitions/GravityBombMunition.cc)
===================================================================
--- code/trunk/src/modules/weapons/munitions/GravityBombMunition.cc	                        (rev 0)
+++ code/trunk/src/modules/weapons/munitions/GravityBombMunition.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,32 @@
+/*
+ * GravityBombMunition.cc
+ *
+ *  Created on: Apr 16, 2015
+ *      Author: Manuel Eggimann
+ */
+#include "GravityBombMunition.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+RegisterClass(GravityBombMunition);
+
+    GravityBombMunition::GravityBombMunition(Context* context) : Munition(context)
+    {
+        RegisterObject(GravityBombMunition);
+        this->maxMunitionPerMagazine_ = 1;
+        this->maxMagazines_ = 30;
+        this->magazines_ = 15;
+
+        this->bUseSeparateMagazines_ = false;
+        this->bStackMunition_ = true;
+
+        this->bAllowMunitionRefilling_ = true;
+        this->bAllowMultiMunitionRemovementUnderflow_ = false;
+    }
+
+}
+
+
+
+

Copied: code/trunk/src/modules/weapons/munitions/GravityBombMunition.h (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/munitions/GravityBombMunition.h)
===================================================================
--- code/trunk/src/modules/weapons/munitions/GravityBombMunition.h	                        (rev 0)
+++ code/trunk/src/modules/weapons/munitions/GravityBombMunition.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,35 @@
+/*
+ * GravityBombMunition.h
+ *
+ *  Created on: Apr 16, 2015
+ *      Author: meggiman
+ */
+
+#ifndef GRAVITYBOMBMUNITION_H_
+#define GRAVITYBOMBMUNITION_H_
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+    /**
+     * @class   GravityBombMunition
+     *
+     * @brief   This class is used to set the behaviour of various 
+     *          munition specific attributes of the GravityBomb like max count of munition per magazine.
+     *
+     * @author  Manuel
+     * @date    23.05.2015
+     */
+    class _WeaponsExport GravityBombMunition : public Munition
+    {
+        public:
+            GravityBombMunition(Context* context);
+            virtual ~GravityBombMunition() {}
+    };
+
+}
+
+
+#endif /* GRAVITYBOMBMUNITION_H_ */

Modified: code/trunk/src/modules/weapons/projectiles/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/weapons/projectiles/CMakeLists.txt	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/weapons/projectiles/CMakeLists.txt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -5,5 +5,8 @@
   Projectile.cc
   LightningGunProjectile.cc
   Rocket.cc
+  RocketOld.cc
   SimpleRocket.cc
+  GravityBomb.cc
+  GravityBombField.cc
 )

Copied: code/trunk/src/modules/weapons/projectiles/GravityBomb.cc (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/projectiles/GravityBomb.cc)
===================================================================
--- code/trunk/src/modules/weapons/projectiles/GravityBomb.cc	                        (rev 0)
+++ code/trunk/src/modules/weapons/projectiles/GravityBomb.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,102 @@
+/*
+ * GravityBomb.cc
+ *
+ *  Created on: Mar 26, 2015
+ *      Author: Manuel Eggimann
+ */
+#include "GravityBomb.h"
+#include "graphics/Model.h"
+
+
+namespace orxonox{
+    RegisterClass(GravityBomb);
+
+    const float GravityBomb::LIFETIME = 2.5;  ///< The gravity bomb lifetime in seconds.
+
+    GravityBomb::GravityBomb(Context* context):
+                BasicProjectile(),
+                MovableEntity(context),
+                RadarViewable(this,static_cast<WorldEntity*>(this))
+        {
+            RegisterObject(GravityBomb);
+
+            this->setMass(10.0);
+            this->hasCollided_ = false;
+            if (GameMode::isMaster())
+            {
+                //Define CollisionType of the bomb
+                this->timeToLife_= LIFETIME;
+                this->setCollisionResponse(false);
+                this->setCollisionType(WorldEntity::Dynamic);
+                this->enableCollisionCallback();
+
+                //Add Collision Shape
+                SphereCollisionShape* collisionShape = new SphereCollisionShape(context);
+                collisionShape->setRadius(1.0);
+                this->attachCollisionShape(collisionShape);
+
+                //Create Bomb Model
+                Model* rocketModel = new Model(this->getContext());
+                rocketModel->setMeshSource("GravityBombRocket.mesh"); //Demo Model from SimpleRocket
+                rocketModel->scale(3.0f);
+                this->attach(rocketModel);
+                //Add second model because the bomb consists of the bomb and attached rockets (2 separate models)
+                Model* bombModel =  new Model(this->getContext());
+                bombModel->setMeshSource("GravityBomb.mesh"); //Demo Model from SimpleRocket
+                bombModel->scale(3.0f);
+                this->attach(bombModel);
+
+                //Add particle effect to the flying rockets.
+                ParticleEmitter* fire = new ParticleEmitter(this->getContext());
+                fire->setOrientation(this->getOrientation());
+                fire->setSource("Orxonox/simplerocketfire");
+                this->attach(fire);
+
+                //Add sound effect while the bomb is flying.
+                WorldSound* bombSound = new WorldSound(context);
+                bombSound->setSource("sounds/GravityBombFlight.ogg");
+                bombSound->setLooping(true);
+                bombSound->setVolume(1.0);
+                this->attach(bombSound);
+                bombSound->play();
+            }
+        }
+
+    GravityBomb::~GravityBomb(){}
+
+    void GravityBomb::tick(float dt)
+    {
+        SUPER(GravityBomb, tick, dt);
+        timeToLife_ -= dt;
+        if (timeToLife_ < 0)
+        {
+            //orxout(debug_output) << "bomb has stoped moving" <<endl;
+            setVelocity(Vector3::ZERO); //Stop the bomb.
+            detonate();
+            this->destroy();
+        }
+        else 
+        {
+            if (hasCollided_) detonate();
+            destroyCheck(); //Bomb is going to be destroyed by destroyCheck(). As written in BasicProectile, this Method should be called by every Projectile.
+        }
+    }
+
+    bool GravityBomb::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint)
+    {
+        hasCollided_ = processCollision(otherObject, contactPoint, cs);
+        return hasCollided_;
+    }
+
+    void GravityBomb::detonate()
+    {
+        //Create the GravityBombField and destroy the Projectil.
+        GravityBombField* field = new GravityBombField(this->getContext());
+        field->setShooter(this->getShooter());
+        field->setPosition(getPosition());
+        //orxout(debug_output) << "detonating. Creating GravityBombField." <<endl;
+        //orxout(debug_output) << "Field is at Position: " << getPosition() << endl;
+    }
+}
+
+

Copied: code/trunk/src/modules/weapons/projectiles/GravityBomb.h (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/projectiles/GravityBomb.h)
===================================================================
--- code/trunk/src/modules/weapons/projectiles/GravityBomb.h	                        (rev 0)
+++ code/trunk/src/modules/weapons/projectiles/GravityBomb.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,55 @@
+/*
+ * GravityBomb.h
+ *
+ *  Created on: Mar 19, 2015
+ *      Author: meggiman
+ */
+
+#ifndef GravityBOMB_H_
+#define GravityBOMB_H_
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "tools/Timer.h"
+
+#include "graphics/ParticleSpawner.h"
+#include "interfaces/RadarViewable.h"
+#include "objects/ForceField.h"
+#include "BasicProjectile.h"
+#include "worldentities/MovableEntity.h"
+#include "core/CoreIncludes.h"
+#include "objects/collisionshapes/SphereCollisionShape.h"
+#include "worldentities/WorldEntity.h"
+#include "GravityBombField.h"
+#include "sound/WorldSound.h"
+
+namespace orxonox
+{
+    /**
+     * @class   GravityBomb
+     *
+     * @brief   This class implements how long the bomb flies before it places the GravityField at it's last possition.
+     *          The field will be created either because the timelimit of the bomb expired or it hit something. After creation of the field,
+     *          the projectile (this object) is destroyed.
+     *
+     * @author  Manuel Eggimann
+     * @date    23.05.2015
+     */
+    class _WeaponsExport GravityBomb : public BasicProjectile , public MovableEntity, public RadarViewable
+    {
+        public:
+            GravityBomb(Context* context);
+            virtual ~GravityBomb();
+            virtual void tick(float dt);
+
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
+            void detonate();
+        private:
+        static const float LIFETIME;
+
+        bool hasCollided_;
+        float timeToLife_; //Time the bomb flies before it explodes.
+        WorldSound* bombSound_;
+    };
+}
+#endif /* GravityBOMB_H_ */

Copied: code/trunk/src/modules/weapons/projectiles/GravityBombField.cc (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/projectiles/GravityBombField.cc)
===================================================================
--- code/trunk/src/modules/weapons/projectiles/GravityBombField.cc	                        (rev 0)
+++ code/trunk/src/modules/weapons/projectiles/GravityBombField.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,176 @@
+/*
+ * GravityBombField.cc
+ *
+ *  Created on: Apr 2, 2015
+ *      Author: Manuel Eggimann
+ */
+
+#include "GravityBombField.h"
+#include "graphics/Model.h"
+
+namespace orxonox{
+    RegisterClass(GravityBombField);
+
+    //Change these constants to alter the behaviour of the field.
+    
+    const float GravityBombField::FORCE_FIELD_LIFETIME = 15;
+    const float GravityBombField::FORCE_SPHERE_START_RADIUS = 250;
+    const float GravityBombField::FORCE_SPHERE_START_STRENGTH = -700;
+    const float GravityBombField::PEAK_EXPLOSION_FORCE = 5e4;
+    const float GravityBombField::FORCE_FIELD_EXPLOSION_DAMMAGE = 100;
+    const float GravityBombField::EXPLOSION_DURATION = 1;
+    const float GravityBombField::EXPLOSION_RADIUS = 600;
+    const float GravityBombField::PEAK_ANGULAR_VELOCITY = 20;
+    const float GravityBombField::CENTRE_MODEL_END_SIZE = 1.5;
+
+    GravityBombField::GravityBombField(Context* context) : ForceField(context),RadarViewable(this, static_cast<WorldEntity*>(this))
+    {
+        RegisterObject(GravityBombField);
+        //Initialize variable with their initial values.
+        lifetime_=FORCE_FIELD_LIFETIME;
+        forceStrength_ = FORCE_SPHERE_START_STRENGTH;
+        forceSphereRadius_ = FORCE_SPHERE_START_RADIUS;
+        modelScaling_ = 1;
+        fieldExploded_ = false;
+
+        setVelocity(FORCE_SPHERE_START_STRENGTH);
+        setDiameter(2*FORCE_SPHERE_START_RADIUS);
+        setMode(modeSphere_s);
+        setCollisionResponse(false);
+
+        //Make the Field visible on Radar and minimap.
+        this->setRadarObjectColour(ColourValue(1.0, 0.0, 0.2,1)); // Red
+        this->setRadarObjectShape(RadarViewable::Dot);
+        this->setRadarObjectScale(1.0f);
+        
+
+        //Attach Model
+        Model* model = new Model(this->getContext());
+        model->setMeshSource("GravityBomb.mesh"); //Demo Model from SimpleRocket
+        model->scale(2.5f);
+        bombModel_ = new MovableEntity(context);
+        bombModel_->attach(model);
+        this->attach(bombModel_);
+
+        //Add a Backlight to the centre.
+        centreLight_ = new Backlight(context);
+        centreLight_->setColour(ColourValue(0.2,0.9,0.2,1));
+        centreLight_->setScale(0.3);
+        centreLight_->setTrailMaterial("Trail/backlighttrail");
+        centreLight_->setMaterial("Examples/Flare");
+        centreLight_->setLifetime(20);
+        bombModel_->attach(centreLight_);
+
+        //Let the Bomb Modell in the centre rotate in a random direction.
+        Vector3 randomRotation;
+        randomRotation.x = rnd();
+        randomRotation.y = rnd();
+        randomRotation.y = rnd();
+        randomRotation.normalise();
+        bombModel_->setAngularAcceleration(randomRotation*(PEAK_ANGULAR_VELOCITY/FORCE_FIELD_LIFETIME));
+
+        //Add Collision Shape
+        SphereCollisionShape* collisionShape = new SphereCollisionShape(context);
+        collisionShape->setRadius(10.0);
+        this->attachCollisionShape(collisionShape);
+
+        //Add particle effect to visualize the force field.
+        this->particleSphere_ = new ParticleEmitter(this->getContext());
+        this->attach(this->particleSphere_);
+        particleSphere_->setSource("Orxonox/GravityBombField");
+
+        //Add a sound effect to the field.
+        WorldSound* fieldSound = new WorldSound(context);
+        fieldSound->setSource("sounds/GravityField.ogg");
+        fieldSound->setLooping(true);
+        fieldSound->setVolume(1.0);
+        this->attach(fieldSound);
+        fieldSound->play();
+    }
+
+    GravityBombField::~GravityBombField(){}
+
+    
+    void GravityBombField::tick(float dt)
+    {
+        SUPER(GravityBombField,tick,dt);
+        lifetime_-=dt;
+
+        if(lifetime_ > EXPLOSION_DURATION)//If field is still alive, make it smaller and stronger.
+        {
+            modelScaling_ += ((CENTRE_MODEL_END_SIZE-1) / FORCE_FIELD_LIFETIME)*dt;
+            forceStrength_ *= (1+dt/10);
+            forceSphereRadius_ = FORCE_SPHERE_START_RADIUS*(1-((FORCE_FIELD_LIFETIME-lifetime_)/FORCE_FIELD_LIFETIME)*((FORCE_FIELD_LIFETIME-lifetime_)/FORCE_FIELD_LIFETIME)*((FORCE_FIELD_LIFETIME-lifetime_)/FORCE_FIELD_LIFETIME));
+        }
+        else if(lifetime_ > 0)
+        {
+            if (!fieldExploded_) // Start the field explosion if it has not been started yet.
+            {
+                forceStrength_ = pow((EXPLOSION_DURATION + lifetime_),4)/EXPLOSION_DURATION * PEAK_EXPLOSION_FORCE;
+                fieldExploded_ = true;
+
+                //Add particle effect to visualize explosion
+                explosionCross_ = new ParticleEmitter(this->getContext());
+                explosionCross_->setSource("Orxonox/FieldExplosion");
+                explosionCross_->setOrientation(rnd(), rnd(), rnd(), rnd());
+                explosionCross_->setScale(0.7);
+                this->attach(explosionCross_);
+
+                //Add explosion sound effect.
+                explosionSound_ = new WorldSound(getContext());
+                explosionSound_->setSource("sounds/GravityFieldExplosion.ogg");
+                explosionSound_->setVolume(1.0);
+                explosionSound_->play();
+            }
+
+            //Check if any pawn is inside the shockwave and hit it with dammage proportional to the distance between explosion centre and pawn. Make sure, the same pawn is damaged only once.
+            for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
+            {
+                Vector3 distanceVector = it->getWorldPosition()-this->getWorldPosition();
+                 //orxout(debug_output) << "Found Pawn:" << it->getWorldPosition() << endl;
+                if(distanceVector.length()< forceSphereRadius_)
+                {
+                    //orxout(debug_output) << "Force sphere radius is: " << forceSphereRadius_ << " Distance to Pawn is: " << distanceVector.length();
+                    if (std::find(victimsAlreadyDamaged_.begin(),victimsAlreadyDamaged_.end(),*it) == victimsAlreadyDamaged_.end())
+                    {
+                        //orxout(debug_output) << "Found Pawn to damage: " << it->getWorldPosition() << endl;
+                        float damage = FORCE_FIELD_EXPLOSION_DAMMAGE*(1-distanceVector.length()/EXPLOSION_RADIUS);
+                        //orxout(debug_output) << "Damage: " << damage << endl;
+                        it->hit(shooter_, it->getWorldPosition(), NULL, damage, 0,0);
+                        victimsAlreadyDamaged_.push_back(*it);
+                    }
+                }
+            }
+
+            forceSphereRadius_ = EXPLOSION_RADIUS*(1-lifetime_/EXPLOSION_DURATION);
+            explosionCross_->setScale(forceSphereRadius_/FORCE_SPHERE_START_RADIUS);
+        }
+        else if (lifetime_ > -6) //The field has to exist for 6 more seconds for the particles of the particle effect to vanish smoothly.
+        {
+            //Make the bomb model invisible, let the strength of the field be zero and remove all particle emitters so the particle effect will slowly vanish.
+            bombModel_->setVisible(false);
+            this->setRadarVisibility(false);
+            forceStrength_ = 0;
+            forceSphereRadius_ = 0.00001;
+            particleSphere_->getParticleInterface()->removeAllEmitters();
+            explosionCross_->getParticleInterface()->removeAllEmitters();
+        }
+        
+        setDiameter(forceSphereRadius_*2);
+        setVelocity(forceStrength_);
+        if(lifetime_>0) particleSphere_->setScale(forceSphereRadius_/FORCE_SPHERE_START_RADIUS);
+        bombModel_->setScale(modelScaling_);
+
+        if (lifetime_ <= -4)
+        {
+            orxout(debug_output) << "Timeout. Destroying field." << endl;
+            this->destroy();
+        }
+    }
+
+    void GravityBombField::destroy()
+    {
+        ForceField::destroy();
+    }
+
+}

Copied: code/trunk/src/modules/weapons/projectiles/GravityBombField.h (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/projectiles/GravityBombField.h)
===================================================================
--- code/trunk/src/modules/weapons/projectiles/GravityBombField.h	                        (rev 0)
+++ code/trunk/src/modules/weapons/projectiles/GravityBombField.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,90 @@
+/*
+ * GravityBombField.h
+ *
+ *  Created on: Apr 2, 2015
+ *      Author: meggiman
+ */
+
+#ifndef GRAVITYBOMBFIELD_H_
+#define GRAVITYBOMBFIELD_H_
+
+#include "graphics/ParticleSpawner.h"
+#include "interfaces/RadarViewable.h"
+#include "objects/ForceField.h"
+#include "BasicProjectile.h"
+#include "worldentities/MovableEntity.h"
+#include "core/CoreIncludes.h"
+#include "GravityBomb.h"
+#include "graphics/ParticleSpawner.h"
+#include "tools/ParticleInterface.h"
+#include <stdlib.h>
+#include <time.h>
+#include <math.h>
+#include "graphics/Backlight.h"
+#include "sound/WorldSound.h"
+
+namespace orxonox {
+
+/**
+ * @class   GravityBombField
+ *
+ * @brief   This class is used by GravityBomb to place the ForceField and Visual effect to the environment.
+ *          The field has a maximum lifetime and gets smaller and stronger the more time passes. In the end, the field explodes and damages all pawns nearby.
+ *
+ * @author  Manuel Eggimann
+ * @date    23.05.2015
+ */
+class GravityBombField: public ForceField, public RadarViewable {
+public:
+    GravityBombField(Context* context);
+    virtual ~GravityBombField();
+    virtual void tick(float dt);
+    virtual void destroy();
+
+    /**
+     * @fn  void GravityBombField::setShooter(Pawn* shooter)
+     *
+     * @brief   This function is used to determine save the pawn who created the field and is used inside the GravityBomb class.
+     *
+     * @author  Manuel Eggimann
+     * @date    23.05.2015
+     *
+     * @param [in,out]  the Pawn that created the field.
+     */
+    void setShooter(Pawn* shooter)
+    { this->shooter_ = shooter; }
+
+    Pawn* getShooter()
+    { return this->shooter_; }
+
+private:
+    //Set these constants inside GravityBombField.cc to alter the behaviour of the field.
+    
+    static const float FORCE_FIELD_LIFETIME;    ///< The lifetime of the ForceField in seconds. After lifetime seconds, has already exploded and the particle effects will start to vanish. 
+    static const float FORCE_SPHERE_START_RADIUS;   ///< The initial sphere radius of the Force Field. The forcefield gets smaller by time.
+    static const float FORCE_SPHERE_START_STRENGTH; ///< The initial Force the Field exerts on every object with non-zero mass.
+    static const float FORCE_FIELD_EXPLOSION_DAMMAGE;   ///< The maximum dammage a pawn gets nearby an exploding field. The farer away from explosion center the smaller the dammage.
+    static const float EXPLOSION_DURATION;  ///< Determines how fast the shockwave of the Explosion expands. It takes GravityBombField::EXPLOSION_DURATION seconds for the field to expand from 0 radius to GravityBombField::EXPLOSION_RADIUS.
+    static const float EXPLOSION_RADIUS;    ///< How far does the shockwave reach. All pawns which outside of a sphere witch this radius rest unharmed by the explosion.
+    static const float PEAK_ANGULAR_VELOCITY;   ///< The model of the bomb in the center of the Field does rotate faster and faster as time passes until it reaches PEAK_ANGULAR_VELOCITY at the fields end of life.
+    static const float PEAK_EXPLOSION_FORCE;    ///< The peak force the explosion exerts on the pawns nearby.
+    static const float CENTRE_MODEL_END_SIZE;   ///< Size of the 3d-model of the bomb in the fields centre.
+
+    float forceSphereRadius_;
+    float forceStrength_;
+    float lifetime_;
+    float modelScaling_;
+    Vector3 rotationVector_;
+    bool fieldExploded_;
+    ParticleEmitter * particleSphere_;
+    ParticleEmitter * explosionCross_;
+    std::vector<Pawn*> victimsAlreadyDamaged_;
+    MovableEntity * bombModel_;
+    Pawn* shooter_;
+    Backlight* centreLight_;
+    WorldSound* explosionSound_;
+};
+
+}
+#endif /* GRAVITYBOMBFIELD_H_ */
+

Modified: code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/weapons/projectiles/LightningGunProjectile.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -46,6 +46,8 @@
         RegisterObject(LightningGunProjectile);
 
         this->textureIndex_ = 1;
+        this->setMass(2);
+        this->setCollisionType(Dynamic);
         this->maxTextureIndex_ = 8;
         this->textureTimer_.setTimer(0.01f, true, createExecutor(createFunctor(&LightningGunProjectile::changeTexture, this)));
 

Modified: code/trunk/src/modules/weapons/projectiles/Rocket.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/Rocket.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/weapons/projectiles/Rocket.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -47,6 +47,7 @@
 #include "sound/WorldSound.h"
 #include "worldentities/CameraPosition.h"
 #include "worldentities/pawns/Pawn.h"
+//#include "particleuniverse/include/ParticleUniverseSystemManager.h"
 
 namespace orxonox
 {
@@ -82,6 +83,11 @@
             this->attach(fire);
             fire->setOrientation(this->getOrientation());
             fire->setSource("Orxonox/rocketfire");
+            
+            // Add Particle Universe Effects
+            //ParticleUniverse::ParticleSystemManager* pManager = ParticleUniverse::ParticleSystemManager::getSingletonPtr();
+            //ParticleUniverse::ParticleSystem* pSys1 = pManager->createParticleSystem("pSys1", "bubbles", this->getScene()->getSceneManager());
+            //this->attachOgreObject(pSys1);
 
             this->enableCollisionCallback();
             this->setCollisionResponse(false);
@@ -222,29 +228,53 @@
     */
     void Rocket::destructionEffect()
     {
-        ParticleSpawner *effect1, *effect2;
+        ParticleSpawner *effect1, *effect2, *effect3, *effect4, *effect5;
         if(this->getShooter())
         {
             effect1 = new ParticleSpawner(this->getShooter()->getContext());
             effect2 = new ParticleSpawner(this->getShooter()->getContext());
+            effect3 = new ParticleSpawner(this->getShooter()->getContext());
+            effect4 = new ParticleSpawner(this->getShooter()->getContext());
+            effect5 = new ParticleSpawner(this->getShooter()->getContext());
         }
         else
         {
             effect1 = new ParticleSpawner(this->getContext());
             effect2 = new ParticleSpawner(this->getContext());
+            effect3 = new ParticleSpawner(this->getContext());
+            effect4 = new ParticleSpawner(this->getContext());
+            effect5 = new ParticleSpawner(this->getContext());
         }
 
         effect1->setPosition(this->getPosition());
         effect1->setOrientation(this->getOrientation());
         effect1->setDestroyAfterLife(true);
-        effect1->setSource("Orxonox/explosion4");
+        effect1->setSource("orxonox/explosion_flash");
         effect1->setLifetime(2.0f);
 
         effect2->setPosition(this->getPosition());
         effect2->setOrientation(this->getOrientation());
         effect2->setDestroyAfterLife(true);
-        effect2->setSource("Orxonox/smoke4");
+        effect2->setSource("orxonox/explosion_flame");
         effect2->setLifetime(3.0f);
+
+        effect3->setPosition(this->getPosition());
+        effect3->setOrientation(this->getOrientation());
+        effect3->setDestroyAfterLife(true);
+        effect3->setSource("orxonox/explosion_shockwave");
+        effect3->setLifetime(3.0f);
+
+        effect4->setPosition(this->getPosition());
+        effect4->setOrientation(this->getOrientation());
+        effect4->setDestroyAfterLife(true);
+        effect4->setSource("orxonox/explosion_sparks");
+        effect4->setLifetime(3.0f);
+
+        effect5->setPosition(this->getPosition());
+        effect5->setOrientation(this->getOrientation());
+        effect5->setDestroyAfterLife(true);
+        effect5->setSource("orxonox/explosion_streak1");
+        effect5->setLifetime(3.0f);
     }
 
     /**

Copied: code/trunk/src/modules/weapons/projectiles/RocketOld.cc (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/projectiles/RocketOld.cc)
===================================================================
--- code/trunk/src/modules/weapons/projectiles/RocketOld.cc	                        (rev 0)
+++ code/trunk/src/modules/weapons/projectiles/RocketOld.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,298 @@
+/*
+ *   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:
+ *      Oliver Scheuss
+ *   Co-authors:
+ *      simonmie
+ *
+ */
+
+/**
+    @file RocketOld.h
+    @brief Implementation of the RocketOld class.
+*/
+
+#include "RocketOld.h"
+
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "Scene.h"
+#include "controllers/Controller.h"
+#include "graphics/Model.h"
+#include "graphics/ParticleSpawner.h"
+#include "infos/PlayerInfo.h"
+#include "objects/collisionshapes/ConeCollisionShape.h"
+#include "sound/WorldSound.h"
+#include "worldentities/CameraPosition.h"
+#include "worldentities/pawns/Pawn.h"
+//#include "particleuniverse/include/ParticleUniverseSystemManager.h"
+
+namespace orxonox
+{
+    RegisterClass(RocketOld);
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes some default values.
+    */
+    RocketOld::RocketOld(Context* context)
+        : ControllableEntity(context)
+        , BasicProjectile()
+        , RadarViewable(this, static_cast<WorldEntity*>(this))
+    {
+        RegisterObject(RocketOld);// Register the RocketOld class to the core
+
+        this->localAngularVelocity_ = 0;
+        this->lifetime_ = 100.0f;
+
+        if (GameMode::isMaster())
+        {
+            this->setCollisionType(WorldEntity::Kinematic);
+            this->setVelocity(0,0,-100);
+
+            // Create RocketOld model
+            Model* model = new Model(this->getContext());
+            model->setMeshSource("rocket.mesh");
+            model->scale(0.7f);
+            this->attach(model);
+
+            // Add effects.
+            ParticleEmitter* fire = new ParticleEmitter(this->getContext());
+            this->attach(fire);
+            fire->setOrientation(this->getOrientation());
+            fire->setSource("Orxonox/rocketfire");
+            
+            // Add Particle Universe Effects
+            //ParticleUniverse::ParticleSystemManager* pManager = ParticleUniverse::ParticleSystemManager::getSingletonPtr();
+            //ParticleUniverse::ParticleSystem* pSys1 = pManager->createParticleSystem("pSys1", "bubbles", this->getScene()->getSceneManager());
+            //this->attachOgreObject(pSys1);
+
+            this->enableCollisionCallback();
+            this->setCollisionResponse(false);
+            this->setCollisionType(Kinematic);
+
+            // Add collision shape
+            ConeCollisionShape* collisionShape = new ConeCollisionShape(this->getContext());
+            collisionShape->setRadius(3);
+            collisionShape->setHeight(500);
+            this->attachCollisionShape(collisionShape);
+
+            this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this)));
+
+            // Add sound
+            this->defSndWpnEngine_ = new WorldSound(this->getContext());
+            this->defSndWpnEngine_->setLooping(true);
+            this->defSndWpnEngine_->setSource("sounds/Rocket_engine.ogg");
+            this->defSndWpnEngine_->setVolume(1.0f);
+            this->attach(defSndWpnEngine_);
+
+            this->defSndWpnLaunch_ = new WorldSound(this->getContext());
+            this->defSndWpnLaunch_->setLooping(false);
+            this->defSndWpnLaunch_->setSource("sounds/Rocket_launch.ogg");
+            this->defSndWpnLaunch_->setVolume(1.0f);
+            this->attach(defSndWpnLaunch_);
+        }
+        else
+        {
+            this->defSndWpnEngine_ = 0;
+            this->defSndWpnLaunch_ = 0;
+        }
+
+        // Add camera
+        CameraPosition* camPosition = new CameraPosition(this->getContext());
+        camPosition->setPosition(0,4,15);
+        camPosition->setAllowMouseLook(true);
+        this->addCameraPosition(camPosition);
+
+        this->setRadarObjectColour(ColourValue(1.0, 0.5, 0.0)); // orange
+        this->setRadarObjectShape(RadarViewable::Triangle);
+        this->setRadarObjectScale(0.5f);
+    }
+
+    /**
+    @brief
+        Destructor. Destroys controller, if present and kills sounds, if playing.
+    */
+    RocketOld::~RocketOld()
+    {
+        if(this->isInitialized())
+        {
+            if (GameMode::isMaster())
+            {
+                this->destructionEffect();
+
+                if (this->getPlayer() && this->getController())
+                    this->player_->stopTemporaryControl();
+            }
+
+            if ( this->defSndWpnEngine_ )
+                this->defSndWpnEngine_->destroy();
+
+            if ( this->defSndWpnLaunch_ )
+                this->defSndWpnLaunch_->destroy();
+        }
+    }
+
+    /**
+    @brief
+        Sets the entity that fired the RocketOld.
+    @param shooter
+        A pointer to the Pawn that fired the RocketOld.
+    */
+    void RocketOld::setShooter(Pawn* shooter)
+    {
+        this->BasicProjectile::setShooter(shooter);
+        
+        this->player_ = this->getShooter()->getPlayer();
+        if(this->player_)
+            this->player_->startTemporaryControl(this);
+
+        if( GameMode::isMaster() )
+        {
+            this->defSndWpnEngine_->play();
+            this->defSndWpnLaunch_->play();
+        }
+    }
+
+    /**
+    @brief
+        Defines which actions the RocketOld has to take in each tick.
+    @param dt
+        The length of the tick.
+    */
+    void RocketOld::tick(float dt)
+    {
+        SUPER(RocketOld, tick, dt);
+
+        if( this->hasLocalController() )
+        {
+            this->setAngularVelocity(this->getOrientation() * this->localAngularVelocity_);
+            this->setVelocity( this->getOrientation()*WorldEntity::FRONT*this->getVelocity().length() );
+            this->localAngularVelocity_ = 0;
+        }
+
+       this->destroyCheck();
+    }
+
+    bool RocketOld::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint)
+    {
+        return this->processCollision(otherObject, contactPoint, cs);
+    }
+
+    /**
+    @brief
+        Destroys the RocketOld and stops the sound,
+    */
+    void RocketOld::destroyObject(void)
+    {
+        if (GameMode::isMaster() && this->defSndWpnEngine_->isPlaying())
+            this->defSndWpnEngine_->stop();
+
+        this->BasicProjectile::destroyObject();
+    }
+
+    /**
+    @brief
+        Destroys the RocketOld upon pressing "fire".
+    */
+    void RocketOld::fired(unsigned int firemode)
+    {
+        this->destroyObject();
+    }
+
+    /**
+    @brief
+        The effects that are displayed, when the RocketOld is destroyed.
+    */
+    void RocketOld::destructionEffect()
+    {
+        ParticleSpawner *effect1, *effect2;
+        if(this->getShooter())
+        {
+            effect1 = new ParticleSpawner(this->getShooter()->getContext());
+            effect2 = new ParticleSpawner(this->getShooter()->getContext());
+        }
+        else
+        {
+            effect1 = new ParticleSpawner(this->getContext());
+            effect2 = new ParticleSpawner(this->getContext());
+        }
+
+        effect1->setPosition(this->getPosition());
+        effect1->setOrientation(this->getOrientation());
+        effect1->setDestroyAfterLife(true);
+        effect1->setSource("Orxonox/explosion4");
+        effect1->setLifetime(2.0f);
+
+        effect2->setPosition(this->getPosition());
+        effect2->setOrientation(this->getOrientation());
+        effect2->setDestroyAfterLife(true);
+        effect2->setSource("Orxonox/smoke4");
+        effect2->setLifetime(3.0f);
+    }
+
+    /**
+    @brief
+        Rotates the RocketOld around the y-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void RocketOld::rotateYaw(const Vector2& value)
+    {
+        ControllableEntity::rotateYaw(value);
+
+        if( !this->isInMouseLook() )
+            this->localAngularVelocity_.y += value.x;
+    }
+
+    /**
+    @brief
+        Rotates the RocketOld around the x-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void RocketOld::rotatePitch(const Vector2& value)
+    {
+        ControllableEntity::rotatePitch(value);
+
+        if( !this->isInMouseLook() )
+            this->localAngularVelocity_.x += value.x;
+    }
+
+    /**
+    @brief
+        Rotates the RocketOld around the z-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void RocketOld::rotateRoll(const Vector2& value)
+    {
+        ControllableEntity::rotateRoll(value);
+
+        if( !this->isInMouseLook() )
+            this->localAngularVelocity_.z += value.x;
+    }
+
+}

Copied: code/trunk/src/modules/weapons/projectiles/RocketOld.h (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/projectiles/RocketOld.h)
===================================================================
--- code/trunk/src/modules/weapons/projectiles/RocketOld.h	                        (rev 0)
+++ code/trunk/src/modules/weapons/projectiles/RocketOld.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,134 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Scheuss
+ *   Co-authors:
+ *      simonmie
+ *
+ */
+
+/**
+    @file RocketOld.h
+    @brief Definition of the RocketOld class.
+*/
+
+#ifndef _RocketOld_H__
+#define _RocketOld_H__
+
+#include "weapons/WeaponsPrereqs.h"
+
+#include "tools/Timer.h"
+
+#include "interfaces/RadarViewable.h"
+#include "worldentities/ControllableEntity.h"
+
+#include "BasicProjectile.h"
+
+namespace orxonox
+{
+    class ConeCollisionShape;
+
+    /**
+    @brief
+        RocketOld that can be steered by the player.
+
+    @author
+        Oli Scheuss
+    @ingroup WeaponsProjectiles
+    */
+    class _WeaponsExport RocketOld : public ControllableEntity, public BasicProjectile, public RadarViewable
+    {
+        public:
+            RocketOld(Context* context);
+            virtual ~RocketOld();
+
+            virtual void tick(float dt); //!< Defines which actions the RocketOld has to take in each tick.
+
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
+            virtual void destroyObject(void);
+            void destructionEffect();
+
+            virtual void moveFrontBack(const Vector2& value) {}
+            virtual void moveRightLeft(const Vector2& value) {}
+            virtual void moveUpDown(const Vector2& value) {}
+
+            virtual void rotateYaw(const Vector2& value);
+            virtual void rotatePitch(const Vector2& value);
+            virtual void rotateRoll(const Vector2& value);
+
+            /**
+            @brief Moves the RocketOld in the Front/Back-direction by the specifed amount.
+            @param value  The amount by which the RocketOld is to be moved.
+            */
+            inline void moveFrontBack(float value)
+                { this->moveFrontBack(Vector2(value, 0)); }
+            /**
+            @brief Moves the RocketOld in the Right/Left-direction by the specifed amount.
+            @param value  The amount by which the RocketOld is to be moved.
+            */
+            inline void moveRightLeft(float value)
+                { this->moveRightLeft(Vector2(value, 0)); }
+            /**
+            @brief Moves the RocketOld in the Up/Down-direction by the specifed amount.
+            @param value  The amount by which the RocketOld is to be moved.
+            */
+            inline void moveUpDown(float value)
+                { this->moveUpDown(Vector2(value, 0)); }
+
+            /**
+            @brief Rotates the RocketOld around the y-axis by the specifed amount.
+            @param value  The amount by which the RocketOld is to be rotated.
+            */
+            inline void rotateYaw(float value)
+                { this->rotateYaw(Vector2(value, 0)); }
+            /**
+            @brief Rotates the RocketOld around the x-axis by the specifed amount.
+            @param value  The amount by which the RocketOld is to be rotated.
+            */
+            inline void rotatePitch(float value)
+                { this->rotatePitch(Vector2(value, 0)); }
+            /**
+            @brief Rotates the RocketOld around the z-axis by the specifed amount.
+            @param value  The amount by which the RocketOld is to be rotated.
+            */
+            inline void rotateRoll(float value)
+                { this->rotateRoll(Vector2(value, 0)); }
+
+            virtual void setShooter(Pawn* shooter);
+
+            virtual void fired(unsigned int firemode);
+
+        private:
+            Vector3 localAngularVelocity_; //!< Variable to temporarily store accumulated steering command input.
+
+            WeakPtr<PlayerInfo> player_; //!< The player that controls the RocketOld.
+            //WeakPtr<Pawn> pawn_; //!< The pawn that controls the RocketOld. TODO
+            Timer destroyTimer_; //!< Timer to destroy the projectile after its lifetime has run out.
+            float lifetime_; //!< The time the projectile exists.
+
+            WorldSound* defSndWpnEngine_; //!< Engine sound.
+            WorldSound* defSndWpnLaunch_; //!< Launch sound.
+    };
+
+}
+
+#endif /* _RocketOld_H__ */

Modified: code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt	2015-10-04 13:45:56 UTC (rev 10622)
@@ -5,5 +5,7 @@
   HsW01.cc
   LightningGun.cc
   RocketFire.cc
+  RocketFireOld.cc
   SimpleRocketFire.cc
+  GravityBombFire.cc
 )

Modified: code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -107,6 +107,7 @@
         projectile->attach(model);
         model->setScale(5);
 
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
         projectile->setOrientation(this->getMuzzleOrientation());
         projectile->setPosition(this->getMuzzlePosition());
         projectile->setVelocity(this->getMuzzleDirection() * this->speed_);

Modified: code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -67,6 +67,7 @@
     {
         BillboardProjectile* projectile = new BillboardProjectile(this->getContext());
 
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
         projectile->setOrientation(this->getMuzzleOrientation());
         projectile->setPosition(this->getMuzzlePosition());
         projectile->setVelocity(this->getMuzzleDirection() * this->speed_);

Copied: code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.cc (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/weaponmodes/GravityBombFire.cc)
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.cc	                        (rev 0)
+++ code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,56 @@
+/*
+ * GravityBombFire.cc
+ *
+ *  Created on: Apr 16, 2015
+ *      Author: Manuel Eggimann
+ */
+#include "GravityBombFire.h"
+
+#include "core/CoreIncludes.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+#include "worldentities/pawns/Pawn.h"
+
+#include "weapons/projectiles/GravityBomb.h"
+
+namespace orxonox
+{
+    RegisterClass(GravityBombFire);
+
+    const float GravityBombFire::BOMB_VELOCITY = 600.0; ///< The velocity of the bomb after launch
+
+    GravityBombFire::GravityBombFire(Context* context) : WeaponMode(context)
+    {
+        RegisterObject(GravityBombFire);
+
+        this->reloadTime_ = 0.50f; 
+        this->bParallelReload_ = false;
+        this->damage_ = 20.0f;  ///< The damage of the Bomb if it hits a pawn.
+
+        this->setMunitionName("GravityBombMunition");
+        this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.8);    ///< sets sound of the bomb as it is fired.
+    }
+
+    GravityBombFire::~GravityBombFire(){};
+
+    void GravityBombFire::fire()
+    {
+        GravityBomb* bomb = new GravityBomb(this->getContext());
+        //Create a new Bomb in 3D-Space and set the right direction speed and orientation.
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
+        bomb->setOrientation(this->getMuzzleOrientation());
+        bomb->setPosition(this->getMuzzlePosition());
+        bomb->setVelocity(this->getMuzzleDirection() * (this->BOMB_VELOCITY+this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getVelocity().length()));
+
+        //Set the shooter of the bomb so it is possible to determine the pawn that killed another one and define damage to shield and healt the bomb does.
+        bomb->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        bomb->setDamage(this->getDamage());
+        bomb->setShieldDamage(this->getShieldDamage());
+        bomb->setHealthDamage(this->getHealthDamage());
+    }
+
+
+}
+
+

Copied: code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.h (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/weaponmodes/GravityBombFire.h)
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.h	                        (rev 0)
+++ code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,43 @@
+/*
+* GravityBombFire.h
+*
+*  Created on: Apr 16, 2015
+*      Author: Manuel Eggimann
+*/
+
+/**
+    @file GravityBombFire.h
+    @brief Definition of the GravityBombFire class.
+*/
+
+#ifndef _GravityBombFire_H__
+#define _GravityBombFire_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+
+    /**
+    *@brief
+    *   Fires the GravityBomb. This class implements everything needed to fire the BasicProjectile GravityBomb.
+    *   Everything that has to do with the bombs behaviour after launching it is implemented in GravityBomb and GravityBombField.
+    *@author
+    *    Manuel Eggimann
+    *@ingroup WeaponsWeaponModes
+    */
+    class _WeaponsExport GravityBombFire : public WeaponMode
+    {
+        public:
+            GravityBombFire(Context* context);
+            virtual ~GravityBombFire();
+
+            virtual void fire();
+
+        private:
+            static const float BOMB_VELOCITY; //!< The initial speed of the bomb when it is launched.
+    };
+}
+
+#endif /* _GravityBombFire_H__ */

Modified: code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -65,6 +65,7 @@
     {
         ParticleProjectile* projectile = new ParticleProjectile(this->getContext());
 
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
         projectile->setOrientation(this->getMuzzleOrientation());
         projectile->setPosition(this->getMuzzlePosition());
         projectile->setVelocity(this->getMuzzleDirection() * this->speed_);

Copied: code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.cc (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/weaponmodes/RocketFireOld.cc)
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.cc	                        (rev 0)
+++ code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -0,0 +1,86 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Scheuss
+ *   Co-authors:
+ *      simonmie
+ *
+ */
+
+/**
+    @file RocketFire.h
+    @brief Implementation of the RocketFire class.
+*/
+
+#include "RocketFireOld.h"
+
+#include "core/CoreIncludes.h"
+#include "util/Math.h"
+
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+#include "worldentities/pawns/Pawn.h"
+
+#include "weapons/projectiles/RocketOld.h"
+
+namespace orxonox
+{
+    RegisterClass(RocketFireOld);
+
+    RocketFireOld::RocketFireOld(Context* context) : WeaponMode(context)
+    {
+        RegisterObject(RocketFireOld);
+
+        this->reloadTime_ = 0.20f;
+        this->bParallelReload_ = false;
+        this->damage_ = 0.0f;
+        this->speed_ = 500.0f;
+
+        this->setMunitionName("RocketMunition");
+        // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
+    }
+
+    RocketFireOld::~RocketFireOld()
+    {
+    }
+
+    /**
+    @brief
+        Fires the weapon. Creates the Rocket and fires it.
+    */
+    void RocketFireOld::fire()
+    {
+        RocketOld* rocket = new RocketOld(this->getContext());
+
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
+        rocket->setOrientation(this->getMuzzleOrientation());
+        rocket->setPosition(this->getMuzzlePosition());
+        rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
+        rocket->scale(2);
+
+        rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        rocket->setDamage(this->getDamage());
+        rocket->setShieldDamage(this->getShieldDamage());
+        rocket->setHealthDamage(this->getHealthDamage());
+    }
+}

Copied: code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.h (from rev 10621, code/branches/presentationFS15merge/src/modules/weapons/weaponmodes/RocketFireOld.h)
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.h	                        (rev 0)
+++ code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -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:
+ *      Oliver Scheuss
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file RocketFireOld.h
+    @brief Definition of the RocketFire class.
+*/
+
+#ifndef _RocketFireOld_H__
+#define _RocketFireOld_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Fires the (steerable) RocketOld.
+    @author
+        Oliver Scheuss
+    @ingroup WeaponsWeaponModes
+    */
+    class _WeaponsExport RocketFireOld : public WeaponMode
+    {
+        public:
+            RocketFireOld(Context* context);
+            virtual ~RocketFireOld();
+
+            virtual void fire();
+
+        private:
+            float speed_; //!< The speed of the Rocket.
+    };
+}
+
+#endif /* _RocketFireOld_H__ */

Modified: code/trunk/src/orxonox/controllers/ControllerDirector.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ControllerDirector.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/orxonox/controllers/ControllerDirector.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -40,6 +40,7 @@
     void ControllerDirector::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
         SUPER(ControllerDirector, XMLPort, xmlelement, mode);
+        XMLPortParam(ControllerDirector, "scriptname", setScriptName, getScriptName, xmlelement, mode).defaultValues("testscript");
 
         orxout(verbose)<< "ControllerDirector::XMLPort " 
           << "An instance of ControllerDirector has been created." << endl;
@@ -82,7 +83,7 @@
        }
        else
          return;
-       
+
        /* Set up a luastate to use for running the scripts */
        LuaState * ls = new LuaState();
        
@@ -97,9 +98,9 @@
        /* Now run the script on this controller. This will still have the above
         * variable "newctrlid" defined, which means it can make use of it.
         */
+       std::string scr = this->scriptname_ + ".lua";
+       ls->doFile(scr);
 
-       ls->doFile("testscript.lua");
-
        /* Increase the controller ID so we have a different one for
         * the next time it is triggered */
        ctrlid += 1;

Modified: code/trunk/src/orxonox/controllers/ControllerDirector.h
===================================================================
--- code/trunk/src/orxonox/controllers/ControllerDirector.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/orxonox/controllers/ControllerDirector.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -46,7 +46,10 @@
             bool party(bool bTriggered, BaseObject* trigger);
             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
 
+            inline void setScriptName(const std::string& name) { this->scriptname_ = name; }
+            inline const std::string& getScriptName() const { return this->scriptname_; }
 
+
             /* Take over control of a given object */
             void takeControl(Controller * controller, BaseObject * trigger);
             bool preparationToTakeControl(BaseObject * trigger);
@@ -54,7 +57,8 @@
             // currently unused
             //void setNewController(Controller * controller);
 
-        private:
+        protected:
+            std::string scriptname_;   
             PlayerInfo* player_;
             ControllableEntity* entity_; 
             PlayerTrigger * pTrigger_;

Modified: code/trunk/src/orxonox/controllers/FormationController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/FormationController.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/orxonox/controllers/FormationController.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -954,6 +954,8 @@
 
     bool FormationController::sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)
     {
+
+
         if (entity1 == entity2)
             return true;
 
@@ -983,7 +985,7 @@
                 team2 = ac->getTeam();
         }
 
-        TeamDeathmatch* tdm = orxonox_cast<TeamDeathmatch*>(gametype);
+        TeamGametype* tdm = orxonox_cast<TeamGametype*>(gametype);
         if (tdm)
         {
             if (entity1->getPlayer())
@@ -993,16 +995,6 @@
                 team2 = tdm->getTeam(entity2->getPlayer());
         }
 
-        Mission* miss = orxonox_cast<Mission*>(gametype);
-        if (miss)
-        {
-            if (entity1->getPlayer())
-                team1 = miss->getTeam(entity1->getPlayer());
-
-            if (entity2->getPlayer())
-                team2 = miss->getTeam(entity2->getPlayer());
-        }
-
         TeamBaseMatchBase* base = 0;
         base = orxonox_cast<TeamBaseMatchBase*>(entity1);
         if (base)

Modified: code/trunk/src/orxonox/controllers/ScriptController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ScriptController.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/orxonox/controllers/ScriptController.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -20,18 +20,33 @@
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  *   Author:
- *      Fabian 'x3n' Landau
+ *      ...
  *   Co-authors:
  *      ...
  *
  */
 
+ /*
+  * Currently available lua commands:
+  *
+  * IMPORTANT: ALL COMMANDS DO REQUIRE 7 PARAMETERS TO BE PROVIDED. FILL UP WITH ZEROES IN UNIMPORTANT PLACES.
+  *
+  * Command             | Abbreviation | Parameter 1          | '' 2     | '' 3    | '' 4                 | '' 5     | '' 6     | '' 7
+  *
+  * "Move And Look"     | mal          | GoTo X Coordinate    | '' Y ''  | '' Z '' | LookAt X Coordinate  |  '' Y '' |  '' Y '' | Duration
+  * "Rotate And Look"   | ral          | GoTo X Coordinate    | '' Y ''  | '' Z '' | Axis (1=x, 2=z, 3=z) |     -    |     -    | Duration
+  * "Spiral"            | spi          | GoTo X Coordinate    | '' Y ''  | '' Z '' |          -           |     -    |     -    | Duration
+  * "Transition Look"   | chl          | From X Coordinate    | '' Y ''  | '' Z '' | To X Coordinate      |  '' Y '' |  '' Y '' | Duration
+  * "Idle (Do nothing)" | idle         | Duration
+  */
+
 #include "ScriptController.h"
 #include "infos/PlayerInfo.h"
 #include "core/CoreIncludes.h"
 #include "worldentities/ControllableEntity.h"
 #include "core/LuaState.h"
-#include <cmath>
+#include "core/LuaState.h"
+#include "util/Math.h"
 
 namespace orxonox
 {
@@ -65,6 +80,9 @@
         /* - Counters */
         this->eventno = 0;
 
+        /* - First "previous event" scheduled at t=0 */
+        /* - Needed for automatically updating event times */
+        this->prevEventTime = 0;
     }
 
     void ScriptController::takeControl(int ctrlid)
@@ -177,24 +195,72 @@
         }
 
         /* Get a variable that specifies how far along the trajectory
-         * we are 
+         * we are currently.
          */
         float dl = eventTime / currentEvent.duration; 
 
-        /* Depending  */
+        /* Depending on command */
         /* Do some moving */
         if( this->processing )
-        { 
-          if( this->currentEvent.fctName == "mal" )
+        {
+          // Abbreviation for "spiral" (rotation + translation)
+          if (this->currentEvent.fctName == "spi") {
+
+            // Need to know a perpendicular basis to the translation vector:
+            // Given (a, b, c) we chose (b, -a, 0)norm and (0, c, -b)norm
+            // Currently we set a fix rotational radius of 400
+            // TODO: Add an option to adjust radius of spiral movement
+            Vector3 direction = this->currentEvent.v1 - startpos;
+
+            Vector3* ortho1 = new Vector3(direction.y, -direction.x, 0);
+            float absOrtho1 = sqrt(direction.y * direction.y + direction.x * direction.x);
+            *ortho1 = 400 * cos(2 * math::pi * dl) * (*ortho1)/absOrtho1;
+
+            Vector3* ortho2 = new Vector3(0, direction.z, -direction.y);
+            float absOrtho2 = sqrt(direction.y * direction.y + direction.z * direction.z);
+            *ortho2 = 400 * sin(2 * math::pi * dl) * (*ortho2)/absOrtho2;
+
+            this->entity_->setPosition( (1-dl)*startpos + dl * this->currentEvent.v1 + *ortho1 + *ortho2);
+
+            delete ortho1;
+            delete ortho2;
+          }
+
+          // Abbreviation for "rotate and look"
+          if (this->currentEvent.fctName == "ral")
+          { 
+            // Specify the axis
+            Vector3* a;
+              switch ((int) currentEvent.d) {
+                case 3:
+                  a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*cos(2*math::pi*dl),
+                                  this->currentEvent.v1.y + this->currentEvent.e*sin(2*math::pi*dl),
+                                  this->currentEvent.v1.z);
+                break;
+                case 2:
+                  a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*sin(2*math::pi*dl),
+                                  this->currentEvent.v1.y,
+                                  this->currentEvent.v1.z + this->currentEvent.e*cos(2*math::pi*dl));
+                break;
+                case 1:
+                  a = new Vector3(this->currentEvent.v1.x,
+                                  this->currentEvent.v1.y + this->currentEvent.e*sin(2*math::pi*dl),
+                                  this->currentEvent.v1.z + this->currentEvent.e*cos(2*math::pi*dl));
+                break;
+              }
+
+            this->entity_->setPosition(*a);
+
+            /* Look at the specified position */
+            this->entity_->lookAt(this->currentEvent.v1);
+          }
+          else if( this->currentEvent.fctName == "mal" )
           {
             /* Set the position to the correct place in the trajectory */
             this->entity_->setPosition( (1-dl)*startpos + dl * this->currentEvent.v1);
 
             /* Look at the specified position */
             this->entity_->lookAt(this->currentEvent.v2);
-
-            /* Update look at position */
-            //this->lookAtPosition = this->currentEvent.v2;
           }
           else if( this->currentEvent.fctName == "chl" )
           {
@@ -223,14 +289,33 @@
 
       /* Fill the structure with all the provided information */
       tmp.fctName = instruction;
+
       //tmp.x1 = x1; tmp.y1 = y1; tmp.z1 = z1;
       //tmp.x2 = x2; tmp.y2 = y2; tmp.z2 = z2;
       tmp.v1 = Vector3(x1,y1,z1);
       tmp.v2 = Vector3(x2,y2,z2);
+
+      // the parameters are not required to be vector coordinates!
+      // for convenience they are however stored twice if they have some kind of different meaning
+      tmp.a = x1;
+      tmp.b = y1;
+      tmp.c = z1;
+      tmp.d = x2;
+      tmp.e = y2;
+      tmp.f = z2;
+
       tmp.duration = duration;
-      tmp.eventTime = executionTime;
 
-      orxout(verbose) << tmp.fctName << endl;
+      /* This is kind of a hack. If we hit the function idle all we want to do is
+         advance event execution time, not schedule anything */
+      if (instruction == "idle") {
+        tmp.eventTime = this->prevEventTime;
+        this->prevEventTime += x1;
+        return;
+      } else {
+        tmp.eventTime = this->prevEventTime;
+        this->prevEventTime += duration;
+      }
 
       /* Add the created event to the event list */
       if(eventList.size()==0)

Modified: code/trunk/src/orxonox/controllers/ScriptController.h
===================================================================
--- code/trunk/src/orxonox/controllers/ScriptController.h	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/orxonox/controllers/ScriptController.h	2015-10-04 13:45:56 UTC (rev 10622)
@@ -20,7 +20,7 @@
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  *   Author:
- *      Fabian 'x3n' Landau
+ *      ...
  *   Co-authors:
  *      ...
  *
@@ -44,9 +44,15 @@
         /** Instruction for this event */
         std::string fctName;
 
+        /** Final position we want to be at **/
         Vector3 v1;
+
+        /** Where we are looking **/
         Vector3 v2;
 
+        /** The parameters are additionally stored as a set of 6 numerical values **/
+        float a, b, c, d, e, f;
+
         /** Time span of the event */
         float duration;
 
@@ -68,10 +74,10 @@
 
             // LUA interface
             // tolua_begin 
-            void eventScheduler(std::string instruction, 
-              float x1, float y1, float z1, 
-              float x2, float y2, float z2, 
-              float duration, float executionTime);
+            void eventScheduler(std::string instruction = "", 
+              float x1 = 0, float y1 = 0, float z1 = 0, 
+              float x2 = 0, float y2 = 0, float z2 = 0, 
+              float duration = 0, float executionTime = 0);
 
             static ScriptController* getScriptController();
 
@@ -115,6 +121,9 @@
             float eventTime;
             Vector3 startpos;
 
+            /* Time of the previously scheduled event */
+            float prevEventTime;
+
             /* - Position to look at during that transition */
             //Vector3 lookAtPosition;
 

Modified: code/trunk/src/orxonox/controllers/testscript.lua
===================================================================
--- code/trunk/src/orxonox/controllers/testscript.lua	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/orxonox/controllers/testscript.lua	2015-10-04 13:45:56 UTC (rev 10622)
@@ -1 +1 @@
-print	('1: Hello World')
+print ('1: Hello World')

Modified: code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	2015-10-04 13:30:38 UTC (rev 10621)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	2015-10-04 13:45:56 UTC (rev 10622)
@@ -366,7 +366,7 @@
             }
             if (GameMode::isMaster())
             {
-//                this->deathEffect();
+                this->deatheffect();
                 this->goWithStyle();
             }
         }
@@ -386,7 +386,7 @@
     void Pawn::deatheffect()
     {
         // play death effect
-        {
+        /*{
             ParticleSpawner* effect = new ParticleSpawner(this->getContext());
             effect->setPosition(this->getPosition());
             effect->setOrientation(this->getOrientation());
@@ -409,7 +409,60 @@
             effect->setDestroyAfterLife(true);
             effect->setSource("Orxonox/sparks");
             effect->setLifetime(4.0f);
+        }*/
+        
+        
+        {
+            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
+            effect->setPosition(this->getPosition());
+            effect->setOrientation(this->getOrientation());
+            effect->setDestroyAfterLife(true);
+            effect->setSource("orxonox/explosion_flash2");
+            effect->setLifetime(5.0f);
         }
+        {
+            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
+            effect->setPosition(this->getPosition());
+            effect->setOrientation(this->getOrientation());
+            effect->setDestroyAfterLife(true);
+            effect->setSource("orxonox/explosion_flame2");
+            effect->setLifetime(5.0f);
+        }
+        {
+            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
+            effect->setPosition(this->getPosition());
+            effect->setOrientation(this->getOrientation());
+            effect->setDestroyAfterLife(true);
+            effect->setSource("orxonox/explosion_shockwave2");
+            effect->scale(20);
+            effect->setLifetime(5.0f);
+        }{
+            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
+            effect->setPosition(this->getPosition());
+            effect->setOrientation(this->getOrientation());
+            effect->setDestroyAfterLife(true);
+            effect->setSource("orxonox/explosion_sparks2");
+            effect->setLifetime(5.0f);
+        }
+        {
+            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
+            effect->setPosition(this->getPosition());
+            effect->setOrientation(this->getOrientation());
+            effect->setDestroyAfterLife(true);
+            effect->setSource("orxonox/explosion_streak2");
+            effect->setLifetime(5.0f);
+        }
+        {
+            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
+            effect->setPosition(this->getPosition());
+            effect->setOrientation(this->getOrientation());
+            effect->setDestroyAfterLife(true);
+            effect->setSource("orxonox/explosion_afterglow");
+            effect->scale(20);
+            effect->setLifetime(5.0f);
+        }
+        
+        
         for (unsigned int i = 0; i < this->numexplosionchunks_; ++i)
         {
             ExplosionChunk* chunk = new ExplosionChunk(this->getContext());




More information about the Orxonox-commit mailing list