Index: /code/trunk/data/defaultConfig/orxonox.ini
===================================================================
--- /code/trunk/data/defaultConfig/orxonox.ini	(revision 11051)
+++ /code/trunk/data/defaultConfig/orxonox.ini	(revision 11052)
@@ -4,2 +4,7 @@
 campaignMissions_[2] = "pirateAttack.oxw"
 campaignMissions_[3] = "iJohnVane_TriptoArea51.oxw"
+campaignMissions_[4] = "iiJohnVane_Area51UnderFire.oxw"
+campaignMissions_[5] = "iiiJohnVane_EscapeTheBastards.oxw"
+campaignMissions_[6] = "expeditionSector.oxw"
+campaignMissions_[7] = "shuttleAttack.oxw"
+campaignMissions_[8] = "shuttleRetaliation.oxw"
Index: /code/trunk/data/gui/layouts/CampaignMenu.layout
===================================================================
--- /code/trunk/data/gui/layouts/CampaignMenu.layout	(revision 11051)
+++ /code/trunk/data/gui/layouts/CampaignMenu.layout	(revision 11052)
@@ -8,39 +8,81 @@
         <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1.0,0},{1.0,0}}" />
         <Property Name="BackgroundEnabled" Value="False" />
-        <Window Type="MenuWidgets/Button" Name="orxonox/MissionOneButton" >
-            <Property Name="Text" Value="Mission 1" />
+        <Window Type="MenuWidgets/Button" Name="orxonox/Mission1Button" >
+            <Property Name="Text" Value="Mission One" />
             <Property Name="Visible" Value="False"/>
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2875,0},{0.6,0},{0.3375,0}}" />
-            <Event Name="Clicked" Function="CampaignMenu.MissionOneButton_clicked"/>
+            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.1,0},{0.65,0},{0.15,0}}" />
+            <Event Name="Clicked" Function="CampaignMenu.Mission1Button_clicked"/>
         </Window>
-        <Window Type="MenuWidgets/Button" Name="orxonox/MissionTwoButton" >
-            <Property Name="Text" Value="Mission 2" />
+        <Window Type="MenuWidgets/Button" Name="orxonox/Mission2Button" >
+            <Property Name="Text" Value="Fight in our Back" />
             <Property Name="Visible" Value="False"/>
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.18,0},{0.65,0},{0.23,0}}" />
             <Property Name="Disabled" Value="True" />
-            <Event Name="Clicked" Function="CampaignMenu.MissionTwoButton_clicked"/>
+            <Event Name="Clicked" Function="CampaignMenu.Mission2Button_clicked"/>
         </Window>
-        <Window Type="MenuWidgets/Button" Name="orxonox/MissionThreeButton" >
-            <Property Name="Text" Value="Mission 3" />
+        <Window Type="MenuWidgets/Button" Name="orxonox/Mission3Button" >
+            <Property Name="Text" Value="Pirate Attack" />
             <Property Name="Visible" Value="False"/>
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4375,0},{0.6,0},{0.4875,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.26,0},{0.65,0},{0.31,0}}" />
             <Property Name="Disabled" Value="True" />
-            <Event Name="Clicked" Function="CampaignMenu.MissionThreeButton_clicked"/>
+            <Event Name="Clicked" Function="CampaignMenu.Mission3Button_clicked"/>
         </Window>
-        <Window Type="MenuWidgets/Button" Name="orxonox/MissionFourButton" >
-            <Property Name="Text" Value="Mission 4" />
+        <Window Type="MenuWidgets/Button" Name="orxonox/Mission4Button" >
+            <Property Name="Text" Value="Trip to Area 51" />
             <Property Name="Visible" Value="False"/>
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5125,0},{0.6,0},{0.5625,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.34,0},{0.65,0},{0.39,0}}" />
             <Property Name="Disabled" Value="True" />
-            <Event Name="Clicked" Function="CampaignMenu.MissionFourButton_clicked"/>
+            <Event Name="Clicked" Function="CampaignMenu.Mission4Button_clicked"/>
         </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/Mission5Button" >
+            <Property Name="Text" Value="Area 51 under Fire" />
+            <Property Name="Visible" Value="False"/>
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.42,0},{0.65,0},{0.47,0}}" />
+            <Property Name="Disabled" Value="True" />
+            <Event Name="Clicked" Function="CampaignMenu.Mission5Button_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/Mission6Button" >
+            <Property Name="Text" Value="Escape the Bastards" />
+            <Property Name="Visible" Value="False"/>
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.50,0},{0.65,0},{0.55,0}}" />
+            <Property Name="Disabled" Value="True" />
+            <Event Name="Clicked" Function="CampaignMenu.Mission6Button_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/Mission7Button" >
+            <Property Name="Text" Value="Expedition to Sector 5C" />
+            <Property Name="Visible" Value="False"/>
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.58,0},{0.65,0},{0.63,0}}" />
+            <Property Name="Disabled" Value="True" />
+            <Event Name="Clicked" Function="CampaignMenu.Mission7Button_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/Mission8Button" >
+            <Property Name="Text" Value="Shuttle under Attack" />
+            <Property Name="Visible" Value="False"/>
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.66,0},{0.65,0},{0.71,0}}" />
+            <Property Name="Disabled" Value="True" />
+            <Event Name="Clicked" Function="CampaignMenu.Mission8Button_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/Mission9Button" >
+            <Property Name="Text" Value="Retaliation" />
+            <Property Name="Visible" Value="False"/>
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.74,0},{0.65,0},{0.79,0}}" />
+            <Property Name="Disabled" Value="True" />
+            <Event Name="Clicked" Function="CampaignMenu.Mission9Button_clicked"/>
+        </Window>
+
+
         <Window Type="MenuWidgets/Button" Name="orxonox/CampaignMenuBackButton" >
             <Property Name="Text" Value="Back" />
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.8,0},{0.6,0},{0.85,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.85,0},{0.65,0},{0.9,0}}" />
             <Event Name="Clicked" Function="CampaignMenu.CampaignMenuBackButton_clicked"/> 
         </Window>
Index: /code/trunk/data/gui/layouts/InGameMenu.layout
===================================================================
--- /code/trunk/data/gui/layouts/InGameMenu.layout	(revision 11051)
+++ /code/trunk/data/gui/layouts/InGameMenu.layout	(revision 11052)
@@ -9,12 +9,19 @@
             <Property Name="Text" Value="Return to Game" />
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2875,0},{0.6,0},{0.3375,0}}" />
+            <Property Name="Alpha" Value="0.9" />
+            <Event Name="Clicked" Function="InGameMenu.button_return_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_ReloadLevelButton" >
+            <Property Name="Text" Value="Reload level" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" />
             <Property Name="Alpha" Value="0.9" />
-            <Event Name="Clicked" Function="InGameMenu.button_return_clicked"/>
+            <Event Name="Clicked" Function="InGameMenu.button_reloadLevel_clicked"/>
         </Window>
         <Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_MainMenuButton" >
             <Property Name="Text" Value="Main Menu" />
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4625,0},{0.6,0},{0.5125,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4375,0},{0.6,0},{0.4875,0}}" />
             <Property Name="Alpha" Value="0.9" />
             <Event Name="Clicked" Function="InGameMenu.button_mainmenu_clicked"/>
@@ -23,5 +30,5 @@
             <Property Name="Text" Value="Settings" />
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5625,0},{0.6,0},{0.6125,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5125,0},{0.6,0},{0.5625,0}}" />
             <Property Name="Alpha" Value="0.9" />
             <Event Name="Clicked" Function="InGameMenu.button_settings_clicked"/>
@@ -30,5 +37,5 @@
             <Property Name="Text" Value="Quit" />
             <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
-            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5875,0},{0.6,0},{0.6375,0}}" />
             <Property Name="Alpha" Value="0.9" />
             <Event Name="Clicked" Function="InGameMenu.button_quit_clicked"/>
Index: /code/trunk/data/gui/scripts/CampaignMenu.lua
===================================================================
--- /code/trunk/data/gui/scripts/CampaignMenu.lua	(revision 11051)
+++ /code/trunk/data/gui/scripts/CampaignMenu.lua	(revision 11052)
@@ -8,8 +8,14 @@
 
 function P.updateButtons()
-    P.updateButton(0, winMgr:getWindow("orxonox/MissionOneButton"))
-    P.updateButton(1, winMgr:getWindow("orxonox/MissionTwoButton"))
-    P.updateButton(2, winMgr:getWindow("orxonox/MissionThreeButton"))
-    P.updateButton(3, winMgr:getWindow("orxonox/MissionFourButton"))
+    P.updateButton(0, winMgr:getWindow("orxonox/Mission1Button"))
+    P.updateButton(1, winMgr:getWindow("orxonox/Mission2Button"))
+    P.updateButton(2, winMgr:getWindow("orxonox/Mission3Button"))
+    P.updateButton(3, winMgr:getWindow("orxonox/Mission4Button"))
+    P.updateButton(4, winMgr:getWindow("orxonox/Mission5Button"))
+    P.updateButton(5, winMgr:getWindow("orxonox/Mission6Button"))
+    P.updateButton(6, winMgr:getWindow("orxonox/Mission7Button"))
+    P.updateButton(7, winMgr:getWindow("orxonox/Mission8Button"))
+    P.updateButton(8, winMgr:getWindow("orxonox/Mission9Button"))
+
 
     if (P.getIndexOfLastFinishedMission() == orxonox.LevelManager:getInstance():getNumberOfCampaignMissions() - 1) then
@@ -54,18 +60,38 @@
 end
 
-function P.MissionOneButton_clicked(e)
+function P.Mission1Button_clicked(e)
     P.loadLevel(P.FindLevel(0))
 end
 
-function P.MissionTwoButton_clicked(e)
+function P.Mission2Button_clicked(e)
     P.loadLevel(P.FindLevel(1))
 end
 
-function P.MissionThreeButton_clicked(e)
+function P.Mission3Button_clicked(e)
     P.loadLevel(P.FindLevel(2))
 end
 
-function P.MissionFourButton_clicked(e)
+function P.Mission4Button_clicked(e)
     P.loadLevel(P.FindLevel(3))
+end
+
+function P.Mission5Button_clicked(e)
+    P.loadLevel(P.FindLevel(4))
+end
+
+function P.Mission6Button_clicked(e)
+    P.loadLevel(P.FindLevel(5))
+end
+
+function P.Mission7Button_clicked(e)
+    P.loadLevel(P.FindLevel(6))
+end
+
+function P.Mission8Button_clicked(e)
+    P.loadLevel(P.FindLevel(7))
+end
+
+function P.Mission9Button_clicked(e)
+    P.loadLevel(P.FindLevel(8))
 end
 
Index: /code/trunk/data/gui/scripts/InGameMenu.lua
===================================================================
--- /code/trunk/data/gui/scripts/InGameMenu.lua	(revision 11051)
+++ /code/trunk/data/gui/scripts/InGameMenu.lua	(revision 11052)
@@ -7,5 +7,5 @@
     P.multiplayerMode = "startClient"
 
-    --button are arranged in a 4x1 matrix, the left lower item is nil
+    --button are arranged in a 5x1 matrix, the left lower item is nil
     P:setButton(1, 1, {
             ["button"] = winMgr:getWindow("orxonox/InGameMenu_ReturnButton"),
@@ -14,14 +14,19 @@
 
     P:setButton(2, 1, {
+            ["button"] = winMgr:getWindow("orxonox/InGameMenu_ReloadLevelButton"),
+            ["callback"]  = P.button_reloadLevel_clicked
+    })
+
+    P:setButton(3, 1, {
             ["button"] = winMgr:getWindow("orxonox/InGameMenu_MainMenuButton"),
             ["callback"]  = P.button_mainmenu_clicked
     })
 
-    P:setButton(3, 1, {
+    P:setButton(4, 1, {
             ["button"] = winMgr:getWindow("orxonox/InGameMenu_SettingsButton"),
             ["callback"]  = P.button_settings_clicked
     })
 
-    P:setButton(4, 1, {
+    P:setButton(5, 1, {
             ["button"] = winMgr:getWindow("orxonox/InGameMenu_QuitButton"),
             ["callback"]  = P.button_quit_clicked
@@ -54,4 +59,9 @@
 end
 
+function P.button_reloadLevel_clicked(e)
+    hideMenuSheet("InGameMenu")
+    orxonox.execute("reloadLevel")
+end
+
 function P.button_return_clicked(e)
     hideMenuSheet("InGameMenu")
Index: /code/trunk/data/gui/scripts/SheetManager.lua
===================================================================
--- /code/trunk/data/gui/scripts/SheetManager.lua	(revision 11051)
+++ /code/trunk/data/gui/scripts/SheetManager.lua	(revision 11052)
@@ -24,4 +24,13 @@
         cursor:show()
     end
+end
+
+function getLoadedSheets()
+    local names = ""
+    for name, sheet in pairs(loadedSheets) do
+        names = names .. name
+        names = names .. ","
+    end
+    return names
 end
 
Index: /code/trunk/data/levels/AITest.oxw
===================================================================
--- /code/trunk/data/levels/AITest.oxw	(revision 11052)
+++ /code/trunk/data/levels/AITest.oxw	(revision 11052)
@@ -0,0 +1,351 @@
+<LevelInfo
+ name = "New AI testing level"
+ description = "A level with two opposing new AI teams"
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipEscort.oxt")
+  include("templates/spaceshipRing.oxt")
+  include("templates/spaceshipSwallow.oxt")
+  include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+    <?lua
+      include("includes/pickups.oxi")
+    ?>
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+    <TeamSpawnPoint team=0 position="2000, 2000, 2000" lookat="1,1,-1" spawnclass=SpaceShip pawndesign=spaceshipassff />
+       
+    <Pawn position = "100000, 100000, 100000">
+      <controller>
+        <MasterController>
+        </MasterController>
+      </controller>
+    </Pawn>
+<!--     
+    <PickupSpawner pickup=largedamageboostpickup position="0,0,0" triggerDistance="20" respawnTime="30" maxSpawnedItems="10" />
+<PickupSpawner pickup=crazyhealthpickup position="0,0,0" triggerDistance="50" respawnTime="30" maxSpawnedItems="10" />
+<PickupSpawner pickup=hugeshieldpickup position="4000,4500, 4500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
+<PickupSpawner pickup=smalljumppickup position="6500,6500, 6000" triggerDistance="20" respawnTime="10" maxSpawnedItems="99" />
+<PickupSpawner pickup=largedamageboostpickup position="9500,9500, 9500" triggerDistance="20" respawnTime="30" maxSpawnedItems="10" />
+<PickupSpawner pickup=largedamageboostpickup position="13000,13000,13000" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+ -->
+<!-- HERE STARTS DEMO FOR THE "WAYPOINTS" -->
+      <!-- 
+    <SpaceShip position="-1500, -1500, -1500" lookat="0,0,0" team=0 name="ss1">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <DivisionController team=1 formationMode="finger4">
+          <actionpoints>
+            <Model mesh="cube.mesh" scale=8 position="  0,2000,-600" />
+            <Model mesh="cube.mesh" scale=8 position="  0,2000,-1000" />
+            <Model mesh="cube.mesh" scale=8 position="400,2000,-1000" />
+            <Model mesh="cube.mesh" scale=8 position="400,2000,-600" />
+          </actionpoints>
+        </DivisionController>
+      </controller>
+    </SpaceShip> 
+ -->
+    <!-- those two are same -->
+
+ <!--    
+    <Model mesh="cube.mesh" scale=8 position="  0,2000,-600" />
+    <Model mesh="cube.mesh" scale=8 position="  0,2000,-1000" />
+    <Model mesh="cube.mesh" scale=8 position="400,2000,-1000" />
+    <Model mesh="cube.mesh" scale=8 position="400,2000,-600" />
+    <SpaceShip position="-1500, 1500, -1000" lookat="0,0,0" team=0 name="ss1">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <DivisionController team=0 formationMode="finger4">
+          <actionpoints>
+            <Actionpoint position="  0,2000,-600" action="FLY" loopStart=true/>
+            <Actionpoint position="  0,2000,-1000" action="FLY"  />
+            <Actionpoint position="400,2000,-1000" action="FLY" />
+            <Actionpoint position="400,2000,-600" action="FLY" loopEnd=true />
+          </actionpoints>
+        </DivisionController>
+      </controller>
+    </SpaceShip>  -->
+   
+<!-- HERE ENDS DEMO FOR THE "WAYPOINTS" -->
+
+<!-- HERE STARTS DEMO FOR THE ACTIONPOINTS. 
+P.S. Never set protectMe in the first actionpoint: if human didn't spawn, that actionpoint will be skipped -->
+       <!-- 
+    <Model mesh="cube.mesh" scale=8 position="0,0,0" />
+
+    <SpaceShip position="-2000, 1500, -1000" lookat="0,0,0" team=0 name="ss2">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <DivisionController team=0 formationMode="finger4">
+          <actionpoints>
+            <Actionpoint position="0,0,0" action="FLY" /> 
+            <Actionpoint position="-1000,750,-500" action="ATTACK" attack="attack" />
+            <Actionpoint position="-1000,750,-500" action="PROTECt" protectMe=true />
+            <Actionpoint position="-1000,750,-500" action="PROTECt" protect="protect" /> 
+            <Actionpoint position="-1000,750,-500" action="FIGHTALL" />
+           </actionpoints>
+        </DivisionController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="-2000, 1900, -1000" lookat="0,0,0" team=0>
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <SectionController team=0>
+        </SectionController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="-2000, 2100, -1000" lookat="0,0,0" team=0>
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=0>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="-2000, 2400, -1000" lookat="0,0,0" team=0>
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=0>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="0, 0, 0" lookat="0,0,0" team=2 name="ss4">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+    </SpaceShip>
+    <SpaceShip position="3000, 1000, 2000" lookat="0,0,0" team=2 name="attack">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+    </SpaceShip>
+    <SpaceShip position="-500, -300, -300" lookat="0,0,0" team=0 name="protect">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+    </SpaceShip> 
+  -->
+   
+<!-- HERE ENDS DEMO FOR THE ACTIONPOINTS -->
+<!-- HERE STARTS DEMO FOR FIGHTING -->
+    
+
+    <SpaceShip position="-4000, 1500, -1000" lookat="0,0,0" team=0 name="d1sd1">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <DivisionController team=0 formationMode="WALL">
+
+        </DivisionController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="-4000, 1900, -1000" lookat="0,0,0" team=0 name="d1ss1">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <SectionController team=0>
+        </SectionController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="-4000, 2100, -1000" lookat="0,0,0" team=0 name="d1sw1">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=0>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="-4000, 2400, -1000" lookat="0,0,0" team=0 name="d1sw2">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=0>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip position="2000, -1500, 1000" lookat="0,0,0" team=1  name="d2sd1">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <DivisionController team=1 formationMode="DIAMOND">
+
+        </DivisionController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="2000, -1900, 1000" lookat="0,0,0" team=1 name="d2ss1">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <SectionController team=1>
+        </SectionController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="2000, -2100, 1000" lookat="0,0,0" team=1 name="d2sw1">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=1>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="2000, -2400, 1000" lookat="0,0,0" team=1 name="d2sw2">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=1>
+        </WingmanController>
+      </controller>
+    </SpaceShip> 
+
+<!-- HERE ENDS DEMO FOR FIGHTING -->
+<!-- HERE STARTS DEMO FOR FORMATIONS -->
+    <!-- 
+    <Model mesh="cube.mesh" scale=8 position="   0,2000,    0" />
+    <Model mesh="cube.mesh" scale=8 position="   0,2000,-2000" />
+    <Model mesh="cube.mesh" scale=8 position="2000,2000,-2000" />
+    <Model mesh="cube.mesh" scale=8 position="2000,2000,    0" />
+
+    <SpaceShip position="-1500, 1500, -1000" lookat="0,0,0" team=0 name="ss1">
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <DivisionController team=0 formationMode="diamond" spread=100>
+          <actionpoints>
+            <Actionpoint position="   0,2000,    0" action="FLY" loopStart=true/>
+            <Actionpoint position="   0,2000,-2000" action="FLY"  />
+            <Actionpoint position="2000,2000,-2000" action="FLY" />
+            <Actionpoint position="2000,2000,    0" action="FLY" loopEnd=true />
+          </actionpoints>
+        </DivisionController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip position="-2000, 1900, -1000" lookat="0,0,0" team=0>
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <SectionController team=0>
+        </SectionController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="-2000, 2100, -1000" lookat="0,0,0" team=0>
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=0>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="-2000, 2400, -1000" lookat="0,0,0" team=0>
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=0>
+        </WingmanController>
+      </controller>
+    </SpaceShip> 
+    -->
+<!-- HERE ENDS DEMO FOR FORMATIONS -->
+    <!-- 1 division is roughly equal to 6 AIControllers--!>
+<!-- 
+    <SpaceShip position="2000, -1500, 1000" lookat="0,0,0" team=1 >
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <DivisionController team=1 formationMode="WALL">
+
+        </DivisionController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="2000, -1900, 1000" lookat="0,0,0" team=1>
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <SectionController team=1>
+        </SectionController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="2000, -2100, 1000" lookat="0,0,0" team=1>
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=1>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+    <SpaceShip position="2000, -2400, 1000" lookat="0,0,0" team=1>
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WingmanController team=1>
+        </WingmanController>
+      </controller>
+    </SpaceShip> 
+
+    <?lua
+      for i = 0, 5, 1 do
+        ?>
+      <SpaceShip position="<?lua print(7000) ?>,<?lua print(i*500) ?>,<?lua print(0) ?>" team=2>
+        <templates>
+          <Template link=spaceshipassff />
+        </templates>
+        <controller>
+          <AIController team=2 />
+        </controller>
+      </SpaceShip>
+    <?lua end ?> -->
+    
+
+  </Scene>
+</Level>
+
Index: /code/trunk/data/levels/FPS_Level_HS14.oxw
===================================================================
--- /code/trunk/data/levels/FPS_Level_HS14.oxw	(revision 11051)
+++ /code/trunk/data/levels/FPS_Level_HS14.oxw	(revision 11052)
@@ -67,6 +67,6 @@
         maxshieldhealth     = "50"
         shieldabsorption    = "0.8"
-        reloadrate          = "100"
-        reloadwaittime      = "0.1"
+        shieldrechargerate  = "100"
+        shieldrechargewaittime = "0.1"
         name                = "Tanis1"
         radarname           = "Light Destroyer" >
@@ -197,6 +197,6 @@
         maxshieldhealth     = "200"
         shieldabsorption    = "0.8"
-        reloadrate          = "1"
-        reloadwaittime      = "1"
+        shieldrechargerate  = "1"
+        shieldrechargewaittime = "1"
         name                = "Tanis0"
         radarname           = "Tanis big ship" >
@@ -216,6 +216,6 @@
         maxshieldhealth     = "50"
         shieldabsorption    = "0.8"
-        reloadrate          = "1"
-        reloadwaittime      = "1"
+        shieldrechargerate  = "1"
+        shieldrechargewaittime = "1"
         name                = "Tanis0"
         radarname           = "Pirate1" >
@@ -239,6 +239,6 @@
         maxshieldhealth     = "50"
         shieldabsorption    = "0.8"
-        reloadrate          = "1"
-        reloadwaittime      = "1"
+        shieldrechargerate  = "1"
+        shieldrechargewaittime = "1"
         name                = "Tanis0"
         radarname           = "Pirate2" >
Index: /code/trunk/data/levels/HeavyCruiser.oxw
===================================================================
--- /code/trunk/data/levels/HeavyCruiser.oxw	(revision 11051)
+++ /code/trunk/data/levels/HeavyCruiser.oxw	(revision 11052)
@@ -553,4 +553,25 @@
 
     <Pawn team=1 health=1000 initialhealth=1000 maxhealth=1000 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=10000 name=HeavyCruiser_body radarname = "HeavyCruiser" >
+        <explosion>
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_sparks2" scale=2.5 />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flame2" scale=2.5 />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" scale=12 />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" scale=2.5 />
+
+            <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_sparks2" scale=2.5 delay=0.3 />
+            <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flame2" scale=2.5 delay=0.3 />
+            <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" scale=12 delay=0.3 />
+            <ExplosionPart offset="50,50,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" scale=2.5 delay=0.3 />
+
+            <ExplosionPart offset="50,-50,-50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_sparks2" scale=2.5 delay=0.6 />
+            <ExplosionPart offset="50,-50,-50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flame2" scale=2.5 delay=0.6 />
+            <ExplosionPart offset="50,-50,-50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" scale=12 delay=0.6 />
+            <ExplosionPart offset="50,-50,-50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" scale=2.5 delay=0.6 />
+
+            <ExplosionPart offset="-50,0,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_sparks2" scale=2.5 delay=0.9 />
+            <ExplosionPart offset="-50,0,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flame2" scale=2.5 delay=0.9 />
+            <ExplosionPart offset="-50,0,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" scale=12 delay=0.9 />
+            <ExplosionPart offset="-50,0,50" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" scale=2.5 delay=0.9 />
+        </explosion>
         <attached>
             <Model position="0,0,0" direction="-1,0,0" mesh="HeavyCruiser_body.mesh" scale="40" />
@@ -718,4 +739,10 @@
 
     <Pawn team=1 health=300 initialhealth=300 maxhealth=300 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=1000 name=HeavyCruiser_sidearmL radarname = "HIDDEN" >
+
+        <explosion>
+            <ExplosionPart offset="-140,0,115" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart offset="-140,0,115" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart offset="-140,0,115" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
 
         <attached>
@@ -758,4 +785,11 @@
 
     <Pawn team=1 health=100 initialhealth=100 maxhealth=100 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=1000 name=HeavyCruiser_sidearmLfront radarname = "HIDDEN" >
+
+        <explosion>
+            <ExplosionPart offset="-141,15,-53" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart offset="-141,15,-53" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart offset="-141,15,-53" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
+
         <attached>
             <Model position="0,0,0" direction="-1,0,0" mesh="HeavyCruiser_sidearmLfront.mesh" scale="40" />
@@ -772,4 +806,9 @@
 
     <Pawn team=1 health=300 initialhealth=300 maxhealth=300 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=1000 name=HeavyCruiser_sidearmR radarname = "HIDDEN" >
+        <explosion>
+            <ExplosionPart offset="140,0,115" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart offset="140,0,115" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart offset="140,0,115" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
         <attached>
             <Model position="0,0,0" direction="-1,0,0" mesh="HeavyCruiser_sidearmR.mesh" scale="40" />
@@ -811,4 +850,9 @@
 
     <Pawn team=1 health=100 initialhealth=100 maxhealth=100 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=1000 name=sidearmRfront radarname = "HIDDEN" >
+        <explosion>
+            <ExplosionPart offset="141,15,-53" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart offset="141,15,-53" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart offset="141,15,-53" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
         <attached>
             <Model position="0,0,0" direction="-1,0,0" mesh="HeavyCruiser_sidearmRfront.mesh" scale="40" />
@@ -825,4 +869,9 @@
 
     <Pawn team=1 health=100 initialhealth=100 maxhealth=100 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=1000 name=HeavyCruiser_frontL radarname = "HIDDEN" >
+        <explosion>
+            <ExplosionPart offset="-80,33,-320" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart offset="-80,33,-320" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart offset="-80,33,-320" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
         <attached>
             <Model position="0,0,0" direction="-1,0,0" mesh="HeavyCruiser_frontL.mesh" scale="40" />
@@ -836,4 +885,9 @@
 
     <Pawn team=1 health=100 initialhealth=100 maxhealth=100 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=1000 name=HeavyCruiser_frontR radarname = "HIDDEN" >
+        <explosion>
+            <ExplosionPart offset="80,33,-320" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart offset="80,33,-320" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart offset="80,33,-320" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
         <attached>
             <Model position="0,0,0" direction="-1,0,0" mesh="HeavyCruiser_frontR.mesh" scale="40" />
@@ -847,4 +901,9 @@
 
     <Pawn team=1 health=100 initialhealth=100 maxhealth=100 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=1000 name=HeavyCruiser_partL radarname = "HIDDEN" >
+        <explosion>
+            <ExplosionPart offset="-94,33,-179" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart offset="-94,33,-179" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart offset="-94,33,-179" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
         <attached>
             <Model position="0,0,0" direction="-1,0,0" mesh="HeavyCruiser_partL.mesh" scale="40" />
@@ -858,4 +917,9 @@
 
     <Pawn team=1 health=100 initialhealth=100 maxhealth=100 position="0,300,-2000" yaw="180" direction="0,0,0" collisionType=dynamic mass=1000 name=HeavyCruiser_partR radarname = "HIDDEN" >
+        <explosion>
+            <ExplosionPart offset="94,33,-179" minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart offset="94,33,-179" minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart offset="94,33,-179" minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
         <attached>
             <Model position="0,0,0" direction="-1,0,0" mesh="HeavyCruiser_partR.mesh" scale="40" />
Index: /code/trunk/data/levels/Hover.oxw
===================================================================
--- /code/trunk/data/levels/Hover.oxw	(revision 11052)
+++ /code/trunk/data/levels/Hover.oxw	(revision 11052)
@@ -0,0 +1,85 @@
+<LevelInfo
+ name = "Hover level"
+ description = "Level for Minigame Hover"
+ tags = "minigame"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipHover.oxt")
+  include("overlays/HoverHUD.oxo")
+?>
+
+<?lua
+MAZE_NUM_CELLS = 10
+MAZE_CELL_SIZE = 100
+MAZE_CELL_HEIGHT = 30
+MAZE_SIZE = MAZE_NUM_CELLS*MAZE_CELL_SIZE
+?>
+
+<Level
+plugins = hover
+gametype = Hover
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+    gravity      = "0, -200, 0"
+  >
+
+    <StaticEntity position="0,0,0" collisionType="static">
+      <attached>
+        <HoverOrigin
+          numCells="<?lua print(MAZE_NUM_CELLS)?>"
+          cellSize="<?lua print(MAZE_CELL_SIZE)?>"
+          cellHeight="<?lua print(MAZE_CELL_HEIGHT)?>"
+        />
+        <Model
+          position="<?lua print(MAZE_SIZE/2)?>,-16,<?lua print(MAZE_SIZE/2)?>"
+          scale3D="<?lua print(MAZE_SIZE/2)?>,16,<?lua print(MAZE_SIZE/2)?>"
+          mesh="CubeGround.mesh"
+        />
+      </attached> 
+      <collisionShapes>
+        <BoxCollisionShape
+          position="<?lua print(MAZE_SIZE/2)?>,<?lua print(MAZE_CELL_HEIGHT+1)?>,<?lua print(MAZE_SIZE/2)?>"
+          halfExtents="<?lua print(MAZE_SIZE/2)?>,1,<?lua print(MAZE_SIZE/2)?>"
+        />
+        <BoxCollisionShape
+          position="<?lua print(MAZE_SIZE/2)?>,-1,<?lua print(MAZE_SIZE/2)?>"
+          halfExtents="<?lua print(MAZE_SIZE/2)?>,1,<?lua print(MAZE_SIZE/2)?>"
+        />
+      </collisionShapes>
+    </StaticEntity>
+
+    <Light
+      type=directional
+      position="-50,500,-50"
+      direction="0.577, -0.577, 0.577"
+      diffuse="1.0, 0.9, 0.9, 1.0"
+      specular="1.0, 0.9, 0.9, 1.0"
+    />
+    
+    <SpawnPoint
+      team=0
+      position="50,20,50"
+      lookat="100,20,100"
+      spawnclass=HoverShip
+      pawndesign=spaceshiphover
+    />
+    
+  </Scene>
+</Level>
+
Index: /code/trunk/data/levels/emptyLevel.oxw
===================================================================
--- /code/trunk/data/levels/emptyLevel.oxw	(revision 11051)
+++ /code/trunk/data/levels/emptyLevel.oxw	(revision 11052)
@@ -13,9 +13,5 @@
 
 <?lua
-  include("templates/spaceshipAssff2.oxt")
-  include("templates/spaceshipPirate.oxt")
   include("templates/spaceshipEscort.oxt")
-  include("templates/spaceshipRing.oxt")
-  include("templates/spaceshipSwallow.oxt")
 ?>
 
Index: /code/trunk/data/levels/expeditionSector.oxw
===================================================================
--- /code/trunk/data/levels/expeditionSector.oxw	(revision 11052)
+++ /code/trunk/data/levels/expeditionSector.oxw	(revision 11052)
@@ -0,0 +1,858 @@
+<LevelInfo
+    name = "Expedition to Sector 5C"
+    description = "Commander, our scientists are reporting strange binary radio signals from a yet unexplored and thought to be uninhabited region, sector 5C. Explore the sector and get to the bottom of these messages!"
+    tags = "mission"
+    screenshot = "expeditionSector.png"
+/>
+
+<?lua
+    include("stats.oxo")
+    include("HUDTemplates3.oxo")
+    include("templates/lodInformation.oxt")
+
+    include("templates/spaceshipAssff.oxt")
+    include("templates/spaceshipPirate.oxt")
+    include("templates/spaceshipEscort.oxt")
+    include("templates/spaceshipShuttle.oxt")
+    include("templates/FPS.oxt")
+    include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<Level gametype = "Mission">
+    <templates>
+        <Template link="lodtemplate_default" />
+    </templates>
+
+    <?lua include("includes/notifications.oxi") ?>
+
+    <NotificationQueueCEGUI
+        name="narrative"
+        targets="simpleNotification"
+        size=3
+        displayTime=3.9
+        position="0.15, 0, 0.1, 0"
+        fontSize="15"
+        fontColor="0.3, 1, 0.2, 0.8"
+        alignment="HorzCentred"
+        displaySize="0.7, 0, 0, 0"
+    />
+
+    <!-- GLOBAL LUA VARIABLES -->
+    <?lua
+
+        --[[ Coordinates in (y,z,x). NOTE: Indexing starts at 1 in lua! Don´t forget to adapt the for loops, too! ]]--
+        cCenter = {0, 0, 0}
+        cSpawn = {-50, 0, 0}
+        cSector = {-15000, -5500, -9000}
+        cSectorEntry = {-4710, -5500, -2826}
+        cPathToEntry = {{0, -2000, 0}}
+        cBeacon = {-6500, -5500, -4400}
+
+        radSector = 12000
+
+	    cStationA = {1400, 400, -800}
+        cNewShip = {1000, 250, -350}
+
+        cPlanet1 = {20000, 0, 29000}
+        cPlanet2 = {-22000, 0, -29000}
+
+      	cEnemyBasePlanet = {-20000, -5500, -8000}
+
+        cEnemyBaseStation1 = {-12500, -4500, -3500}
+
+	      cField1 = {-5000, -4000, -3000}
+ 	      cField2 = {4000, 2000, 4500}
+
+        --[[ Function to print Coordinates. Quotes not included! ]]--
+        function printC(coord)
+          print(coord[1] .. [[,]] .. coord[2] .. [[,]] .. coord[3])
+        end
+
+        --[[ Function to add Coordinates.]]--
+        function addC(coord1, coord2)
+            return {coord1[1]+coord2[1], coord1[2]+coord2[2], coord1[3]+coord2[3]}
+        end
+    ?>
+
+    <Scene
+        ambientlight = "0.8, 0.8, 0.8"
+        skybox = "Orxonox/skyBoxMoreNebula"
+        hasPhysics = true
+    >
+
+    <SpawnPoint name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cCenter) ?>" spawnclass=SpaceShip pawndesign=spaceshipescort />
+
+    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" />
+
+    <Light type=directional position="<?lua printC(cCenter) ?>" 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"/>
+
+    <!--QUEST DEFINITIONS-->
+
+    <GlobalQuest id="quest1">
+        <QuestDescription title="Get the scout ship" description="We received some extraterrestial binary radio signals from Sector 5C! We'd like you to get to the outer base in sector 4A and get a scout ship to explore the sector!" failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <complete-effects>
+            <AddQuest questId="quest2" />
+        </complete-effects>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest2">
+        <QuestDescription title="Explore the sector" description="Now then, Commander, fly over there to check out if life can be found in what we believed it to be an inhabitated region in space. We have marked 5B with red lights so you can easily find it." failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <subquests>
+            <GlobalQuest id="quest2.1">
+                <QuestDescription title="> Get to the Field Source" description="We percieve a large magnetic field source at a certain spot in the sector. You should check it out! We have marked it with a blue light." failMessage="" completeMessage="" />
+                <hints>
+                </hints>
+                <complete-effects>
+                    <AddQuest questId="quest2.2" />
+                </complete-effects>
+            </GlobalQuest>
+            <GlobalQuest id="quest2.2">
+                <QuestDescription title="> Fight your way out" description="Oh no... this cannot be happening! We discovered an alien race, and it does not seem to be interested in peace. In fact, they seem to be planning an attack! You must get out of the hot zone. Fight if necessary!" failMessage="" completeMessage="" />
+                <hints>
+                </hints>
+                <complete-effects>
+                    <AddQuest questId="quest3" />
+                </complete-effects>
+            </GlobalQuest>
+        </subquests>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest3">
+        <QuestDescription title="Get back to 4A" description="You made it out in one piece. Now report to base 4A to warn the others!" failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+    </GlobalQuest>
+
+    <!--EVENTS AND TRIGGERS
+        Usable events and triggers:
+        spawntrigger
+        dockA
+        reachedSector
+        reachedEnemyStation
+        fightEnd
+        backToA
+
+        BASE-STORY-LINE:
+        We receive a message from commander (SimpleNotification -> SpawnTrigger) about alien radio activity in a nearby sector and are asked to change our spaceship
+        QUEST1: Dock to Station and get better Spaceship
+        TRIGGER: Docked to Station
+        EVENT: Change Spaceship and Sector 5C becomes visilbe
+
+        We are asked to go to the sector and explore it
+        QUEST2.1: Go to Sector 5C and see what you can find there
+        TRIGGER: Distance Trigger at enemy spacestation, with a rather large radius
+        EVENT: The 25 Enemies and there SpaceStation become visible, the planet should stay invisible; the patroling enemies on your way back become visible as well.
+
+        On your way back you discover the patroling enemy spaceships, they attack you, but you must survive and report to your commander about an possible upcoming attack from the aliens
+        QUEST2.2: Destroy the patroling spaceships, spare no one
+        TRIGGER: -------- The patroling spaceships should triggered bythemselves?
+        EVENT: After destroying all 5 enemy ships, you can return to your base and safety, the Distancetrigger for next quest is activated
+        FAIL: You fail if you die here
+
+        After destroying the enemy ships, you make it bake to your station in time to report about the hord of enemies you saw and start preparing for the upcoming fight!
+        QUEST3: Go back to spacestation
+        TRIGGER: Distancetrigger i suppose?
+        EVENT: You win this level, and the main level is unlocked.
+    -->
+
+    <EventMultiTrigger name="spawntrigger">
+        <events>
+            <trigger>
+                <EventListener event="playerSpawn" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <!-- HACK: just waited out 3sec for animation. Cannot link an event to the COMPLETION of a dock. How is this not possible?? -->
+    <EventMultiTrigger name="dockedA" activations="1" stayactive="true" delay=3>
+        <events>
+            <trigger>
+                <EventListener event="dockA" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <DistanceTrigger name="reachedSector" position="<?lua printC(cSector) ?>" distance="<?lua print(radSector) ?>" target="SpaceShip" beaconMode="identify" targetname="newSpaceShip" stayactive=true />
+
+    <DistanceTrigger name="reachedEnemyStation" position="<?lua printC(cEnemyBaseStation1) ?>" distance="5000" target="SpaceShip" beaconMode="identify" targetname="newSpaceShip" stayactive=true />
+
+    <!-- Recursive helper function for the fightEnd event -->
+    <?lua
+    function enemyTriggerRecursor(i)
+    if i > 0 then
+    return [[
+    <EventTrigger name=killedEnemy]] .. i .. [[ activations=1 stayactive=true delay=0.1>
+        <events>
+            <trigger>
+                <EventListener event=enemy />
+            </trigger>
+        </events>
+        ]] .. enemyTriggerRecursor(i-1) .. [[
+    </EventTrigger>
+    ]]
+    else return ""
+    end
+    end
+    ?>
+    <!-- Actual Event for the enemies. -->
+    <?lua print(enemyTriggerRecursor(5)) ?>
+    <EventMultiTrigger name="fightEnd" delay=0.1 stayactive=true>
+        <events>
+            <trigger>
+                <EventListener event="killedEnemy5" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <DistanceTrigger active=false name="closeToPatrol" position="<?lua printC(cStationA) ?>" distance="6000" target="SpaceShip" beaconMode="identify" targetname="newSpaceShip" stayactive=true >
+        <events>
+            <activity>
+                <EventListener event="reachedEnemyStation" />
+            </activity>
+        </events>
+    </DistanceTrigger>
+
+    <DistanceTrigger active=false name="backToA" position="<?lua printC(cStationA) ?>" distance="600" target="SpaceShip" beaconMode="identify" targetname="newSpaceShip" stayactive=true >
+        <events>
+            <activity>
+                <EventListener event="fightEnd" />
+            </activity>
+        </events>
+    </DistanceTrigger>
+
+    <Script code="Mission endMission true" onLoad="false">
+        <events>
+            <trigger>
+                <EventListener event="backToA" />
+            </trigger>
+        </events>
+    </Script>
+
+    <DistanceTrigger invert=true active=false name="hasDied" position="<?lua printC(cSector) ?>" distance="100000" target="SpaceShip" beaconMode="identify" targetname="newSpaceShip" stayactive=true >
+        <events>
+            <activity>
+                <EventListener event="reachedSector" />
+            </activity>
+        </events>
+    </DistanceTrigger>
+
+    <Script code="Mission endMission fail" onLoad="false">
+        <events>
+            <trigger>
+                <EventListener event="hasDied" />
+            </trigger>
+        </events>
+    </Script>
+
+    <!--QUEST EFFECT BEACONS -->
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <AddQuest questId="quest1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="spawntrigger" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="dockedA" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <AddQuest questId="quest2.1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="reachedSector" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest2.1" />
+            <AddQuest questId="quest2.2" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="reachedEnemyStation" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest2.2" />
+            <CompleteQuest questId="quest2" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="fightEnd" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <!--NOTIFICATIONS -->
+
+    <SimpleNotification broadcast="true" message="Welcome, Commander.">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="We've picked up strange radio Signals from Sector 5B!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=8 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Please dock to the outer base and get into the scout ship!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=12 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="We have marked the sector in red Lights. Enter it!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=0 >
+                   <events>
+                      <trigger>
+                         <EventListener event="dockedA" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Huh? Something's emanating a strong field... We marked it in blue.">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=0 >
+                   <events>
+                      <trigger>
+                         <EventListener event="reachedSector" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Woah! What the hell? We made alien contact!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=0 >
+                   <events>
+                      <trigger>
+                         <EventListener event="reachedEnemyStation" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="It looks like they are getting ready to attack someone...">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="reachedEnemyStation" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="It must be us! Commander, get back to the base and report!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=8 >
+                   <events>
+                      <trigger>
+                         <EventListener event="reachedEnemyStation" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Oh no! A patrol! When did it get here?!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=0 >
+                   <events>
+                      <trigger>
+                         <EventListener event="closeToPatrol" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Phew, that was close. Now get back here!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=0 >
+                   <events>
+                      <trigger>
+                         <EventListener event="fightEnd" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <!--STATIONS -->
+
+    <Template name="station">
+        <Pawn mass=10000000 collisionType=dynamic friction=0.01>
+            <attached>
+                <Model mesh="HydroHarvester.mesh" position="0,0,0" scale=50 />
+                <DistanceTriggerBeacon name="NPC" />
+            </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>
+        </Pawn>
+    </Template>
+
+    <Pawn name="statA" team=0 radarname="Outer Base - Sector 4B" position="<?lua printC(cStationA) ?>" direction="<?lua printC(cSpawn) ?>" yaw=45 pitch=-5 roll=-25 initialhealth=10000 maxhealth=10000 >
+        <templates>
+            <Template link="station" />
+        </templates>
+        <attached>
+            <DockingTarget name="dockTargetA" />
+            <Dock position="0,0,0" active=true>
+                <animations>
+                    <MoveToDockingTarget target="dockTargetA" />
+                </animations>
+                <effects>
+                    <DockToShip target="newSpaceShip" />
+                </effects>
+                <events>
+                    <execute>
+                        <EventListener event="dockA" />
+                    </execute>
+                </events>
+                <attached>
+                    <DistanceTrigger position="0,0,0" distance="200" target="SpaceShip" beaconMode="exclude" targetname="NPC" name="dockA" />
+                    <Billboard position="0,0,0" amplitude=1 material="Flares/lensflare" colour="1,0,0.05" />
+                </attached>
+            </Dock>
+        </attached>
+    </Pawn>
+
+    <!-- EnemyStation -->
+
+    <!-- Marking Billboard -->
+    <Billboard visible=false position="<?lua printC(cEnemyBaseStation1) ?>" amplitude=30 scale=2 material="Flares/lensflare" colour="0,0,1">
+        <events>
+           <visibility>
+              <EventListener event="reachedSector" />
+          </visibility>
+        </events>
+    </Billboard>
+
+
+    <Pawn name="statB" team=1 radarname="EnemyBase" position="<?lua printC(cEnemyBaseStation1) ?>" direction="<?lua printC(cSpawn) ?>" yaw=45 pitch=-5 roll=-25 initialhealth=10000 maxhealth=10000 >
+        <templates>
+            <Template link="station" />
+        </templates>
+        <events>
+            <visibility>
+                <EventListener event="reachedEnemyStation" />
+            </visibility>
+            <activity>
+                <EventListener event="reachedEnemyStation" />
+            </activity>
+        </events>
+    </Pawn>
+
+    <!-- New SpaceShip as destination of dock A-->
+    <SpaceShip
+            template            = "spaceshipassff"
+            team                = "0"
+            position            = "<?lua printC(cNewShip) ?>"
+            lookat              = "<?lua printC(cSector) ?>"
+            health              = "1500"
+            initialhealth       = "1500"
+            maxhealth           = "1500"
+            shieldhealth        = "80"
+            initialshieldhealth = "80"
+            maxshieldhealth     = "120"
+            shieldabsorption    = "0.8"
+            reloadrate          = "1"
+            reloadwaittime      = "1"
+            name                = "newSpaceShip"
+            radarname           = "ScoutShip" >
+        <attached>
+            <DockingTarget name="newSpaceShip" />
+            <DistanceTriggerBeacon name="newSpaceShip" />
+        </attached>
+    </SpaceShip>
+
+    <!--ELEMENTS -->
+
+    <?lua
+    for i = 1, 64, 1
+    do
+    rBillboard = {math.sin(i*math.pi/32)*radSector, 0, math.cos(i*math.pi/32)*radSector}
+    cBillNow = addC(cSector,rBillboard)
+    ?>
+    <Billboard position="<?lua printC(cBillNow) ?>"  scale=10 material="Flares/lensflare" colour="1,0.2,0.2" visible=false>
+        <events>
+            <visibility>
+                <EventListener event="dockedA" />
+            </visibility>
+        </events>
+    </Billboard>
+    <?lua end ?>
+
+    <!-- Asteroids you have to fly through to get to the EnemyBase -->
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+       asteroidField(cField1[1], cField1[2], cField1[3], 20, 30, 4500, 500, 0)
+    ?>
+
+    <!-- Other Asteroid-Fields -->
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+       asteroidField(cField2[1], cField2[2], cField2[3], 20, 30, 4500, 500, 0)
+    ?>
+
+    <!-- Planets -->
+
+   <Planet
+        position="<?lua printC(cPlanet1) ?>"
+        scale="3000"
+        collisionType="dynamic"
+        linearDamping="0.8"
+        angularDamping="0"
+        mass="5000000"
+        pitch="0"
+        mesh="planets/muunilinst.mesh"
+        atmosphere="atmosphere1"
+        rotationaxis="1,0,0"
+        rotationrate="1.0"
+        atmospheresize="80.0f"
+        imagesize="1024.0f"
+        collisiondamage=2
+        enablecollisiondamage=true
+	      visible=true
+	      active=ture
+      >
+      <attached>
+        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
+        </attached>
+          <collisionShapes>
+            <SphereCollisionShape radius="3000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
+    ?>
+
+    <Planet
+        position="<?lua printC(cPlanet2) ?>"
+        scale="2000"
+        collisionType="dynamic"
+        linearDamping="0.8"
+        angularDamping="0"
+        mass="5000000"
+        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
+	      visible=true
+	      active=true
+      >
+      <attached>
+        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
+        </attached>
+          <collisionShapes>
+            <SphereCollisionShape radius="2000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(cPlanet2[1], cPlanet2[2], cPlanet2[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
+    ?>
+
+    <!-- EnemyPlanet(s) -->
+
+    <Planet
+        position="<?lua printC(cEnemyBasePlanet) ?>"
+        scale="5000"
+        collisionType="dynamic"
+        linearDamping="0.8"
+        angularDamping="0"
+        mass="5000000"
+        pitch="0"
+        mesh="planets/jupiter.mesh"
+        atmosphere="atmosphere1"
+        rotationaxis="1,0,0"
+        rotationrate="1.0"
+        atmospheresize="80.0f"
+        imagesize="1024.0f"
+        collisiondamage=2
+        enablecollisiondamage=true
+	      visible=false
+	      active=false
+      >
+      <attached>
+        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-500" />
+        </attached>
+          <collisionShapes>
+            <SphereCollisionShape radius="5000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
+    <?lua
+      xi = 5
+      zi = 5
+      for k = 1, xi, 1
+      do
+    ?>
+    <?lua
+      for j = 1, zi, 1
+      do
+      x = -2500+k*100
+      z = -4400+j*100
+    ?>
+    <SpaceShip visible=false active=false name="enemyStalled" radarname="Attacker" position="-11000,<?lua print(z)?>,<?lua print(x)?>" lookat="0,0,0" team=1>
+        <templates>
+            <Template link="spaceshippirate" />
+        </templates>
+        <events>
+            <visibility>
+                <EventListener event="reachedEnemyStation" />
+            </visibility>
+        </events>
+    </SpaceShip>
+    <?lua end ?>
+    <?lua end ?>
+
+    <SpaceShip visible=false active=false name="enemy" radarname="Guard" position="-2700,-800,-800" lookat="0,0,0" team=1>
+      <templates>
+        <Template link=spaceshippirate />
+      </templates>
+      <events>
+          <visibility>
+              <EventListener event="reachedEnemyStation" />
+          </visibility>
+          <activity>
+              <EventListener event="reachedEnemyStation" />
+          </activity>
+      </events>
+      <controller>
+        <WaypointPatrolController active=false accuracy=40 alertnessradius=2000 team=1>
+            <events>
+                <activity>
+                    <EventListener event="reachedEnemyStation" />
+                </activity>
+            </events>
+          <waypoints>
+            <StaticEntity position="-3400,-1200,-200" />
+            <StaticEntity position="-1600,-1000,-200" />
+            <StaticEntity position="-1700,-1400,-940" />
+            <StaticEntity position="-2100,-1200,-1250" />
+            <StaticEntity position="-2700,-800,-800" />
+          </waypoints>
+        </WaypointPatrolController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip visible=false active=false name="enemy" radarname="Guard" position="-3400,-1200,-200" lookat="0,0,0" team=1>
+        <events>
+            <visibility>
+                <EventListener event="reachedEnemyStation" />
+            </visibility>
+            <activity>
+                <EventListener event="reachedEnemyStation" />
+            </activity>
+        </events>
+      <templates>
+        <Template link=spaceshippirate />
+      </templates>
+      <controller>
+        <WaypointPatrolController active=false accuracy=40 alertnessradius=2000 team=1>
+            <events>
+                <activity>
+                    <EventListener event="reachedEnemyStation" />
+                </activity>
+            </events>
+          <waypoints>
+            <StaticEntity position="-1600,-1000,-200" />
+            <StaticEntity position="-1700,-1400,-940" />
+            <StaticEntity position="-2100,-1200,-1250" />
+            <StaticEntity position="-2700,-800,-800" />
+            <StaticEntity position="-3400,-1200,-200" />
+          </waypoints>
+        </WaypointPatrolController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip visible=false active=false name="enemy" radarname="Guard" position="-1600,-1000,-200" lookat="0,0,0" team=1>
+        <events>
+            <visibility>
+                <EventListener event="reachedEnemyStation" />
+            </visibility>
+            <activity>
+                <EventListener event="reachedEnemyStation" />
+            </activity>
+        </events>
+      <templates>
+        <Template link=spaceshippirate />
+      </templates>
+      <controller>
+        <WaypointPatrolController active=false accuracy=40 alertnessradius=2000 team=1>
+            <events>
+                <activity>
+                    <EventListener event="reachedEnemyStation" />
+                </activity>
+            </events>
+          <waypoints>
+            <StaticEntity position="-1700,-1400,-940" />
+            <StaticEntity position="-2100,-1200,-1250" />
+            <StaticEntity position="-2700,-800,-800" />
+            <StaticEntity position="-3400,-1200,-200" />
+            <StaticEntity position="-1600,-1000,-200" />
+          </waypoints>
+        </WaypointPatrolController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip visible=false active=false name="enemy" radarname="Guard" position="-1700,-1400,-940" lookat="0,0,0" team=1>
+        <events>
+            <visibility>
+                <EventListener event="reachedEnemyStation" />
+            </visibility>
+            <activity>
+                <EventListener event="reachedEnemyStation" />
+            </activity>
+        </events>
+      <templates>
+        <Template link=spaceshippirate />
+      </templates>
+      <controller>
+        <WaypointPatrolController active=false accuracy=40 alertnessradius=2000 team=1>
+            <events>
+                <activity>
+                    <EventListener event="reachedEnemyStation" />
+                </activity>
+            </events>
+          <waypoints>
+            <StaticEntity position="-2100,-1200,-1250" />
+            <StaticEntity position="-2700,-800,-800" />
+            <StaticEntity position="-3400,-1200,-200" />
+            <StaticEntity position="-1600,-1000,-200" />
+            <StaticEntity position="-1700,-1400,-940" />
+          </waypoints>
+        </WaypointPatrolController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip visible=false active=false name="enemy" radarname="Guard" position="-2100,-1200,-1250" lookat="0,0,0" team=1>
+        <events>
+            <visibility>
+                <EventListener event="reachedEnemyStation" />
+            </visibility>
+            <activity>
+                <EventListener event="reachedEnemyStation" />
+            </activity>
+        </events>
+      <templates>
+        <Template link=spaceshippirate />
+      </templates>
+      <controller>
+        <WaypointPatrolController active=false accuracy=40 alertnessradius=2000 team=1>
+            <events>
+                <activity>
+                    <EventListener event="reachedEnemyStation" />
+                </activity>
+            </events>
+          <waypoints>
+            <StaticEntity position="-2700,-800,-800" />
+            <StaticEntity position="-3400,-1200,-200" />
+            <StaticEntity position="-1600,-1000,-200" />
+            <StaticEntity position="-1700,-1400,-940" />
+            <StaticEntity position="-2100,-1200,-1250" />
+          </waypoints>
+        </WaypointPatrolController>
+      </controller>
+    </SpaceShip>
+
+    </Scene>
+</Level>
Index: /code/trunk/data/levels/iJohnVane_TriptoArea51.oxw
===================================================================
--- /code/trunk/data/levels/iJohnVane_TriptoArea51.oxw	(revision 11051)
+++ /code/trunk/data/levels/iJohnVane_TriptoArea51.oxw	(revision 11052)
@@ -169,6 +169,6 @@
         maxshieldhealth     = "120"
         shieldabsorption    = "0.8"
-        reloadrate          = "1"
-        reloadwaittime      = "1"
+        shieldrechargerate  = "1"
+        shieldrechargewaittime = "1"
         name                = "cruiser"
         radarname           = "Spacecruiser" >
Index: /code/trunk/data/levels/iiiJohnVane_EscapeTheBastards.oxw
===================================================================
--- /code/trunk/data/levels/iiiJohnVane_EscapeTheBastards.oxw	(revision 11051)
+++ /code/trunk/data/levels/iiiJohnVane_EscapeTheBastards.oxw	(revision 11052)
@@ -288,4 +288,9 @@
                     </WaypointController>
         </controller>
+        <explosion >
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
     </Pawn>
 
Index: /code/trunk/data/levels/includes/invaderWeapon.oxi
===================================================================
--- /code/trunk/data/levels/includes/invaderWeapon.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/invaderWeapon.oxi	(revision 11052)
@@ -7,5 +7,5 @@
       <WeaponSet firemode=1 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -25,3 +25,6 @@
         </links>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=0.5/>
+    </munition>
Index: /code/trunk/data/levels/includes/invaderWeaponEnemy.oxi
===================================================================
--- /code/trunk/data/levels/includes/invaderWeaponEnemy.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/invaderWeaponEnemy.oxi	(revision 11052)
@@ -7,5 +7,5 @@
       <WeaponSet firemode=1 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -25,3 +25,6 @@
         </links>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=0.5/>
+    </munition>
Index: /code/trunk/data/levels/includes/pickups.oxi
===================================================================
--- /code/trunk/data/levels/includes/pickups.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/pickups.oxi	(revision 11052)
@@ -78,4 +78,20 @@
 />
 
+<PickupRepresentation
+    name = "destroy"
+    pickupName = "Destroy Pickup"
+    pickupDescription = "Destroy all pickups you have."
+    spawnerTemplate = "destroypickupRepresentation"
+    inventoryRepresentation = "detroyPickup"
+/>
+
+<PickupRepresentation
+    name = "destroycarrier"
+    pickupName = "Destroy Carrier Pickup"
+    pickupDescription = "destroys you."
+    spawnerTemplate = "destroycarrierpickupRepresentation"
+    inventoryRepresentation = "destroyCarrierPickup"
+/>
+
 <!-- Speed pickups -->
 
@@ -138,4 +154,30 @@
 />
 
+<!-- Munition pickups -->
+
+<PickupRepresentation
+    name = "smallmunitionpickup"
+    pickupName = "Small munition"
+    pickupDescription = "Gives a small amount of munition."
+    spawnerTemplate = "smallmunitionpickupRepresentation"
+    inventoryRepresentation = "SmallMunition"
+/>
+
+<PickupRepresentation
+    name = "mediummunitionpickup"
+    pickupName = "Medium munition"
+    pickupDescription = "Gives a medium amount of munition."
+    spawnerTemplate = "mediummunitionpickupRepresentation"
+    inventoryRepresentation = "MediumMunition"
+/>
+
+<PickupRepresentation
+    name = "hugemunitionpickup"
+    pickupName = "Huge munition"
+    pickupDescription = "Gives a huge amount of munition."
+    spawnerTemplate = "hugemunitionpickupRepresentation"
+    inventoryRepresentation = "HugeMunition"
+/>
+
 <!-- Pickup Collection pickups -->
 
@@ -175,9 +217,9 @@
 
 <PickupRepresentation
-    name = "largedamageboostpickup"
-    pickupName = "Large DamageBoost Pickup"
+    name = "hugedamageboostpickup"
+    pickupName = "Huge DamageBoost Pickup"
     pickupDescription = "Multiplies the ship damage with 7."
-    spawnerTemplate = "largedamageboostpickupRepresentation"
-    inventoryRepresentation = "LargeDamageBoost"
+    spawnerTemplate = "hugedamageboostpickupRepresentation"
+    inventoryRepresentation = "HugeDamageBoost"
 />
 
@@ -207,2 +249,28 @@
     inventoryRepresentation = "HugeShrink"
 />
+
+<!-- Boost Pickup -->
+
+<PickupRepresentation
+    name = "smallboostpickup"
+    pickupName = "Small Boost"
+    pickupDescription = "Restores the boost by a bit"
+    spawnerTemplate = "smallboostpickupRepresentation"
+    inventoryRepresentation = "SmallBoost"
+/>
+
+<PickupRepresentation
+    name = "mediumboostpickup"
+    pickupName = "Medium Boost"
+    pickupDescription = "Restores the boost"
+    spawnerTemplate = "mediumboostpickupRepresentation"
+    inventoryRepresentation = "MediumBoost"
+/>
+
+<PickupRepresentation
+    name = "hugeboostpickup"
+    pickupName = "Huge Boost"
+    pickupDescription = "Restores the boost considerably"
+    spawnerTemplate = "hugeboostpickupRepresentation"
+    inventoryRepresentation = "HugeBoost"
+/>
Index: de/trunk/data/levels/includes/towerWeaponSettings.oxi
===================================================================
--- /code/trunk/data/levels/includes/towerWeaponSettings.oxi	(revision 11051)
+++ 	(revision )
@@ -1,55 +1,0 @@
-     <weaponslots>
-      <WeaponSlot position="-15.0,-1.5,0" />
-      <WeaponSlot position=" 15.0,-1.5,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>
-          <attached>
-            <Model mesh="LightningGun.mesh" pitch="100" roll="90" yaw="90" position="0,-1.3,200" scale=1/>
-            <Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,200" scale=1 />
-            <Model mesh="hs-w01_reduced.mesh" roll="45" pitch="-76" yaw="-45" position="-1.5,1,200" scale=10 />
-          </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0.005 damage=31.4159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=314.159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
-          <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
-        </Weapon>
-        
-        <Weapon>
-          <attached>
-            <Model mesh="LightningGun.mesh" pitch="103" roll="90" yaw="90" position="0,-1.35,0" />
-            <Model mesh="LightningGun-s.mesh" pitch="103" roll="90" yaw="90" position="0.2,-1.35,0" />
-            <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
-          </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
-          <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
-        </Weapon>
-        <Weapon>
-          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
-          <RocketFire mode=3 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>
Index: /code/trunk/data/levels/includes/weaponSettingsAssff.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsAssff.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsAssff.oxi	(revision 11052)
@@ -10,5 +10,5 @@
       <WeaponSet firemode=3 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -24,6 +24,6 @@
             <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" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
           <LightningGun mode=1 munitionpershot=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
         </Weapon>
@@ -34,12 +34,17 @@
             <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
           <LightningGun mode=1 munitionpershot=1 muzzleoffset="0,0,0" damage=23 />
         </Weapon>
         <Weapon>
           <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 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=8 />
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=2 replenishinterval=7.5/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+      <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsAssff2.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsAssff2.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsAssff2.oxi	(revision 11052)
@@ -9,6 +9,6 @@
       <WeaponSet firemode=2 />
       <WeaponSet firemode=3 />
-    </weaponsets>
-    <weapons>
+    </weaponsets> 
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -23,6 +23,6 @@
             <BlinkingBillboard position="-1.9, -.5, -5.5" material="PE/lensflare" colour="0.128, 0.28, 1" amplitude=0.25 frequency=16 quadratic=0 />
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 healthamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6,1.3,-2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6,1.3,-2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 healthamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6,1.3,-2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6,1.3,-2.0" />
           <LightningGun mode=1 munitionpershot=1 muzzleoffset="0,0,0" shielddamage=23 />
         </Weapon>
@@ -32,12 +32,17 @@
             <BlinkingBillboard position="1.9, -.5, -5.5" material="PE/lensflare" colour="0.128, 0.28, 1" amplitude=0.25 frequency=16 quadratic=0 />
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6,1.3,-2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1,1.6,-2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6,1.3,-2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1,1.6,-2.0" />
           <LightningGun mode=1 munitionpershot=1 muzzleoffset="0,0,0" shielddamage=23 />
         </Weapon>
         <Weapon>
           <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 />
-          <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 fuel=10 />
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+      <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsCollateral.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsCollateral.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsCollateral.oxi	(revision 11052)
@@ -10,5 +10,5 @@
       <WeaponSet firemode=3 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -25,7 +25,7 @@
             <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="90" yaw="-90" position="-1.5, 1, -0.3" scale=0.6 /> <!-- MACHINE GUN -->
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
-          <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 />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <LightningGun mode=1 munitionpershot=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
         </Weapon>
 
@@ -36,12 +36,17 @@
             <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="90" yaw="-90" position="1.8, 1, -0.3" scale=0.6 /> <!-- MACHINE GUN -->
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
         </Weapon>
         <Weapon>
           <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
-          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+      <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsEscort.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsEscort.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsEscort.oxi	(revision 11052)
@@ -7,5 +7,5 @@
       <WeaponSet firemode=1 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -14,10 +14,8 @@
         </links>
         <Weapon>
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam2.mesh" />
-          <!--HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" projectileMesh="LaserBeam2.mesh" /-->
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam2.mesh" />
         </Weapon>
         <Weapon>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
-          <!--HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" projectileMesh="LaserBeam2.mesh" /-->
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
         </Weapon>
       </WeaponPack>
@@ -27,3 +25,6 @@
         </links>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsEscortMine.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsEscortMine.oxi	(revision 11052)
+++ /code/trunk/data/levels/includes/weaponSettingsEscortMine.oxi	(revision 11052)
@@ -0,0 +1,34 @@
+    <weaponslots>
+      <WeaponSlot position="-9.2,2,-13" />
+      <WeaponSlot position=" 9.2,2,-13" />
+    </weaponslots>
+    <weaponsets>
+      <WeaponSet firemode=0 />
+      <WeaponSet firemode=1 />
+    </weaponsets>
+    <weaponpacks>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+        </links>
+        <Weapon>
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam2.mesh" />
+          <MineGun mode=0 munitionpershot=1 delay=0.125 damage=50 shielddamage=15 healthdamage=10 muzzleoffset=" 0.1, 1.4,-10" maxtimeuntilexplosion=25 timeuntilactivation=2.5/>
+        </Weapon>
+        <Weapon>
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
+          <IceGun mode=0 munitionpershot=1 delay=0.125 damage=9.3 muzzleoffset=" 0.1, 1.4,-3" freezefactor=0.5 freezetime=2.0 />
+        </Weapon>
+      </WeaponPack>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
+        </links>
+      </WeaponPack>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+      <IceMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+      <MineMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsFPS.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsFPS.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsFPS.oxi	(revision 11052)
@@ -11,5 +11,5 @@
       <WeaponSet firemode=1 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack firemode=0>
         <links>
@@ -49,3 +49,7 @@
         /-->
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=5 replenishamount=1 replenishinterval=7.5/>
+      <LightningMunition initialmagazines=2 maxmagazines=2 munitionpermagazine=8 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsFPS_HS14.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsFPS_HS14.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsFPS_HS14.oxi	(revision 11052)
@@ -11,5 +11,5 @@
       <WeaponSet firemode=1 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack firemode=0>
         <links>
@@ -49,3 +49,7 @@
         /-->
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=5 replenishamount=1 replenishinterval=7.5/>
+      <LightningMunition initialmagazines=2 maxmagazines=2 munitionpermagazine=8 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsFS15.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsFS15.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsFS15.oxi	(revision 11052)
@@ -12,5 +12,5 @@
   <WeaponSet firemode=4 />
 </weaponsets>
-<weapons>
+<weaponpacks>
   <WeaponPack>
     <links>
@@ -38,5 +38,5 @@
       <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 />
+      <RocketFire mode=4 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
     </Weapon>
   </WeaponPack>
@@ -49,3 +49,9 @@
     </Weapon-->
   </WeaponPack>
-</weapons>
+</weaponpacks>
+<munition>
+  <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+  <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+  <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+  <GravityBombMunition initialmagazines=3 maxmagazines=3 munitionpermagazine=1 />
+</munition>
Index: /code/trunk/data/levels/includes/weaponSettingsGhost.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsGhost.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsGhost.oxi	(revision 11052)
@@ -11,5 +11,5 @@
       <WeaponSet firemode=2 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -19,19 +19,24 @@
         </links>
         <Weapon>
-          <HsW01 mode=0 munitionpershot=0 healthdamage=3.14159 delay=0 material="Flares/point_lensflare" />
-          <HsW01 mode=0 munitionpershot=0 healthdamage=3.14159 delay=0.125 material="Flares/point_lensflare" muzzleoffset=" 0.5,0.6,1.7" />
+          <HsW01 mode=0 munitionpershot=1 healthdamage=3.14159 delay=0 material="Flares/point_lensflare" />
+          <HsW01 mode=0 munitionpershot=1 healthdamage=3.14159 delay=0.125 material="Flares/point_lensflare" muzzleoffset=" 0.5,0.6,1.7" />
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=30 shielddamage=10 />
         </Weapon>
         <Weapon>
-          <HsW01 mode=0 munitionpershot=0 damage=3.14159 delay=0  material="Flares/point_lensflare" />
-          <HsW01 mode=0 munitionpershot=0 damage=3.14159 delay=0.125 material="Flares/point_lensflare" muzzleoffset="-0.5,0.6,1.7" />
+          <HsW01 mode=0 munitionpershot=1 damage=3.14159 delay=0  material="Flares/point_lensflare" />
+          <HsW01 mode=0 munitionpershot=1 damage=3.14159 delay=0.125 material="Flares/point_lensflare" muzzleoffset="-0.5,0.6,1.7" />
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=30 shielddamage=10 />
         </Weapon>
         <Weapon>
-          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 />
+          <SimpleRocketFire mode=2 munitionpershot=1 muzzleoffset="0,0,0" damage=50 />
         </Weapon>
         <Weapon>
-          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 delay=0.1 />
+          <SimpleRocketFire mode=2 munitionpershot=1 muzzleoffset="0,0,0" damage=50 delay=0.1 />
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+      <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsH2.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsH2.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsH2.oxi	(revision 11052)
@@ -8,5 +8,5 @@
       <WeaponSet firemode=1 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -18,6 +18,6 @@
             <Model mesh="hs-w01s.mesh" roll="180" position="0.1, 0.0, 0.0" scale=2 />
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.8, 0.9,-4" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.8, 0.9,-4" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.8, 0.9,-4" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.8, 0.9,-4" />
         </Weapon>
         <Weapon>
@@ -26,6 +26,6 @@
             <Model mesh="hs-w01s.mesh" roll="180" position="-0.1, 0.0, 0.0" scale=2 />
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.8, 0.9, -4.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.8, 0.9, -4.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.8, 0.9, -4.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.8, 0.9, -4.0" />
         </Weapon>
       </WeaponPack>
@@ -42,4 +42,7 @@
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=10 maxmagazines=10 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+    </munition>
 
Index: /code/trunk/data/levels/includes/weaponSettingsHXY.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsHXY.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsHXY.oxi	(revision 11052)
@@ -7,5 +7,5 @@
       <WeaponSet firemode=1 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -24,3 +24,7 @@
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=10 maxmagazines=10 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsHeartAttack.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsHeartAttack.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsHeartAttack.oxi	(revision 11052)
@@ -11,5 +11,5 @@
       <WeaponSet firemode=3 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -20,19 +20,19 @@
         </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" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -11.4, 0, -5" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -11.4, 0, -5" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 11.4, 0, -5" />
+          <HsW01 mode=0 munitionpershot=1 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" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -15, 1.6, -2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" -15, 1.6, -2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 15, 1.6, -2" />
+          <HsW01 mode=0 munitionpershot=1 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 />
+          <LaserFire mode=1 munitionpershot=1 muzzleoffset="2.2,6,16" damage=30 shielddamage=20 />
+          <LaserFire mode=1 munitionpershot=1 muzzleoffset="-2.2,6,16" damage=30 shielddamage=20 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
           <GravityBombFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
         </Weapon>
@@ -40,11 +40,9 @@
         </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>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=20 maxmagazines=20 munitionpermagazine=10 replenishamount=1 replenishinterval=6.0/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+      <RocketMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=1 />
+      <GravityBombMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsHeavyCruiser.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsHeavyCruiser.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsHeavyCruiser.oxi	(revision 11052)
@@ -10,5 +10,5 @@
       <WeaponSet firemode=3 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -24,6 +24,6 @@
             <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" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=1 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>
@@ -34,20 +34,17 @@
             <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-76" yaw="-90" position="-1.5,1,-10.3" scale=0.6 />
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
         </Weapon>
         <Weapon>
           <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
-          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
         </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>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=5.0/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+      <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsHeavyCruiserBody.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsHeavyCruiserBody.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsHeavyCruiserBody.oxi	(revision 11052)
@@ -10,5 +10,5 @@
       <WeaponSet firemode=3 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -21,6 +21,6 @@
           <attached>
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=1 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>
@@ -28,11 +28,11 @@
           <attached>
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
         </Weapon>
         <Weapon>
           <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
-          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
         </Weapon>
       </WeaponPack>
@@ -45,3 +45,8 @@
         </Weapon-->
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=7.0/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+      <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsHover.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsHover.oxi	(revision 11052)
+++ /code/trunk/data/levels/includes/weaponSettingsHover.oxi	(revision 11052)
@@ -0,0 +1,30 @@
+<weaponslots>
+  <WeaponSlot position="-3,2,-3" />
+  <WeaponSlot position=" 3,2,-3" />
+</weaponslots>
+<weaponsets>
+  <WeaponSet firemode=0 />
+  <WeaponSet firemode=1 />
+</weaponsets>
+<weaponpacks>
+  <WeaponPack>
+    <links>
+      <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+      <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+    </links>
+    <Weapon>
+      <IceGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" projectileMesh="LaserBeam2.mesh" />
+    </Weapon>
+    <Weapon>
+      <IceGun mode=0 munitionpershot=0 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
+    </Weapon>
+  </WeaponPack>
+  <WeaponPack>
+    <links>
+      <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
+    </links>
+  </WeaponPack>
+</weaponpacks>  
+<munition>
+  <IceMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+</munition>
Index: /code/trunk/data/levels/includes/weaponSettingsImmTest.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsImmTest.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsImmTest.oxi	(revision 11052)
@@ -10,5 +10,5 @@
       <WeaponSet firemode=3 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -44,5 +44,5 @@
         <Weapon>
           <SimpleRocketFire mode=2 muzzleoffset="0,0,0" shielddamage=50 />
-          <RocketFire mode=3 muzzleoffset="0,0,0" healthdamage=80 shielddamage=20 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" healthdamage=80 shielddamage=20 fuel=10 />
         </Weapon>
       </WeaponPack>
@@ -55,3 +55,8 @@
         </Weapon-->
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=7.0/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+      <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsPirate.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsPirate.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsPirate.oxi	(revision 11052)
@@ -7,5 +7,5 @@
       <WeaponSet firemode=1 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -14,11 +14,14 @@
         </links>
         <Weapon>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=2.5 material="Flares/point_lensflare" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.5,0.6,1.7" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=2.5 material="Flares/point_lensflare" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.5,0.6,1.7" />
         </Weapon>
         <Weapon>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=2.5 material="Flares/point_lensflare" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.5,0.6,1.7" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=2.5 material="Flares/point_lensflare" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=2.5 material="Flares/point_lensflare" muzzleoffset="-0.5,0.6,1.7" />
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=7.0/>
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsRing.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsRing.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsRing.oxi	(revision 11052)
@@ -1,26 +1,35 @@
-<weaponslots>
-  <WeaponSlot position="11,0,-7" />
-  <WeaponSlot position="0,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>
-      <IceGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 muzzleoffset="11,0,-3" freezefactor=0.5 freezetime=2.0 />
-    </Weapon>
-    <Weapon>
-      <IceGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 muzzleoffset=" -11,0,-3" freezefactor=0.5 freezetime=2.0 />
-    </Weapon>
-    <Weapon>
-      <GravityBombFire mode=1 munitionpershot=0 delay=0.125 damage=3 muzzleoffset="0,0,-7"/>
-    </Weapon>
-  </WeaponPack>
-</weapons>
+    <weaponslots>
+      <WeaponSlot position="11,0,-7" />
+      <WeaponSlot position="-11,0,-7" />
+      <WeaponSlot position="0,0,-7" />
+    </weaponslots>
+    <weaponsets>
+      <WeaponSet firemode=0 />
+      <WeaponSet firemode=1 />
+      <WeaponSet firemode=2 />
+    </weaponsets>
+    <weaponpacks>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+          <DefaultWeaponmodeLink firemode=2 weaponmode=2 />
+        </links>
+        <Weapon>
+          <LaserFire mode=0 munitionpershot=1 damage=10 shielddamage=5 />
+          <IceGun mode=1 munitionpershot=1 delay=0.125 damage=9.3 muzzleoffset="11,0,-3" freezefactor=0.5 freezetime=2.0 />
+        </Weapon>
+        <Weapon>
+          <LaserFire mode=0 munitionpershot=1 damage=10 shielddamage=5 />
+          <IceGun mode=1 munitionpershot=1 delay=0.125 damage=9.3 muzzleoffset=" -11,0,-3" freezefactor=0.5 freezetime=2.0 />
+        </Weapon>
+        <Weapon>
+          <GravityBombFire mode=2 munitionpershot=1 delay=0.125 damage=3 muzzleoffset="0,0,-7"/>
+        </Weapon>
+      </WeaponPack>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+      <GravityBombMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=1 />
+      <IceMunition initialmagazines=16 maxmagazines=16 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsSpacecruiser.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsSpacecruiser.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsSpacecruiser.oxi	(revision 11052)
@@ -14,5 +14,5 @@
       <WeaponSet firemode=3 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -28,6 +28,6 @@
             <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" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=1 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,11 +38,11 @@
             <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
         </Weapon>
         <Weapon>
           <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
-          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
         </Weapon>
         <Weapon>
@@ -52,6 +52,6 @@
             <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" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=1 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>
@@ -62,6 +62,6 @@
             <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
         </Weapon>
@@ -72,6 +72,6 @@
             <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" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=1 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>
@@ -82,8 +82,13 @@
             <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=20 maxmagazines=20 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+      <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsSwallow.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsSwallow.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsSwallow.oxi	(revision 11052)
@@ -2,4 +2,5 @@
       <WeaponSlot position=" 8,1.66,-17.5" />
       <WeaponSlot position="-8,1.66,-17.5" />
+      <WeaponSlot position="0,1.66,-17.5" />
     </weaponslots>
     <weaponsets>
@@ -7,5 +8,5 @@
       <WeaponSet firemode=1 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -14,9 +15,15 @@
         </links>
         <Weapon>
-          <SplitGun mode=0 munitionpershot=0 damage=6.0 muzzleoffset="0.5,0.6,1.7" splittime=0.2 numberofsplits=2 numberofchilds=3 spread=0.1 damagereduction=2.0 />
+          <SplitGun mode=0 munitionpershot=1 damage=6.0 muzzleoffset="0.5,0.6,1.7" splittime=0.2 numberofsplits=2 numberofchilds=3 spread=0.1 damagereduction=2.0 />
+          <LaserFire mode=1 munitionpershot=1 damage=10.0 muzzleoffset="0.5,0.6,1.7" />
         </Weapon>
         <Weapon>
-          <SplitGun mode=0 munitionpershot=0 damage=6.0 muzzleoffset="-0.5,0.6,1.7" splittime=0.2 numberofsplits=2 numberofchilds=3 spread=0.1 damagereduction=2.0 />
-        </Weapon>
+          <SplitGun mode=0 munitionpershot=1 damage=6.0 muzzleoffset="-0.5,0.6,1.7" splittime=0.2 numberofsplits=2 numberofchilds=3 spread=0.1 damagereduction=2.0 />
+          <LaserFire mode=1 munitionpershot=1 damage=10.0 muzzleoffset="-0.5,0.6,1.7" />
+        </Weapon>       
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=20 maxmagazines=20 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+      <SplitMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsTransporter.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsTransporter.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsTransporter.oxi	(revision 11052)
@@ -7,5 +7,5 @@
       <WeaponSet firemode=1 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -14,13 +14,17 @@
         </links>
         <Weapon>
-          <HsW01 mode=0 munitionpershot=0 delay=0.1   damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.1   damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=1 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>
         <Weapon>
-          <HsW01 mode=0 munitionpershot=0 delay=0.1   damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.1   damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=1 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>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=20 maxmagazines=20 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsTurret.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsTurret.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsTurret.oxi	(revision 11052)
@@ -5,5 +5,5 @@
       <WeaponSet firemode=0 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -20,3 +20,6 @@
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsTurret1.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsTurret1.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsTurret1.oxi	(revision 11052)
@@ -5,5 +5,5 @@
       <WeaponSet firemode=0 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -20,3 +20,6 @@
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+    </munition>
Index: /code/trunk/data/levels/includes/weaponSettingsbigship.oxi
===================================================================
--- /code/trunk/data/levels/includes/weaponSettingsbigship.oxi	(revision 11051)
+++ /code/trunk/data/levels/includes/weaponSettingsbigship.oxi	(revision 11052)
@@ -10,5 +10,5 @@
       <WeaponSet firemode=3 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -21,6 +21,6 @@
           <attached>
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=1 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>
@@ -29,11 +29,11 @@
            
           </attached>
-          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
-          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+          <HsW01 mode=0 munitionpershot=1 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
           <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
         </Weapon>
         <Weapon>
           <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
-          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 fuel=10 />
         </Weapon>
       </WeaponPack>
@@ -46,3 +46,8 @@
         </Weapon-->
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=12 maxmagazines=12 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
+      <LightningMunition initialmagazines=4 maxmagazines=4 munitionpermagazine=8 />
+      <RocketMunition initialmagazines=5 maxmagazines=5 munitionpermagazine=1 />
+    </munition>
Index: /code/trunk/data/levels/kecks.oxw
===================================================================
--- /code/trunk/data/levels/kecks.oxw	(revision 11051)
+++ /code/trunk/data/levels/kecks.oxw	(revision 11052)
@@ -348,5 +348,5 @@
 
 
-			<Pawn health=20 position="0, 112900, 0" direction="0,-1,0" name="boxDestroyed" collisionType=dynamic mass=100000  radarname = "Gravitation Box" >
+			<Pawn health=20 position="0, 112900, 0" direction="0,-1,0" name="boxDestroyed" collisionType=dynamic mass=100000  radarname = "Gravitation Box" explosionchunks=0 >
 				<attached>
 					<Model position="0,0,0" scale="10" mesh="CuboidBody.mesh"  />
@@ -359,4 +359,9 @@
 					</WaypointController>
 				</controller>
+				<explosion >
+            		<ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            		<ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            		<ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        		</explosion>
 			 </Pawn>
 
Index: /code/trunk/data/levels/mineLevel.oxw
===================================================================
--- /code/trunk/data/levels/mineLevel.oxw	(revision 11052)
+++ /code/trunk/data/levels/mineLevel.oxw	(revision 11052)
@@ -0,0 +1,64 @@
+ <LevelInfo
+ name = "Mine level"
+ description = "A test level with the new mine weapon."
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipEscortMine.oxt")
+  include("templates/spaceshipHover.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=spaceshipescortmine />
+
+        <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 4" >
+        <events>
+          <visibility>
+            <EventListener event="flying4" />
+          </visibility>
+        </events>
+        <attached>
+            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
+        </collisionShapes>
+    </Pawn>
+
+    <Pawn team=1 health=30 position="0,200,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 3">
+        <events>
+          <visibility>
+            <EventListener event="flying4" />
+          </visibility>
+        </events>
+        <attached>
+           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
+        </collisionShapes>
+    </Pawn>
+    
+  </Scene>
+</Level>
+
Index: /code/trunk/data/levels/missionOne.oxw
===================================================================
--- /code/trunk/data/levels/missionOne.oxw	(revision 11051)
+++ /code/trunk/data/levels/missionOne.oxw	(revision 11052)
@@ -526,4 +526,9 @@
             </WaypointController>
         </controller>
+        <explosion >
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
     </Pawn>
 
@@ -544,4 +549,9 @@
             </WaypointController>
         </controller>
+        <explosion >
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
     </Pawn>
 
@@ -562,4 +572,9 @@
             <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
         </collisionShapes>
+        <explosion >
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
     </Pawn>
 
@@ -580,4 +595,9 @@
             </WaypointController>
         </controller>
+        <explosion >
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+            <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+        </explosion>
     </Pawn>
 
@@ -1080,6 +1100,6 @@
         maxshieldhealth     = "120"
         shieldabsorption    = "0.8"
-        reloadrate          = "1"
-        reloadwaittime      = "1"
+        shieldrechargerate  = "1"
+        shieldrechargewaittime = "1"
         name                = "cruiser"
         radarname           = "Spacecruiser" >
@@ -1659,10 +1679,10 @@
 
 <!-- @Triggers: HACK. The attacktrigger6 Event is created, but does not trigger the Script.
-(WTF?) TODO: looks like a BUG 
+(WTF?) TODO: looks like a BUG
 Thus a distanceTrigger is created, that gets enabled, when the inner trigger gets activated.
 Due to the large radius it is likely that it actually gets triggered.
 -->
 
-  <DistanceTrigger name="testDistanceTrigger" position="0,0,0" distance=10000 target="SpaceShip" stayActive="true" delay=37.0>
+  <DistanceTrigger name="testDistanceTrigger" position="0,0,0" distance=10000 target="Pawn" stayActive="true" delay=37.0>
     <EventTrigger name="testEventTrigger" activations="1" stayactive="true" delay=0.1>
       <events>
Index: /code/trunk/data/levels/notifications.oxw
===================================================================
--- /code/trunk/data/levels/notifications.oxw	(revision 11051)
+++ /code/trunk/data/levels/notifications.oxw	(revision 11052)
@@ -19,4 +19,16 @@
     <?lua include("includes/notifications.oxi") ?>
 
+    <NotificationQueueCEGUI
+      name="narrative"
+      targets="simpleNotification,commandNotification"
+      size=3
+      displayTime=3.9
+      position="0.2, 0, 0.1, 0"
+      fontSize="23"
+      fontColor="0.3, 1, 0.2, 0.8"
+      alignment="HorzCentred"
+      displaySize="0.6, 0, 0, 0"
+      />
+
     <Scene
         ambientlight = "0.5, 0.5, 0.5"
@@ -25,6 +37,7 @@
 
     <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=spaceshipassff />
 
-    <CommandNotification preMessage="Open the PickupInventory by pressing '" postMessage="'." command="OrxonoxOverlay toggleVisibility PickupInventory">
+    <CommandNotification preMessage="Open the PickupInventory by pressing '" postMessage="'." command="OrxonoxOverlay show PickupInventory">
         <events>
             <trigger>
@@ -44,10 +57,4 @@
     <Billboard position="0,0,100" colour="1.0,0,1.0" material="Examples/Flare" />
 
-    <?lua
-      for i = 1, 10, 1 do
-    ?>
-        <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
-    <?lua end ?>
-
   </Scene>
 </Level>
Index: /code/trunk/data/levels/pickups.oxw
===================================================================
--- /code/trunk/data/levels/pickups.oxw	(revision 11051)
+++ /code/trunk/data/levels/pickups.oxw	(revision 11052)
@@ -36,4 +36,28 @@
     <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
 
+    <!-- Boost pickup -->
+    
+    <PickupSpawner pickup=smallboostpickup position="-25,-125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+    <PickupSpawner pickup=mediumboostpickup position="0,-125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+    <PickupSpawner pickup=hugeboostpickup position="25,-125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+
+    <!-- DamageBoost pickup -->
+    
+    <PickupSpawner pickup=smalldamageboostpickup position="-25,-100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+    <PickupSpawner pickup=mediumdamageboostpickup position="0,-100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+    <PickupSpawner pickup=hugedamageboostpickup position="25,-100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+
+    <!-- Munition pickups -->
+
+    <PickupSpawner pickup=smallmunitionpickup position="-25,-75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
+    <PickupSpawner pickup=mediummunitionpickup position="0,-75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
+    <PickupSpawner pickup=hugemunitionpickup position="25,-75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />    
+
+    <!-- Shrink pickup -->
+
+    <PickupSpawner pickup=smallshrinkpickup position="-25,-50,-125" triggerDistance="20" respawnTime="60" maxSpawnedItems="5" />
+    <PickupSpawner pickup=mediumshrinkpickup position="0,-50,-125" triggerDistance="20" respawnTime="60" maxSpawnedItems="5" />
+    <PickupSpawner pickup=hugeshrinkpickup position="25,-50,-125" triggerDistance="20" respawnTime="60" maxSpawnedItems="5" />    
+
     <!-- Shield pickups -->
 
@@ -63,20 +87,4 @@
 
     <!-- Meta pickups -->
-
-    <Template name=usemetapickup baseclass=MetaPickup>
-      <MetaPickup representation="use" metaType="use" />
-    </Template>
-    
-    <Template name=dropmetapickup baseclass=MetaPickup>
-      <MetaPickup representation="drop" metaType="drop" />
-    </Template>
-    
-    <Template name=destroymetapickup baseclass=MetaPickup>
-      <MetaPickup metaType="destroy" />
-    </Template>
-    
-    <Template name=destroycarriermetapickup baseclass=MetaPickup>
-      <MetaPickup metaType="destroyCarrier" />
-    </Template>
     
     <PickupSpawner pickup=usemetapickup position="-25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
@@ -91,11 +99,5 @@
     <!-- Drone pickup -->
     
-    <PickupSpawner pickup=dronepickup position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
-    
-    <!-- DamageBoost pickup -->
-    
-    <PickupSpawner pickup=smalldamageboostpickup position="-50,75,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
-    <PickupSpawner pickup=mediumdamageboostpickup position="-50,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
-    <PickupSpawner pickup=largedamageboostpickup position="-50,125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
+    <PickupSpawner pickup=dronepickup position="-25,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     
     <!-- Other pickups -->
@@ -103,7 +105,7 @@
     <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
     <PickupRepresentation
-      name = "MediumHealth"
-      pickupName = "Medium Health Pack"
-      pickupDescription = "Once used adds a medium amout of health to the ship."
+      name = "ContinousHealth"
+      pickupName = "Continous Health Pack"
+      pickupDescription = "While useing adds a medium amout of health to the ship."
       spawnerTemplate = "mediumhealthpickupRepresentation"
       inventoryRepresentation = "MediumHealth"
@@ -111,12 +113,8 @@
 
     <Template name=continuoushealthpickup baseclass=HealthPickup>
-      <HealthPickup representation="MediumHealth" health=500 activationType=immediate healthRate=10 durationType=continuous />
+      <HealthPickup representation="ContinousHealth" health=500 activationType=immediate healthRate=10 durationType=continuous />
     </Template>
     
     <PickupSpawner pickup=continuoushealthpickup position="-50,0,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
-
-    <PickupSpawner pickup="smallshrinkpickup" position="-25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
-    <PickupSpawner pickup="mediumshrinkpickup" position="0,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
-    <PickupSpawner pickup="hugeshrinkpickup" position="25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
     
     <!-- @Objects: 4 boxes (uncontrolled pawns) -->
@@ -177,13 +175,4 @@
     </Pawn>
 
-    <!--StaticEntity position="0,-200,0" direction="0,-1,0" collisionType=static mass=500 friction=0.01 >
-      <attached>
-        <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" />
-      </attached>
-      <collisionShapes>
-        <BoxCollisionShape position="0,0,0" halfExtents="10,10,10" />
-      </collisionShapes>
-  </StaticEntity-->
-
   </Scene>
 </Level>
Index: /code/trunk/data/levels/planetLevelHS15.oxw
===================================================================
--- /code/trunk/data/levels/planetLevelHS15.oxw	(revision 11052)
+++ /code/trunk/data/levels/planetLevelHS15.oxw	(revision 11052)
@@ -0,0 +1,119 @@
+<LevelInfo
+ name = "Planet and City level"
+ description = "Fly into the planet. Get teleported into a city"
+ tags = "test"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff2.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipEscort.oxt")
+  include("templates/spaceshipRing.oxt")
+  include("templates/spaceshipSwallow.oxt")
+?>
+
+
+<!-- Global variable definition -->
+<?lua
+PLANET_DISTANCE = 1000000
+PLANET_SCALE = 20000
+SKYBOX_SCALE = 100000
+X = 20
+Y = 20
+CELL_SIZE = 600
+?>
+
+<!-- city generator -->
+<?lua
+function randomHouses(x,y,cellSize)
+    returnString = ""
+    for currentX = 1, x, 1 do
+      for currentY = 1, y, 1 do
+        houseNr = math.floor(math.random()*7 + 1)
+        orientation = math.floor(math.random()*4)*90
+        houses = {"Glasstower1","ETH","Hausc1","PrimeTower","Hausc2","101","hausc3"}
+        scales = {100,100,100,100,100,100,100}
+        collisionShapes = {--[[Glasstower1]]"<BoxCollisionShape position=\"0,405,0\" halfExtents=\"90,405,90\" /><BoxCollisionShape  position=\"0,855,0\" halfExtents=\"110, 45, 110\" /><BoxCollisionShape      position=\"0,957,0\" halfExtents=\"5, 70, 5\" />  ",--[[ETH]]"<BoxCollisionShape      position=\"-46.16,22.423,3.439\" halfExtents=\"89.5,30.4,151.5\" /><BoxCollisionShape      position=\"105.607996,22.905,-137.980005\" halfExtents=\"31.40,23.55,39.25\" /><BoxCollisionShape      position=\"105.607996,22.905,137.078003\" halfExtents=\"31.40,23.55,39.25\" /><BoxCollisionShape      position=\"65.356,22.905,118.208997\" halfExtents=\"31.40,23.55,20.40\" /><BoxCollisionShape      position=\"65.356,22.905,-121.712\" halfExtents=\"31.40,23.55,20.40\" /><SphereCollisionShape  position=\"44.985001,60.196997,0.352 \" radius=\"31.65\" />",--[[Hausc1]]"<BoxCollisionShape position=\"0,71.43,0\" halfExtents=\"142.86, 71.43, 142.86\" /><BoxCollisionShape position=\"-71.43,285.72,-71.43\" halfExtents=\"71.43, 142.86, 71.43\" /><BoxCollisionShape position=\"71.43,428.58,0\" halfExtents=\"71.43, 285.72, 142.86\" /><BoxCollisionShape position=\"71.43,857.16,-71.43\" halfExtents=\"71.43, 142.86, 71.43\" /><BoxCollisionShape position=\"-35.715,214.29,35.715\" halfExtents=\"35.715, 71.43, 35.715\" /><BoxCollisionShape position=\"-35.715,500.01,-107.145\" halfExtents=\"35.715, 71.43, 35.715\" /><BoxCollisionShape position=\"107.145,785.73,35.715\" halfExtents=\"35.715, 71.43, 35.715\" />",--[[PrimeTower]]"<BoxCollisionShape      position=\"-16.1,278.6,053.\" halfExtents=\"063,296,063\" yaw=\"-16.5\" /> <BoxCollisionShape      position=\"007.1,278.6,027.3\" halfExtents=\"065,296,065\" yaw=\"-28\" /><BoxCollisionShape      position=\"012.8,278.6,-63.3\" halfExtents=\"076,296,076\" yaw=\"4\" /> <BoxCollisionShape      position=\"023.18,278.6,-135.4\" halfExtents=\"067.7,296,067.7\" yaw=\"-36\" />",--[[Hausc2]]"<BoxCollisionShape      position=\"0,349.999,-166.667\" halfExtents=\"83.333, 349.999, 83.333\" /><BoxCollisionShape      position=\"0,349.999,166.667\" halfExtents=\"83.333, 349.999, 83.333\" /><BoxCollisionShape      position=\"41.666,291.666,0\" halfExtents=\"41.666, 58.333, 83.333\" /><BoxCollisionShape      position=\"-41.666,524.999,0\" halfExtents=\"41.666, 58.333, 83.333\" /> ",--[[101]]"<BoxCollisionShape    position=\"0,565.7,0\" halfExtents=\"76,565.7,76\" /><BoxCollisionShape position=\"-2.8,1210,1\" halfExtents=\"39,82,39\" />",--[[hausc3]]"<BoxCollisionShape      position=\"0,300,-208.33\" halfExtents=\"250,0,65.1\" pitch=\"-50.194\" /><BoxCollisionShape      position=\"0,300,-125\" halfExtents=\"250,0,65.1\" pitch=\"50.194\" /><BoxCollisionShape      position=\"125,275,0\" halfExtents=\"48.59,0,250\" roll=\"30.964\" /><BoxCollisionShape      position=\"208.33,275,0\" halfExtents=\"48.59,0,250\" roll=\"-30.964\" /><BoxCollisionShape      position=\"166.67,125,0\" halfExtents=\"83.33,125,250\" /><BoxCollisionShape      position=\"-83.33,125,-166.67\" halfExtents=\"166.66,125,83.33\" />"}
+        if (currentX > 0 and currentX < x and currentY > 1 --[[and currentY ~= y]]) then
+        returnString = returnString .. "<StaticEntity collisionType=\"static\" position=\"" .. (currentX*cellSize) .. "," .. (currentY*cellSize - (cellSize/2)) .. ",0\" direction=\"0,1,0\" pitch=\"0\" roll=\"0\" yaw=\"" .. orientation .. "\">  <attached> <Model position=\"0,0,0\" mesh=\"" .. houses[houseNr] .. ".mesh\" scale=\"" .. scales[houseNr] .. "\"/></attached><collisionShapes>" .. collisionShapes[houseNr] .. "</collisionShapes></StaticEntity>\n\n"
+        end
+        returnString = returnString .. "<StaticEntity collisionType=\"static\" position=\"" .. (currentX*cellSize - cellSize/2) .. "," .. (currentY*cellSize) .. ",0\" direction=\"0,1,0\" pitch=\"0\" roll=\"0\" yaw=\"0\">  <attached> <Model position=\"0,0,0\" mesh=\"CityGroundLamps.mesh\" scale=\"" .. cellSize .. "\"/><Model position=\"0,0,0\" mesh=\"CityGround.mesh\" scale=\"" .. cellSize .. "\"/></attached><collisionShapes><BoxCollisionShape position=\"0,0,0\" halfExtents=\"500,0,500\"/><BoxCollisionShape position=\"48.5,50.88,192\" halfExtents=\"5,50.88,5\"/><BoxCollisionShape position=\"48.5,50.88,-192\" halfExtents=\"5,50.88,5\"/><BoxCollisionShape position=\"48.5,50.88,-54\" halfExtents=\"5,50.88,5\"/><BoxCollisionShape position=\"48.5,50.88,54\" halfExtents=\"5,50.88,5\"/><BoxCollisionShape position=\"-48.5,50.88,192\" halfExtents=\"5,50.88,5\"/><BoxCollisionShape position=\"-48.5,50.88,-192\" halfExtents=\"5,50.88,5\"/><BoxCollisionShape position=\"-48.5,50.88,-54\" halfExtents=\"5,50.88,5\"/><BoxCollisionShape position=\"-48.5,50.88,54\" halfExtents=\"5,50.88,5\"/></collisionShapes></StaticEntity>\n\n"
+      end
+    end
+    return returnString
+end
+
+?>
+
+<Level>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+
+  <?lua include("includes/notifications.oxi") ?>
+
+
+  <Scene
+    ambientlight = "0.45, 0.4, 0.35"
+    skybox       = "Orxonox/Starbox"
+  >
+
+    
+    <Planet
+      position="<?lua print(PLANET_DISTANCE)?>,0,0"
+      scale="<?lua print(PLANET_SCALE)?>"
+      collisionType="dynamic"
+      linearDamping="0.8"
+      angularDamping="0"
+      mass="5.9e21"
+      mesh="planets/earth.mesh"
+      atmosphere="atmosphere1"
+      rotationaxis="0,1,0"
+      rotationrate="0.2"
+      atmospheresize="80.0f"
+      imagesize="1024.0f"
+      collisiondamage= 2
+      enablecollisiondamage= false
+    />
+
+    <DistanceTrigger name="SkyboxVisible" position="0,0,0" target="Pawn" distance="100000" stayActive="true" delay=0 />
+
+    <?lua print(randomHouses(X,Y,CELL_SIZE)) ?>
+  
+    <StaticEntity position="0,0,0" direction="0,0,0" collisionType=static mass=0 friction=0.01 yaw=90 pitch=180 roll=90 >
+      <attached> 
+        <Model position="0,0,0" mesh="skyboxHoenggerberg.mesh" scale3D="<?lua print(SKYBOX_SCALE)?>,<?lua print(SKYBOX_SCALE)?>,<?lua print(SKYBOX_SCALE)?>" lodLevel="0">
+          <events>
+            <visibility>
+              <EventTrigger>
+                <events>
+                  <trigger>
+                    <EventListener event="SkyboxVisible"/>
+                  </trigger>
+                </events>
+              </EventTrigger>
+            </visibility>
+          </events>
+        </Model>
+      </attached>
+    </StaticEntity>
+
+    <Light type="directional" position="-90,50,60" lookat="0,0,0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+
+    <SpawnPoint team=0 position="<?lua print(PLANET_DISTANCE - PLANET_SCALE - 2000)?>,0,0" lookat="<?lua print(PLANET_DISTANCE) ?>,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort orientation="-0.4,-0.6,0.6,0.4" />
+
+    <PortalEndPoint position="<?lua print(X*CELL_SIZE/2) ?>,<?lua print(Y*CELL_SIZE/2) ?>,500" id="3" distance="40" target="Pawn"/>
+    <PortalEndPoint position="<?lua print(PLANET_DISTANCE) ?>,0,0" id="2" distance="<?lua print(PLANET_SCALE)?>" target="Pawn"/>
+    <PortalEndPoint position="<?lua print(PLANET_DISTANCE + PLANET_SCALE + 6000) ?>,0,0" id="1" distance="40" target="Pawn"/>
+
+    <PortalLink fromID="2" toID="3" />
+    <PortalLink fromID="3" toID="1" />   
+  </Scene>
+</Level>
Index: /code/trunk/data/levels/presentationHS13.oxw
===================================================================
--- /code/trunk/data/levels/presentationHS13.oxw	(revision 11051)
+++ /code/trunk/data/levels/presentationHS13.oxw	(revision 11052)
@@ -162,6 +162,6 @@
         maxshieldhealth     = "120"
         shieldabsorption    = "0.8"
-        reloadrate          = "1"
-        reloadwaittime      = "1"
+        shieldrechargerate  = "1"
+        shieldrechargewaittime = "1"
         name                = "Tanis1"
         radarname           = "Tanis Cruiser" >
Index: /code/trunk/data/levels/shieldTest.oxw
===================================================================
--- /code/trunk/data/levels/shieldTest.oxw	(revision 11051)
+++ /code/trunk/data/levels/shieldTest.oxw	(revision 11052)
@@ -43,6 +43,6 @@
     shieldabsorption= 1
 
-    reloadrate= "10"
-    reloadwaittime= 1
+    shieldrechargerate = "10"
+    shieldrechargewaittime = 1
 
 >
Index: /code/trunk/data/levels/shuttleAttack.oxw
===================================================================
--- /code/trunk/data/levels/shuttleAttack.oxw	(revision 11052)
+++ /code/trunk/data/levels/shuttleAttack.oxw	(revision 11052)
@@ -0,0 +1,1171 @@
+<!--TODO: Shuttle and Stations -->
+<LevelInfo
+    name = "Shuttle under Attack"
+    description = "The newly discovered hostile alien species is attacking one of our outset stations, Andromeda! There is no protecting it; you have to escort the escape shuttle to a safer location."
+    tags = "mission"
+    screenshot = "shuttleProtect.png"
+/>
+
+<?lua
+    include("stats.oxo")
+    include("HUDTemplates3.oxo")
+    include("templates/lodInformation.oxt")
+
+    include("templates/spaceshipAssff.oxt")
+    include("templates/spaceshipPirate.oxt")
+    include("templates/spaceshipEscort.oxt")
+    include("templates/spaceshipShuttle.oxt")
+    include("templates/FPS.oxt")
+    include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<Level gametype = "Mission">
+    <templates>
+        <Template link="lodtemplate_default" />
+    </templates>
+
+    <?lua include("includes/notifications.oxi") ?>
+
+    <NotificationQueueCEGUI
+        name="narrative"
+        targets="simpleNotification"
+        size=3
+        displayTime=3.9
+        position="0.15, 0, 0.1, 0"
+        fontSize="15"
+        fontColor="0.3, 1, 0.2, 0.8"
+        alignment="HorzCentred"
+        displaySize="0.7, 0, 0, 0"
+    />
+
+    <!-- GLOBAL LUA VARIABLES -->
+    <?lua
+        waves = 3
+        enemiesInit = 5
+        enemiesIncrease = 2
+        allies = 3
+
+        --[[ Coordinates in (y,z,x). NOTE: Indexing starts at 1 in lua! Don´t forget to adapt the for loops, too! ]]--
+        cCenter = {0, 0, 0}
+        cSpawn = {-50, 0, 0}
+        cUnit = {-2000, 0, 3000}
+        cA = {-3000, 0, 5000}
+        cB = {-3000, 0, -5000}
+        cC = {-2300, 0, 0}
+        dStation = {1, 0, 0}
+        cNewShip = {-2100, 0, 4100}
+        cFPSGround = {-2300, 800, 0}
+        cFPS = {-2300, 1000, 0}
+        cField1 = {400, 0, 2500}
+        cField2 = {400, 0, -2500}
+        cPlanet1 = {8000, -2000, 15000}
+        cPlanet2 = {-20000, 4000, -1000}
+        rAllies = {3000, -2000}         --[[ To be addressed directly, hence r. Do not permute! ]]--
+
+        --[[ Function to print Coordinates. Quotes not included! ]]--
+        function printC(coord)
+          print(coord[1] .. [[,]] .. coord[2] .. [[,]] .. coord[3])
+        end
+    ?>
+
+    <Scene
+        ambientlight = "0.8, 0.8, 0.8"
+        skybox = "Orxonox/skyBoxMoreNebula"
+        hasPhysics = true
+    >
+
+    <SpawnPoint name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cA) ?>" spawnclass=SpaceShip pawndesign=spaceshipescort />
+
+    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" />
+
+    <Light type=directional position="<?lua printC(cCenter) ?>" 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"/>
+
+    <!--QUEST DEFINITIONS-->
+
+    <GlobalQuest id="quest1">
+        <QuestDescription title="Reach Andromeda Station!" description="You need to get in contact with your base! Word is enemies are preparing to attack our people and goods! Be quick!" failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <complete-effects>
+            <AddQuest questId="quest2" />
+            <AddQuest questId="quest2.1" />
+        </complete-effects>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest2">
+        <QuestDescription title="Prepare to fight the Enemy" description="You need to be prepared, mentally and physically! So gather all your strength and forces to destroy those space pirates!" failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <subquests>
+            <GlobalQuest id="quest2.1">
+                <QuestDescription title="> Get a better Spaceship" description="Take over the faster, stronger, more secure and overall better spaceship!" failMessage="" completeMessage="" />
+                <complete-effects>
+                    <AddQuest questId="quest2.2" />
+                </complete-effects>
+            </GlobalQuest>
+            <GlobalQuest id="quest2.2">
+                <QuestDescription title="> Meet your Unit" description="Your unit will help you, where ever you go. To victory or to death, they will be loyal to you!" failMessage="" completeMessage="" />
+            </GlobalQuest>
+        </subquests>
+        <complete-effects>
+            <AddQuest questId="quest3" />
+        </complete-effects>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest3">
+        <QuestDescription title="Fight the first Wave" description="Five enemies are approaching you! There main target is the shuttle though, so destroy them - before the destroy the escape shuttle with the valuebals goods (and of course the people aboard)!" failMessage="Oh no! You have to be better, they destroyed the shuttle!" completeMessage="Good Job!" />
+        <hints>
+        </hints>
+        <complete-effects>
+            <AddQuest questId="quest4" />
+            <AddQuest questId="quest4.1" />
+            <AddQuest questId="quest4.2" />
+        </complete-effects>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest4">
+        <QuestDescription title="Prepare for the next Wave" description="This was just a scouting troop from the enemies, they know now how many there are from us and will send a bigger troop next time! Prepare yourself..." failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <subquests>
+            <GlobalQuest id="quest4.1">
+                <QuestDescription title="> Get to the Defense Station" description="Fly to the defense station, we will guard your spaceship while you will fight them with the Cannon Suit." failMessage="" completeMessage="" />
+            </GlobalQuest>
+            <GlobalQuest id="quest4.2">
+                <QuestDescription title="> Get into the Cannon Suit!" description="Dock to the defense station, you will be able to contol the Cannon Suit on top of the station, perfect for fighting off a hord of enemies!" failMessage="" completeMessage="" />
+            </GlobalQuest>
+        </subquests>
+        <complete-effects>
+            <AddQuest questId="quest5" />
+        </complete-effects>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest5">
+        <QuestDescription title="Fight the Hord!" description="Destroy the next wave!" failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <complete-effects>
+            <AddQuest questId="quest6" />
+            <AddQuest questId="quest6.1" />
+            <AddQuest questId="quest6.2" />
+        </complete-effects>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest6">
+        <QuestDescription title="Get back for the Showdown" description="Undock from the defense station and get into your Spaceship!" failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <subquests>
+            <GlobalQuest id="quest6.1">
+                <QuestDescription title="> Collect the local Pickups" description="There is a box with pickups close to the station, you can collect them if you want to, but it is advised to do so. They will support your task in destroying the enemies and make your life easier." failMessage="" completeMessage="" />
+            </GlobalQuest>
+            <GlobalQuest id="quest6.2">
+                <QuestDescription title="> Get back to the Shuttle" description="Fly to the Shuttle!" failMessage="" completeMessage="" />
+            </GlobalQuest>
+        </subquests>
+        <complete-effects>
+            <AddQuest questId="quest7" />
+        </complete-effects>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest7">
+        <QuestDescription title="Fight the final Wave" description="Good gracious, another hord of pirate ships!" failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <subquests>
+        </subquests>
+    </GlobalQuest>
+
+    <!--EVENTS AND TRIGGERS
+        Usable events and triggers:
+        _spawntrigger
+        _reachedA
+        _dock<A|B|C>
+        _docked<A>      WIP; see below
+        -joinedUnit
+        _wave<k>
+        _killedEnemy<k>.<i>
+        _waveClear<k>
+    -->
+
+
+
+    <EventMultiTrigger name="spawntrigger" activations=1>
+        <events>
+            <trigger>
+                <EventListener event="playerSpawn" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <DistanceTrigger name="reachedA" position="<?lua printC(cA) ?>" distance=1000 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true />
+
+    <!-- HACK: just waited out 3sec for animation. Cannot link an event to the COMPLETION of a dock. How is this not possible?? -->
+    <EventMultiTrigger name="dockedA" activations="1" stayactive="true" delay=3>
+        <events>
+            <trigger>
+                <EventListener event="dockA" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <DistanceTrigger name="joinedUnit" active=false position="<?lua printC(cUnit) ?>" distance=100 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true>
+        <events>
+            <activity>
+                    <EventListener event="dockedA" />
+            </activity>
+        </events>
+    </DistanceTrigger>
+
+    <EventMultiTrigger name="wave1" activations="1" delay=4>
+        <events>
+            <trigger>
+                <EventListener event="joinedUnit" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <!-- Recursive helper function for the end-of-wave events. F*ck the event system, seriously. -->
+    <?lua
+    function enemyTriggerRecursor(i, k)
+    if i > 0 then
+    return [[
+    <EventTrigger name=killedEnemy]] .. k .. [[.]] .. i .. [[ activations=1 stayactive=true delay=0.1>
+        <events>
+            <trigger>
+                <EventListener event=attackers]] .. k .. [[ />
+            </trigger>
+        </events>
+        ]] .. enemyTriggerRecursor(i-1, k) .. [[
+    </EventTrigger>
+    ]]
+    else return ""
+    end
+    end
+    ?>
+    <!-- Actual recursive Event(s) for the respective waves. -->
+    <?lua
+    enemies = enemiesInit
+    for k = 1, waves, 1
+    do
+    print(enemyTriggerRecursor(enemies,k))
+    ?>
+    <EventMultiTrigger name="waveClear<?lua print(k) ?>" delay=4.0>
+        <events>
+            <trigger>
+                <EventListener event="killedEnemy<?lua print(k .. [[.]] .. enemies) ?>" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+    <?lua enemies = enemies + enemiesIncrease ?>
+    <?lua end ?>
+
+    <!-- This controls the ally AI controller so it is only active when active enemies are around! -->
+    <EventDispatcher name="allyControllerDispatcher">
+      <targets>
+        <EventTarget target="allyController" />
+      </targets>
+      <events>
+          <activity>
+              <?lua
+              for k = 1, waves, 1 do
+              ?>
+              <Trigger mode=and>
+                  <EventTrigger>
+                      <events>
+                          <trigger>
+                              <EventListener event="wave<?lua print(k) ?>" />
+                          </trigger>
+                      </events>
+                  </EventTrigger>
+                  <EventTrigger invert=true>
+                      <events>
+                          <trigger>
+                              <EventListener event="waveClear<?lua print(k) ?>" />
+                          </trigger>
+                      </events>
+                  </EventTrigger>
+              </Trigger>
+              <?lua end ?>
+          </activity>
+      </events>
+    </EventDispatcher>
+
+    <DistanceTrigger active=false name="reachedC" position="<?lua printC(cC) ?>" distance=400 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true>
+        <events>
+            <activity>
+                <EventListener event="waveClear1" />
+            </activity>
+        </events>
+    </DistanceTrigger>
+
+    <EventMultiTrigger name="dockedC" activations="1" stayactive="true" delay=3>
+        <events>
+            <trigger>
+                <EventListener event="dockC" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <EventMultiTrigger name="wave2" activations="1" delay=8>
+        <events>
+            <trigger>
+                <EventListener event="dockedC" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <EventMultiTrigger name="readyAfterWave2" activations="1" delay=2 stayactive=true>
+        <events>
+            <trigger>
+                <Trigger mode=and>
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="undockC" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="waveClear2" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                </Trigger>
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <!-- See the DistanceTrigger attached to the shuttle here! !-->
+
+    <EventMultiTrigger name="wave3" activations="1" delay=12>
+        <events>
+            <trigger>
+                <EventListener event="reachedShuttle" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <DistanceTrigger active=false name="reachedB" position="<?lua printC(cB) ?>" distance=400 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true>
+        <events>
+            <activity>
+                <EventListener event="waveClear3" />
+            </activity>
+        </events>
+    </DistanceTrigger>
+
+    <Script code="Mission endMission true" onLoad="false">
+        <events>
+            <trigger>
+                <EventListener event="reachedB" />
+            </trigger>
+        </events>
+    </Script>
+
+    <EventMultiTrigger name="missionFailed" activations="1" stayactive=true>
+        <events>
+            <trigger>
+                <EventListener event="transporter" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <EventMultiTrigger name="failMissionHelper" delay=4 stayactive=true>
+        <events>
+            <trigger>
+                <EventListener event="missionFailed" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <DistanceTrigger active=false name="failMission" position="<?lua printC(cA) ?>" distance=100 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true>
+        <events>
+            <activity>
+                <EventListener event="failMissionHelper" />
+            </activity>
+        </events>
+    </DistanceTrigger>
+
+    <!--HACK: Ultimately settled on docking A to fail the mission... that makes a whole lot of sense. -->
+
+    <Script code="Mission endMission fail" onLoad="false">
+        <events>
+            <trigger>
+                <EventListener event="failMission" />
+            </trigger>
+        </events>
+    </Script>
+
+    <!--QUEST EFFECT BEACONS -->
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <AddQuest questId="quest1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="spawntrigger" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="reachedA" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest2.1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="dockedA" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest2.2" />
+            <CompleteQuest questId="quest2" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="joinedUnit" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest3" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="waveClear1" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest4.1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="reachedC" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest4.2" />
+            <CompleteQuest questId="quest4" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="dockedC" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest5" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="waveClear2" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest6.1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="gotPickups" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest6.2" />
+            <CompleteQuest questId="quest6" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="reachedShuttle" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest7" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="waveClear3" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <!--NOTIFICATIONS -->
+
+    <SimpleNotification broadcast="true" message="Welcome, Commander. Please report at Andromeda Station.">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Our enemy is set to attack us very soon.">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=8 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Please study your mission briefing!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=12 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Welcome to Andromeda, Commander.">
+        <events>
+            <trigger>
+                <EventListener event="reachedA" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="We've prepared a reinforced Ship for you.">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="reachedA" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Now join our defense Team.">
+        <events>
+            <trigger>
+                <EventListener event="dockedA" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Howdy Commander! Ready to kick some alien ass?">
+        <events>
+            <trigger>
+                <EventListener event="joinedUnit" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <!-- HACK: Somehow only fires a second time if the (notification,event) pairs are separate! WTF -->
+    <?lua
+    for k = 1, waves, 1 do
+    ?>
+    <SimpleNotification broadcast="true" message="An enemy wave is approaching the shuttle!">
+        <events>
+            <trigger>
+                <EventListener event="wave<?lua print(k) ?>" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+    <?lua end ?>
+
+    <SimpleNotification broadcast="true" message="yippie ki yay motherf*cker!">
+        <events>
+            <trigger>
+                <EventListener event="attackers1" />
+                <EventListener event="attackers2" />
+                <EventListener event="attackers3" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Phew, that was close! Well done, Commmander.">
+        <events>
+            <trigger>
+                <EventListener event="waveClear1" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="But it's not over yet! Get to the defense station and dock!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="waveClear1" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="This is our powerful reinforced cannon suit.">
+        <events>
+            <trigger>
+                <EventListener event="dockedC" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="It should deal with those pesky invaders!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="dockedC" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Brilliant work, Commander! now undock again.">
+        <events>
+            <trigger>
+                <EventListener event="waveClear2" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Here's some supplies for you. Shoot that crate!">
+        <events>
+            <trigger>
+                <EventListener event="readyAfterWave2" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Our Intelligence reports one more wave...">
+        <events>
+            <trigger>
+                <EventListener event="reachedShuttle" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Ready to be a hero, Commander?">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="reachedShuttle" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Congrats, Commander! You saved our skin.">
+        <events>
+            <trigger>
+                <EventListener event="waveClear3" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Get over to the safe base to take a break.">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="waveClear3" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="It's over... we failed. Retreat to Andromeda!">
+        <events>
+            <trigger>
+                <EventListener event="missionFailed" />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <!--STATIONS -->
+
+    <!-- (Temporary) Template for stations. Used to define common features of all Stations. -->
+    <Template name="station">
+        <Pawn mass=10000000 collisionType=dynamic friction=0.01>
+            <attached>
+                <Model mesh="HydroHarvester.mesh" position="0,0,0" scale=50 />
+                <DistanceTriggerBeacon name="NPC" />
+            </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>
+        </Pawn>
+    </Template>
+
+    <!-- A, Coordinates are approx. (cos(29pi/16), sin(29pi/16), 0)*3000 -->
+    <Pawn name="statA" team=0 radarname="Andromeda Station" position="<?lua printC(cA) ?>" direction="<?lua printC(dStation) ?>" yaw=-50 initialhealth=10000 maxhealth=10000>
+        <templates>
+            <Template link="station" />
+        </templates>
+        <attached>
+            <DockingTarget name="dockTargetA" />
+            <Dock position="0,0,0" active=true>
+                <animations>
+                    <MoveToDockingTarget target="dockTargetA" />
+                </animations>
+                <effects>
+                    <DockToShip target="newSpaceShip" />
+                </effects>
+                <events>
+                    <execute>
+                        <EventListener event="dockA" />
+                    </execute>
+                </events>
+                <attached>
+                    <DistanceTrigger position="0,0,0" distance="200" target="SpaceShip" beaconMode="exclude" targetname="NPC" name="dockA" />
+                    <Billboard position="0,0,0" amplitude=1 material="Flares/lensflare" colour="1,0,0.05" />
+                </attached>
+            </Dock>
+        </attached>
+    </Pawn>
+
+    <!-- B, Coordinates are approx. (-cos(29pi/16), sin(29pi/16), 0)*3000 -->
+    <Pawn name="statB" team=0 radarname="Safe Base" position="<?lua printC(cB) ?>" direction="<?lua printC(dStation) ?>" yaw=210 initialhealth=10000 maxhealth=10000>
+        <templates>
+            <Template link="station" />
+        </templates>
+        <attached>
+            <DockingTarget name="dockTargetB" />
+            <Dock position="0,0,0" active=false>
+                <animations>
+                    <MoveToDockingTarget target="dockTargetB" />
+                </animations>
+                <effects>
+                    <DockToShip target="newSpaceShip" />
+                </effects>
+                <events>
+                    <execute>
+                        <EventListener event="dockB" />
+                    </execute>
+                </events>
+                <attached>
+                    <DistanceTrigger position="0,0,0" distance="200" target="SpaceShip" beaconMode="exclude" targetname="NPC" name="dockB" />
+                    <Billboard position="0,0,0" amplitude=1 material="Flares/lensflare" colour="1,0,0.05" />
+                </attached>
+            </Dock>
+        </attached>
+    </Pawn>
+
+    <!-- C -->
+    <Pawn name="statC" team=0 radarname="Defense Station" position="<?lua printC(cC) ?>" direction="<?lua printC(dStation) ?>" initialhealth=10000 maxhealth=10000>
+        <templates>
+            <Template link="station" />
+        </templates>
+        <attached>
+            <DockingTarget name="dockTargetC" />
+            <Dock position="0,0,0">
+                <animations>
+                    <MoveToDockingTarget target="dockTargetC" />
+                </animations>
+                <effects>
+                    <DockToShip target="fpsMode" />
+                </effects>
+                <events>
+                    <execute>
+                        <EventListener event="dockC" />
+                    </execute>
+                </events>
+                <attached>
+                    <!--HACK: We use another dock to undock back to the ship since undocking is not implemented... -->
+                    <Dock position="0,0,0" active=true>
+                        <effects>
+                            <DockToShip target="newSpaceShip" />
+                        </effects>
+                        <events>
+                            <execute>
+                                <EventListener event="undockC" />
+                            </execute>
+                        </events>
+                    </Dock>
+                    <DistanceTrigger active=false position="0,0,0" distance="200" target="SpaceShip" beaconMode="exclude" targetname="NPC" name="dockC">
+                        <events>
+                            <activity>
+                                <EventListener event="reachedC" />
+                            </activity>
+                        </events>
+                    </DistanceTrigger>
+                    <Billboard position="0,0,0" amplitude=1 material="Flares/lensflare" colour="1,0,0.05" />
+                </attached>
+            </Dock>
+        </attached>
+    </Pawn>
+
+    <!-- New SpaceShip as destination of dock A-->
+    <SpaceShip
+            template            = "spaceshipassff"
+            team                = "0"
+            position            = "<?lua printC(cNewShip) ?>"
+            lookat              = "<?lua print(rAllies[2] .. ',' .. [[0]] .. ',' .. rAllies[1]) ?>"
+            health              = "400"
+            initialhealth       = "400"
+            maxhealth           = "1500"
+            shieldhealth        = "80"
+            initialshieldhealth = "80"
+            maxshieldhealth     = "120"
+            shieldabsorption    = "0.8"
+            reloadrate          = "1"
+            reloadwaittime      = "1"
+            name                = "newSpaceShip"
+            radarname           = "Defender" >
+        <attached>
+            <DockingTarget name="newSpaceShip" />
+            <DistanceTriggerBeacon name="newSpaceShip" />
+        </attached>
+    </SpaceShip>
+
+    <!-- FPS Player as destination of dock C -->
+    <FpsPlayer team=0 template = "fps" radarname = "Cannon Suit" position = "<?lua printC(cFPS) ?>" lookat="<?lua printC(cCenter) ?>">
+        <attached>
+            <DockingTarget name="fpsMode" />
+            <DistanceTriggerBeacon name="fpsPlayer" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="1,1,1"/>
+        </collisionShapes>
+    </FpsPlayer>
+
+    <!-- Floor for FPS Player -->
+    <StaticEntity position="<?lua printC(cFPSGround) ?>" collisionType=static mass=100000 friction=0.01 >
+        <attached>
+            <Model position="0,0,0" mesh="crate.mesh" scale3D="80,5,80" />
+            <Billboard position="320,50,320" material="Flares/ringflare2" colour="0.2,0.4,0.8" />
+    	    <DistanceTrigger position="320,50,320" distance="50" target="Pawn" beaconMode="identify" targetname="fpsPlayer" name="undockC" stayactive=true />
+            <ForceField active=false position="0,0,0" mode="homogen" diameter="600" forcedirection = "0,-500,0" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="400,25,400" />
+        </collisionShapes>
+    </StaticEntity>
+
+    <!--ELEMENTS -->
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+       asteroidField(cField1[1], cField1[2], cField1[3], 20, 30, 2000, 250, 0)
+    ?>
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+       asteroidField(cField2[1], cField2[2], cField2[3], 20, 30, 2000, 250, 0)
+    ?>
+
+    <Planet
+        position="<?lua printC(cPlanet1) ?>"
+        scale="2000"
+        collisionType="dynamic"
+        linearDamping="0.8"
+        angularDamping="0"
+        mass="5000000"
+        pitch="0"
+        mesh="planets/muunilinst.mesh"
+        atmosphere="atmosphere1"
+        rotationaxis="1,0,0"
+        rotationrate="1.0"
+        atmospheresize="80.0f"
+        imagesize="1024.0f"
+        collisiondamage = 2
+        enablecollisiondamage = true
+      >
+      <attached>
+        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
+        </attached>
+          <collisionShapes>
+            <SphereCollisionShape radius="2000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 0, 30, 20, 40, 2800, 3000, 200, 1)
+    ?>
+
+    <Planet
+        position="<?lua printC(cPlanet2) ?>"
+        scale="3000"
+        collisionType="dynamic"
+        linearDamping="0.8"
+        angularDamping="0"
+        mass="5000000"
+        pitch="0"
+        mesh="planets/planet3.mesh"
+        atmosphere="atmosphere1"
+        rotationaxis="1,0,0"
+        rotationrate="1.0"
+        atmospheresize="80.0f"
+        imagesize="1024.0f"
+        collisiondamage = 2
+        enablecollisiondamage = true
+      >
+      <attached>
+        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
+        </attached>
+          <collisionShapes>
+            <SphereCollisionShape radius="3000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(cPlanet2[1], cPlanet2[2], cPlanet2[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
+    ?>
+
+    <Pawn team=0 health=30 position="<?lua print((cC[1]+600) .. ',' .. cC[2] .. ',' .. (cC[3]-600)) ?>" direction="0,-1,0" collisionType=dynamic mass=1000 radarname="Supplies" name="gotPickups">
+        <events>
+            <visibility>
+                <EventListener event="readyAfterWave2" />
+            </visibility>
+            <activity>
+                <EventListener event="readyAfterWave2" />
+            </activity>
+        </events>
+        <attached>
+            <Model position="0,0,0" mesh="crate.mesh" scale3D="10,10,10" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
+        </collisionShapes>
+    </Pawn>
+
+    <?lua
+        include("includes/pickups.oxi")
+    ?>
+
+    <PickupSpawner pickup=hugeshieldpickup position="<?lua print((cC[1]+585) .. ',' .. cC[2] .. ',' .. (cC[3]-585)) ?>" triggerDistance="15" maxSpawnedItems="1">
+        <events>
+            <visibility>
+                <EventListener event="readyAfterWave2" />
+            </visibility>
+            <activity>
+                <EventListener event="readyAfterWave2" />
+            </activity>
+        </events>
+    </PickupSpawner>
+
+    <PickupSpawner pickup=crazyhealthpickup position="<?lua print((cC[1]+615) .. ',' .. cC[2] .. ',' .. (cC[3]-615)) ?>" triggerDistance="15" maxSpawnedItems="1">
+        <events>
+            <visibility>
+                <EventListener event="readyAfterWave2" />
+            </visibility>
+            <activity>
+                <EventListener event="readyAfterWave2" />
+            </activity>
+        </events>
+    </PickupSpawner>
+
+    <PickupSpawner pickup=hugespeedpickup position="<?lua print((cC[1]+585) .. ',' .. cC[2] .. ',' .. (cC[3]-615)) ?>" triggerDistance="15" maxSpawnedItems="1" >
+        <events>
+            <visibility>
+                <EventListener event="readyAfterWave2" />
+            </visibility>
+            <activity>
+                <EventListener event="readyAfterWave2" />
+            </activity>
+        </events>
+    </PickupSpawner>
+
+    <!-- Allies -->
+    <?lua
+    for i = 1, allies, 1
+    do
+    x = rAllies[1] + math.cos(2*math.pi/allies*(i+1))*100
+    y = rAllies[2] + math.sin(2*math.pi/allies*(i+1))*100
+    ?>
+    <SpaceShip visible=false active=false name="allies<?lua print(k)?>" radarname="Ally" position="<?lua print(y)?>,<?lua print(math.pow(-1,i)*100) ?>,<?lua print(x)?>" lookat="0,0,0" team=0>
+        <templates>
+            <Template link="spaceshipassff" />
+        </templates>
+        <events>
+            <visibility>
+                <EventListener event="dockedA" />
+            </visibility>
+            <activity>
+                <EventListener event="dockedA" />
+            </activity>
+        </events>
+        <attached>
+            <DistanceTriggerBeacon name="NPC" />
+        </attached>
+        <controller>
+            <!-- also see allyControllerDispatcher -->
+            <AIController name="allyController" accuracy=100 team=0 active=false />
+        </controller>
+    </SpaceShip>
+    <?lua end ?>
+
+    <!-- Enemies. Outer loop defines waves, inner loop defines enemies in every wave. -->
+    <?lua
+    enemies = enemiesInit
+    for k = 1, waves, 1
+    do
+    ?>
+    <?lua
+    for i = 1, enemies, 1
+    do
+    x = math.cos(math.pi/(2*enemies - 2)*(i+k))*1500
+    y = math.sin(math.pi/(2*enemies - 2)*(i+k))*1500
+    ?>
+    <SpaceShip visible=false active=false name="attackers<?lua print(k)?>" radarname="Attacker" position="<?lua print(y)?>,<?lua print(math.pow(-1,i)*250) ?>,<?lua print(x)?>" lookat="0,0,0" team=1>
+        <templates>
+            <Template link="spaceshippirate" />
+        </templates>
+        <events>
+            <visibility>
+                <EventListener event="wave<?lua print(k)?>" />
+            </visibility>
+            <activity>
+                <EventListener event="wave<?lua print(k)?>" />
+            </activity>
+        </events>
+        <attached>
+            <DistanceTriggerBeacon name="NPC" />
+        </attached>
+        <controller>
+            <WaypointPatrolController name="attackController" accuracy=100 alertnessradius=100 team=1 active=false>
+                <waypoints>
+                    <Attacher target="transporter" deletewithparent=false />
+                </waypoints>
+                <events>
+                    <activity>
+                        <EventListener event="wave<?lua print(k)?>" />
+                    </activity>
+                </events>
+            </WaypointPatrolController>
+        </controller>
+    </SpaceShip>
+    <?lua end ?>
+    <?lua
+    enemies = enemies + enemiesIncrease
+    end ?>
+
+    <!-- Transporter, starting Point is near A, end Point near B, the circle parameters for the waypoints are: Center = (0, -887, 0), r = 2613 -->
+    <SpaceShip position="<?lua printC(cA) ?>" lookat="<?lua printC(cB) ?>" team=0 name="transporter" radarname="Shuttle" >
+        <templates>
+            <Template link="spaceshipShuttle" />
+        </templates>
+        <attached>
+            <DistanceTriggerBeacon name="NPC" />
+            <DistanceTriggerBeacon name="transporter" />
+            <DistanceTrigger active=false name="reachedShuttle" position="0,0,0" distance=400 target="SpaceShip" beaconMode="exclude" targetname="NPC" stayactive=true initialhealth=1000 maxhealth=1000>
+                <events>
+                    <activity>
+                        <EventListener event="readyAfterWave2" />
+                    </activity>
+                </events>
+            </DistanceTrigger>
+        </attached>
+        <controller>
+            <WaypointController accuracy=10 team=0>
+                <waypoints>
+                    <!-- A to B -->
+                    <?lua
+                    max = 5
+                    for i = 1, max, 1
+                    do
+                    x = math.cos(math.pi*(i+1)/8)*5000
+                    y = -math.sin(math.pi*(i+1)/8)*700-3000
+                    ?>
+                    <Billboard position="<?lua print(y) ?>,0,<?lua print(x) ?>" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
+                    <?lua end ?>
+
+                    <!-- Return Point -->
+                    <Billboard position="<?lua printC(cB) ?>" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
+
+                    <!-- B to A -->
+                    <?lua
+                    max = 5
+                    for i = 1, max, 1
+                    do
+                    x = math.cos(math.pi*(max+2-i)/8)*5000
+                    y = -math.sin(math.pi*(max+2-i)/8)*700-3000
+                    ?>
+                    <Billboard position="<?lua print(y) ?>,0,<?lua print(x) ?>" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
+                    <?lua end ?>
+
+                    <!-- Start Point -->
+                    <Billboard position="<?lua printC(cA) ?>" amplitude=1 material="Flares/lensflare" colour="1,1,0.05"/>
+                </waypoints>
+            </WaypointController>
+        </controller>
+    </SpaceShip>
+
+    </Scene>
+</Level>
Index: /code/trunk/data/levels/shuttleRetaliation.oxw
===================================================================
--- /code/trunk/data/levels/shuttleRetaliation.oxw	(revision 11052)
+++ /code/trunk/data/levels/shuttleRetaliation.oxw	(revision 11052)
@@ -0,0 +1,1181 @@
+<LevelInfo
+    name = "Retaliation"
+    description = "This attack cannot be met with no consequences! Commander, we order you to get back to sector 5C and erradicate the alien menace at once!"
+    tags = "mission"
+    screenshot = "retailiation.png"
+/>
+
+<?lua
+    include("stats.oxo")
+    include("HUDTemplates3.oxo")
+    include("templates/lodInformation.oxt")
+
+    include("templates/spaceshipAssff.oxt")
+    include("templates/spaceshipPirate.oxt")
+    include("templates/spaceshipEscort.oxt")
+    include("templates/spaceshipShuttle.oxt")
+    include("templates/FPS.oxt")
+    include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<Level gametype = "Mission">
+    <templates>
+        <Template link="lodtemplate_default" />
+    </templates>
+
+    <?lua include("includes/notifications.oxi") ?>
+
+    <NotificationQueueCEGUI
+        name="narrative"
+        targets="simpleNotification"
+        size=3
+        displayTime=3.9
+        position="0.15, 0, 0.1, 0"
+        fontSize="15"
+        fontColor="0.3, 1, 0.2, 0.8"
+        alignment="HorzCentred"
+        displaySize="0.7, 0, 0, 0"
+    />
+
+    <!-- GLOBAL LUA VARIABLES -->
+    <?lua
+
+        enemies = 2
+        allies = 2
+
+        radSector = 12000
+
+        --[[ Coordinates in (y,z,x). NOTE: Indexing starts at 1 in lua! Don´t forget to adapt the for loops, too! ]]--
+        cCenter = {0, 0, 0}
+        cSpawn = {1500, -2000, 900}
+        cSector = {-15000, -5500, -9000}
+        cSectorEntry = {-4710, -5500, -2826}
+        cPathToEntry = {{0, -2000, 0}}
+        cBeacon = {-6500, -5500, -4400}
+         cAllyWait = cBeacon
+
+        cAlly = cSpawn
+        cEnemy = {-9600, -5500, -6000}
+
+        rSection= {0, -200, 0}
+        rWingman1 = {0, -100, 100}
+        rWingman2 = {0, -100, -100}
+
+        cPlanet1 = {20000, 0, 29000}
+        cPlanet2 = {-22000, 0, -29000}
+
+        cEnemyBasePlanet = {-20000, -8000, -10000}
+
+        cField1 = {-5000, -4000, -3000}
+        cField2 = {4000, 2000, 4500}
+
+
+        --[[ Function to print Coordinates. Quotes not included! ]]--
+        function printC(coord)
+          print(coord[1] .. [[,]] .. coord[2] .. [[,]] .. coord[3])
+        end
+
+        --[[ Function to add Coordinates.]]--
+        function addC(coord1, coord2)
+            return {coord1[1]+coord2[1], coord1[2]+coord2[2], coord1[3]+coord2[3]}
+        end
+    ?>
+
+    <Scene
+        ambientlight = "0.8, 0.8, 0.8"
+        skybox = "Orxonox/skyBoxMoreNebula"
+        hasPhysics = true
+    >
+
+    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" />
+
+    <Light type=directional position="<?lua printC(cSpawn) ?>" 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"/>
+
+    <!--SPAWNING-->
+
+    <Template name=commander>
+        <SpaceShip
+            template            = "spaceshipassff"
+            team                = "0"
+            health              = "800"
+            initialhealth       = "800"
+            maxhealth           = "1500"
+            shieldhealth        = "80"
+            initialshieldhealth = "80"
+            maxshieldhealth     = "120"
+            shieldabsorption    = "0.8"
+            reloadrate          = "1"
+            reloadwaittime      = "1"
+            name                = "commander"
+            radarname           = "Commander"
+            >
+            <attached>
+                <DistanceTriggerBeacon name="Commander" />
+            </attached>
+        </SpaceShip>
+    </Template>
+
+    <Template name=ally>
+        <SpaceShip
+            template            = "spaceshipassff"
+            team                = "0"
+            radarname           = "Ally"
+            lookat              = "<?lua printC(cPathToEntry[1]) ?>"
+        >
+            <attached>
+                <DistanceTriggerBeacon name="Ally" />
+            </attached>
+        </SpaceShip>
+    </Template>
+
+    <Template name=enemy>
+        <SpaceShip
+            template            = "spaceshippirate"
+            team                = "1"
+            radarname           = "Invader"
+            lookat              = "<?lua printC(cBeacon) ?>"
+            active              = false
+            visible             = false
+        >
+            <attached>
+                <DistanceTriggerBeacon name="Enemy" />
+            </attached>
+        </SpaceShip>
+    </Template>
+
+    <TeamSpawnPoint active=false name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cPathToEntry[1]) ?>" spawnclass=SpaceShip pawndesign=commander>
+        <events>
+            <activity>
+                <EventTrigger invert=true>
+                  <events>
+                    <trigger>
+                      <EventListener event="reachedSector" />
+                    </trigger>
+                  </events>
+                </EventTrigger>
+            </activity>
+        </events>
+    </TeamSpawnPoint>
+
+    <TeamSpawnPoint active=false name="altSpawn" team=0 position="<?lua printC(cBeacon) ?>" lookat="<?lua printC(cSector) ?>" spawnclass=SpaceShip pawndesign=commander>
+        <events>
+            <activity>
+                <EventListener event="reachedSector" />
+            </activity>
+        </events>
+    </TeamSpawnPoint>
+
+    <!--QUEST DEFINITIONS-->
+
+    <GlobalQuest id="quest1">
+        <QuestDescription title="Enter Sector 5C" description="It is time to retaliate against the aggressors. Get back to Sector 5C to kill every last one of them! We have you covered with <?lua print(allies) ?> of our finest Divisions. They will guide, help and protect you if necessary." failMessage="" completeMessage="" />
+        <hints>
+            <QuestHint id="quest1hint1">
+                <QuestDescription title="Markings" description="We have marked the bounds of Sector 5C in red lights, you can follow the green trail to get there." />
+            </QuestHint>
+        </hints>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest2">
+        <QuestDescription title="Find them" description="It seems they have hidden themselves, that is, their whole civilization, in fear of retaliation. Our scientists presume some cloaking technology to be in use. Look out for a way to make the aggressors visible!" failMessage="" completeMessage="" />
+        <hints>
+            <QuestHint id="quest2hint1">
+                <QuestDescription title="The detector beacon" description="Our scientists claim cloaking is generally toggled by a visible Switch called a detector beacon. Try to find a bright light in your Area and approach it!" />
+            </QuestHint>
+        </hints>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest3">
+        <QuestDescription title="Fight their army" description="You have successfully uncovered their civilization and home planet, and it is much worse than we thought... they came prepared! You have to fight their army to fulfill your mission." failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <complete-effects>
+            <AddQuest questId="quest4" />
+            <AddQuest questId="quest4.1" />
+            <AddQuest questId="quest4.2" />
+            <AddQuestHint hintId="quest4.1hint1" />
+            <AddQuestHint hintId="quest4.2hint1" />
+        </complete-effects>
+    </GlobalQuest>
+
+    <GlobalQuest id="quest4">
+        <QuestDescription title="Do the right thing" description="The aggressors have surrendered and seem to have had good reasons for their actions. Yet they did not talk to us beforehand and tried to kill us. What will you do?" failMessage="" completeMessage="" />
+        <hints>
+        </hints>
+        <subquests>
+            <GlobalQuest id="quest4.1">
+                <QuestDescription title="> Destroy their civilisation" description="Even if they had reasons, they are still murderers and can not be trusted anymore. This whole thing might even be a setup... We need to kill them and destroy their planet!" failMessage="" completeMessage="" />
+                <hints>
+                    <QuestHint id="quest4.1hint1">
+                        <QuestDescription title="Choosing" description="To make this choice, kill the remaining enemy ships. The divisions will follow your decision." />
+                    </QuestHint>
+                </hints>
+            </GlobalQuest>
+            <GlobalQuest id="quest4.2">
+                <QuestDescription title="> Spare them and leave" description="Military tension arising from a missunderstanding is no valid reasoning for a genocide. Nothing is. We should leave and talk this out later." failMessage="" completeMessage="" />
+                <hints>
+                    <QuestHint id="quest4.2hint1">
+                        <QuestDescription title="Choosing" description="To make this choice, fly out of the sector. The divisions will follow your decision." />
+                    </QuestHint>
+                </hints>
+            </GlobalQuest>
+        </subquests>
+    </GlobalQuest>
+
+    <!--EVENTS AND TRIGGERS
+        Usable events and triggers:
+        spawntrigger
+    -->
+
+    <EventMultiTrigger name="spawntrigger" activations=1>
+        <events>
+            <trigger>
+                <EventListener event="playerSpawn" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <EventMultiTrigger name="spawned" stayactive=true activations=1>
+        <events>
+            <trigger>
+                <EventListener event="spawntrigger" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <DistanceTrigger name="reachedSector" position="<?lua printC(cSector) ?>" distance="<?lua print(radSector) ?>" target="SpaceShip" beaconMode="identify" targetname="Commander" stayactive=true />
+
+    <EventMultiTrigger name="addQuest2">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=10 >
+                   <events>
+                      <trigger>
+                         <EventListener event="reachedSector" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <DistanceTrigger name="alliesReachedWait" position="<?lua printC(cAllyWait) ?>" distance="1000" target="SpaceShip" beaconMode="identify" targetname="Ally" stayactive=true />
+
+    <!-- So the allies stall when they reached their position for negociation and don´t fire away... -->
+
+    <EventDispatcher name="allyControllerDispatcher">
+      <targets>
+        <EventTarget target="allyController" />
+      </targets>
+      <events>
+          <activity>
+                <Trigger mode=or>
+                    <EventTrigger invert=true>
+                        <events>
+                            <trigger>
+                                <EventListener event="alliesReachedWait" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="noMercy" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                    <Trigger mode=and>
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="fightBegun" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert=true>
+                            <events>
+                                <trigger>
+                                    <EventListener event="oneUnitLeft" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </Trigger>
+          </activity>
+      </events>
+    </EventDispatcher>
+
+    <EventMultiTrigger name="hintBeacon">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=70 >
+                   <events>
+                      <trigger>
+                         <EventListener event="reachedSector" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <DistanceTrigger name="cloakBeacon" position="<?lua printC(cBeacon) ?>" distance=100 target="SpaceShip" beaconMode="identify" targetname="Commander" stayactive=true />
+
+    <EventMultiTrigger name="fightBegun" stayactive=true>
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=12>
+                   <events>
+                      <trigger>
+                         <EventListener event="cloakBeacon" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <EventDispatcher name="enemyControllerDispatcher">
+      <targets>
+        <EventTarget target="enemyController" />
+      </targets>
+      <events>
+          <activity>
+              <Trigger mode=and>
+                  <EventTrigger>
+                      <events>
+                          <trigger>
+                              <EventListener event="fightBegun" />
+                          </trigger>
+                      </events>
+                  </EventTrigger>
+                  <EventTrigger invert=true>
+                      <events>
+                          <trigger>
+                              <EventListener event="oneUnitLeft" />
+                          </trigger>
+                      </events>
+                  </EventTrigger>
+              </Trigger>
+          </activity>
+      </events>
+    </EventDispatcher>
+
+    <EventMultiTrigger name="noMercy" stayactive=true>
+        <events>
+            <trigger>
+                <EventListener event="allUnitsDown" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <EventMultiTrigger name="enemyPlanetMulti">
+     <events>
+         <trigger>
+             <EventListener event="enemyPlanet" />
+         </trigger>
+     </events>
+    </EventMultiTrigger>
+
+    <!-- Recursive helper function for the event at the "end" of a Unit.-->
+    <?lua
+    function enemyTriggerRecursor(i, k)
+    if i > 0 then
+    return [[
+    <EventTrigger name=killedEnemy]] .. ((k-1)*4+i) .. [[ activations=1 stayactive=true delay=0.1>
+        <events>
+            <trigger>
+                <EventListener event=enemy]] .. k .. [[ />
+            </trigger>
+        </events>
+        ]] .. enemyTriggerRecursor(i-1, k) .. [[
+    </EventTrigger>
+    ]]
+    else return ""
+    end
+    end
+    ?>
+    <!-- Actual recursive Event(s) for the respective Units. (packs of 4 Enemies that is!) -->
+    <?lua
+    for k = 1, enemies, 1
+    do
+    print(enemyTriggerRecursor(4,k))
+    ?>
+    <EventMultiTrigger name="unit<?lua print(k) ?>Down" delay=0.1 stayactive=true>
+        <events>
+            <trigger>
+                <EventListener event="killedEnemy<?lua print(k*4) ?>" />
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+    <?lua end ?>
+
+    <EventMultiTrigger name="oneUnitLeft" stayactive=true>
+        <events>
+            <trigger>
+                <Trigger mode=or>
+                    <?lua
+                    for k = 1, enemies, 1
+                    do
+                    ?>
+                        <Trigger mode=and>
+                            <EventTrigger invert=true>
+                                <events>
+                                    <trigger>
+                                        <EventListener event="unit<?lua print(k) ?>Down" />
+                                    </trigger>
+                                </events>
+                            </EventTrigger>
+                            <?lua
+                            for i = 1, enemies, 1
+                            do
+                            if not (i == k) then
+                            ?>
+                            <EventTrigger>
+                                <events>
+                                    <trigger>
+                                        <EventListener event="unit<?lua print(i) ?>Down" />
+                                    </trigger>
+                                </events>
+                            </EventTrigger>
+                            <?lua end end ?>
+                        </Trigger>
+                    <?lua end ?>
+                </Trigger>
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <EventMultiTrigger name="allUnitsDown" stayactive=true>
+        <events>
+            <trigger>
+                <Trigger mode=and>
+                    <?lua
+                    for k = 1, enemies, 1
+                    do
+                    ?>
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="unit<?lua print(k) ?>Down" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                    <?lua end ?>
+                </Trigger>
+            </trigger>
+        </events>
+    </EventMultiTrigger>
+
+    <!--TODO: Complete the DistanceTriggers for completing/succeeding correctly! -->
+
+    <DistanceTrigger active=false invert=true name="almostLeft" position="<?lua printC(cSector) ?>" distance="<?lua print(radSector-200) ?>" target="SpaceShip" beaconMode="identify" targetname="Commander" stayactive=true>
+        <events>
+            <activity>
+                <Trigger mode=and>
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="oneUnitLeft" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                    <EventTrigger invert=true>
+                        <events>
+                            <trigger>
+                                <EventListener event="enemyPlanetMulti" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                </Trigger>
+            </activity>
+        </events>
+    </DistanceTrigger>
+
+    <DistanceTrigger active=false invert=true name="leftSector" position="<?lua printC(cSector) ?>" distance="<?lua print(radSector) ?>" target="SpaceShip" beaconMode="identify" targetname="Commander" stayactive=true>
+        <events>
+            <activity>
+                <EventListener event="oneUnitLeft" />
+            </activity>
+        </events>
+    </DistanceTrigger>
+
+    <Script code="Mission endMission true" onLoad="false">
+        <events>
+            <trigger>
+                <EventListener event="leftSector" />
+            </trigger>
+        </events>
+    </Script>
+
+    <!--QUEST EFFECT BEACONS -->
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <AddQuest questId="quest1" />
+            <AddQuestHint HintId="quest1hint1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="spawntrigger" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest1" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="reachedSector" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <AddQuest questId="quest2" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="addQuest2" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <AddQuestHint hintId="quest2hint1
+                " />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="hintBeacon" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest2" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="cloakBeacon" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <AddQuest questId="quest3" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="fightBegun" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest3" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="oneUnitLeft" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+    <!--TODO: Include planet destruction and quitting -->
+
+    <QuestEffectBeacon times=1>
+        <effects>
+            <CompleteQuest questId="quest4" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="enemyAllGone" />
+            </execute>
+        </events>
+    </QuestEffectBeacon>
+
+
+    <!--NOTIFICATIONS -->
+
+    <SimpleNotification broadcast="true" message="Welcome, Commander. It is time to retaliate!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=4 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Get to section 5C and erradicate the aggressors!">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=8 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="That seems extreme. Is there no way around it?">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=12 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Stick to your objective, Commander. This is war.">
+        <events>
+            <trigger>
+                <EventTrigger stayactive="true" delay=16 >
+                   <events>
+                      <trigger>
+                         <EventListener event="spawntrigger" />
+                      </trigger>
+                   </events>
+                </EventTrigger>
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Huh?! The sector is empty! where are they hiding?">
+       <events>
+           <trigger>
+               <EventTrigger stayactive="true" delay=2 >
+                  <events>
+                     <trigger>
+                        <EventListener event="reachedSector" />
+                     </trigger>
+                  </events>
+               </EventTrigger>
+           </trigger>
+       </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="They must be cloaking themselves! But we'll figure it out...">
+      <events>
+          <trigger>
+              <EventTrigger stayactive="true" delay=6 >
+                 <events>
+                    <trigger>
+                       <EventListener event="reachedSector" />
+                    </trigger>
+                 </events>
+              </EventTrigger>
+          </trigger>
+      </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Got it! Look out for a bright light and touch it!">
+     <events>
+         <trigger>
+             <EventListener event="addQuest2" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Divisions are standing by, Sir.">
+     <events>
+         <trigger>
+             <EventListener event="alliesReachedWait" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Woah! what the hell! they boobytrapped us!">
+     <events>
+         <trigger>
+             <EventListener event="cloakBeacon" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Greetings, Humans. Are you here to resign to your menace and make amends?">
+     <events>
+         <trigger>
+             <EventTrigger stayactive="true" delay=4 >
+                <events>
+                   <trigger>
+                      <EventListener event="cloakBeacon" />
+                   </trigger>
+                </events>
+             </EventTrigger>
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Menace? What is he on about, General?">
+     <events>
+         <trigger>
+             <EventTrigger stayactive="true" delay=8 >
+                <events>
+                   <trigger>
+                      <EventListener event="cloakBeacon" />
+                   </trigger>
+                </events>
+             </EventTrigger>
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="None of your concern, Commander. Launch the attack!">
+     <events>
+         <trigger>
+             <EventTrigger stayactive="true" delay=12 >
+                <events>
+                   <trigger>
+                      <EventListener event="cloakBeacon" />
+                   </trigger>
+                </events>
+             </EventTrigger>
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Unit 1 down!">
+     <events>
+         <trigger>
+             <EventListener event="unit1Down" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Unit 2 down!">
+     <events>
+         <trigger>
+             <EventListener event="unit2Down" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Unit 3 down!">
+     <events>
+         <trigger>
+             <EventListener event="unit3Down" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Unit 4 down!">
+     <events>
+         <trigger>
+             <EventListener event="unit4Down" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Please! No More! We surrender!">
+     <events>
+         <trigger>
+             <EventListener event="oneUnitLeft" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Roger that, Commander. We destroy their planet.">
+     <events>
+         <trigger>
+             <EventListener event="allUnitsDown" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="Well done, Commander! Now exfiltrate the sector!">
+     <events>
+         <trigger>
+             <EventListener event="enemyPlanetMulti" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <SimpleNotification broadcast="true" message="This will have dire consequences, Commander!">
+     <events>
+         <trigger>
+             <EventListener event="almostLeft" />
+         </trigger>
+     </events>
+    </SimpleNotification>
+
+    <!--ELEMENTS -->
+
+    <!-- Billboard Path to Sector 5C. Height changes in an atan shape -->
+
+    <?lua
+    for i = 1, 11, 1
+    do
+    heightNow = cPathToEntry[1][2] - (cPathToEntry[1][2]-cSectorEntry[2])*(math.atan(-1.6+0.3*i) + 1)/2
+    cBillNow = {(cSectorEntry[1]-cPathToEntry[1][1])*i/12, heightNow, (cSectorEntry[3]-cPathToEntry[1][3])*i/12}
+    cPathToEntry[i+1] = cBillNow
+    ?>
+    <Billboard position="<?lua printC(cBillNow) ?>"  scale=2 material="Flares/ringflare" colour="0.2,0.9,0.2"/>
+    <?lua
+    end
+    cPathToEntry[13] = cSectorEntry
+    ?>
+
+    <Billboard position="<?lua printC(cSectorEntry) ?>"  scale=5 material="Flares/ringflare" colour="0.2,0.9,0.2"/>
+
+    <!-- Circular Billboard Ring around Sector 5C -->
+
+    <?lua
+    for i = 1, 64, 1
+    do
+    rBillboard = {math.sin(i*math.pi/32)*radSector, 0, math.cos(i*math.pi/32)*radSector}
+    cBillNow = addC(cSector,rBillboard)
+    ?>
+    <Billboard position="<?lua printC(cBillNow) ?>"  scale=10 material="Flares/lensflare" colour="1,0.2,0.2"/>
+    <?lua end ?>
+
+    <!-- Cloaking Beacon -->
+
+    <BlinkingBillboard visible=false active=false scale=2 position="<?lua printC(cBeacon) ?>" material="Flares/lensflare" frequency=1 amplitude=3 colour="0.4,0.4,1">
+        <events>
+            <activity>
+                <EventListener event="addQuest2" />
+            </activity>
+            <visibility>
+                <EventListener event="addQuest2" />
+            </visibility>
+        </events>
+    </BlinkingBillboard>
+
+    <!-- Asteroids you have to fly through to get to the EnemyBase -->
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+       asteroidField(cField1[1], cField1[2], cField1[3], 20, 30, 4500, 500, 0)
+    ?>
+
+    <!-- Other Asteroid-Fields -->
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+       asteroidField(cField2[1], cField2[2], cField2[3], 20, 30, 4500, 500, 0)
+    ?>
+
+    <!-- Planets -->
+
+   <Planet
+        position="<?lua printC(cPlanet1) ?>"
+        scale="3000"
+        collisionType="dynamic"
+        linearDamping="0.8"
+        angularDamping="0"
+        mass="5000000"
+        pitch="0"
+        mesh="planets/muunilinst.mesh"
+        atmosphere="atmosphere1"
+        rotationaxis="1,0,0"
+        rotationrate="1.0"
+        atmospheresize="80.0f"
+        imagesize="1024.0f"
+        collisiondamage = 2
+        enablecollisiondamage = true
+    visible=true
+    active=true
+      >
+      <attached>
+        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
+        </attached>
+        <collisionShapes>
+            <SphereCollisionShape radius="3000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
+    ?>
+
+    <Planet
+        position="<?lua printC(cPlanet2) ?>"
+        scale="2000"
+        collisionType="dynamic"
+        linearDamping="0.8"
+        angularDamping="0"
+        mass="5000000"
+        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
+        visible=true
+        active=true
+      >
+      <attached>
+        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
+        </attached>
+          <collisionShapes>
+            <SphereCollisionShape radius="2000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
+    <?lua
+        dofile("includes/asteroidField.lua")
+        asteroidBelt(cPlanet2[1], cPlanet2[2], cPlanet2[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
+    ?>
+
+    <!-- EnemyPlanet -->
+
+    <Planet
+        position="<?lua printC(cEnemyBasePlanet) ?>"
+        scale="5000"
+        collisionType="dynamic"
+        linearDamping="0.8"
+        angularDamping="0"
+        mass="5000000"
+        pitch="0"
+        mesh="planets/jupiter.mesh"
+        atmosphere="atmosphere1"
+        rotationaxis="1,0,0"
+        rotationrate="1.0"
+        atmospheresize="80.0f"
+        imagesize="1024.0f"
+        collisiondamage = 2
+        enablecollisiondamage = true
+        visible=false
+        active=false
+    >
+        <attached>
+           <ForceField position="0,0,0" rotationaxis="0.1,1,0.1"mode="sphere" diameter="10000" velocity="-500" />
+        </attached>
+        <events>
+            <activity>
+                <Trigger  name="enemyPlanetVisible" mode=and>
+                   <EventTrigger>
+                         <events>
+                             <trigger>
+                                 <EventListener event="cloakBeacon" />
+                             </trigger>
+                         </events>
+                     </EventTrigger>
+                     <EventTrigger invert=true>
+                         <events>
+                             <trigger>
+                                 <EventListener event="enemyPlanetMulti" />
+                             </trigger>
+                         </events>
+                     </EventTrigger>
+                 </Trigger>
+            </activity>
+            <visibility>
+                <Trigger  name="enemyPlanetVisible" mode=and>
+                   <EventTrigger>
+                         <events>
+                             <trigger>
+                                 <EventListener event="cloakBeacon" />
+                             </trigger>
+                         </events>
+                     </EventTrigger>
+                     <EventTrigger invert=true>
+                         <events>
+                             <trigger>
+                                 <EventListener event="enemyPlanetMulti" />
+                             </trigger>
+                         </events>
+                     </EventTrigger>
+                 </Trigger>
+            </visibility>
+        </events>
+        <collisionShapes>
+          <SphereCollisionShape position="0,0,0" radius=5000/>
+        </collisionShapes>
+    </Planet>
+
+    <!-- Pawn that represents the planet during destruction -->
+
+    <Pawn team=1 visible=false active=false scale=5000 health=500 name="enemyPlanet" position="<?lua printC(cEnemyBasePlanet) ?>" collisionType=dynamic mass=5000000 radarname="Enemy home planet">
+        <events>
+            <activity>
+                <EventListener event="allUnitsDown" />
+            </activity>
+            <visibility>
+                <EventListener event="allUnitsDown" />
+            </visibility>
+        </events>
+        <collisionShapes>
+          <SphereCollisionShape position="0,0,0" radius=5005/>
+        </collisionShapes>
+    </Pawn>
+    <!--SHIPS -->
+    <!-- one Controller to rule them all -->
+    <Pawn position = "100000, 100000, 100000">
+      <controller>
+        <MasterController>
+        </MasterController>
+      </controller>
+    </Pawn>
+    <!--Allied units-->
+
+    <?lua
+    for i = 1, allies, 1
+    do
+    rUnit = {-math.sin(math.pi*((i-1/2)/allies))*125, math.pow(-1,i)*80, math.cos(math.pi*((i-1/2)/allies))*800}
+    cAllyNow = addC(cAlly,rUnit)
+    ?>
+
+    <SpaceShip health=600 initialhealth=600 maxhealth=600 position="<?lua printC(cAllyNow) ?>" name="ally<?lua print(i) ?>.D">
+      <templates>
+        <Template link=ally />
+      </templates>
+      <controller>
+        <DivisionController name="allyController" team=0 formationMode="diamond" spread=100>
+          <actionpoints>
+              <?lua
+              for i = 1, 13, 1
+              do
+              ?>
+              <Actionpoint position="<?lua printC(addC(cPathToEntry[i], rUnit)) ?>" action="fly"/>
+              <?lua end ?>
+           </actionpoints>
+        </DivisionController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip health=600 initialhealth=600 maxhealth=600 position="<?lua printC(addC(cAllyNow,rSection)) ?>" lookat="0,0,0" name="ally<?lua print(i) ?>.S">
+      <templates>
+        <Template link=ally />
+      </templates>
+      <controller>
+        <SectionController name="allyController" team=0>
+        </SectionController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip health=600 initialhealth=600 maxhealth=600 position="<?lua printC(addC(cAllyNow,rWingman1)) ?>" lookat="0,0,0" name="ally<?lua print(i) ?>.W1">
+      <templates>
+        <Template link=ally />
+      </templates>
+      <controller>
+        <WingmanController name="allyController" team=0>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip health=600 initialhealth=600 maxhealth=600 position="<?lua printC(addC(cAllyNow,rWingman2)) ?>" lookat="0,0,0" name="ally<?lua print(i) ?>.W2">
+      <templates>
+        <Template link=ally />
+      </templates>
+      <controller>
+        <WingmanController name="allyController" team=0>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+
+    <?lua end ?>
+
+    <!-- Enemy Units -->
+
+    <?lua
+    for k = 1, enemies, 1
+    do
+    rUnit = {125 -math.sin(math.pi*((k-1/2)/enemies))*200, math.pow(-1,k)*300, math.cos(math.pi*((k-1/2)/enemies))*1000}
+    cEnemyNow = addC(cEnemy,rUnit)
+    ?>
+
+    <SpaceShip health=400 initialhealth=400 maxhealth=400 position="<?lua printC(cEnemyNow) ?>" name="enemy<?lua print(k) ?>">
+      <templates>
+        <Template link=enemy />
+      </templates>
+      <events>
+          <activity>
+              <EventListener event="cloakBeacon" />
+          </activity>
+          <visibility>
+              <EventListener event="cloakBeacon" />
+          </visibility>
+      </events>
+      <controller>
+        <DivisionController name="enemyController" active=false team=1 formationMode="diamond" spread=100>
+          <actionpoints>
+              <Actionpoint position="<?lua printC(cEnemyNow) ?>" action="fightall" />
+          </actionpoints>
+        </DivisionController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip health=400 initialhealth=400 maxhealth=400 position="<?lua printC(addC(cEnemyNow,rSection)) ?>" name="enemy<?lua print(k) ?>">
+      <templates>
+        <Template link=enemy />
+      </templates>
+      <events>
+          <activity>
+              <EventListener event="cloakBeacon" />
+          </activity>
+          <visibility>
+              <EventListener event="cloakBeacon" />
+          </visibility>
+      </events>
+      <controller>
+        <SectionController name="enemyController" active=false team=1>
+        </SectionController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip health=400 initialhealth=400 maxhealth=400 position="<?lua printC(addC(cEnemyNow,rWingman1)) ?>" lookat="0,0,0" name="enemy<?lua print(k) ?>">
+      <templates>
+        <Template link=enemy />
+      </templates>
+      <events>
+          <activity>
+              <EventListener event="cloakBeacon" />
+          </activity>
+          <visibility>
+              <EventListener event="cloakBeacon" />
+          </visibility>
+      </events>
+      <controller>
+        <WingmanController name="enemyController" active=false team=1>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip health=400 initialhealth=400 maxhealth=400 position="<?lua printC(addC(cEnemyNow,rWingman2)) ?>" name="enemy<?lua print(k) ?>">
+      <templates>
+        <Template link=enemy />
+      </templates>
+      <events>
+          <activity>
+              <EventListener event="cloakBeacon" />
+          </activity>
+          <visibility>
+              <EventListener event="cloakBeacon" />
+          </visibility>
+      </events>
+      <controller>
+        <WingmanController name="enemyController" active=false team=1>
+        </WingmanController>
+      </controller>
+    </SpaceShip>
+
+    <?lua end ?>
+
+    </Scene>
+</Level>
Index: /code/trunk/data/levels/templates/FPS.oxt
===================================================================
--- /code/trunk/data/levels/templates/FPS.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/FPS.oxt	(revision 11052)
@@ -24,4 +24,9 @@
       <BoxCollisionShape position="0,-25,0" halfExtents="15,20,15" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+    </explosion>
 
     <camerapositions>
Index: /code/trunk/data/levels/templates/FPS_HS14.oxt
===================================================================
--- /code/trunk/data/levels/templates/FPS_HS14.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/FPS_HS14.oxt	(revision 11052)
@@ -29,4 +29,9 @@
       <CameraPosition position="-1,1,2.2" drag=false mouselook=true />
     </camerapositions>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+    </explosion>
 
     <?lua
Index: /code/trunk/data/levels/templates/HeavyCruiser.oxt
===================================================================
--- /code/trunk/data/levels/templates/HeavyCruiser.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/HeavyCruiser.oxt	(revision 11052)
@@ -19,6 +19,6 @@
    maxshieldhealth     = 50
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 300
@@ -383,4 +383,9 @@
         <BoxCollisionShape position="11,18,58" halfExtents="10,10,10" info="HOOK, frontR"/> -->
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsHeavyCruiser.oxi")
Index: /code/trunk/data/levels/templates/HeavyCruiserBody.oxt
===================================================================
--- /code/trunk/data/levels/templates/HeavyCruiserBody.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/HeavyCruiserBody.oxt	(revision 11052)
@@ -17,6 +17,6 @@
    maxshieldhealth     = 500
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 300
@@ -210,4 +210,9 @@
         <BoxCollisionShape position="11,18,58" halfExtents="10,10,10" info="frontR, HOOK"/> -->
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsHeavyCruiserBody.oxi")
Index: /code/trunk/data/levels/templates/ModularSpaceShipTest.oxt
===================================================================
--- /code/trunk/data/levels/templates/ModularSpaceShipTest.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/ModularSpaceShipTest.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 50
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 100
@@ -116,4 +116,10 @@
         <BoxCollisionShape position="0,0,0" halfExtents="30,30,30" />
     </collisionShapes>
+
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsAssff.oxi")
Index: /code/trunk/data/levels/templates/bigship.oxt
===================================================================
--- /code/trunk/data/levels/templates/bigship.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/bigship.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 50
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 30
@@ -83,4 +83,16 @@
       
     </collisionShapes>
+
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsbigship.oxi")
Index: /code/trunk/data/levels/templates/enemyInvader.oxt
===================================================================
--- /code/trunk/data/levels/templates/enemyInvader.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/enemyInvader.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 10
    shieldabsorption    = 0.9
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 150
@@ -55,4 +55,15 @@
       <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/invaderWeapon.oxi")
@@ -77,6 +88,6 @@
    maxshieldhealth     = 20
    shieldabsorption    = 0.9
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 150
Index: /code/trunk/data/levels/templates/pickupRepresentationTemplates.oxt
===================================================================
--- /code/trunk/data/levels/templates/pickupRepresentationTemplates.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/pickupRepresentationTemplates.oxt	(revision 11052)
@@ -1,2 +1,79 @@
+<!-- Boost pickups: -->
+
+<Template name=smallboostpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Flash" scale=0.3 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=smallboostpickup baseclass=BoostPickup>
+  <BoostPickup
+    representation = "smallboostpickup"
+    boostrefill = 0.5
+    activationType = "immediate"
+    durationType = "once"
+  />
+</Template>
+
+<Template name=mediumboostpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Flash" scale=0.5 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=mediumboostpickup baseclass=BoostPickup>
+  <BoostPickup
+    representation = "mediumboostpickup"
+    boostrefill = 0.75
+    activationType = "immediate"
+    durationType = "once"
+  />
+</Template>
+
+<Template name=hugeboostpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.0,1.0,0.8" material="Flash" scale=0.7 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=hugeboostpickup baseclass=BoostPickup>
+  <BoostPickup
+    representation = "hugeboostpickup"
+    boostrefill = 1.0
+    activationType = "immediate"
+    durationType = "once"
+  />
+</Template>
+
 <!-- Shield pickups: -->
 
@@ -189,4 +266,104 @@
 </Template>
 
+<!-- Munition pickups: -->
+
+<Template name=smallmunitionpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="0.59,0.30,0.16" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.47,0.24,0.13" material="Munition" scale=0.3 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=smallmunitionpickup baseclass=MunitionPickup>
+  <MunitionPickup
+    representation = "smallmunitionpickup"
+    activationType = "immediate"
+    durationType = "once"
+  >
+    <munitioncontainers>
+        <MunitionContainer munitiontype="LaserMunition" munitionamount=16 magazinesamount=0 />
+        <MunitionContainer munitiontype="FusionMunition" munitionamount=8 magazinesamount=0 />
+        <MunitionContainer munitiontype="LightningMunition" munitionamount=8 magazinesamount=0 />
+    </munitioncontainers>
+  </MunitionPickup>
+</Template>
+
+<Template name=mediummunitionpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="0.59,0.30,0.16" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.47,0.24,0.13" material="Munition" scale=0.5 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=mediummunitionpickup baseclass=MunitionPickup>
+  <MunitionPickup
+    representation = "mediummunitionpickup"
+    activationType = "immediate"
+    durationType = "once"
+  >
+    <munitioncontainers>
+        <MunitionContainer munitiontype="LaserMunition" munitionamount=32 magazinesamount=0 />
+        <MunitionContainer munitiontype="FusionMunition" munitionamount=16 magazinesamount=0 />
+        <MunitionContainer munitiontype="LightningMunition" munitionamount=16 magazinesamount=0 />        
+        <MunitionContainer munitiontype="SplitMunition" munitionamount=8 magazinesamount=0 />
+        <MunitionContainer munitiontype="RocketMunition" munitionamount=0 magazinesamount=2 />
+        <MunitionContainer munitiontype="MineMunition" munitionamount=0 magazinesamount=2 />
+    </munitioncontainers>
+  </MunitionPickup>
+</Template>
+
+<Template name=hugemunitionpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="0.59,0.30,0.16" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.47,0.24,0.13" material="Munition" scale=0.7 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=hugemunitionpickup baseclass=MunitionPickup>
+  <MunitionPickup
+    representation = "hugemunitionpickup"
+    activationType = "immediate"
+    durationType = "once"
+  >
+    <munitioncontainers>
+        <MunitionContainer munitiontype="LaserMunition" munitionamount=64 magazinesamount=0 />
+        <MunitionContainer munitiontype="FusionMunition" munitionamount=32 magazinesamount=0 />
+        <MunitionContainer munitiontype="LightningMunition" munitionamount=32 magazinesamount=0 />        
+        <MunitionContainer munitiontype="SplitMunition" munitionamount=16 magazinesamount=0 />
+        <MunitionContainer munitiontype="RocketMunition" munitionamount=0 magazinesamount=10 />
+        <MunitionContainer munitiontype="IceMunition" munitionamount=0 magazinesamount=10 />
+        <MunitionContainer munitiontype="GravityBombMunition" munitionamount=0 magazinesamount=10 />
+        <MunitionContainer munitiontype="MineMunition" munitionamount=0 magazinesamount=10 />
+    </munitioncontainers>
+  </MunitionPickup>
+</Template>
+
 <!-- Meta pickups: -->
 
@@ -196,13 +373,17 @@
             <StaticEntity>
                 <attached>
-                    <Billboard position="0,0,0" colour="0.60,0.97,0.23" material="Sphere2" scale=0.1>
-                        <attached>
-                            <Billboard position="0,0,0" colour="0.40,0.81,0.10" material="Arrow" scale=0.65 />
-                        </attached>
-                    </Billboard>
-                </attached>
-            </StaticEntity>
-        </spawner-representation>
-    </PickupRepresentation>
+                    <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="ArrowUp" scale=0.65 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=usemetapickup baseclass=MetaPickup>
+  <MetaPickup representation="use" metaType="use" />
 </Template>
 
@@ -212,13 +393,57 @@
             <StaticEntity>
                 <attached>
-                    <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1>
-                        <attached>
-                            <Billboard position="0,0,0" colour="0.95,0.20,0.10" material="Arrow" scale=0.65 />
-                        </attached>
-                    </Billboard>
-                </attached>
-            </StaticEntity>
-        </spawner-representation>
-    </PickupRepresentation>
+                    <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="ArrowDown" scale=0.65 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=dropmetapickup baseclass=MetaPickup>
+  <MetaPickup representation="drop" metaType="drop" />
+</Template>
+
+<Template name=destroypickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Splash" scale=0.65 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=destroymetapickup baseclass=MetaPickup>
+  <MetaPickup representation="destroy" metaType="destroy" />
+</Template>
+
+<Template name=destroycarrierpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Asterisk" scale=0.65 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=destroycarriermetapickup baseclass=MetaPickup>
+  <MetaPickup representation="destroycarrier" metaType="destroyCarrier" />
 </Template>
 
@@ -232,5 +457,5 @@
                     <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
                         <attached>
-                            <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageSmall" scale=0.7 />
+                            <Billboard position="0,0,0" colour="0.70,0.10,0.10" material="Damage" scale=0.3 />
                         </attached>
                     </Billboard>
@@ -258,5 +483,5 @@
                     <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
                         <attached>
-                            <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageMedium" scale=0.7 />
+                            <Billboard position="0,0,0" colour="0.70,0.10,0.10" material="Damage" scale=0.5 />
                         </attached>
                     </Billboard>
@@ -277,5 +502,5 @@
 </Template>
 
-<Template name=largedamageboostpickupRepresentation>
+<Template name=hugedamageboostpickupRepresentation>
     <PickupRepresentation>
         <spawner-representation>
@@ -284,16 +509,16 @@
                     <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
                         <attached>
-                            <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageLarge" scale=0.7 />
-                        </attached>
-                    </Billboard>
-                </attached>
-            </StaticEntity>
-        </spawner-representation>
-    </PickupRepresentation>
-</Template>
-
-<Template name=largedamageboostpickup baseclass=DamageBoostPickup>
+                            <Billboard position="0,0,0" colour="0.70,0.10,0.10" material="Damage" scale=0.7 />                            
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=hugedamageboostpickup baseclass=DamageBoostPickup>
   <DamageBoostPickup
-    representation = "largedamageboostpickup"
+    representation = "hugedamageboostpickup"
     duration = 10.0
     damageMultiplier = 7.0
@@ -498,5 +723,5 @@
                     <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
                         <attached>
-                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.4 />
+                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.35 />
                         </attached>
                     </Billboard>
@@ -524,5 +749,5 @@
                     <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
                         <attached>
-                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.7 />
+                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.55 />
                         </attached>
                     </Billboard>
@@ -550,5 +775,5 @@
                     <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
                         <attached>
-                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=1.0 />
+                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.75 />
                         </attached>
                     </Billboard>
@@ -609,13 +834,13 @@
         </attached>
         <collisionShapes>
-            <BoxCollisionShape position="0,0,0"      halfExtents="1, 1, 1" />
+            <SphereCollisionShape position="0,0,0" radius=5 />
         </collisionShapes>
         <weaponslots>
-            <WeaponSlot position="    0,   0,0" />
+            <WeaponSlot position="0,0,0" />
         </weaponslots>
         <weaponsets>
             <WeaponSet firemode=0 />
         </weaponsets>
-        <weapons>
+        <weaponpacks>
             <WeaponPack>
                 <links>
@@ -631,5 +856,8 @@
                 </Weapon>
             </WeaponPack>
-        </weapons>
+        </weaponpacks>
+        <munition>
+            <LaserMunition initialmagazines=2 maxmagazines=2 munitionpermagazine=10 replenishamount=1 replenishinterval=0.5/>
+        </munition>
     </Drone>
 </Template>
Index: /code/trunk/data/levels/templates/spaceshipAssff.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipAssff.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipAssff.oxt	(revision 11052)
@@ -5,5 +5,4 @@
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
-   explosionchunks        = 6
 
    health            = 100
@@ -15,6 +14,6 @@
    maxshieldhealth     = 50
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 100
@@ -57,4 +56,14 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
+    <explosion>
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsAssff.oxi")
Index: /code/trunk/data/levels/templates/spaceshipAssff2.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipAssff2.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipAssff2.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 150
    shieldabsorption    = 0.95
-   reloadrate          = 5
-   reloadwaittime      = 0.5
+   shieldrechargerate  = 5
+   shieldrechargewaittime = 0.5
 
    primaryThrust     = 100
@@ -37,4 +37,6 @@
    linearDamping     = 0.7
    angularDamping    = 0.9999999
+
+   explosionSound = "sounds/Explosion2.ogg"
   >
     <engines>
@@ -55,4 +57,15 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsAssff2.oxi")
Index: /code/trunk/data/levels/templates/spaceshipCollateralDamage.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipCollateralDamage.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipCollateralDamage.oxt	(revision 11052)
@@ -16,6 +16,6 @@
    maxshieldhealth     = 50
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 100
@@ -62,4 +62,16 @@
 
     </collisionShapes>
+
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 
 
Index: /code/trunk/data/levels/templates/spaceshipDodgeRace.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipDodgeRace.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipDodgeRace.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 20
    shieldabsorption    = 0.1
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 150
@@ -60,4 +60,15 @@
       <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/invaderWeapon.oxi")
Index: /code/trunk/data/levels/templates/spaceshipEscort.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipEscort.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipEscort.oxt	(revision 11052)
@@ -5,5 +5,5 @@
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
-   explosionchunks        = 4
+   explosionchunks        = 10
 
    health            = 80
@@ -15,6 +15,6 @@
    maxshieldhealth     = 60
    shieldabsorption    = 0.9
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 150
@@ -56,4 +56,16 @@
       <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
     </collisionShapes>
+    <explosion>
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart mesh="explosionparts/escort_part_1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_3.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_4.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_5.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_6.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsEscort.oxi")
@@ -92,4 +104,7 @@
     <EffectContainer condition="idle">
       <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
+       />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=150 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=15 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
     </EffectContainer>
     <EffectContainer condition="not idle">
@@ -101,7 +116,8 @@
     </EffectContainer>
     <EffectContainer condition="normal or boost">
-      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 0, 10" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
-      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, 0, 10" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=5 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
     </EffectContainer>
+
     <EffectContainer condition="boost">
       <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 0, 10" colour="0.6, 0.8, 0.75, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
Index: /code/trunk/data/levels/templates/spaceshipEscortMine.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipEscortMine.oxt	(revision 11052)
+++ /code/trunk/data/levels/templates/spaceshipEscortMine.oxt	(revision 11052)
@@ -0,0 +1,127 @@
+<Template name=spaceshipescortmine>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipescortcameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 10
+
+   health            = 80
+   maxhealth         = 200
+   initialhealth     = 80
+
+   shieldhealth        = 35
+   initialshieldhealth = 35
+   maxshieldhealth     = 60
+   shieldabsorption    = 0.9
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
+
+   primaryThrust     = 150
+   auxilaryThrust    = 30
+   rotationThrust    = 50
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 20
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 6
+
+   collisionType     = "dynamic"
+   mass              = 80
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+  >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipescortengine />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipescortengine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=0 roll=0 scale=4 mesh="escortShip.mesh" />
+      <Model position="0,0,0" yaw=180 pitch=90 roll=0 scale=4 mesh="escortWeapon.mesh" />
+<!--Model mesh="cube.mesh" mass=10 position="0,0,3" scale3D="10,4,8" />
+<Model mesh="cube.mesh" mass=10 position="12.6,-2,3" scale3D="2.8,2.8,11" />
+<Model mesh="cube.mesh" mass=10 position="-12.6,-2,3" scale3D="2.8,2.8,11" />
+<Model mesh="cube.mesh" mass=10 position="0,0,-12" scale3D="4,4,7" /-->
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0    ,0 ,  3" halfExtents="10,   4,8" />
+      <BoxCollisionShape position="12.6 ,-2,  3" halfExtents="2.8,2.8,11"/>
+      <BoxCollisionShape position="-12.6,-2,  3" halfExtents="2.8,2.8,11"/>
+      <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
+    </collisionShapes>
+    <explosion>
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart mesh="explosionparts/escort_part_1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_3.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_4.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_5.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/escort_part_6.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
+<?lua
+  include("../includes/weaponSettingsEscortMine.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipescortcameras 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=spaceshipescortengine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2.2
+
+   speedfront     = 200
+   speedback      =  70
+   speedleftright =  70
+   speedupdown    =  70
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+
+   accelerationfront     = 700
+   accelerationbrake     = 700
+   accelerationback      =  125
+   accelerationleftright =  125
+   accelerationupdown    =  125
+  >
+    <EffectContainer condition="idle">
+      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
+       />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=150 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 0.5, 0.65, 1.0" width=15 length=15 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=2 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="not idle">
+      <FadingBillboard mainstate=activity active=false scale=0.09 position="12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.09 position="-12, -2, 13" colour="0.2, 1.0, 0.65, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+    <EffectContainer condition="normal or brake">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=5 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, -2, 14" colour="0.2, 1.0, 0.65, 1.0" width=15 length=1500 lifetime=2 elements=1 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="boost">
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position=" 12, 0, 10" colour="0.6, 0.8, 0.75, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+      <Backlight mainstate=activity active=false scale=0.33 name=bltest position="-12, 0, 10" colour="0.6, 0.8, 0.75, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+    </EffectContainer>
+
+  </MultiStateEngine>
+</Template>
Index: /code/trunk/data/levels/templates/spaceshipGhost.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipGhost.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipGhost.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 150
    shieldabsorption    = 0.9
-   reloadrate          = 3
-   reloadwaittime      = 0.0
+   shieldrechargerate  = 3
+   shieldrechargewaittime = 0.0
 
    primaryThrust     = 600
@@ -52,4 +52,15 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsGhost.oxi")
Index: /code/trunk/data/levels/templates/spaceshipH2.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipH2.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipH2.oxt	(revision 11052)
@@ -41,4 +41,15 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 
   </SpaceShip>
Index: /code/trunk/data/levels/templates/spaceshipHXY.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipHXY.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipHXY.oxt	(revision 11052)
@@ -35,4 +35,15 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 
 <?lua
Index: /code/trunk/data/levels/templates/spaceshipHXYSL.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipHXYSL.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipHXYSL.oxt	(revision 11052)
@@ -34,4 +34,15 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 
 <?lua
Index: /code/trunk/data/levels/templates/spaceshipHeartAttack.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipHeartAttack.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipHeartAttack.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 800
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 40
@@ -63,4 +63,15 @@
       <BoxCollisionShape position="-5,5,4.3"  halfExtents="1.4, 1.5, 1.4" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsHeartAttack.oxi")
Index: /code/trunk/data/levels/templates/spaceshipHover.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipHover.oxt	(revision 11052)
+++ /code/trunk/data/levels/templates/spaceshipHover.oxt	(revision 11052)
@@ -0,0 +1,109 @@
+<Template name=spaceshiphover>
+  <SpaceShip
+   hudtemplate            = spaceshiphoverhud
+   camerapositiontemplate = spaceshiphovercameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 6
+
+   health            = 100
+   maxhealth         = 200
+   initialhealth     = 100
+
+   shieldhealth        = 25
+   initialshieldhealth = 25
+   maxshieldhealth     = 40
+   shieldabsorption    = 0.6
+   reloadrate          = 2
+   reloadwaittime      = 0.5
+
+   primaryThrust     = 200
+   auxilaryThrust    = 30
+   rotationThrust    = 25
+
+   jumpBoost = 90
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 10
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   collisionType     = "dynamic"
+   mass              = 100
+   linearDamping     = 0.2
+   angularDamping    = 0.9999999
+  >
+    <engines>
+      <MultiStateEngine position=" 0, 0, 0" template=spaceshiphoverengine />
+    </engines>
+    <attached>
+      <Model position="0,0,-20" mesh="hovership_body.mesh" scale="5" yaw=180/>	
+      <Model position="0,0,-20" mesh="hovership_engine.mesh" scale="5" yaw=180/>	
+      <Model position="0,0,-20" mesh="hovership_gun.mesh" scale="5" yaw=180/>	
+      
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0,-2 ,7" halfExtents="7, 4 ,30" />
+    </collisionShapes>
+    <explosion>
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" scale=2 />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart mesh="explosionparts/pirate_part_1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/pirate_part_2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/pirate_part_3.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/pirate_part_4.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
+
+<?lua
+  include("../includes/weaponSettingsHover.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshiphovercameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,8, 5" drag=true mouselook=true />
+      <CameraPosition position="0,8,5" yaw="180" drag=true mouselook=true />
+    </camerapositions>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshiphoverengine baseclass=Engine>
+  <MultiStateEngine
+   boostfactor    = 2
+
+   speedfront     = 90
+   speedback      =  40
+   speedleftright =  40
+   speedupdown    =  40
+
+   accelerationfront     = 500
+   accelerationbrake     = 500
+   accelerationback      =  125
+   accelerationleftright =  125
+   accelerationupdown    =  125
+  >
+    <EffectContainer condition="not idle">
+      <FadingBillboard mainstate=activity active=false scale=0.02 position=" 1.3, 0, 15" colour="1.0, 0.65, 0.2, 1.0" material="Examples/FlareZwei" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.02 position=" 0, 0, 15" colour="1.0, 0.65, 0.2, 1.0" material="Examples/FlareZwei" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.02 position="-1.3, 0, 15" colour="1.0, 0.65, 0.2, 1.0" material="Examples/FlareZwei" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+      <Backlight mainstate=activity active=false scale=0.8 name=bltest position=" 0, 0,  40" colour="1.0, 0.65, 0.2, 1.0" width=10 length=800 lifetime=1 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+     
+    </EffectContainer>
+    <EffectContainer condition="boost">
+      <Backlight mainstate=activity active=false scale=0.8 name=bltest position="  0, 0, 40" colour="1.0, 0.65, 0.2, 1.0" width=10 length=1600 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="brake">
+      <FadingBillboard mainstate=activity active=false scale=0.5 position=" 0, 0, 40" colour="0.8, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      
+    </EffectContainer>
+  </MultiStateEngine>
+</Template>
Index: /code/trunk/data/levels/templates/spaceshipInvader.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipInvader.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipInvader.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 60
    shieldabsorption    = 0.9
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 150
@@ -59,4 +59,15 @@
       <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/invaderWeapon.oxi")
Index: /code/trunk/data/levels/templates/spaceshipPirate.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipPirate.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipPirate.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 40
    shieldabsorption    = 0.6
-   reloadrate          = 2
-   reloadwaittime      = 0.5
+   shieldrechargerate  = 2
+   shieldrechargewaittime = 0.5
 
    primaryThrust     = 100
@@ -53,4 +53,14 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
+    <explosion>
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" scale=2 />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart mesh="explosionparts/pirate_part_1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/pirate_part_2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/pirate_part_3.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="explosionparts/pirate_part_4.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 
 <?lua
Index: /code/trunk/data/levels/templates/spaceshipRace.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipRace.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipRace.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 50
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 100
@@ -57,4 +57,15 @@
 
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsAssff.oxi")
Index: /code/trunk/data/levels/templates/spaceshipRing.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipRing.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipRing.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 60
    shieldabsorption    = 0.9
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 150
@@ -53,4 +53,15 @@
       <BoxCollisionShape position="0,     0,-12" halfExtents="4  , 4 ,7" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsRing.oxi")
Index: /code/trunk/data/levels/templates/spaceshipShuttle.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipShuttle.oxt	(revision 11052)
+++ /code/trunk/data/levels/templates/spaceshipShuttle.oxt	(revision 11052)
@@ -0,0 +1,101 @@
+<Template name=spaceshipShuttle>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipTransportercameras
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 6
+
+   health            = 2000
+   maxhealth         = 2500
+   initialhealth     = 2000
+
+   primaryThrust     = 120;
+   auxilaryThrust    = 20;
+   rotationThrust    = 30;
+
+   collisionType     = "dynamic"
+   mass              = 1000
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+  >
+    <engines>
+      <MultiStateEngine position=" 0, 0, 0" template=spaceshipTransporterengine />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=180 pitch=0 roll=0 scale=10 mesh="Transporterspaceship.mesh" />
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position=" 0, 0, 20"      halfExtents=" 37, 25, 80" />
+      <BoxCollisionShape position=" 0, 21, 20"      halfExtents=" 37, 21, 80" />
+      <BoxCollisionShape position=" 0, 40, 110"      halfExtents=" 20, 10, 40" />
+      <BoxCollisionShape position=" 0, 45, 170"      halfExtents=" 33, 25, 20" />
+      <BoxCollisionShape position=" -60, 33, 0"      halfExtents=" 24, 16, 120" />
+      <BoxCollisionShape position=" 60, 33, 0"      halfExtents=" 24, 16, 120" />
+      <BoxCollisionShape position=" 0, 10, -90"      halfExtents=" 30, 25, 30" />
+      <BoxCollisionShape position=" 0, -3, -145"      halfExtents=" 20, 20, 30" />
+    </collisionShapes>
+
+<?lua
+  include("../includes/weaponSettingsTransporter.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipTransportercameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,90,350" drag=true mouselook=true />
+      <CameraPosition position="0,125, 400" drag=true mouselook=true />
+      <CameraPosition position="0,200,550" drag=true mouselook=true />
+    </camerapositions>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipTransporterengine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2
+
+   speedfront     = 120
+   speedback      =  20
+   speedleftright =  20
+   speedupdown    =  20
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+
+   accelerationfront     = 40
+   accelerationbrake     = 30
+   accelerationback      = 20
+   accelerationleftright =  20
+   accelerationupdown    =  20
+  >
+    <EffectContainer condition="idle">
+      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
+    </EffectContainer>
+    <EffectContainer condition="not idle">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or brake">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+      <Backlight mainstate=activity active=false scale=2 name=bltest position=" -80, 33, 100" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=2 name=bltest position=" 80, 33, 100" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=2 name=bltest position=" -75, 25, -57" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=2 name=bltest position=" 75, 25, -57" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="boost">
+      <Backlight mainstate=activity active=false scale=3 name=bltest position=" -80, 33, 100" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+      <Backlight mainstate=activity active=false scale=3 name=bltest position=" 80, 33, 100" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+      <Backlight mainstate=activity active=false scale=3 name=bltest position=" -75, 25, -57" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+      <Backlight mainstate=activity active=false scale=3 name=bltest position=" 75, 25, -57" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+    </EffectContainer>
+    <EffectContainer condition="brake">
+      <FadingBillboard mainstate=activity active=false scale=2 position=" -75, 33, 40" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=2 position=" 75, 33, 40" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=1 position=" -68, 25, -115" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=1 position=" 68, 25, -115" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+  </MultiStateEngine>
+</Template>
Index: /code/trunk/data/levels/templates/spaceshipSpacecruiser.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipSpacecruiser.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipSpacecruiser.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 90
    shieldabsorption    = 0.9
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 90
@@ -66,4 +66,15 @@
 
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsSpacecruiser.oxi")
Index: /code/trunk/data/levels/templates/spaceshipSwallow.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipSwallow.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipSwallow.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 80
    shieldabsorption    = 0.75
-   reloadrate          = 1.5
-   reloadwaittime      = 0.2
+   shieldrechargerate  = 1.5
+   shieldrechargewaittime = 0.2
 
    primaryThrust     = 600;
@@ -49,4 +49,15 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsSwallow.oxi")
Index: /code/trunk/data/levels/templates/spaceshipTransporter.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipTransporter.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipTransporter.oxt	(revision 11052)
@@ -34,4 +34,15 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 
 <?lua
Index: /code/trunk/data/levels/templates/spaceshipTransporterSL.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipTransporterSL.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipTransporterSL.oxt	(revision 11052)
@@ -34,4 +34,15 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 
 <?lua
Index: /code/trunk/data/levels/templates/spaceshipTurret.oxt
===================================================================
--- /code/trunk/data/levels/templates/spaceshipTurret.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/spaceshipTurret.oxt	(revision 11052)
@@ -15,6 +15,6 @@
    maxshieldhealth     = 50
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 100
@@ -44,4 +44,15 @@
         <SphereCollisionShape radius="10"   position = "0,0,0"/>
     </collisionShapes>
+    <explosion >
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_flash2" effect2="orxonox/explosion_flame2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_shockwave2" effect2="orxonox/explosion_sparks2" />
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="orxonox/explosion_streak2" effect2="orxonox/explosion_afterglow" />
+
+      <ExplosionPart minspeed=0 maxspeed=0 effect1="Orxonox/explosion2b" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="CockpitDebris.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="BodyDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris1.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+      <ExplosionPart mesh="WingDebris2.mesh" effect1="Orxonox/fire4" effect2="Orxonox/smoke6" />
+    </explosion>
 <?lua
   include("../includes/weaponSettingsTurret.oxi")
Index: /code/trunk/data/levels/templates/towerdefensetower.oxt
===================================================================
--- /code/trunk/data/levels/templates/towerdefensetower.oxt	(revision 11051)
+++ /code/trunk/data/levels/templates/towerdefensetower.oxt	(revision 11052)
@@ -4,6 +4,6 @@
 
    	explosionchunks        = 6
-	reloadrate=10 
-	reloadwaittime=5 
+	shieldrechargerate=10 
+	shieldrechargewaittime=5 
 	collisionType="none" 
 	pitch="0" 
Index: /code/trunk/data/levels/towerDefense.oxw
===================================================================
--- /code/trunk/data/levels/towerDefense.oxw	(revision 11051)
+++ /code/trunk/data/levels/towerDefense.oxw	(revision 11052)
@@ -39,6 +39,6 @@
   <TowerDefenseTower
   explosionchunks=6
-  reloadrate=10 
-  reloadwaittime=5 
+  shieldrechargerate=10 
+  shieldrechargewaittime=5 
   collisionType="none" 
   pitch="0" 
@@ -60,5 +60,5 @@
       <WeaponSet firemode=0 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -69,5 +69,8 @@
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LaserMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10 replenishamount=1 replenishinterval=0.3/>
+    </munition>
   </TowerDefenseTower>
 </Template>
@@ -76,6 +79,6 @@
   <TowerDefenseTower
   explosionchunks=6
-  reloadrate=10 
-  reloadwaittime=5 
+  shieldrechargerate=10 
+  shieldrechargewaittime=5 
   collisionType="none" 
   pitch="0" 
@@ -97,5 +100,5 @@
       <WeaponSet firemode=0 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -106,5 +109,8 @@
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <LightningMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+    </munition>
     <attached>
       <Backlight position="0,0,0" scale=2.0 colour="0.4, 0.0, 1.0" width=10 length=10 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
@@ -116,6 +122,6 @@
   <TowerDefenseTower
   explosionchunks=6
-  reloadrate=10 
-  reloadwaittime=5 
+  shieldrechargerate=10 
+  shieldrechargewaittime=5 
   collisionType="none" 
   pitch="0" 
@@ -137,5 +143,5 @@
       <WeaponSet firemode=0 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -146,5 +152,8 @@
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <SplitMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+    </munition>
   </TowerDefenseTower>
 </Template>
@@ -153,6 +162,6 @@
   <TowerDefenseTower
   explosionchunks=6
-  reloadrate=10 
-  reloadwaittime=5 
+  shieldrechargerate=10 
+  shieldrechargewaittime=5 
   collisionType="none" 
   pitch="0" 
@@ -174,5 +183,5 @@
       <WeaponSet firemode=0 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -180,8 +189,11 @@
         </links>
         <Weapon>
-          <RocketFire mode=0 munitionpershot=0 muzzleoffset="0,0,0" damage=2 shielddamage=4 />  
+          <RocketFire mode=0 munitionpershot=0 muzzleoffset="0,0,0" damage=2 shielddamage=4 fuel=10/>  
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <RocketMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+    </munition>
       <attached>
       <ParticleSpawner position="0,0,0" source="Orxonox/sparks" lifetime=3.0 autostart=1 loop=1 />
@@ -193,6 +205,6 @@
   <TowerDefenseTower
   explosionchunks=6
-  reloadrate=10 
-  reloadwaittime=5 
+  shieldrechargerate=10 
+  shieldrechargewaittime=5 
   collisionType="none" 
   pitch="0" 
@@ -214,5 +226,5 @@
       <WeaponSet firemode=0 />
     </weaponsets>
-    <weapons>
+    <weaponpacks>
       <WeaponPack>
         <links>
@@ -223,5 +235,8 @@
         </Weapon>
       </WeaponPack>
-    </weapons>
+    </weaponpacks>
+    <munition>
+      <IceMunition initialmagazines=1 maxmagazines=1 munitionpermagazine=10/>
+    </munition>
   </TowerDefenseTower>
 </Template>
@@ -243,6 +258,6 @@
    maxshieldhealth     = 15
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 1000
@@ -308,6 +323,6 @@
    maxshieldhealth     = 0
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 100
@@ -381,6 +396,6 @@
    maxshieldhealth     = 5
    shieldabsorption    = 0.8
-   reloadrate          = 1
-   reloadwaittime      = 1
+   shieldrechargerate  = 1
+   shieldrechargewaittime = 1
 
    primaryThrust     = 100
Index: /code/trunk/data/overlays/HUDTemplates3.oxo
===================================================================
--- /code/trunk/data/overlays/HUDTemplates3.oxo	(revision 11051)
+++ /code/trunk/data/overlays/HUDTemplates3.oxo	(revision 11052)
@@ -27,4 +27,22 @@
 </Template>
 
+<Template name="rockethud">
+  <OverlayGroup name = "rockethud" scale = "1, 1">
+    <HUDRocketFuelBar
+     name          = "RocketFuelBar1"
+     background    = "Orxonox/BarBackground"
+     size          = "0.40, 0.04"
+     position      = "0.0 , 1.0 "
+     pickpoint     = "0, 1"
+     correctaspect = true
+     iconmaterial  = "Orxonox/BarIconFuel"
+    >
+      <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
+      <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
+      <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
+    </HUDRocketFuelBar>
+  </OverlayGroup>
+</Template>
+
 <Template name="spaceshiphud">
   <OverlayGroup name = "spaceshiphud" scale = "1, 1">
@@ -34,16 +52,16 @@
      name              = "HealthBar1"
      background        = "Orxonox/HealthBarBackground"
-     size              = "0.35, 0.0875"
-     position          = "0.0 , 0.9 "
+     size              = "0.40, 0.08"
+     position          = "0.0 , 0.85 "
      pickpoint         = "0, 1"
      bartexture        = "healthbar_bar.png"
      textfont          = "VeraMono"
      textusebarcolour  = true
-     textsize          = 0.039
-     textoffset        = "0.315, 0.05"
+     textscale          = 0.4
+     textoffset        = "0.325, -0.825"
      textpickpoint     = "0, 0"
      textalign         = "right"
-     correctaspect     = false
-     textcorrectaspect = false
+     correctaspect     = true
+     iconmaterial      = "Orxonox/BarIconHealth"
     >
       <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
@@ -51,12 +69,27 @@
       <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
     </HUDHealthBar>
+
+    <HUDShieldBar
+     name          = "ShieldBar1"
+     background    = "Orxonox/BarBackground"
+     size          = "0.40, 0.04"
+     position      = "0.0 , 0.9 "
+     pickpoint     = "0, 1"
+     correctaspect = true
+     iconmaterial  = "Orxonox/BarIconShield"
+    >
+      <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
+      <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
+      <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
+    </HUDShieldBar>    
 
     <HUDSpeedBar
      name          = "SpeedBar1"
      background    = "Orxonox/BarBackground"
-     size          = "0.35, 0.05"
+     size          = "0.40, 0.04"
      position      = "0.0 , 0.95 "
      pickpoint     = "0, 1"
-     correctaspect = false
+     correctaspect = true
+     iconmaterial  = "Orxonox/BarIconSpeed"
     >
       <BarColour position = 0.0 colour = "0.7,0.5,0.2" />
@@ -67,9 +100,10 @@
     <HUDBoostBar
      name          = "BoostBar1"
-     backgroundtex = "bar1.png"
-     size          = "0.35, 0.05"
+     background    = "Orxonox/BarBackground"
+     size          = "0.40, 0.04"
      position      = "0.0 , 1.0 "
      pickpoint     = "0, 1"
-     correctaspect = false
+     correctaspect = true
+     iconmaterial  = "Orxonox/BarIconBoost"
     >
       <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
@@ -81,16 +115,16 @@
      name              = "EnemyHealthBar"
      background        = "Orxonox/HealthBarBackground"
-     size              = "0.35, 0.0875"
-     position          = "1 ,0.1"
-     pickpoint         = "1, 1"
+     size              = "0.4, 0.08"
+     position          = "1 ,0"
+     pickpoint         = "1, 0"
      bartexture        = "healthbar_bar.png"
      textfont          = "VeraMono"
      textusebarcolour  = true
-     textsize          = 0.039
-     textoffset        = "0.315, 0.05"
+     textscale         = 0.4
+     textoffset        = "-0.675, 0.175"
      textpickpoint     = "0, 0"
      textalign         = "right"
-     correctaspect     = false
-     textcorrectaspect = false
+     correctaspect     = true
+     iconmaterial      = "Orxonox/BarIconHealth"
     >
       <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
@@ -98,4 +132,18 @@
       <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
     </HUDEnemyHealthBar>
+
+    <HUDEnemyShieldBar
+     name          = "EnemyShieldBar1"
+     background    = "Orxonox/BarBackground"
+     size          = "0.40, 0.04"
+     position      = "1.0 , 0.1 "
+     pickpoint     = "1, 0"
+     correctaspect = true
+     iconmaterial  = "Orxonox/BarIconShield"
+    >
+      <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
+      <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
+      <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
+    </HUDEnemyShieldBar>   
 
     <HUDNavigation
@@ -127,4 +175,13 @@
      mapAngle3D   			= 0.6435011
     />
+
+    <HUDWeaponSystem
+     name                   = "WeaponSystem"
+     correctaspect          = true
+     position               = "0.01, 0.01"
+     pickpoint              = "0, 0"
+     visible                = "true"
+     weaponModeHUDSize      = "0.09, 0.03"
+    />
     
     <HUDTimer
Index: /code/trunk/data/overlays/HoverHUD.oxo
===================================================================
--- /code/trunk/data/overlays/HoverHUD.oxo	(revision 11052)
+++ /code/trunk/data/overlays/HoverHUD.oxo	(revision 11052)
@@ -0,0 +1,46 @@
+<Template name="HoverHUD">
+  <OverlayGroup name="HoverHUD" scale = "1, 1">
+  </OverlayGroup>
+</Template>
+
+
+<Template name="spaceshiphoverhud">
+  <OverlayGroup name = "spaceshiphoverhud" scale = "1, 1">
+    <TimeHUD
+     name       = "TimerHUD"
+     position  = "0.95, 0.02"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.05
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "right"
+    />
+
+    <FlagHUD
+     name      = "FlagHUD"
+     position  = "0.05, 0.02"
+     size      = "0.18, 0.05"
+    />
+
+    <HUDHealthBar
+     name              = "HealthBar1"
+     background        = "Orxonox/HealthBarBackground"
+     size              = "0.35, 0.0875"
+     position          = "0.0 , 0.97"
+     pickpoint         = "0, 1"
+     bartexture        = "healthbar_bar.png"
+     textfont          = "VeraMono"
+     textusebarcolour  = true
+     textscale          = 0.4
+     textoffset        = "0.325, -0.825"
+     textpickpoint     = "0, 0"
+     textalign         = "right"
+     correctaspect     = true
+     iconmaterial      = "Orxonox/BarIconHealth"
+    >
+      <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
+      <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
+      <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
+    </HUDHealthBar>
+ </OverlayGroup>
+</Template>
Index: /code/trunk/data/overlays/InvaderHUD.oxo
===================================================================
--- /code/trunk/data/overlays/InvaderHUD.oxo	(revision 11051)
+++ /code/trunk/data/overlays/InvaderHUD.oxo	(revision 11052)
@@ -99,10 +99,10 @@
      textfont          = "VeraMono"
      textusebarcolour  = true
-     textsize          = 0.039
-     textoffset        = "0.315, 0.05"
+     textscale          = 0.4
+     textoffset        = "0.325, -0.825"
      textpickpoint     = "0, 0"
      textalign         = "right"
-     correctaspect     = false
-     textcorrectaspect = false
+     correctaspect     = true
+     iconmaterial      = "Orxonox/BarIconHealth"
     >
       <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
Index: /code/trunk/data/overlays/jumpHUD.oxo
===================================================================
--- /code/trunk/data/overlays/jumpHUD.oxo	(revision 11051)
+++ /code/trunk/data/overlays/jumpHUD.oxo	(revision 11052)
@@ -37,21 +37,5 @@
      showFuel = false
      showMessages = true
-    />    
-
-  <HUDBar
-     name          = "SpeedBar1"
-     background    = "Orxonox/BarBackground"
-     size          = "0.35, 0.05"
-     position      = "0.0 , 1.0 "
-     pickpoint     = "0, 1"
-     correctaspect = false
-
-     initialvalue = 50
-
-     >
-      <BarColour position = 0.0 colour = "0.7,0.5,0.2" />
-      <BarColour position = 0.5 colour = "0.2,0.7,0.2" />
-      <BarColour position = 1.0 colour = "0.7,0.2,0.2" />
-    </HUDBar>
+    />
 
   </OverlayGroup>
Index: /code/trunk/data/particle/MineExpl.particle
===================================================================
--- /code/trunk/data/particle/MineExpl.particle	(revision 11052)
+++ /code/trunk/data/particle/MineExpl.particle	(revision 11052)
@@ -0,0 +1,95 @@
+particle_system Orxonox/MineExpl
+{
+	material PE/lensflare
+	particle_width 65.0
+	particle_height 40.0
+	quota 500
+	cull_each false
+	sorted false
+	local_space false
+	iteration_interval 0.0
+	nonvisible_update_timeout 0.0
+	billboard_type oriented_self
+	billboard_origin center
+	billboard_rotation_type vertex
+	point_rendering false
+	accurate_facing false
+
+	emitter Point
+	{
+		position 0.0 0.0 0.0
+		direction -1.0 0.0 0.0
+		angle 55
+		emission_rate 1250
+		velocity_min 300
+		velocity_max 300
+		time_to_live_min 1
+		time_to_live_max 2
+		duration_min 0.1
+		duration_max 0.1
+		repeat_delay_min 10
+		repeat_delay_max 10
+		colour_range_start 0 0.333333 1 1
+		colour_range_end 0 0.333333 1 1
+	}
+
+	emitter Point
+	{
+		position 0.0 0.0 0.0
+		direction 1.0 0.0 0.0
+		angle 55
+		emission_rate 200
+		velocity_min 300
+		velocity_max 300
+		time_to_live_min 2
+		time_to_live_max 2.5
+		duration_min 0.1
+		duration_max 0.1
+		repeat_delay_min 10
+		repeat_delay_max 10
+		colour_range_start 0 0.333333 1 1
+		colour_range_end 0 0.333333 1 1
+	}
+
+	emitter Point
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 0.0 -1.0
+		angle 55
+		emission_rate 1250
+		velocity_min 300
+		velocity_max 300
+		time_to_live_min 2
+		time_to_live_max 2.5
+		duration_min 0.1
+		duration_max 0.1
+		repeat_delay_min 10
+		repeat_delay_max 10
+		colour_range_start 0 0.333333 1 1
+		colour_range_end 0 0.333333 1 1
+	}
+
+	emitter Point
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 0.0 1.0
+		angle 55
+		emission_rate 1250
+		velocity_min 300
+		velocity_max 300
+		time_to_live_min 2
+		time_to_live_max 2.5
+		duration_min 0.1
+		duration_max 0.1
+		repeat_delay_min 10
+		repeat_delay_max 10
+		colour_range_start 0 0.333333 1 1
+		colour_range_end 0 0.333333 1 1
+	}
+
+	
+	affector Scaler
+	{
+		rate -2
+	}
+}
Index: /code/trunk/data/particle/MineExpl1.particle
===================================================================
--- /code/trunk/data/particle/MineExpl1.particle	(revision 11052)
+++ /code/trunk/data/particle/MineExpl1.particle	(revision 11052)
@@ -0,0 +1,47 @@
+particle_system Orxonox/MineExpl1
+{
+	material PE/lensflare
+	particle_width 35.0
+	particle_height 35.0
+	quota 500
+	cull_each false
+	sorted false
+	local_space false
+	iteration_interval 0.0
+	nonvisible_update_timeout 0.0
+	billboard_type oriented_self
+	billboard_origin center
+	billboard_rotation_type vertex
+	point_rendering false
+	accurate_facing false
+
+	emitter Point
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 1.0 0.0
+		angle 30
+		emission_rate 2000
+		velocity_min 300
+		velocity_max 300
+		time_to_live_min 3
+		time_to_live_max 4
+		duration_min 2.0
+		duration_max 2.5
+		repeat_delay	10
+		repeat_delay_min	10
+		repeat_delay_max	10
+		colour_range_start 0 0.333333 1 1
+		colour_range_end 0 0.333333 1 1
+	}
+
+	affector DirectionRandomiser
+	{
+		randomness 5
+		scope 1
+		keep_velocity true
+	}
+	affector Scaler
+	{
+		rate -2
+	}
+}
Index: /code/trunk/data/particle/MineExpl2.particle
===================================================================
--- /code/trunk/data/particle/MineExpl2.particle	(revision 11052)
+++ /code/trunk/data/particle/MineExpl2.particle	(revision 11052)
@@ -0,0 +1,47 @@
+particle_system Orxonox/MineExpl2
+{
+	material PE/lensflare
+	particle_width 35.0
+	particle_height 35.0
+	quota 500
+	cull_each false
+	sorted false
+	local_space false
+	iteration_interval 0.0
+	nonvisible_update_timeout 0.0
+	billboard_type oriented_self
+	billboard_origin center
+	billboard_rotation_type vertex
+	point_rendering false
+	accurate_facing false
+
+	emitter Point
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 -1.0 0.0
+		angle 30
+		emission_rate 2000
+		velocity_min 300
+		velocity_max 300
+		time_to_live_min 2
+		time_to_live_max 2.5
+		duration_min 0.5
+		duration_max 1.5
+		repeat_delay	10
+		repeat_delay_min	10
+		repeat_delay_max	10
+		colour_range_start 0 0.333333 1 1
+		colour_range_end 0 0.333333 1 1
+	}
+
+	affector DirectionRandomiser
+	{
+		randomness 5
+		scope 1
+		keep_velocity true
+	}
+	affector Scaler
+	{
+		rate -2
+	}
+}
Index: /code/trunk/data/particle/engine.particle
===================================================================
--- /code/trunk/data/particle/engine.particle	(revision 11052)
+++ /code/trunk/data/particle/engine.particle	(revision 11052)
@@ -0,0 +1,70 @@
+particle_system Orxonox/engine
+{
+	material PE/glowEffect
+	particle_width 10.0
+	particle_height 10.0
+	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 Ring
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 0.0 1.0
+		angle 0
+		width 0.5
+		height 0.5
+		depth 0
+		inner_width 0.99
+		inner_height 0.99
+		emission_rate 250
+		velocity_min 50
+		velocity_max 55
+		time_to_live_min 0.075
+		time_to_live_max 0.09
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 1 0.333333 0 1
+		colour_range_end 1 0.333333 0 1
+	}
+
+	emitter Ring
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 0.0 1.0
+		angle 0
+		width 0.5
+		height 0.5
+		depth 0
+		inner_width 0.1
+		inner_height 0.25
+		emission_rate 250
+		velocity_min 50
+		velocity_max 55
+		time_to_live_min 0.1
+		time_to_live_max 0.125
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 1 0 0 1
+		colour_range_end 1 0 0 1
+	}
+
+	affector Scaler
+	{
+		rate -40
+	}
+}
Index: /code/trunk/data/particle/engineglow.particle
===================================================================
--- /code/trunk/data/particle/engineglow.particle	(revision 11051)
+++ /code/trunk/data/particle/engineglow.particle	(revision 11052)
@@ -1,40 +1,114 @@
-
 particle_system Orxonox/engineglow
 {
-	quota	200
-	material	PE/bigFlame
-	particle_width	12
-	particle_height	12
-	cull_each	false
-	renderer	billboard
-	billboard_type	point
+	material PE/glowEffect
+	particle_width 100.0
+	particle_height 100.0
+	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 HollowEllipsoid
+	emitter Ring
 	{
-		angle	0
-		colour	0.46875 0.8125 0.93359375 1
-		colour_range_start	.6640625 .91796875 .92578125 1
-		colour_range_end	.08203125 .7578125 .98046875 1
-		direction	0 1 0
-		emission_rate	45
-		position	0 0 0
-		velocity	5
-		velocity_min	4
-		velocity_max	6
-		time_to_live	0.5
-		time_to_live_min	0.2
-		time_to_live_max	0.9
-		duration	0
-		duration_min	0
-		duration_max	0
-		repeat_delay	0
-		repeat_delay_min	0
-		repeat_delay_max	0
-		width	4
-		height	2.5
-		depth	1.3
-		inner_width	0.5
-		inner_height	0.3
-		inner_depth	0.2
+		position 0.0 0.0 0.0
+		direction 0.0 0.0 1.0
+		angle 0
+		width 150
+		height 150
+		depth 1
+		inner_width 0.99
+		inner_height 0.99
+		emission_rate 30
+		velocity_min 20
+		velocity_max 20
+		time_to_live_min 5
+		time_to_live_max 5
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 0.666667 1 0 1
+		colour_range_end 0 1 0 1
+	}
+
+	emitter Ring
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 0.0 1.0
+		angle 0
+		width 130
+		height 130
+		depth 0
+		inner_width 0.99
+		inner_height 0.99
+		emission_rate 10
+		velocity_min 200
+		velocity_max 200
+		time_to_live_min 0.75
+		time_to_live_max 0.75
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 1 1 0 1
+		colour_range_end 1 1 0.498039 1
+	}
+
+	emitter Ring
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 0.0 1.0
+		angle 0
+		width 80
+		height 80
+		depth 0
+		inner_width 0.99
+		inner_height 0.99
+		emission_rate 57.89
+		velocity_min 250
+		velocity_max 250
+		time_to_live_min 1
+		time_to_live_max 1
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 1 0.333333 0 1
+		colour_range_end 1 0.333333 0 1
+	}
+
+	emitter Ring
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 0.0 1.0
+		angle 0
+		width 50
+		height 50
+		depth 0
+		inner_width 0.01
+		inner_height 0.5
+		emission_rate 37.89
+		velocity_min 300
+		velocity_max 300
+		time_to_live_min 1.5
+		time_to_live_max 1.5
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 1 0 0 1
+		colour_range_end 1 0 0 1
+	}
+
+	affector Scaler
+	{
+		rate -20
 	}
 }
Index: /code/trunk/data/particle/ice.particle
===================================================================
--- /code/trunk/data/particle/ice.particle	(revision 11052)
+++ /code/trunk/data/particle/ice.particle	(revision 11052)
@@ -0,0 +1,59 @@
+particle_system Orxonox/ice
+{
+	material PE/iceCrystal
+	particle_width 5
+	particle_height 5
+	quota 7000
+	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 Box
+	{
+		position 0.0 0.0 0.0
+		direction 1.0 1.0 1.0
+		angle 45
+		width 20
+		height 20
+		depth 20
+		emission_rate 200
+		velocity_min 1
+		velocity_max 1
+		time_to_live_min 3
+		time_to_live_max 6
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 1 1 1 1
+		colour_range_end 0.9 1 1 1
+	}
+
+	affector LinearForce
+	{
+		force_vector 0.0 -0.5 1.0
+		force_application add
+	}
+
+	affector DirectionRandomiser
+	{
+		randomness 50
+		scope 100
+		keep_velocity true
+	}
+
+	affector Rotator
+	{
+		rotation_speed_range_start 43.26
+		rotation_speed_range_end 0
+		rotation_range_start 0
+		rotation_range_end 0
+	}
+}
Index: /code/trunk/data/particle/mineparticle.particle
===================================================================
--- /code/trunk/data/particle/mineparticle.particle	(revision 11052)
+++ /code/trunk/data/particle/mineparticle.particle	(revision 11052)
@@ -0,0 +1,53 @@
+particle_system Orxonox/mineparticle
+{
+	material PE/lensflare
+	particle_width 5.0
+	particle_height 5.0
+	quota 2000
+	cull_each true
+	sorted true
+	local_space false
+	iteration_interval 0.0
+	nonvisible_update_timeout 0.0
+	billboard_type point
+	billboard_origin bottom_right
+	billboard_rotation_type vertex
+	point_rendering false
+	accurate_facing false
+
+	emitter HollowEllipsoid
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 0.0 1.0
+		angle 0
+		width 20
+		height 20
+		depth 20
+		inner_width 0.99
+		inner_height 0.99
+		inner_depth 0.99
+		emission_rate 20.12
+		velocity_min 1
+		velocity_max 1
+		time_to_live_min 5
+		time_to_live_max 5
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 1 0 0 1
+		colour_range_end 1 0 0 1
+	}
+
+	affector Scaler
+	{
+		rate -2
+	}
+	affector Rotator
+	{
+		rotation_speed_range_start 100
+		rotation_speed_range_end 500
+		rotation_range_start 0
+		rotation_range_end 180
+	}
+}
Index: /code/trunk/data/particle/psygun.particle
===================================================================
--- /code/trunk/data/particle/psygun.particle	(revision 11052)
+++ /code/trunk/data/particle/psygun.particle	(revision 11052)
@@ -0,0 +1,62 @@
+particle_system Orxonox/psygun
+{
+	material PE/glowEffect
+	particle_width 200.0
+	particle_height 200.0
+	quota 300
+	cull_each false
+	sorted false
+	local_space false
+	iteration_interval 0.0
+	nonvisible_update_timeout 0.0
+	billboard_type point
+	billboard_origin top_right
+	billboard_rotation_type vertex
+	point_rendering false
+	accurate_facing true
+
+	emitter Point
+	{
+		position 0.0 0.0 0.0
+		direction 0.0 1.0 0.0
+		angle 154.8
+		emission_rate 400
+		velocity_min 100
+		velocity_max 300
+		time_to_live_min 0
+		time_to_live_max 3.38
+		duration_min 1
+		duration_max 1
+		repeat_delay_min 0.11
+		repeat_delay_max 2.81
+		colour_range_start 0.666667 0 0.498039 1
+		colour_range_end 1 0 0.498039 1
+	}
+
+	affector LinearForce
+	{
+		force_vector 0.0 12.32 0.0
+		force_application add
+	}
+
+	affector Rotator
+	{
+		rotation_speed_range_start 100
+		rotation_speed_range_end 500
+		rotation_range_start 0
+		rotation_range_end 180
+	}
+
+	affector Scaler
+	{
+		rate -98.82
+	}
+
+	affector ColourFader
+	{
+		red -0.93
+		green -1
+		blue 1
+		alpha -1
+	}
+}
Index: /code/trunk/data/particle/rocketfire.particle
===================================================================
--- /code/trunk/data/particle/rocketfire.particle	(revision 11051)
+++ /code/trunk/data/particle/rocketfire.particle	(revision 11052)
@@ -1,50 +1,63 @@
 particle_system Orxonox/rocketfire
 {
-	quota	300
-	material	PE/explosion
-	particle_width	15
-	particle_height	5
-	cull_each	false
-	renderer	billboard
-	sorted	false
-	local_space	false
-	iteration_interval	0
-	nonvisible_update_timeout	0
-	billboard_type	point
-	billboard_origin	center
-	billboard_rotation_type	texcoord
-	common_up_vector	0 1 0
-	point_rendering	false
-	accurate_facing	false
+	material PE/glowEffect
+	particle_width 2
+	particle_height 2
+	quota 10000
+	cull_each true
+	sorted true
+	local_space true
+	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 Ellipsoid
 	{
-		angle	2
-		colour	1 0.682759 1 1
-		colour_range_start	1 0.682759 1 1
-		colour_range_end	1 0.682759 1 1
-		direction	0 0 1
-		emission_rate	1200
-		position	0 0 3
-		velocity	10
-		velocity_min	10
-		velocity_max	48
-		time_to_live	0.1
-		time_to_live_min	0.1
-		time_to_live_max	0.2
-		duration	0
-		duration_min	0
-		duration_max	0
-		repeat_delay	0
-		repeat_delay_min	0
-		repeat_delay_max	0
-		width	1.5
-		height	1.5
-		depth	10
+		position 0.05 0.0 2.0
+		direction 0.0 0.0 1.0
+		angle 0
+		width 0
+		height 0
+		depth 0
+		emission_rate 1200
+		velocity_min 10
+		velocity_max 20
+		time_to_live_min 0.1
+		time_to_live_max 0.1
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 1 0.333333 0 1
+		colour_range_end 1 0 0 1
+	}
+	emitter Ellipsoid
+	{
+		position 0.05 0.0 2.0
+		direction 0.0 0.0 1.0
+		angle 0
+		width 0
+		height 0
+		depth 0
+		emission_rate 100
+		velocity_min 5
+		velocity_max 10
+		time_to_live_min 0.1
+		time_to_live_max 0.1
+		duration_min 0
+		duration_max 0
+		repeat_delay_min 0
+		repeat_delay_max 0
+		colour_range_start 0.2 0.5 0.65
+		colour_range_end 0.25 0.55 0.7
 	}
 
 	affector Scaler
 	{
-		rate	-20
+		rate -8
 	}
 }
Index: /code/trunk/src/libraries/core/CoreConfig.cc
===================================================================
--- /code/trunk/src/libraries/core/CoreConfig.cc	(revision 11051)
+++ /code/trunk/src/libraries/core/CoreConfig.cc	(revision 11052)
Index: /code/trunk/src/libraries/core/CoreConfig.h
===================================================================
--- /code/trunk/src/libraries/core/CoreConfig.h	(revision 11051)
+++ /code/trunk/src/libraries/core/CoreConfig.h	(revision 11052)
Index: /code/trunk/src/libraries/core/GUIManager.cc
===================================================================
--- /code/trunk/src/libraries/core/GUIManager.cc	(revision 11051)
+++ /code/trunk/src/libraries/core/GUIManager.cc	(revision 11052)
@@ -36,4 +36,8 @@
 #include <OgreRenderWindow.h>
 
+extern "C" {
+#include <lua.h>
+}
+
 #if CEGUI_VERSION >= 0x000800
 #   include <CEGUI/DefaultLogger.h>
@@ -251,7 +255,26 @@
     /*static*/ const std::string GUIManager::defaultScheme_ = "TaharezGreen"; //Alternative: Orxonox (not fully complete yet, see the graphics menu)
 
-    SetConsoleCommand("showGUI", &GUIManager::showGUI).defaultValue(1, false).defaultValue(2, false);
-    SetConsoleCommand("hideGUI", &GUIManager::hideGUI);
-    SetConsoleCommand("toggleGUI", &GUIManager::toggleGUI).defaultValue(1, false).defaultValue(2, false);
+    namespace autocompletion
+    {
+        /**
+            @brief Returns the names of all currently existing OverlayGroups.
+        */
+        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(guinames)();
+        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(guinames)()
+        {
+            ArgumentCompletionList names;
+            const std::vector<std::string> guis = GUIManager::getInstance().getLoadedGUIs();
+            for (size_t i = 0; i < guis.size(); ++i)
+                names.push_back(ArgumentCompletionListElement(guis[i], getLowercase(guis[i])));
+            return names;
+        }
+    }
+
+    SetConsoleCommand("showGUI", &GUIManager::showGUI).defaultValue(1, false).defaultValue(2, false)
+            .argumentCompleter(0, autocompletion::guinames());
+    SetConsoleCommand("hideGUI", &GUIManager::hideGUI)
+            .argumentCompleter(0, autocompletion::guinames());
+    SetConsoleCommand("toggleGUI", &GUIManager::toggleGUI).defaultValue(1, false).defaultValue(2, false)
+            .argumentCompleter(0, autocompletion::guinames());
 
     RegisterAbstractClass(GUIManager).inheritsFrom<WindowEventListener>();
@@ -489,4 +512,26 @@
     {
         this->luaState_->doString(str, rootFileInfo_);
+    }
+
+    std::vector<std::string> GUIManager::getLoadedGUIs()
+    {
+        // TODO: is there a better way to read back a return value from lua? i.e. by using LuaState?
+        lua_State* L = this->luaState_->getInternalLuaState();
+
+        // push function
+        lua_getglobal(L, "getLoadedSheets");
+
+        // do the call (0 arguments, 1 result)
+        if (lua_pcall(L, 0, 1, 0) != 0)
+          orxout(internal_error) << "error running function: " << lua_tostring(L, -1) << endl;
+
+        // retrieve result
+        if (!lua_isstring(L, -1))
+          orxout(internal_error) << "function must return a string" << endl;
+        std::string value = lua_tostring(L, -1);
+        lua_pop(L, 1);
+
+        SubString tokens(value, ",");
+        return tokens.getAllStrings();
     }
 
Index: /code/trunk/src/libraries/core/GUIManager.h
===================================================================
--- /code/trunk/src/libraries/core/GUIManager.h	(revision 11051)
+++ /code/trunk/src/libraries/core/GUIManager.h	(revision 11052)
@@ -107,4 +107,6 @@
         void preUpdate(const Clock& time);
 
+        std::vector<std::string> getLoadedGUIs();
+
         void loadGUI(const std::string& name);
         static void showGUI(const std::string& name, bool bHidePrevious = false, bool bNoInput = false);
Index: /code/trunk/src/libraries/core/GameConfig.cc
===================================================================
--- /code/trunk/src/libraries/core/GameConfig.cc	(revision 11051)
+++ /code/trunk/src/libraries/core/GameConfig.cc	(revision 11052)
Index: /code/trunk/src/libraries/core/GameConfig.h
===================================================================
--- /code/trunk/src/libraries/core/GameConfig.h	(revision 11051)
+++ /code/trunk/src/libraries/core/GameConfig.h	(revision 11052)
Index: /code/trunk/src/libraries/core/command/ArgumentCompletionFunctions.h
===================================================================
--- /code/trunk/src/libraries/core/command/ArgumentCompletionFunctions.h	(revision 11051)
+++ /code/trunk/src/libraries/core/command/ArgumentCompletionFunctions.h	(revision 11052)
@@ -161,6 +161,6 @@
 */
 #define ARGUMENT_COMPLETION_FUNCTION_DECLARATION(functionname) \
-    _CoreExport ArgumentCompleter* functionname(); \
-    _CoreExport ArgumentCompletionList acf_##functionname
+    ArgumentCompleter* functionname(); \
+    ArgumentCompletionList acf_##functionname
 
 /**
@@ -196,14 +196,14 @@
     namespace autocompletion
     {
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(fallback)();
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(groupsandcommands)(const std::string& fragment);
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(subcommands)(const std::string& fragment, const std::string& group);
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(command)(const std::string& fragment);
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(hiddencommand)(const std::string& fragment);
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(files)(const std::string& fragment);
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(settingssections)();
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(settingsentries)(const std::string& fragment, const std::string& section);
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(settingsvalue)(const std::string& fragment, const std::string& entry, const std::string& section);
-        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(tclthreads)();
+        _CoreExport ARGUMENT_COMPLETION_FUNCTION_DECLARATION(fallback)();
+        _CoreExport ARGUMENT_COMPLETION_FUNCTION_DECLARATION(groupsandcommands)(const std::string& fragment);
+        _CoreExport ARGUMENT_COMPLETION_FUNCTION_DECLARATION(subcommands)(const std::string& fragment, const std::string& group);
+        _CoreExport ARGUMENT_COMPLETION_FUNCTION_DECLARATION(command)(const std::string& fragment);
+        _CoreExport ARGUMENT_COMPLETION_FUNCTION_DECLARATION(hiddencommand)(const std::string& fragment);
+        _CoreExport ARGUMENT_COMPLETION_FUNCTION_DECLARATION(files)(const std::string& fragment);
+        _CoreExport ARGUMENT_COMPLETION_FUNCTION_DECLARATION(settingssections)();
+        _CoreExport ARGUMENT_COMPLETION_FUNCTION_DECLARATION(settingsentries)(const std::string& fragment, const std::string& section);
+        _CoreExport ARGUMENT_COMPLETION_FUNCTION_DECLARATION(settingsvalue)(const std::string& fragment, const std::string& entry, const std::string& section);
+        _CoreExport ARGUMENT_COMPLETION_FUNCTION_DECLARATION(tclthreads)();
     }
 }
Index: /code/trunk/src/libraries/core/command/ConsoleCommandIncludes.cc
===================================================================
--- /code/trunk/src/libraries/core/command/ConsoleCommandIncludes.cc	(revision 11051)
+++ /code/trunk/src/libraries/core/command/ConsoleCommandIncludes.cc	(revision 11052)
Index: /code/trunk/src/libraries/core/command/ConsoleCommandManager.cc
===================================================================
--- /code/trunk/src/libraries/core/command/ConsoleCommandManager.cc	(revision 11051)
+++ /code/trunk/src/libraries/core/command/ConsoleCommandManager.cc	(revision 11052)
Index: /code/trunk/src/libraries/core/commandline/CMakeLists.txt
===================================================================
--- /code/trunk/src/libraries/core/commandline/CMakeLists.txt	(revision 11051)
+++ /code/trunk/src/libraries/core/commandline/CMakeLists.txt	(revision 11052)
Index: /code/trunk/src/libraries/core/input/KeyBinder.cc
===================================================================
--- /code/trunk/src/libraries/core/input/KeyBinder.cc	(revision 11051)
+++ /code/trunk/src/libraries/core/input/KeyBinder.cc	(revision 11052)
@@ -359,4 +359,44 @@
     /**
     @brief
+        Return the first key name for a specific command in a human readable form
+    */
+    const std::string& KeyBinder::getBindingReadable(const std::string& commandName)
+    {
+        const std::string& binding = this->getBinding(commandName);
+
+        SubString substring = SubString(binding, ".");
+        std::string name;
+        std::string group;
+        switch(substring.size())
+        {
+            case 0:
+                return binding;
+            case 1:
+                return binding;
+            case 2:
+                group = substring[0];
+            default:
+                name = substring.subSet(1).join(".");
+        }
+
+        std::stringstream stream;
+        if(group.compare("Keys") == 0)
+            stream << "Key " << name.substr(3);
+        else if(group.compare("MouseButtons") == 0)
+            stream << "Mouse " << name;
+        else if(group.compare("JoyStickButtons") == 0)
+            stream << "Joystick " << name;
+        else if(group.compare("JoyStickAxes") == 0)
+            stream << "Joystick Axis" << name.substr(5, 6) << name.substr(name.find("Axis")+6);
+        else if(group.compare("MouseAxes") == 0)
+            stream << "Mouse " << name.substr(1,3) << " " << name.substr(0, 1) << "-Axis";
+        else
+            return binding;
+
+        return *(new std::string(stream.str()));
+    }
+
+    /**
+    @brief
         Get the number of different key bindings of a specific command.
     @param commandName
Index: /code/trunk/src/libraries/core/input/KeyBinder.h
===================================================================
--- /code/trunk/src/libraries/core/input/KeyBinder.h	(revision 11051)
+++ /code/trunk/src/libraries/core/input/KeyBinder.h	(revision 11052)
@@ -68,4 +68,5 @@
         const std::string& getBinding(const std::string& commandName); //tolua_export
         const std::string& getBinding(const std::string& commandName, unsigned int index); //tolua_export
+        const std::string& getBindingReadable(const std::string& commandName); //tolua_export
         unsigned int getNumberOfBindings(const std::string& commandName); //tolua_export
 
Index: /code/trunk/src/libraries/core/singleton/ScopedSingletonIncludes.cc
===================================================================
--- /code/trunk/src/libraries/core/singleton/ScopedSingletonIncludes.cc	(revision 11051)
+++ /code/trunk/src/libraries/core/singleton/ScopedSingletonIncludes.cc	(revision 11052)
Index: /code/trunk/src/libraries/core/singleton/ScopedSingletonIncludes.h
===================================================================
--- /code/trunk/src/libraries/core/singleton/ScopedSingletonIncludes.h	(revision 11051)
+++ /code/trunk/src/libraries/core/singleton/ScopedSingletonIncludes.h	(revision 11052)
Index: /code/trunk/src/libraries/network/NetworkFunctionIncludes.cc
===================================================================
--- /code/trunk/src/libraries/network/NetworkFunctionIncludes.cc	(revision 11051)
+++ /code/trunk/src/libraries/network/NetworkFunctionIncludes.cc	(revision 11052)
Index: /code/trunk/src/libraries/network/NetworkFunctionIncludes.h
===================================================================
--- /code/trunk/src/libraries/network/NetworkFunctionIncludes.h	(revision 11051)
+++ /code/trunk/src/libraries/network/NetworkFunctionIncludes.h	(revision 11052)
Index: /code/trunk/src/libraries/network/NetworkFunctionManager.cc
===================================================================
--- /code/trunk/src/libraries/network/NetworkFunctionManager.cc	(revision 11051)
+++ /code/trunk/src/libraries/network/NetworkFunctionManager.cc	(revision 11052)
Index: /code/trunk/src/libraries/network/NetworkFunctionManager.h
===================================================================
--- /code/trunk/src/libraries/network/NetworkFunctionManager.h	(revision 11051)
+++ /code/trunk/src/libraries/network/NetworkFunctionManager.h	(revision 11052)
Index: /code/trunk/src/libraries/tools/ParticleInterface.cc
===================================================================
--- /code/trunk/src/libraries/tools/ParticleInterface.cc	(revision 11051)
+++ /code/trunk/src/libraries/tools/ParticleInterface.cc	(revision 11052)
@@ -233,3 +233,8 @@
             this->particleSystem_->setKeepParticlesInLocalSpace(keep);
     }
+
+    void ParticleInterface::setDimensions(float scale)
+    {
+        this->particleSystem_->setDefaultDimensions(scale * this->particleSystem_->getDefaultWidth(), scale * this->particleSystem_->getDefaultHeight());
+    }
 }
Index: /code/trunk/src/libraries/tools/ParticleInterface.h
===================================================================
--- /code/trunk/src/libraries/tools/ParticleInterface.h	(revision 11051)
+++ /code/trunk/src/libraries/tools/ParticleInterface.h	(revision 11052)
@@ -75,4 +75,6 @@
             void setDetailLevel(unsigned int level);
 
+            void setDimensions(float scale);
+
         protected:
             virtual void changedTimeFactor(float factor_new, float factor_old);
Index: /code/trunk/src/libraries/util/Math.cc
===================================================================
--- /code/trunk/src/libraries/util/Math.cc	(revision 11051)
+++ /code/trunk/src/libraries/util/Math.cc	(revision 11052)
@@ -161,5 +161,5 @@
          - If the other object is exactly above me, the function returns <tt>Vector2(0, 0.5)</tt>.
     */
-    orxonox::Vector2 get2DViewcoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition)
+    orxonox::Vector2 get2DViewCoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition)
     {
         orxonox::Vector3 distance = otherposition - myposition;
Index: /code/trunk/src/libraries/util/Math.h
===================================================================
--- /code/trunk/src/libraries/util/Math.h	(revision 11051)
+++ /code/trunk/src/libraries/util/Math.h	(revision 11052)
@@ -91,5 +91,5 @@
     _UtilExport float getAngle(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& otherposition);
     _UtilExport orxonox::Vector2 get2DViewdirection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
-    _UtilExport orxonox::Vector2 get2DViewcoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
+    _UtilExport orxonox::Vector2 get2DViewCoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
     _UtilExport orxonox::Vector2 get3DProjection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle, const float detectionlimit);
     _UtilExport bool isObjectHigherThanShipOnMap(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle);
Index: /code/trunk/src/modules/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/CMakeLists.txt	(revision 11051)
+++ /code/trunk/src/modules/CMakeLists.txt	(revision 11052)
@@ -43,2 +43,3 @@
 ADD_SUBDIRECTORY(mini4dgame)
 ADD_SUBDIRECTORY(dodgerace)
+ADD_SUBDIRECTORY(hover)
Index: /code/trunk/src/modules/docking/DockingController.cc
===================================================================
--- /code/trunk/src/modules/docking/DockingController.cc	(revision 11051)
+++ /code/trunk/src/modules/docking/DockingController.cc	(revision 11052)
@@ -61,5 +61,5 @@
 
         float distance = (this->dock_->getWorldPosition() - entity->getPosition()).length();
-        Vector2 coord = get2DViewcoordinates(     // I don't understand this too
+        Vector2 coord = get2DViewCoordinates(     // I don't understand this too
             entity->getPosition(),
             entity->getOrientation() * WorldEntity::FRONT,
Index: /code/trunk/src/modules/dodgerace/DodgeRace.cc
===================================================================
--- /code/trunk/src/modules/dodgerace/DodgeRace.cc	(revision 11051)
+++ /code/trunk/src/modules/dodgerace/DodgeRace.cc	(revision 11052)
@@ -71,8 +71,12 @@
             for (int i = 0; i < 7; i++)
             {
-                BigExplosion* chunk = new BigExplosion(this->center_->getContext());
-                chunk->setPosition(Vector3(600, 0, 100.f * i - 300));
-                chunk->setVelocity(Vector3(1000, 0, 0));  //player->getVelocity()
-                chunk->setScale(20);
+                WeakPtr<ExplosionPart> chunk5 = new ExplosionPart(this->center_->getContext());
+                chunk5->setPosition(Vector3(600, 0, 100.f * i - 300));
+                chunk5->setVelocity(Vector3(1000, 0, 0));  //player->getVelocity()
+                chunk5->setScale(10);
+                chunk5->setEffect1("Orxonox/explosion2b");
+                chunk5->setEffect2("Orxonox/smoke6");
+                chunk5->Explode();
+
             }
         }
Index: /code/trunk/src/modules/dodgerace/DodgeRace.h
===================================================================
--- /code/trunk/src/modules/dodgerace/DodgeRace.h	(revision 11051)
+++ /code/trunk/src/modules/dodgerace/DodgeRace.h	(revision 11052)
@@ -56,5 +56,4 @@
 
 #include "core/command/ConsoleCommand.h"
-#include "worldentities/BigExplosion.h"
 
 #include "gametypes/Deathmatch.h"
Index: /code/trunk/src/modules/hover/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/hover/CMakeLists.txt	(revision 11052)
+++ /code/trunk/src/modules/hover/CMakeLists.txt	(revision 11052)
@@ -0,0 +1,20 @@
+SET_SOURCE_FILES(Hover_SRC_FILES
+  Hover.cc
+  HoverShip.cc
+  HoverWall.cc
+  HoverOrigin.cc
+  HoverFlag.cc
+  TimeHUD.cc
+  FlagHUD.cc
+  MazeGenerator.cc
+)
+
+ORXONOX_ADD_LIBRARY(hover
+  PLUGIN
+  FIND_HEADER_FILES
+  LINK_LIBRARIES
+    orxonox
+    objects
+    overlays
+  SOURCE_FILES ${Hover_SRC_FILES}
+)
Index: /code/trunk/src/modules/hover/FlagHUD.cc
===================================================================
--- /code/trunk/src/modules/hover/FlagHUD.cc	(revision 11052)
+++ /code/trunk/src/modules/hover/FlagHUD.cc	(revision 11052)
@@ -0,0 +1,106 @@
+/*
+ *   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:
+ *      Cyrill Burgener
+ *
+ */
+
+/**
+    @file FlagHUD.cc
+    @brief Implementation of the FlagHUD
+*/
+
+#include "FlagHUD.h"
+
+#include <OgreOverlayManager.h>
+#include <OgreMaterialManager.h>
+#include <OgrePanelOverlayElement.h>
+
+#include "util/StringUtils.h"
+#include "core/CoreIncludes.h"
+#include "Hover.h"
+
+namespace orxonox
+{
+    RegisterClass(FlagHUD);
+
+    FlagHUD::FlagHUD(Context* context) : OrxonoxOverlay(context)
+    {
+        RegisterObject(FlagHUD);
+
+        this->hoverGame_ = NULL;
+        this->panel_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
+            .createOverlayElement("Panel", "FlagHUD_Panel_" + getUniqueNumberString()));
+        this->panel_->setMaterialName("Hover/Flag");
+        this->overlay_->add2D(this->panel_);
+
+        this->flagCount_ = 5;
+        setFlagCount(5);
+    }
+
+    FlagHUD::~FlagHUD()
+    {
+        if (this->isInitialized())
+        {
+            Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->panel_);
+        }
+    }
+
+/**
+    @brief Sets the amount of flags displayed, once zero it does not reappear
+    @param flagCount
+*/
+    void FlagHUD::setFlagCount(int flagCount) {
+        if(flagCount == 0){
+            this->panel_->hide();
+            return;
+        }
+        this->panel_->setDimensions(
+            this->panel_->_getRelativeWidth() / ((float) flagCount_) * ((float) flagCount),
+            this->panel_->_getRelativeHeight()
+            );
+        this->panel_->setTiling(flagCount*1.0f, 1.0f);
+
+        this->flagCount_ = flagCount;
+    }
+
+    void FlagHUD::tick(float dt)
+    {
+        SUPER(FlagHUD, tick, dt);
+
+        setFlagCount(this->hoverGame_->getNumberOfFlags());
+    }
+
+    void FlagHUD::changedOwner()
+    {
+        SUPER(FlagHUD, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+        {
+            this->hoverGame_ = orxonox_cast<Hover*>(this->getOwner()->getGametype());
+        }
+        else
+        {
+            this->hoverGame_ = 0;
+        }
+    }
+}
Index: /code/trunk/src/modules/hover/FlagHUD.h
===================================================================
--- /code/trunk/src/modules/hover/FlagHUD.h	(revision 11052)
+++ /code/trunk/src/modules/hover/FlagHUD.h	(revision 11052)
@@ -0,0 +1,60 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Cyrill Burgener
+ *
+ */
+
+ /**
+    @file FlagHUD.h
+    @brief Declaration of the FlagHUD class.
+*/
+
+#ifndef _FlagHUD_H__
+#define _FlagHUD_H__
+
+#include "HoverPrereqs.h"
+
+#include "util/OgreForwardRefs.h"
+#include "overlays/OrxonoxOverlay.h"
+#include "tools/interfaces/Tickable.h"
+
+namespace orxonox
+{
+    class _HoverExport FlagHUD : public OrxonoxOverlay , public Tickable
+    {
+    public:
+        FlagHUD(Context* context);
+        virtual ~FlagHUD();
+
+        virtual void tick(float dt);
+        virtual void changedOwner();
+
+        void setFlagCount(int flagCount);
+
+    private:
+        Hover* hoverGame_;
+        Ogre::PanelOverlayElement* panel_;
+        int flagCount_;
+    };
+}
+#endif /* _FlagHUD_H__ */
Index: /code/trunk/src/modules/hover/Hover.cc
===================================================================
--- /code/trunk/src/modules/hover/Hover.cc	(revision 11052)
+++ /code/trunk/src/modules/hover/Hover.cc	(revision 11052)
@@ -0,0 +1,115 @@
+/*
+ *   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:
+ *      Manuel Meier
+ *   Co-authors:
+ *      Cyrill Burgener
+ *
+ */
+
+/**
+    @file Hover.cc
+    @brief Implementation of the Hover class. Sets up the whole Minigame
+*/
+
+#include "Hover.h"
+
+#include "HoverOrigin.h"
+#include "HoverWall.h"
+#include "HoverFlag.h"
+#include "MazeGenerator.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    RegisterUnloadableClass(Hover);
+
+    Hover::Hover(Context* context) : Gametype(context)
+    {
+        RegisterObject(Hover);
+
+        this->origin_ = NULL;
+        this->numberOfFlags_ = 1;
+        this->firstTick_ = true;
+
+        this->setHUDTemplate("HoverHUD");
+    }
+
+    void Hover::tick(float dt)
+    {
+        SUPER(Hover, tick, dt);
+
+        if(this->firstTick_ && this->origin_)
+        {
+            this->firstTick_ = false;
+
+            int numCells = this->origin_->getNumCells();
+            int cellSize = this->origin_->getCellSize();
+            int cellHeight = this->origin_->getCellHeight();
+
+            MazeGenerator generator(numCells);
+            generator.generateMaze();
+            generator.renderMaze();
+
+            int* levelcode = generator.getLevelcode();
+
+            //Outer Walls
+            for(int i = 0; i<numCells; i++){
+                (new HoverWall(origin_->getContext()))->init(0,        i+1,      cellSize, cellHeight, 1);
+                (new HoverWall(origin_->getContext()))->init(numCells, i+1,      cellSize, cellHeight, 1);
+                (new HoverWall(origin_->getContext()))->init(i+1,      0,        cellSize, cellHeight, 2);
+                (new HoverWall(origin_->getContext()))->init(i+1,      numCells, cellSize, cellHeight, 2);
+            }
+
+            //Generate inner Walls according to levelcode
+            for(int y=0; y<numCells; y++){
+                for(int x=0; x<numCells; x++){
+                    switch(levelcode[ y * numCells + x ]){
+                        case 1: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1);
+                                break;
+                        case 3: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 1);
+                        case 2: (new HoverWall(origin_->getContext()))->init(x+1, numCells-y, cellSize, cellHeight, 0);
+                        default: break;
+                    }
+                }   
+            }
+
+            //Generate 5 flags randomly
+            for ( int i = 0; i < 5; i++ )
+            {
+                HoverFlag* flag = new HoverFlag(origin_->getContext());
+                flag->init(rand()%numCells, rand()%numCells, cellSize);
+                flags_.push_back(flag);
+            }
+
+        }//firsttick end
+
+        // Check if ship collided with one of the flags
+        for ( unsigned int i = 0; i < flags_.size(); i++ ){
+            if(flags_[i]->getCollided()){
+                flags_[i]->destroyLater();
+                flags_.erase (flags_.begin()+i);
+            }
+        }
+        numberOfFlags_ = flags_.size();
+    }
+}
Index: /code/trunk/src/modules/hover/Hover.h
===================================================================
--- /code/trunk/src/modules/hover/Hover.h	(revision 11052)
+++ /code/trunk/src/modules/hover/Hover.h	(revision 11052)
@@ -0,0 +1,68 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Master of Desaster:
+ *      Manuel Meier
+ *   Co-authors:
+ *      Cyrill Burgener
+ *
+ */
+
+/**
+    @file Hover.h
+    @brief Gametype. For more information see .cc file
+    @ingroup Hover
+*/
+
+#ifndef _Hover_H__
+#define _Hover_H__
+
+#include "HoverPrereqs.h"
+
+#include <vector>
+
+#include "gametypes/Gametype.h"
+#include "HoverOrigin.h"
+
+namespace orxonox
+{
+    class _HoverExport Hover : public Gametype
+    {
+       public:
+            Hover(Context* context);
+
+            virtual void tick(float dt);          
+
+            void setOrigin(HoverOrigin* origin)
+                { this->origin_ = origin; }
+
+            inline int getNumberOfFlags() const
+                { return this->numberOfFlags_; }
+
+        private:
+            WeakPtr<HoverOrigin> origin_;
+            std::vector<HoverFlag*> flags_;
+            int numberOfFlags_;
+            bool firstTick_;
+    };
+}
+
+#endif /* _Hover_H__ */
Index: /code/trunk/src/modules/hover/HoverFlag.cc
===================================================================
--- /code/trunk/src/modules/hover/HoverFlag.cc	(revision 11052)
+++ /code/trunk/src/modules/hover/HoverFlag.cc	(revision 11052)
@@ -0,0 +1,109 @@
+/*
+ *   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:
+ *      Manuel Meier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file HoverFlag.cc
+    @brief The Flags that are being set in the Hover Minigame They support two coordinates from 0-9 each
+*/
+
+#include "HoverFlag.h"
+#include "HoverShip.h"
+
+#include "core/CoreIncludes.h"
+
+#include "graphics/Model.h"
+#include "objects/collisionshapes/BoxCollisionShape.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(HoverFlag);
+
+    HoverFlag::HoverFlag(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(HoverFlag);
+
+        this->model_ = NULL;
+        this->cs_ = NULL;
+        this->collided_ = false;
+
+        this->enableCollisionCallback();
+        this->setCollisionResponse(true);
+        this->setCollisionType(Static);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    HoverFlag::~HoverFlag()
+    {
+        if (this->isInitialized())
+        {
+            if (this->model_)
+                this->model_->destroy();
+            if (this->cs_)
+                this->cs_->destroy();
+        }
+    }
+
+    /**
+    @brief
+        Initializes the flag.
+    @param xCoordinate
+        X-Coordinate of the flage, 0-9, origin is bottom left
+    @param yCoordinate
+        Y-Coordinate of the flage, 0-9, origin is bottom left
+    */
+    void HoverFlag::init(int xCoordinate, int yCoordinate, int cellSize)
+    {
+        model_ = new Model(this->getContext());
+        model_->setMeshSource("ss_flag_eu.mesh");
+        model_->setScale3D(Vector3(5, 5, 5));
+        model_->setPosition(Vector3(xCoordinate*cellSize*1.0f + cellSize/2,10.0f,yCoordinate*cellSize*1.0f + cellSize/2));
+
+        this->attach(model_);
+
+        cs_ = new BoxCollisionShape(this->getContext());
+        cs_->setHalfExtents(Vector3(5, 5, 5));
+        cs_->setPosition(Vector3(xCoordinate*cellSize*1.0f + cellSize/2,0.0f,yCoordinate*cellSize*1.0f + cellSize/2));
+
+        this->attachCollisionShape(cs_);
+    }
+
+    /**
+    @brief
+        Checks if the Hovership collided with the flag
+    */
+    bool HoverFlag::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
+    {
+        if(otherObject->isA(Class(HoverShip)))
+            collided_ = true;
+        return false;
+    }
+}
Index: /code/trunk/src/modules/hover/HoverFlag.h
===================================================================
--- /code/trunk/src/modules/hover/HoverFlag.h	(revision 11052)
+++ /code/trunk/src/modules/hover/HoverFlag.h	(revision 11052)
@@ -0,0 +1,68 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Manuel Meier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file HoverFlag.h
+    @brief See .cc File
+    @ingroup Hover
+*/
+
+#ifndef _HoverFlag_H__
+#define _HoverFlag_H__
+
+#include "HoverPrereqs.h"
+#include "objects/ObjectsPrereqs.h"
+
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    class _HoverExport HoverFlag : public StaticEntity
+    {
+        public:
+            HoverFlag(Context* context);
+            virtual ~HoverFlag();
+
+            void init(int xCoordinate, int yCoordinate, int cellSize);
+
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint);            
+
+            inline bool getCollided() const
+                { return this->collided_; }
+            inline void setCollided(bool setValue)
+                { this->collided_ = setValue; }
+
+        private:
+            Model* model_;
+            BoxCollisionShape* cs_;
+            bool collided_;
+
+    };
+}
+
+#endif /* _HoverFlag_H__ */
Index: /code/trunk/src/modules/hover/HoverOrigin.cc
===================================================================
--- /code/trunk/src/modules/hover/HoverOrigin.cc	(revision 11052)
+++ /code/trunk/src/modules/hover/HoverOrigin.cc	(revision 11052)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Manuel Meier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file HoverOrigin.cc
+    @brief The HoverOrigin is a StaticEntity which represents the level of the minigame. All platforms, enemies and items are attached to the HoverOrigin.
+*/
+
+#include "HoverOrigin.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "Hover.h"
+
+namespace orxonox
+{
+    RegisterClass(HoverOrigin);
+
+    HoverOrigin::HoverOrigin(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(HoverOrigin);
+        checkGametype();
+    }
+
+    void HoverOrigin::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(HoverOrigin, XMLPort, xmlelement, mode);
+
+        XMLPortParam(HoverOrigin, "numCells", setNumCells, getNumCells, xmlelement, mode);
+        XMLPortParam(HoverOrigin, "cellSize", setCellSize, getCellSize, xmlelement, mode);
+        XMLPortParam(HoverOrigin, "cellHeight", setCellHeight, getCellHeight, xmlelement, mode);
+    }
+
+    void HoverOrigin::checkGametype()
+    {
+        if (getGametype() != NULL && this->getGametype()->isA(Class(Hover)))
+        {
+            Hover* hoverGametype = orxonox_cast<Hover*>(this->getGametype());
+            hoverGametype->setOrigin(this);
+        }
+    }
+}
Index: /code/trunk/src/modules/hover/HoverOrigin.h
===================================================================
--- /code/trunk/src/modules/hover/HoverOrigin.h	(revision 11052)
+++ /code/trunk/src/modules/hover/HoverOrigin.h	(revision 11052)
@@ -0,0 +1,137 @@
+/*
+ *   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:
+ *      Manuel Meier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HoverOrigin_H__
+#define _HoverOrigin_H__
+
+#include "HoverPrereqs.h"
+
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    
+    /**
+    @brief
+        The HoverOrigin implements the playing field @ref orxonox::Hover "Hover" takes place in and allows for many parameters of the minigame to be set.
+        The playing field resides in the x,z-plane, with the x-axis being the horizontal axis and the z-axis being the vertical axis.
+        
+        Various parameters can be set:
+        - The <b>dimension</b> is a vector, that defines the width and height of the playing field. The default is <em>(200, 120)</em>.
+        - The <b>balltemplate</b> is a template that is applied to the @ref orxonox::HoverPlatform "HoverPlatform", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
+        - The <b>battemplate</b> is a template that is applied to the @ref orxonox::HoverPlatform "HoverFigure", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
+        - The <b>ballspeed</b> is the speed with which the @ref orxonox::HoverPlatform "HoverPlatform" moves. The default is <em>100</em>.
+        - The <b>ballaccfactor</b> is the acceleration factor for the @ref orxonox::HoverPlatform "HoverPlatform". The default is <em>1.0</em>.
+        - The <b>batspeed</b> is the speed with which the @ref orxonox::HoverFigure "HoverFigures" move. The default is <em>60</em>.
+        - The <b>batlength</b> is the length of the @ref orxonox::HoverFigure "HoverFigures" as the percentage of the height of the playing field. The default is <em>0.25</em>.
+        
+        An example in XML of the HoverOrigin would be:
+        
+        First the needed templates:
+        The template for the @ref orxonox::HoverPlatform "HoverPlatform".
+        @code
+        <Template name="Hoverball">
+          <HoverPlatform>
+            <attached>
+              <Model mesh="sphere.mesh" scale="2" />
+              <ParticleSpawner name="hiteffect" position="0,0,0" source="Orxonox/sparks2" lifetime="0.01" autostart="0" mainstate="spawn" />
+            </attached>
+            <eventlisteners>
+              <EventTarget target="hiteffect" />
+            </eventlisteners>
+          </HoverPlatform>
+        </Template>
+        @endcode
+        As can be seen, a sphere is attached as the @ref orxonox::Model "Model" for the @ref orxonox::HoverPlatform "HoverPlatform", and also an @ref orxonox::EventListener "EventListener" that triggers a @ref orxonox::ParticleSpawner "ParticleSpawner", whenever the ball hits the boundaries is attached.
+        
+        Additionally the template for the @ref orxonox::HoverFigure "HoverFigure".
+        @code
+        <Template name="Hoverbatcameras" defaults="0">
+          <HoverFigure>
+            <camerapositions>
+              <CameraPosition position="0,200,0" pitch="-90" absolute="true" />
+            </camerapositions>
+          </HoverFigure>
+        </Template>
+
+        <Template name="Hoverbat">
+          <HoverFigure camerapositiontemplate=Hoverbatcameras>
+            <attached>
+              <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
+            </attached>
+          </HoverFigure>
+        </Template>
+        @endcode
+        As can be seen, there are actually two templates. The first template is needed to set the camera for the @ref orxonox::HoverFigure "HoverFigure". The second template ist the actual template for the @ref orxonox::HoverFigure "HoverFigure", the template for the camera position is added and a @ref orxonox::Model "Model" for the @ref orxonox::HoverFigure "HoverFigure" is attached.
+        propellerTemplate_
+        Finally the HoverOrigin is created.
+        @code
+        <HoverOrigin name="Hovercenter" dimension="200,120" balltemplate="Hoverball" battemplate="Hoverbat" ballspeed="200" ballaccfactor="1.0" batspeed="130" batlength="0.25">
+          <attached>
+            <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
+            <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
+          </attached>
+        </HoverOrigin>
+        @endcode
+        All parameters are specified. And also two @ref orxonox::Model "Models" (for the upper and lower boundary) are attached.
+        
+        For a more elaborate example, have a look at the <code>Hover.oxw</code> level file.
+
+    */
+    class _HoverExport HoverOrigin : public StaticEntity
+    {
+        public:
+            HoverOrigin(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Hover.
+            virtual ~HoverOrigin() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a HoverOrigin through XML.
+            
+            inline void setNumCells(int numCells)
+                { this->numCells_ = numCells; }
+            inline int getNumCells() const
+                { return this->numCells_; }
+
+            inline void setCellSize(int cellSize)
+                { this->cellSize_ = cellSize; }
+            inline int getCellSize() const
+                { return this->cellSize_; }
+
+            inline void setCellHeight(int cellHeight)
+                { this->cellHeight_ = cellHeight; }
+            inline int getCellHeight() const
+                { return this->cellHeight_; }
+
+        private:
+            void checkGametype();
+       
+            int numCells_;
+            int cellSize_;
+            int cellHeight_;
+    };
+}
+
+#endif /* _HoverOrigin_H__ */
Index: /code/trunk/src/modules/hover/HoverPrereqs.h
===================================================================
--- /code/trunk/src/modules/hover/HoverPrereqs.h	(revision 11052)
+++ /code/trunk/src/modules/hover/HoverPrereqs.h	(revision 11052)
@@ -0,0 +1,80 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Cyrill Burgener
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Shared library macros, enums, constants and forward declarations for the Hover module
+*/
+
+#ifndef _HoverPrereqs_H__
+#define _HoverPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(HOVER_STATIC_BUILD)
+#  ifdef HOVER_SHARED_BUILD
+#    define _HoverExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _HoverExport
+#    else
+#      define _HoverExport __declspec(dllimport)
+#    endif
+#  endif
+#  define _HoverPrivate
+#elif defined (ORXONOX_GCC_VISIBILITY)
+#  define _HoverExport  __attribute__ ((visibility("default")))
+#  define _HoverPrivate __attribute__ ((visibility("hidden")))
+#else
+#  define _HoverExport
+#  define _HoverPrivate
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+    class FlagHUD;
+    class Hover;
+    class HoverFlag;
+    class HoverOrigin;
+    class HoverShip;
+    class HoverWall;
+    class MazeGenerator;
+    class TimeHUD;
+}
+
+#endif /* _HoverPrereqs_H__*/
Index: /code/trunk/src/modules/hover/HoverShip.cc
===================================================================
--- /code/trunk/src/modules/hover/HoverShip.cc	(revision 11052)
+++ /code/trunk/src/modules/hover/HoverShip.cc	(revision 11052)
@@ -0,0 +1,122 @@
+/*
+ *   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:
+ *      Cyrill Burgener
+ *
+ */
+
+/**
+    @file HoverShip.cc
+    @brief Implementation of the HoverShip control
+*/
+
+#include "HoverShip.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
+
+namespace orxonox
+{
+    RegisterClass(HoverShip);
+
+    HoverShip::HoverShip(Context* context) : SpaceShip(context)
+    {
+        RegisterObject(HoverShip);
+        enableCollisionCallback();
+        isFloor_ = false;
+        jumpBoost_ = 0;
+    }
+
+    void HoverShip::moveFrontBack(const Vector2& value)
+        { this->steering_.z -= value.x; }
+
+    void HoverShip::moveRightLeft(const Vector2& value)
+        { this->steering_.x += value.x; }
+
+    void HoverShip::moveUpDown(const Vector2& value)
+        { this->steering_.y += value.x; }
+
+    void HoverShip::rotateYaw(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() + value.x);
+
+        Pawn::rotateYaw(value);
+    }
+
+    void HoverShip::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(HoverShip, XMLPort, xmlelement, mode);
+
+        XMLPortParam(HoverShip, "jumpBoost", setJumpBoost, getJumpBoost, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Removed, does nothing.
+    @param value
+    */
+    void HoverShip::rotatePitch(const Vector2& value) { }
+
+    /**
+    @brief
+        Removed, does nothing.
+    @param value
+    */
+    void HoverShip::rotateRoll(const Vector2& value) { }
+
+    /**
+    @brief
+        Checks if the ship is touching the floor. The ship can only jump if there is contact with someting beneath it.
+    */
+    bool HoverShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint)
+    {
+        SpaceShip::collidesAgainst(otherObject, cs, contactPoint);
+        //SUPER(HoverShip, collidesAgainst, otherObject, cs, contactPoint);
+
+        if (contactPoint.m_normalWorldOnB.y() > 0.6
+            && this->getVelocity().y < 1) {
+            this->isFloor_ = true;
+        } else {
+            this->isFloor_ = false;
+        }
+
+        return false;
+    }
+
+    /**
+    @brief
+        Makes the ship jump
+    @param bBoost
+    */
+    void HoverShip::boost(bool bBoost) {
+        if (bBoost && this->isFloor_)
+        {
+            this->setVelocity(
+                this->getVelocity().x,
+                jumpBoost_,
+                this->getVelocity().z
+                );
+            this->isFloor_ = false;
+        }
+    }
+}
Index: /code/trunk/src/modules/hover/HoverShip.h
===================================================================
--- /code/trunk/src/modules/hover/HoverShip.h	(revision 11052)
+++ /code/trunk/src/modules/hover/HoverShip.h	(revision 11052)
@@ -0,0 +1,77 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Cyrill Burgener
+ *
+ */
+
+/**
+    @file HoverShip.h
+    @brief Declaration of the HoverShip class.
+*/
+
+#ifndef _HoverShip_H__
+#define _HoverShip_H__
+
+#include "HoverPrereqs.h"
+
+#include "worldentities/pawns/SpaceShip.h"
+
+namespace orxonox
+{
+    class _HoverExport HoverShip : public SpaceShip
+    {
+        public:
+            HoverShip(Context* context);
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            /// sets this ships jumpBoost
+            inline void setJumpBoost(float jumpBoost)
+                { this->jumpBoost_ = jumpBoost; }
+            /// returns this ships jumpBoost
+            inline float getJumpBoost() const
+                { return this->jumpBoost_; }
+
+            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);
+
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
+
+            virtual void boost(bool bBoost);
+
+        private:
+            float jumpBoost_;
+            bool isFloor_;
+    };
+}
+
+#endif /* _HoverShip_H__ */
Index: /code/trunk/src/modules/hover/HoverWall.cc
===================================================================
--- /code/trunk/src/modules/hover/HoverWall.cc	(revision 11052)
+++ /code/trunk/src/modules/hover/HoverWall.cc	(revision 11052)
@@ -0,0 +1,112 @@
+/*
+ *   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:
+ *      Manuel Meier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file HoverWall.cc
+    @brief Represents one Wall piece in the Hover Game
+*/
+
+#include "HoverWall.h"
+
+#include "core/CoreIncludes.h"
+#include "graphics/Model.h"
+#include "objects/collisionshapes/BoxCollisionShape.h"
+
+namespace orxonox
+{
+    RegisterClass(HoverWall);
+
+    HoverWall::HoverWall(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(HoverWall);
+
+        this->model_ = NULL;
+        this->cs_ = NULL;
+
+        this->enableCollisionCallback();
+        this->setCollisionResponse(true);
+        this->setCollisionType(Static);
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    HoverWall::~HoverWall()
+    {
+        if (this->isInitialized())
+        {
+            if (this->model_)
+                this->model_->destroy();
+            if (this->cs_)
+                this->cs_->destroy();
+        }
+    }
+
+    /**
+    @brief
+        Initializes a HoverWall
+    @param x
+        x-Coordinate of the Square that the Wall is attached to, 0-9, Origin is Bottom left
+    @param y
+        y-Coordinate of the Square that the Wall is attached to, 0-9, Origin is Bottom left
+    @param orientation
+            Wall on the right side (1) or on top (2) of this square, 0-1        
+    */
+    void HoverWall::init(int x, int y, int cellSize, int cellHeight, int orientation)
+    {
+        int xSize_, zSize_, xPos_, zPos_;
+
+        if(orientation == 1){
+            xSize_ = cellSize/2;
+            zSize_ = 2;
+            zPos_ = x*cellSize;
+            xPos_ = y*cellSize-cellSize/2;
+        }
+        else{
+            xSize_ = 2;
+            zSize_ = cellSize/2;
+            zPos_ = x*cellSize-cellSize/2;
+            xPos_ = y*cellSize;
+        }
+
+
+        model_ = new Model(this->getContext());
+        model_->setMeshSource("CuboidBody.mesh");
+        model_->setScale3D(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f));
+        model_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f));
+
+        this->attach(model_);
+
+        cs_ = new BoxCollisionShape(this->getContext());
+        cs_->setHalfExtents(Vector3(xSize_*1.0f, cellHeight*1.0f, zSize_*1.0f));
+        cs_->setPosition(Vector3(xPos_*1.0f, 0.0f, zPos_*1.0f));
+
+        this->attachCollisionShape(cs_);
+    }
+}
Index: /code/trunk/src/modules/hover/HoverWall.h
===================================================================
--- /code/trunk/src/modules/hover/HoverWall.h	(revision 11052)
+++ /code/trunk/src/modules/hover/HoverWall.h	(revision 11052)
@@ -0,0 +1,59 @@
+/*
+ *   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:
+ *      Manuel Meier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file HoverWall.h
+    @brief See .cc-file for further information
+    @ingroup Hover
+*/
+
+#ifndef _HoverWall_H__
+#define _HoverWall_H__
+
+#include "HoverPrereqs.h"
+#include "objects/ObjectsPrereqs.h"
+
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    class _HoverExport HoverWall : public StaticEntity
+    {
+        public:
+            HoverWall(Context* context);
+            virtual ~HoverWall();
+
+            void init(int x, int y, int cellSize, int cellHeight, int orientation);
+
+        private:
+            Model* model_;
+            BoxCollisionShape* cs_;
+    };
+}
+
+#endif /* _HoverWall_H__ */
Index: /code/trunk/src/modules/hover/MazeGenerator.cc
===================================================================
--- /code/trunk/src/modules/hover/MazeGenerator.cc	(revision 11052)
+++ /code/trunk/src/modules/hover/MazeGenerator.cc	(revision 11052)
@@ -0,0 +1,255 @@
+/*
+ *   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:
+ *      Manuel Meier
+ *   Co-authors:
+ *      Cyrill Burgener
+ *
+ *   Based on random-maze-generator by Sergey Kosarevsky, 2014
+ *   https://github.com/corporateshark/random-maze-generator
+ *
+ */
+
+/**
+    @file MazeGenerator.cc
+    @brief Implementation of the MazeGenerator class. Generates the maze.
+*/
+
+#include "MazeGenerator.h"
+
+#include <vector>
+
+#include "util/Output.h"
+#include "util/Math.h"
+
+namespace orxonox
+{
+    MazeGenerator::MazeGenerator(int numCells)
+    {
+        this->numCells_ = numCells;
+
+        //levelcode_ represents the pitch: It's a 10x10 field.
+        // 1 represents a Wall on the right side of this square
+        // 2 represents a Wall on the top of this square
+        // 3 represents 2 and 1 at the same time
+        // Note: the levelcode_ is generated from the Maze-Generator functions at the beginning of the game
+        this->levelcode_ = new int[ numCells_*numCells_ ];;
+        std::fill( levelcode_, levelcode_ + numCells_*numCells_, 0 );
+
+        this->maze_ = new unsigned char[ numCells_*numCells_ ];
+        std::fill( maze_, maze_ + numCells_*numCells_, 0 );
+
+        // current traversing position
+        this->ptX_ = 0;
+        this->ptY_ = 0;
+
+        //                  0  1  2  3  4  5  6  7  8
+        //                     U  R     D           L
+        int headingX[9] = { 0, 0,+1, 0, 0, 0, 0, 0,-1 };
+        int headingY[9] = { 0,-1, 0, 0,+1, 0, 0, 0, 0 };
+        int mask[9]     = {
+                              0,
+                              eDirection_Down | eDirection_Down << 4,
+                              eDirection_Left | eDirection_Left << 4,
+                              0,
+                              eDirection_Up | eDirection_Up << 4,
+                              0,
+                              0,
+                              0,
+                              eDirection_Right | eDirection_Right << 4
+                          };
+
+        std::copy(headingX, headingX + 9, this->headingX_);
+        std::copy(headingY, headingY + 9, this->headingY_);
+        std::copy(mask,     mask + 9,     this->mask_);
+    }
+
+    MazeGenerator::~MazeGenerator()
+    {
+        delete[] this->levelcode_;
+        delete[] this->maze_;
+    }
+
+    /**
+    @brief
+        Checks if Direction is valid (for Maze-Generator)
+    */
+    bool MazeGenerator::isDirValid( eDirection Dir )
+    {
+        int NewX = ptX_ + headingX_[ Dir ];
+        int NewY = ptY_ + headingY_[ Dir ];
+
+        if ( !Dir || NewX < 0 || NewY < 0 || NewX >= numCells_ || NewY >= numCells_ ) return false;
+
+        return !maze_[ NewX + numCells_ * NewY ];
+    }
+
+    /**
+    @brief
+        Generates new Direction (for Maze-Generator)
+    */
+    eDirection MazeGenerator::getDirection()
+    {
+        eDirection Dir = eDirection( 1 << randomInt4() );
+
+        while ( true )
+        {
+            for ( int x = 0; x < 4; x++ )
+            {
+                if ( isDirValid( Dir ) ) { return eDirection( Dir ); }
+
+                Dir = eDirection( Dir << 1 );
+
+                if ( Dir > eDirection_Left ) { Dir = eDirection_Up; }
+            }
+
+            Dir = eDirection( ( maze_[ cellIdx() ] & 0xf0 ) >> 4 );
+
+            // nowhere to go
+            if ( !Dir ) return eDirection_Invalid;
+
+            ptX_ += headingX_[ Dir ];
+            ptY_ += headingY_[ Dir ];
+
+            Dir = eDirection( 1 << randomInt4() );
+        }
+    }
+
+    /**
+    @brief
+        Generates a Maze (for Maze-Generator)
+    */
+    void MazeGenerator::generateMaze()
+    {
+
+        for ( eDirection Dir = getDirection(); Dir != eDirection_Invalid; Dir = getDirection() )
+        {
+            maze_[ cellIdx() ] |= Dir;
+
+            ptX_ += headingX_[ Dir ];
+            ptY_ += headingY_[ Dir ];
+
+            maze_[ cellIdx() ] = mask_[ Dir ];
+        }
+    }  
+    
+    /**
+    @brief
+        Print Maze (for Debugging only)
+    */
+    void MazeGenerator::mazeOut(){
+        for ( int y = 0; y < numCells_; y++ )
+        {
+            for ( int x = 0; x < numCells_; x++ )
+            {
+                char v = maze_[ y * numCells_ + x ];
+                orxout()<<"[";
+                if ( ( v & eDirection_Up    ) ) orxout()<<"U";
+                else orxout()<<" ";
+                if ( ( v & eDirection_Right ) ) orxout()<<"R";
+                else orxout()<<" ";
+                if ( ( v & eDirection_Down  ) ) orxout()<<" ";
+                else orxout()<<" ";
+                if ( ( v & eDirection_Left  ) ) orxout()<<" ";
+                else orxout()<<" ";
+                orxout()<<"]";
+            }
+            orxout()<<endl;
+        }
+
+    }
+
+    /**
+    @brief
+        Print levelcode_ (for Debugging only)
+    */
+    void MazeGenerator::levelOut(){
+        for ( int y = 0; y < numCells_; y++ )
+        {
+            for ( int x = 0; x < numCells_; x++ )
+            {
+                orxout()<<"[";
+                if ( levelcode_[ y * numCells_ + x ] < 2) orxout()<<"U";
+                else orxout()<<" ";
+                if ( levelcode_[ y * numCells_ + x ] % 2 == 0) orxout()<<"R";
+                else orxout()<<" ";
+
+                orxout()<<" ";
+                orxout()<<" ";
+                orxout()<<"]";
+            }
+            orxout()<<endl;
+        }
+    }
+
+    /**
+    @brief
+        Generate levelcode_ from Maze
+    */
+    void MazeGenerator::renderMaze()
+    {
+        for ( int y = 0; y < numCells_; y++ )
+        {
+            for ( int x = 0; x < numCells_; x++ )
+            {
+                char v = maze_[ y * numCells_ + x ];
+
+                if ( !( v & eDirection_Up    ) && y >0) levelcode_[ y * numCells_ + x ] |= 2;
+                if ( !( v & eDirection_Right ) && x <(numCells_-1)) levelcode_[ y * numCells_ + x ] |= 1;
+            }
+        }
+
+        // leave an empty space in the middle of the maze
+        int lowerBound = numCells_ / 2 - 2;
+        int upperBound = numCells_ / 2 + 2;
+        for ( int y = lowerBound; y < upperBound; y++ )
+        {
+            for ( int x = lowerBound; x < upperBound; x++ )
+            {
+
+                if(y == lowerBound && x != upperBound)
+                    levelcode_[ y * numCells_ + x ] &= 2;
+                else if (x == upperBound && y != lowerBound)
+                    levelcode_[ y * numCells_ + x ] &= 1;
+                else if(x != upperBound)
+                    levelcode_[ y * numCells_ + x ] = 0;
+            }
+        }
+
+    }
+
+    // return the current index in maze_
+    int MazeGenerator::cellIdx()
+    {
+        return ptX_ + numCells_ * ptY_;
+    }
+
+    int MazeGenerator::randomInt()
+    {
+        return (rand() % numCells_);
+    }
+
+    int MazeGenerator::randomInt4()
+    {
+        return (rand() % 4);
+    }
+}
Index: /code/trunk/src/modules/hover/MazeGenerator.h
===================================================================
--- /code/trunk/src/modules/hover/MazeGenerator.h	(revision 11052)
+++ /code/trunk/src/modules/hover/MazeGenerator.h	(revision 11052)
@@ -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.
+ *
+ *   Master of Desaster:
+ *      Manuel Meier
+ *   Co-authors:
+ *      Cyrill Burgener
+ *
+ */
+
+/**
+    @file MazeGenerator.h
+    @ingroup Hover
+*/
+
+#ifndef _MazeGenerator_H__
+#define _MazeGenerator_H__
+
+#include "HoverPrereqs.h"
+
+namespace orxonox
+{
+    enum eDirection
+    {
+        eDirection_Invalid = 0,
+        eDirection_Up      = 1,
+        eDirection_Right   = 2,
+        eDirection_Down    = 4,
+        eDirection_Left    = 8
+    }; 
+
+    class _HoverExport MazeGenerator
+    {
+        public:
+            MazeGenerator(int numCells);
+            ~MazeGenerator();
+
+            void generateMaze();
+            void renderMaze();
+            void mazeOut();
+            void levelOut();
+
+            int* getLevelcode() const
+                { return this->levelcode_; }
+
+        private:
+            bool isDirValid( eDirection Dir );
+            eDirection getDirection();
+
+            int cellIdx();
+            int randomInt();
+            int randomInt4();
+
+            int numCells_;
+            int* levelcode_;
+            unsigned char* maze_;
+
+            // current traversing position
+            int ptX_;
+            int ptY_;
+
+            int headingX_[9];
+            int headingY_[9];
+            int mask_[9];
+    };
+}
+
+#endif /* _MazeGenerator_H__ */
Index: /code/trunk/src/modules/hover/TimeHUD.cc
===================================================================
--- /code/trunk/src/modules/hover/TimeHUD.cc	(revision 11052)
+++ /code/trunk/src/modules/hover/TimeHUD.cc	(revision 11052)
@@ -0,0 +1,108 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Cyrill Burgener
+ *
+ */
+
+/**
+    @file TimeHUD.cc
+    @brief Implementation of the TimeHUD
+*/
+
+
+#include "TimeHUD.h"
+
+#include "core/CoreIncludes.h"
+#include "util/Convert.h"
+#include "Hover.h"
+
+namespace orxonox
+{
+    RegisterClass(TimeHUD);
+
+    TimeHUD::TimeHUD(Context* context) : OverlayText(context)
+    {
+        RegisterObject(TimeHUD);
+
+        this->time_ = 0.0f;
+        this->running_ = false;
+        this->hoverGame_ = 0;
+        setRunning(true);
+    }
+
+    inline std::string getTimeString(float time) {
+        std::ostringstream ss;
+
+        int h = ((int) (time * 100.0f)) % 100;
+        int s = ((int) time) % 60;
+        int m = (int) (time / 60.0f);
+
+        ss << m << ":";
+
+        if(s < 10) {
+            ss << 0;
+        }
+        ss << s << ":";
+
+        if(h < 10) {
+            ss << 0;
+        }
+        ss << h << "s";
+        return ss.str();
+    }
+
+    void TimeHUD::tick(float dt)
+    {
+        SUPER(TimeHUD, tick, dt);
+
+        if(this->running_) {
+            this->time_ += dt;
+        }
+        if (this->hoverGame_)
+        {
+            this->setCaption(getTimeString(this->time_));
+        }
+        if(this->hoverGame_->getNumberOfFlags() == 0)
+            setRunning(false);
+        
+    }
+
+    void TimeHUD::changedOwner()
+    {
+        SUPER(TimeHUD, changedOwner);
+
+        if (this->getOwner() && this->getOwner()->getGametype())
+        {
+            this->hoverGame_ = orxonox_cast<Hover*>(this->getOwner()->getGametype());
+        }
+        else
+        {
+            this->hoverGame_ = 0;
+        }
+    }
+
+    void TimeHUD::reset()
+    {
+        this->time_ = 0;
+    }
+}
Index: /code/trunk/src/modules/hover/TimeHUD.h
===================================================================
--- /code/trunk/src/modules/hover/TimeHUD.h	(revision 11052)
+++ /code/trunk/src/modules/hover/TimeHUD.h	(revision 11052)
@@ -0,0 +1,65 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Cyrill Burgener
+ *
+ */
+
+ /**
+    @file TimeHUD.h
+    @brief Declaration of the TimeHUD class.
+*/
+
+#ifndef _TimeHUD_H__
+#define _TimeHUD_H__
+
+#include "HoverPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _HoverExport TimeHUD : public OverlayText, public Tickable
+    {
+        public:
+            TimeHUD(Context* context);
+
+            virtual void tick(float dt);
+            virtual void changedOwner();
+
+            /// sets if the clock is running
+            inline void setRunning(bool running)
+                { this->running_ = running; }
+            /// returns if the clock is running
+            inline bool isRunning() const
+                { return this->running_; }
+
+            void reset();
+
+        private:
+            Hover* hoverGame_;
+            float time_;
+            bool running_;
+    };
+}
+#endif /* _TimeHUD_H__ */
Index: /code/trunk/src/modules/invader/Invader.cc
===================================================================
--- /code/trunk/src/modules/invader/Invader.cc	(revision 11051)
+++ /code/trunk/src/modules/invader/Invader.cc	(revision 11052)
@@ -51,5 +51,5 @@
 
 #include "core/command/ConsoleCommand.h"
-#include "worldentities/BigExplosion.h"
+#include "worldentities/ExplosionPart.h"
 
 namespace orxonox
@@ -82,8 +82,15 @@
             for (int i = 0; i < 7; i++)
             {
-                BigExplosion* chunk = new BigExplosion(this->center_->getContext());
-                chunk->setPosition(Vector3(600, 0, 100.f * i - 300));
-                chunk->setVelocity(Vector3(1000, 0, 0));  //player->getVelocity()
-                chunk->setScale(20);
+
+                WeakPtr<ExplosionPart> chunk5 = new ExplosionPart(this->center_->getContext());
+                chunk5->setPosition(this->center_->getPosition());
+                chunk5->setVelocity(Vector3(1000, 0, 0));  //player->getVelocity()
+                chunk5->setScale(10);
+                chunk5->setEffect1("Orxonox/explosion2b");
+                chunk5->setEffect2("Orxonox/smoke6");
+                chunk5->setMinSpeed(0);
+                chunk5->setMaxSpeed(0);
+                chunk5->Explode();
+
             }
         }
Index: /code/trunk/src/modules/notifications/dispatchers/CommandNotification.cc
===================================================================
--- /code/trunk/src/modules/notifications/dispatchers/CommandNotification.cc	(revision 11051)
+++ /code/trunk/src/modules/notifications/dispatchers/CommandNotification.cc	(revision 11052)
@@ -101,51 +101,7 @@
         std::stringstream stream;
         stream << this->getPreMessage();
-        stream << this->bindingNiceifyer(KeyBinderManager::getInstance().getCurrent()->getBinding(this->getCommand()));
+        stream << KeyBinderManager::getInstance().getCurrent()->getBindingReadable(this->getCommand());
         stream << this->getPostMessage();
         return *(new std::string(stream.str()));
     }
-
-    /**
-    @brief
-        Transforms the input binding into a human readable form.
-    @param binding
-        The binding to be transformed
-    @return
-        Returns a human readable version of the input binding.
-    */
-    //TODO: Move to KeyBinderManager...
-    const std::string& CommandNotification::bindingNiceifyer(const std::string& binding)
-    {
-        SubString substring = SubString(binding, ".");
-        std::string name;
-        std::string group;
-        switch(substring.size())
-        {
-            case 0:
-                return binding;
-            case 1:
-                return binding;
-            case 2:
-                group = substring[0];
-            default:
-                name = substring.subSet(1).join(".");
-        }
-
-        std::stringstream stream;
-        if(group.compare("Keys") == 0)
-            stream << "Key " << name.substr(3);
-        else if(group.compare("MouseButtons") == 0)
-            stream << "Mouse " << name;
-        else if(group.compare("JoyStickButtons") == 0)
-            stream << "Joystick " << name;
-        else if(group.compare("JoyStickAxes") == 0)
-            stream << "Joystick Axis" << name.substr(5, 6) << name.substr(name.find("Axis")+6);
-        else if(group.compare("MouseAxes") == 0)
-            stream << "Mouse " << name.substr(1,3) << " " << name.substr(0, 1) << "-Axis";
-        else
-            return binding;
-
-        return *(new std::string(stream.str()));
-    }
-
 }
Index: /code/trunk/src/modules/notifications/dispatchers/CommandNotification.h
===================================================================
--- /code/trunk/src/modules/notifications/dispatchers/CommandNotification.h	(revision 11051)
+++ /code/trunk/src/modules/notifications/dispatchers/CommandNotification.h	(revision 11052)
@@ -122,7 +122,4 @@
             void setPostMessage(const std::string& message)
                  { this->postMessage_ = message; }
-
-            const std::string& bindingNiceifyer(const std::string& binding); //!< Transforms the input binding into a human readable form.
-
     };
 
Index: /code/trunk/src/modules/objects/Turret.h
===================================================================
--- /code/trunk/src/modules/objects/Turret.h	(revision 11051)
+++ /code/trunk/src/modules/objects/Turret.h	(revision 11052)
@@ -103,8 +103,8 @@
 
             inline void setRotationThrust(float rotationthrust)
-            	{ this->rotationThrust_ = rotationthrust; }
+                { this->rotationThrust_ = rotationthrust; }
 
             inline float getRotationThrust()
-            	{ return this->rotationThrust_; }
+                { return this->rotationThrust_; }
 
         protected:
Index: /code/trunk/src/modules/overlays/OverlaysPrereqs.h
===================================================================
--- /code/trunk/src/modules/overlays/OverlaysPrereqs.h	(revision 11051)
+++ /code/trunk/src/modules/overlays/OverlaysPrereqs.h	(revision 11052)
@@ -90,5 +90,12 @@
     class HUDRadar;
     class HUDSpeedBar;
+    class HUDShieldBar;
     class HUDBoostBar;
+    class HUDRocketFuelBar;
+    class HUDEnemyHealthBar;
+    class HUDEnemyShieldBar;
+    class HUDWeaponSystem;
+    class HUDWeapon;
+    class HUDWeaponMode;
     class HUDTimer;
     class HUDAimAssistant;
Index: /code/trunk/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/overlays/hud/CMakeLists.txt	(revision 11051)
+++ /code/trunk/src/modules/overlays/hud/CMakeLists.txt	(revision 11052)
@@ -5,7 +5,13 @@
   HUDSpeedBar.cc
   HUDBoostBar.cc
+  HUDShieldBar.cc
   HUDHealthBar.cc
+  HUDRocketFuelBar.cc
   HUDTimer.cc
   HUDEnemyHealthBar.cc
+  HUDEnemyShieldBar.cc
+  HUDWeaponMode.cc
+  HUDWeapon.cc
+  HUDWeaponSystem.cc
   ChatOverlay.cc
   AnnounceMessage.cc
Index: /code/trunk/src/modules/overlays/hud/HUDBar.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDBar.cc	(revision 11051)
+++ /code/trunk/src/modules/overlays/hud/HUDBar.cc	(revision 11052)
@@ -47,9 +47,8 @@
     RegisterClass(BarColour);
 
-    BarColour::BarColour(Context* context)
-        : BaseObject(context)
+    BarColour::BarColour(Context* context) : BaseObject(context)
     {
         RegisterObject(BarColour);
-
+        
         this->setColour(ColourValue(1.0, 1.0, 1.0, 1.0));
         this->setPosition(0.0);
@@ -69,6 +68,5 @@
     RegisterClass(HUDBar);
 
-    HUDBar::HUDBar(Context* context)
-        : OrxonoxOverlay(context), right2Left_(false), autoColour_(false)
+    HUDBar::HUDBar(Context* context) : OrxonoxOverlay(context), right2Left_(false), autoColour_(false)
     {
         RegisterObject(HUDBar);
@@ -88,4 +86,8 @@
         this->bar_->setMaterialName(materialname);
 
+        this->bar_->setPosition(0.0f,0.0f);
+        this->bar_->setDimensions(1.0f,1.0f);
+
+        this->bUseIcon_ = false;
         this->value_ = 1.0f;  // initialize with 1.0f to trigger a change when calling setValue(0.0f) on the line below
         this->setAutoColour(true);
@@ -95,4 +97,9 @@
 
         this->background_->addChild(bar_);
+
+        this->icon_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDBar_icon_" + getUniqueNumberString()));
+        this->icon_->setPosition(0.06f,0.0f);
+        this->icon_->setDimensions(0.1f,1.0f);
+        this->background_->addChild(this->icon_);
     }
 
@@ -115,4 +122,5 @@
         XMLPortParam(HUDBar, "autocolour",   setAutoColour,  getAutoColour,  xmlelement, mode);
         XMLPortParam(HUDBar, "bartexture",   setBarTexture,  getBarTexture, xmlelement, mode);
+        XMLPortParam(HUDBar, "iconmaterial", setIconMaterial, getIconMaterial, xmlelement, mode);
         XMLPortObject(HUDBar, BarColour, "", addColour, getColour, xmlelement, mode);
     }
@@ -161,17 +169,37 @@
         }
 
+        float height = this->bar_->getHeight();
+        float top = this->bar_->getTop();
+
         // set value
         if (this->right2Left_)
         {
             // backward case
-            this->bar_->setPosition(0.06f + 0.88f * (1 - this->value_), 0.0f);
-            this->bar_->setDimensions(0.88f * this->value_, 1.0f);
+            if (this->bUseIcon_)
+            {
+                this->bar_->setPosition(0.16f + 0.78f * (1 - this->value_), top);
+                this->bar_->setDimensions(0.78f * this->value_, height);
+            }
+            else
+            {
+                this->bar_->setPosition(0.06f + 0.88f * (1 - this->value_), top);
+                this->bar_->setDimensions(0.88f * this->value_, height);
+            }
         }
         else
         {
             // default case
-            this->bar_->setPosition(0.06f, 0.0f);
-            this->bar_->setDimensions(0.88f * this->value_, 1.0f);
-        }
+            if (this->bUseIcon_)
+            {
+                this->bar_->setPosition(0.16f, top);
+                this->bar_->setDimensions(0.78f * this->value_, height);
+            }
+            else
+            {
+                this->bar_->setPosition(0.06f, top);
+                this->bar_->setDimensions(0.88f * this->value_, height);
+            }
+        }
+
         if (this->value_ != 0)
             this->bar_->setTiling(this->value_, 1.0);
@@ -208,3 +236,15 @@
         return this->textureUnitState_->getTextureName();
     }
+
+    void HUDBar::setIconMaterial(const std::string& iconMaterial)
+    {
+        this->bUseIcon_ = true;
+        this->icon_->setMaterialName(iconMaterial);
+        valueChanged();
+    }
+
+    const std::string& HUDBar::getIconMaterial() const
+    {
+        return this->icon_->getMaterialName();
+    }
 }
Index: /code/trunk/src/modules/overlays/hud/HUDBar.h
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDBar.h	(revision 11051)
+++ /code/trunk/src/modules/overlays/hud/HUDBar.h	(revision 11052)
@@ -37,4 +37,5 @@
 #include <map>
 #include <vector>
+#include <OgrePanelOverlayElement.h>
 
 #include "util/Math.h"
@@ -51,5 +52,5 @@
         virtual ~BarColour() { }
 
-        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);     
 
         void setColour(const ColourValue& colour) { this->colour_ = colour; }
@@ -115,10 +116,17 @@
         const std::string& getBarTexture() const;
 
+        void setIconMaterial(const std::string& iconMaterial);
+        const std::string& getIconMaterial() const;
+
         inline const ColourValue& getCurrentBarColour() const
             { return this->currentColour_; }
 
+        inline void setIconPosition(Vector2 position)
+            { this->icon_->setPosition(position.x, position.y); }
+        inline void setIconDimensions(Vector2 dimensions)
+            { this->icon_->setDimensions(dimensions.x, dimensions.y); }
+
     protected:
         virtual void valueChanged();
-
     private:
         void addColour(BarColour* colour);
@@ -129,7 +137,9 @@
         float value_;                       //!< progress of bar
         ColourValue currentColour_;
+        bool bUseIcon_;
 
         Ogre::PanelOverlayElement* bar_;
         Ogre::TextureUnitState* textureUnitState_;
+        Ogre::PanelOverlayElement* icon_;
         std::map<float, ColourValue> colours_;
         std::vector<BarColour*> barColours_;
Index: /code/trunk/src/modules/overlays/hud/HUDBoostBar.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDBoostBar.cc	(revision 11051)
+++ /code/trunk/src/modules/overlays/hud/HUDBoostBar.cc	(revision 11052)
@@ -59,5 +59,5 @@
             if (this->owner_->isBoostCoolingDown())
             {
-                this->setBackgroundColour(ColourValue(0.7f, 0.2f, 0.2f));
+                //this->setBackgroundColour(ColourValue(0.7f, 0.2f, 0.2f));
                 if (this->flashDt_ <= 0.0f)
                 {
@@ -72,5 +72,5 @@
                 this->flashDt_ = 0.0f;
                 this->show();
-                this->setBackgroundColour(ColourValue(0.2f, 0.7f, 0.2f));
+                //this->setBackgroundColour(ColourValue(0.2f, 0.7f, 0.2f));
             }
 
Index: /code/trunk/src/modules/overlays/hud/HUDEnemyShieldBar.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDEnemyShieldBar.cc	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDEnemyShieldBar.cc	(revision 11052)
@@ -0,0 +1,89 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "HUDEnemyShieldBar.h"
+
+#include "core/config/ConfigValueIncludes.h"
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+    RegisterClass(HUDEnemyShieldBar);
+
+    HUDEnemyShieldBar::HUDEnemyShieldBar(Context* context) : HUDShieldBar(context)
+    {
+        RegisterObject(HUDEnemyShieldBar);
+
+        this->setConfigValues();
+        this->owner_ = NULL;
+    }
+
+    HUDEnemyShieldBar::~HUDEnemyShieldBar()
+    {
+    }
+
+    void HUDEnemyShieldBar::setConfigValues()
+    {
+        SetConfigValue(useEnemyBar_, true);
+    }
+
+    void HUDEnemyShieldBar::tick(float dt)
+    {
+        this->updateTarget();
+
+        SUPER(HUDEnemyShieldBar, tick, dt);
+    }
+
+    void HUDEnemyShieldBar::updateTarget()
+    {
+        Pawn* pawn = NULL;
+        if (this->owner_ && this->useEnemyBar_)
+        {
+            // Get the owner's current target (target is usually a Model)
+            WorldEntity* target = this->owner_->getTarget();
+            // Find the Pawn that belongs to this target (if any)
+            while (target && !target->isA(Class(Pawn)))
+                target = target->getParent();
+            pawn = orxonox_cast<Pawn*>(target);
+            // Don't show the EnemyShieldBar if the pawn is invisible
+            if (pawn && !pawn->isVisible())
+                pawn = NULL;
+        }
+        // Set the pawn as owner of the EnemyShieldBar
+        this->setShieldBarOwner(pawn);
+        this->setVisible(pawn != NULL);
+    }
+
+    void HUDEnemyShieldBar::changedOwner()
+    {
+        SUPER(HUDEnemyShieldBar, changedOwner);
+
+        this->owner_ = orxonox_cast<ControllableEntity*>(this->getOwner());
+        this->updateTarget();
+    }
+}
Index: /code/trunk/src/modules/overlays/hud/HUDEnemyShieldBar.h
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDEnemyShieldBar.h	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDEnemyShieldBar.h	(revision 11052)
@@ -0,0 +1,58 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HUDEnemyShieldBar_H__
+#define _HUDEnemyShieldBar_H__
+
+#include "HUDShieldBar.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        This class displays the shield status of the target enemy of it's owner.
+    */
+    class _OverlaysExport HUDEnemyShieldBar : public HUDShieldBar
+    {
+        public:
+            HUDEnemyShieldBar(Context* context);
+            virtual ~HUDEnemyShieldBar();
+
+            void setConfigValues();
+            virtual void tick(float dt);
+
+            void changedOwner();
+
+        private:
+            void updateTarget();
+
+            ControllableEntity* owner_;
+            bool useEnemyBar_;
+    };
+}
+#endif /* _HUDEnemyShieldBar_H__ */
Index: /code/trunk/src/modules/overlays/hud/HUDHealthBar.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDHealthBar.cc	(revision 11051)
+++ /code/trunk/src/modules/overlays/hud/HUDHealthBar.cc	(revision 11052)
@@ -45,4 +45,9 @@
         this->owner_ = 0;
         this->bUseBarColour_ = false;
+        this->textOffset_ = Vector2(0.0f, 0.0f);
+        this->textScale_ = 1.0f;
+
+        this->setIconPosition(Vector2(0.05f,0.5f));
+        this->setIconDimensions(Vector2(0.1f,0.5f));
 
         this->textoverlay_ = new OverlayText(this->getContext());
@@ -51,4 +56,7 @@
 
         this->textoverlay_->setCaption("");
+        this->textoverlay_->setAspectCorrection(false);
+
+        positionText();
     }
 
@@ -58,5 +66,5 @@
         {
             this->textoverlay_->destroy();
-            this->textoverlay_ = 0;
+            this->textoverlay_ = NULL;
         }
     }
@@ -70,10 +78,9 @@
         XMLPortParam(HUDHealthBar, "textusebarcolour",  setTextUseBarColour,     getTextUseBarColour,     xmlelement, mode).defaultValues(false);
         XMLPortParam(HUDHealthBar, "textcolour",        setTextColour,           getTextColour,           xmlelement, mode).defaultValues(ColourValue(1.0, 1.0, 1.0, 1.0));
-        XMLPortParam(HUDHealthBar, "textsize",          setTextSize,             getTextSize,             xmlelement, mode).defaultValues(1.0f);
         XMLPortParam(HUDHealthBar, "textalign",         setTextAlignmentString,  getTextAlignmentString,  xmlelement, mode).defaultValues("left");
         XMLPortParam(HUDHealthBar, "textoffset",        setTextOffset,           getTextOffset,           xmlelement, mode).defaultValues(Vector2::ZERO);
+        XMLPortParam(HUDHealthBar, "textscale",         setTextScale,            getTextScale,            xmlelement, mode).defaultValues(1.0f);
         XMLPortParam(HUDHealthBar, "textpickpoint",     setTextPickPoint,        getTextPickPoint,        xmlelement, mode).defaultValues(Vector2::ZERO);
         XMLPortParam(HUDHealthBar, "textrotation",      setTextRotation,         getTextRotation,         xmlelement, mode).defaultValues(0.0f);
-        XMLPortParam(HUDHealthBar, "textcorrectaspect", setTextAspectCorrection, getTextAspectCorrection, xmlelement, mode).defaultValues(true);
         XMLPortParam(HUDHealthBar, "textspacewidth",    setTextSpaceWidth,       getTextSpaceWidth,       xmlelement, mode).defaultValues(true);
     }
@@ -139,3 +146,21 @@
             this->textoverlay_->setColour(this->textColour_);
     }
+
+    void HUDHealthBar::positionText()
+    {
+        this->textoverlay_->setPosition(this->getPosition() + this->textOffset_*this->getActualSize());
+        this->textoverlay_->setTextSize(this->getActualSize().y*this->textScale_);
+    }
+
+    void HUDHealthBar::positionChanged()
+    {
+        HUDBar::positionChanged();
+        positionText();
+    }
+
+    void HUDHealthBar::sizeChanged()
+    {
+        HUDBar::sizeChanged();
+        positionText();
+    }    
 }
Index: /code/trunk/src/modules/overlays/hud/HUDHealthBar.h
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDHealthBar.h	(revision 11051)
+++ /code/trunk/src/modules/overlays/hud/HUDHealthBar.h	(revision 11052)
@@ -75,13 +75,15 @@
                 { return this->textoverlay_->getAlignmentString(); }
 
-            inline void setTextSize(float size)
-                { this->textoverlay_->setTextSize(size); }
-            inline float getTextSize() const
-                { return this->textoverlay_->getTextSize(); }
-
             inline void setTextVisible(bool bVisible)
                 { this->textoverlay_->setVisible(bVisible); }
             inline bool getTextVisible() const
                 { return this->textoverlay_->isVisible(); }
+
+            inline void setTextScale(float scale)
+                { this->textScale_ = scale;
+                  positionText();
+                }
+            inline float getTextScale() const
+                { return this->textScale_; }
 
             inline void setTextPickPoint(const Vector2& pickpoint)
@@ -91,12 +93,9 @@
 
             inline void setTextOffset(const Vector2& position)
-                { this->textoverlay_->setPosition(this->getPosition() + (position - this->getPickPoint()) * this->getSize()); }
+                { this->textOffset_ = position;
+                  this->positionText();
+                }
             inline Vector2 getTextOffset() const
-                { return (this->textoverlay_->getPosition() - this->getPosition()) / this->getSize() + this->getPickPoint(); }
-
-            inline void setTextAspectCorrection(bool correct)
-                { this->textoverlay_->setAspectCorrection(correct); }
-            inline bool getTextAspectCorrection() const
-                { return this->textoverlay_->getAspectCorrection(); }
+                { return this->textOffset_; }
 
             inline void setTextRotation(const Degree& angle)
@@ -112,10 +111,15 @@
             inline void setHealthBarOwner(Pawn* owner)
                 { this->owner_ = owner; }
-
+        protected:
+            virtual void positionChanged();
+            virtual void sizeChanged();
         private:
+            virtual void positionText();
             WeakPtr<Pawn> owner_;
             StrongPtr<OverlayText> textoverlay_;
             bool bUseBarColour_;
             ColourValue textColour_;
+            Vector2 textOffset_;
+            float textScale_;
     };
 }
Index: /code/trunk/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDRadar.cc	(revision 11051)
+++ /code/trunk/src/modules/overlays/hud/HUDRadar.cc	(revision 11052)
@@ -240,5 +240,5 @@
             }
             else
-                coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
+                coord = get2DViewCoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
 
             coord *= math::pi / 3.5f; // small adjustment to make it fit the texture
Index: /code/trunk/src/modules/overlays/hud/HUDRocketFuelBar.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDRocketFuelBar.cc	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDRocketFuelBar.cc	(revision 11052)
@@ -0,0 +1,73 @@
+/*
+ *   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 2src/libraries/core/class/Identifier.h
+ *   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:
+ *      ...
+ *
+ */
+
+#include "HUDRocketFuelBar.h"
+
+#include "core/CoreIncludes.h"
+#include "weapons/projectiles/Rocket.h"
+
+namespace orxonox
+{
+    RegisterClass(HUDRocketFuelBar);
+
+    HUDRocketFuelBar::HUDRocketFuelBar(Context* context) : HUDBar(context)
+    {
+        RegisterObject(HUDRocketFuelBar);
+
+        this->owner_ = NULL;
+    }
+
+    HUDRocketFuelBar::~HUDRocketFuelBar()
+    {
+    }
+
+    void HUDRocketFuelBar::tick(float dt)
+    {
+        SUPER(HUDRocketFuelBar, tick, dt);
+
+        if (this->owner_)
+        {
+            float maxFuel = this->owner_->getMaxFuel();
+            if (maxFuel > 0.0)
+            {
+                this->setValue(this->owner_->getFuel()/maxFuel);
+            }
+            else
+            {
+                this->setValue(0.0);
+            }
+        }
+    }
+
+    void HUDRocketFuelBar::changedOwner()
+    {
+        SUPER(HUDRocketFuelBar, changedOwner);
+
+        this->owner_ = orxonox_cast<Rocket*>(this->getOwner());
+    }
+}
Index: /code/trunk/src/modules/overlays/hud/HUDRocketFuelBar.h
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDRocketFuelBar.h	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDRocketFuelBar.h	(revision 11052)
@@ -0,0 +1,58 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+ /**
+    @file HUDRocketFuelBar.h
+    @brief Definition of the HUDRocketFuelBar class. This HUDBar displays the the amount of fuel  that a rocket has.
+*/
+
+#ifndef _HUDRocketFuelBar_H__
+#define _HUDRocketFuelBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "weapons/projectiles/Rocket.h"
+#include "HUDBar.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDRocketFuelBar : public HUDBar, public Tickable
+    {
+    public:
+        HUDRocketFuelBar(Context* context);
+        virtual ~HUDRocketFuelBar();
+
+        virtual void tick(float dt);
+        virtual void changedOwner();
+
+    private:
+        Rocket* owner_;
+    };
+}
+#endif /* _HUDRocketFuelBar_H__ */
Index: /code/trunk/src/modules/overlays/hud/HUDShieldBar.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDShieldBar.cc	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDShieldBar.cc	(revision 11052)
@@ -0,0 +1,81 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "HUDShieldBar.h"
+
+#include "core/CoreIncludes.h"
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+    RegisterClass(HUDShieldBar);
+
+    HUDShieldBar::HUDShieldBar(Context* context)
+        : HUDBar(context)
+    {
+        RegisterObject(HUDShieldBar);
+
+        this->owner_ = NULL;
+    }
+
+    HUDShieldBar::~HUDShieldBar()
+    {
+    }
+
+    void HUDShieldBar::tick(float dt)
+    {
+        SUPER(HUDShieldBar, tick, dt);
+
+        if (this->owner_)
+        {
+            float maxShieldHealth = this->owner_->getMaxShieldHealth();
+            float shieldHealth = this->owner_->getShieldHealth();
+
+            if (maxShieldHealth > 0.0f)
+            {
+                this->setValue(shieldHealth/maxShieldHealth);
+            }
+            else
+            {
+                this->setValue(0.0f);
+            }
+        }
+        else
+        {
+            this->setValue(0.0f);
+        }
+    }
+
+    void HUDShieldBar::changedOwner()
+    {
+        SUPER(HUDShieldBar, changedOwner);
+
+        this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+    }
+}
+
Index: /code/trunk/src/modules/overlays/hud/HUDShieldBar.h
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDShieldBar.h	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDShieldBar.h	(revision 11052)
@@ -0,0 +1,60 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HUDShieldBar_H__
+#define _HUDShieldBar_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "HUDBar.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        The HUDShieldBar displays the the status of the shield of its owner (a @ref Pawn).
+        The length of the bar is given by the ratio of the shield health and the maximal shield health of the @ref Pawn.
+    */
+
+    class _OverlaysExport HUDShieldBar : public HUDBar, public Tickable
+    {
+    public:
+        HUDShieldBar(Context* context);
+        virtual ~HUDShieldBar();
+
+        virtual void tick(float dt);
+        virtual void changedOwner();
+
+        inline void setShieldBarOwner(Pawn* owner)
+            { this->owner_ = owner; }
+    private:
+        Pawn* owner_;
+    };
+}
+#endif /* _HUDShieldBar_H__ */
Index: /code/trunk/src/modules/overlays/hud/HUDWeapon.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDWeapon.cc	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDWeapon.cc	(revision 11052)
@@ -0,0 +1,224 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "HUDWeapon.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "core/class/Super.h"
+
+namespace orxonox
+{
+    RegisterClass(HUDWeapon);
+
+    HUDWeapon::HUDWeapon(Context* context) : OrxonoxOverlay(context)
+    {
+        RegisterObject(HUDWeapon);
+
+        weaponModeHUDActualSize_ = Vector2(0.0f,0.0f);
+
+        weaponModes_ = NULL;
+        weaponIndex_ = 0;
+        hudWeaponModes_.clear();
+
+        overlayElement_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWeapon" + getUniqueNumberString()));
+        overlayElement_->setMaterialName("Orxonox/WSHUD_Weapon");
+        overlayElement_->setPosition(0.0f,0.0f);
+        overlayElement_->setDimensions(1.0f,1.0f);
+        this->background_->addChild(overlayElement_);
+    }
+
+    HUDWeapon::~HUDWeapon()
+    {
+        if (this->isInitialized())
+        {
+            destroyHUDChilds();
+        }
+    }
+
+    void HUDWeapon::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(HUDWeapon, XMLPort, xmlelement, mode);
+
+        /*XMLPortParam(HUDWeapons, "sensitivity", setRadarSensitivity, getRadarSensitivity, xmlelement, mode);
+        XMLPortParam(HUDWeapons, "halfDotSizeDistance", setHalfDotSizeDistance, getHalfDotSizeDistance, xmlelement, mode);*/
+    }
+
+    void HUDWeapon::tick(float dt)
+    {
+        SUPER(HUDWeapon, tick, dt);
+
+        if (!weapon_)
+        {
+            // TODO: destroy this HUD id the Weapon does no more exist. (Wehen the weak pointer is NULL)
+        }
+    }    
+
+    void HUDWeapon::positionChanged()
+    {
+        OrxonoxOverlay::positionChanged();
+
+        positionHUDChilds();
+    }
+
+    void HUDWeapon::sizeChanged()
+    {
+        OrxonoxOverlay::sizeChanged();
+
+        positionHUDChilds();
+    }
+
+    void HUDWeapon::changedOwner()
+    {
+        SUPER(HUDWeapon, changedOwner);
+
+        this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+
+        updateWeaponModeList();
+    }
+
+    void HUDWeapon::changedOverlayGroup()
+    {
+        SUPER(HUDWeapon, changedOverlayGroup);
+    }   
+
+    void HUDWeapon::changedVisibility()
+    {
+        SUPER(HUDWeapon, changedVisibility);
+
+        bool visible = this->isVisible();
+
+        for (std::vector<WeakPtr<HUDWeaponMode> >::iterator it = hudWeaponModes_.begin(); it != hudWeaponModes_.end(); ++it)
+        {
+            (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed
+            (*it)->setVisible(visible);
+        }
+    }
+
+    void HUDWeapon::changedName()
+    {
+        SUPER(HUDWeapon, changedName);
+    }
+
+    void HUDWeapon::setWeapon(Weapon* weapon)
+    {
+        weapon_ = weapon;
+
+        if (!weapon_)
+        {
+            return;
+        }
+
+        updateWeaponModeList();
+    }
+
+    void HUDWeapon::updateWeaponModeList()
+    {
+        if (owner_ == NULL || weapon_ == NULL)
+        {
+            return;
+        }
+            
+        destroyHUDChilds();
+
+        weaponModes_ = weapon_->getAllWeaponmodes();
+
+        updateSize();
+        createHUDChilds();
+        positionHUDChilds();
+    }  
+
+    void HUDWeapon::createHUDChilds()
+    {
+        if (weaponModes_ == NULL)
+        {
+            return;
+        }
+
+        int positionIndex = 0;
+
+        for (std::multimap<unsigned int, WeaponMode*>::iterator it = weaponModes_->begin(); it != weaponModes_->end(); ++it)
+        {
+            HUDWeaponMode* hudWeaponMode = new HUDWeaponMode(this->getContext());
+            hudWeaponMode->setOwner(owner_);
+            hudWeaponMode->setOverlayGroup(this->getOverlayGroup());
+            hudWeaponMode->setVisible(this->isVisible());
+            hudWeaponMode->setWeaponMode(it->second);
+            hudWeaponMode->setWeaponIndex(this->weaponIndex_);                    
+            hudWeaponMode->setAspectCorrection(false);
+            hudWeaponMode->setPickPoint(Vector2(0.0f,0.0f));
+
+            hudWeaponModes_.push_back(hudWeaponMode);
+
+            ++ positionIndex;
+        }
+    }      
+
+    void HUDWeapon::positionHUDChilds()
+    {
+        int positionIndex = 0;
+
+        for (std::vector<WeakPtr<HUDWeaponMode> >::iterator it = hudWeaponModes_.begin(); it != hudWeaponModes_.end(); ++it)
+        {
+            (*it)->setPositionOffset(this->positionOffset_);
+            (*it)->setWeaponModeIndex(positionIndex);
+            (*it)->setWeaponIndex(this->weaponIndex_);
+            (*it)->setWeaponModeHUDActualSize(this->weaponModeHUDActualSize_);
+
+            ++ positionIndex;
+        }
+    }  
+
+    void HUDWeapon::destroyHUDChilds()
+    {
+        for (std::vector<WeakPtr<HUDWeaponMode> >::iterator it = hudWeaponModes_.begin(); it != hudWeaponModes_.end(); ++it)
+        {
+            (*it)->destroy();
+        } 
+
+        hudWeaponModes_.clear();
+    }
+
+    void HUDWeapon::updateSize()
+    {
+        if (weaponModes_ != NULL)
+        {
+            this->setSize(Vector2(weaponModeHUDActualSize_.x,weaponModeHUDActualSize_.y*weaponModes_->size()));
+            updatePosition();
+        }        
+    }
+
+    void HUDWeapon::updatePosition()
+    {
+        if (weaponModes_ != NULL)
+        {
+            this->setPosition(Vector2(weaponModeHUDActualSize_.x*weaponIndex_,0.0f) + this->positionOffset_);
+        }        
+    }       
+}
Index: /code/trunk/src/modules/overlays/hud/HUDWeapon.h
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDWeapon.h	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDWeapon.h	(revision 11052)
@@ -0,0 +1,107 @@
+/*
+ *   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 _HUDWeapon_H__
+#define _HUDWeapon_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+#include <string>
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h> 
+
+#include "overlays/OrxonoxOverlay.h"
+#include "tools/interfaces/Tickable.h"
+#include "worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponMode.h"
+#include "HUDWeaponMode.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDWeapon : public OrxonoxOverlay, public Tickable
+    {
+    public:
+        HUDWeapon(Context* context);
+        virtual ~HUDWeapon();
+
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+        virtual void tick(float dt);
+        virtual void changedOwner();
+        virtual void changedOverlayGroup();
+        virtual void changedVisibility();
+        virtual void changedName();
+        virtual void positionChanged();
+        virtual void sizeChanged();
+
+        virtual void setWeapon(Weapon* weapon);
+
+        inline void setWeaponModeHUDActualSize(Vector2 vector)
+            { weaponModeHUDActualSize_ = vector;
+              this->updateSize();
+            }
+        inline Vector2 getWeaponModeHUDActualSize() const
+            { return weaponModeHUDActualSize_; }
+        inline void setPositionOffset(Vector2 positionOffset)
+            {
+                this->positionOffset_ = positionOffset;
+                this->updatePosition();
+            }            
+        inline void setWeaponIndex(int index)
+            {
+                weaponIndex_ = index;
+                this->updatePosition();
+            }        
+
+    private:
+        virtual void createHUDChilds();
+        virtual void positionHUDChilds();
+        virtual void destroyHUDChilds();
+        virtual void updateWeaponModeList();
+        virtual void updateSize();
+        virtual void updatePosition();
+
+        WeakPtr<Pawn> owner_;
+        WeakPtr<Weapon> weapon_;
+
+        std::multimap<unsigned int, WeaponMode*>* weaponModes_;
+        std::vector<WeakPtr<HUDWeaponMode> > hudWeaponModes_;
+
+        Ogre::PanelOverlayElement* overlayElement_;
+
+        Vector2 weaponModeHUDActualSize_;
+        Vector2 positionOffset_;
+        int weaponIndex_;
+    };
+}
+
+#endif /* _HUDWeapon_H__ */
Index: /code/trunk/src/modules/overlays/hud/HUDWeaponMode.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDWeaponMode.cc	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDWeaponMode.cc	(revision 11052)
@@ -0,0 +1,289 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "HUDWeaponMode.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Convert.h"
+#include "core/class/Super.h"
+
+namespace orxonox
+{
+    RegisterClass(HUDWeaponMode);
+
+    HUDWeaponMode::HUDWeaponMode(Context* context) : OrxonoxOverlay(context)
+    {
+        RegisterObject(HUDWeaponMode);
+
+        weaponIndex_ = 0;
+        weaponModeIndex_ = 0;
+
+        overlayElementIcon_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWeaponMode" + getUniqueNumberString()));
+        overlayElementIcon_->setPosition(0.0f,0.0f);
+        overlayElementIcon_->setDimensions(1.0f,1.0f);
+        this->background_->addChild(overlayElementIcon_);
+
+        overlayElementReplenish_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWeaponMode" + getUniqueNumberString()));
+        overlayElementReplenish_->setPosition(0.0f,0.0f);
+        overlayElementReplenish_->setDimensions(1.0f,1.0f);
+        this->background_->addChild(overlayElementReplenish_);
+
+        overlayElementMunition_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWeaponMode" + getUniqueNumberString()));
+        overlayElementMunition_->setPosition(0.0f,0.0f);
+        overlayElementMunition_->setDimensions(1.0f,1.0f);
+        this->background_->addChild(overlayElementMunition_);
+
+        overlayElementState_ = static_cast<Ogre::PanelOverlayElement* >(Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "HUDWeaponMode" + getUniqueNumberString()));
+        overlayElementState_->setPosition(0.0f,0.0f);
+        overlayElementState_->setDimensions(1.0f,1.0f);
+        this->background_->addChild(overlayElementState_);
+
+        overlayElementIcon_->show();
+        overlayElementReplenish_->show();
+        overlayElementMunition_->show();
+        overlayElementState_->show();
+
+        // Create two text overlays
+        this->textOverlayLeft_ = new OverlayText(this->getContext());
+        assert(this->textOverlayLeft_.get());
+        this->textOverlayLeft_->setCaption("?");
+        textOverlayLeft_->setPickPoint(Vector2(0.0f,0.0f));
+        textOverlayLeft_->setVisible(true);
+        textOverlayLeft_->setAlignment(OverlayText::Center);
+        textOverlayLeft_->setTextSize(0.02f);
+        textOverlayLeft_->setColour(ColourValue(0.21,0.70,0.21,1.0));
+        textOverlayLeft_->setAspectCorrection(false);
+        textOverlayLeft_->setZOrder(600);
+        
+        this->textOverlayRight_ = new OverlayText(this->getContext());
+        assert(this->textOverlayRight_.get());
+        this->textOverlayRight_->setCaption("?");
+        textOverlayRight_->setPickPoint(Vector2(0.0f,0.0f));
+        textOverlayRight_->setVisible(true);
+        textOverlayRight_->setAlignment(OverlayText::Center);
+        textOverlayRight_->setTextSize(0.02f);
+        textOverlayRight_->setColour(ColourValue(0.21,0.70,0.21,1.0));
+        textOverlayRight_->setAspectCorrection(false);
+        textOverlayRight_->setZOrder(600);
+
+        materialNameState_ = "";
+
+        overlayElementReplenish_->setMaterialName("Orxonox/WSHUD_Replenish");
+    }
+
+    HUDWeaponMode::~HUDWeaponMode()
+    {
+        if (this->isInitialized())
+        {
+            this->textOverlayLeft_->destroy();
+            this->textOverlayRight_->destroy();
+        }
+    }
+
+    void HUDWeaponMode::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(HUDWeaponMode, XMLPort, xmlelement, mode);
+    }
+
+    void HUDWeaponMode::tick(float dt)
+    {
+        SUPER(HUDWeaponMode, tick, dt);
+
+        if (this->owner_ && this->weaponMode_)
+        {
+            std::string lastMaterialNameState = materialNameState_;
+
+            if (weaponMode_->getReloading())
+            {
+                materialNameState_ = "Orxonox/WSHUD_Reloading";
+            }
+            else
+            {
+                materialNameState_ = "Orxonox/WSHUD_Ready";
+            }            
+
+            Munition* munition = this->weaponMode_->getMunition();
+
+            if (munition != NULL)
+            {
+                MunitionDeployment::Value deployment = munition->getMunitionDeployment();
+
+                if (deployment == MunitionDeployment::Share)
+                {
+                    this->textOverlayLeft_->setCaption(multi_cast<std::string>(munition->getNumMunitionInCurrentMagazine(weaponMode_)));
+                    this->textOverlayRight_->setCaption(multi_cast<std::string>(munition->getNumMagazines()));
+                }
+                else if (deployment == MunitionDeployment::Stack)
+                {
+                    this->textOverlayLeft_->setCaption(multi_cast<std::string>(munition->getNumMunition(weaponMode_)));
+                    this->textOverlayRight_->setCaption("");
+                }
+                else if (deployment == MunitionDeployment::Separate)
+                {
+                    this->textOverlayLeft_->setCaption(multi_cast<std::string>(munition->getNumMunitionInCurrentMagazine(weaponMode_)));
+                    this->textOverlayRight_->setCaption(multi_cast<std::string>(munition->getNumMagazines()));
+                }
+
+                if (munition->getNumMunition(weaponMode_) == 0)
+                {
+                    materialNameState_ = "Orxonox/WSHUD_Empty";
+                }
+
+                if (munition->isA(Class(ReplenishingMunition)))
+                {
+                    ReplenishingMunition* replenishingMunition = dynamic_cast<ReplenishingMunition*>(munition);
+
+                    if (replenishingMunition->canAddMagazines(1))
+                    {
+                        float progress = 1.0f - replenishingMunition->getProgress();
+                        overlayElementReplenish_->setDimensions(1.0f,progress);                    
+                    }
+                    else
+                    {
+                        overlayElementReplenish_->setDimensions(1.0f,1.0f);
+                    }
+                }
+            }
+
+            if (materialNameState_ != lastMaterialNameState)
+            {
+                overlayElementState_->setMaterialName(materialNameState_);
+            }
+        }
+    }    
+
+    void HUDWeaponMode::positionChanged()
+    {
+        OrxonoxOverlay::positionChanged();
+
+        positionHUDChilds();
+    }
+
+    void HUDWeaponMode::sizeChanged()
+    {
+        OrxonoxOverlay::sizeChanged();
+
+        positionHUDChilds();
+    }
+
+    void HUDWeaponMode::changedOwner()
+    {
+        SUPER(HUDWeaponMode, changedOwner);
+
+        this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+
+        materialNameState_ = ""; // Needed to set the material in the tick after a change of the owner.
+    }
+
+    void HUDWeaponMode::changedOverlayGroup()
+    {
+        SUPER(HUDWeaponMode, changedOverlayGroup);
+
+        this->getOverlayGroup()->addElement(this->textOverlayLeft_.get());
+        this->getOverlayGroup()->addElement(this->textOverlayRight_.get());
+    }   
+
+    void HUDWeaponMode::changedVisibility()
+    {
+        SUPER(HUDWeaponMode, changedVisibility);
+
+        bool visible = this->isVisible();
+
+        this->textOverlayLeft_->setVisible(visible);
+        this->textOverlayRight_->setVisible(visible);
+    }
+
+    void HUDWeaponMode::changedName()
+    {
+        SUPER(HUDWeaponMode, changedName);
+
+        //this->textOverlay_->setName(this->getName() + "text");
+    }  
+
+    void HUDWeaponMode::setWeaponMode(WeaponMode* weaponMode)
+    {
+        weaponMode_ = weaponMode;
+
+        if (!weaponMode_)
+        {
+            return;
+        }
+
+        std::string materialName = weaponMode_->getHUDImageString();
+
+        overlayElementIcon_->setMaterialName(materialName);
+
+        Munition* munition = this->weaponMode_->getMunition();
+
+        if (munition != NULL)
+        {
+            MunitionDeployment::Value deployment = munition->getMunitionDeployment();
+
+            if (deployment == MunitionDeployment::Share)
+            {
+                overlayElementMunition_->setMaterialName("Orxonox/WSHUD_MunitionShare");
+            }
+            else if (deployment == MunitionDeployment::Stack)
+            {
+                overlayElementMunition_->setMaterialName("Orxonox/WSHUD_MunitionStack");
+            }
+            else if (deployment == MunitionDeployment::Separate)
+            {
+                overlayElementMunition_->setMaterialName("Orxonox/WSHUD_MunitionSeparate");
+            }
+        }
+    }
+
+    void HUDWeaponMode::positionHUDChilds()
+    {
+        Vector2 size = Vector2(getSize().x*45.0f/150.0f, getSize().y);
+        Vector2 offset1 = Vector2(getSize().x*82.5f/150.0f, 0.0f);
+        Vector2 offset2 = Vector2(getSize().x*127.5f/150.0f, 0.0f);
+
+        textOverlayLeft_->setPosition(getPosition() + offset1);
+        textOverlayRight_->setPosition(getPosition() + offset2);
+
+        textOverlayLeft_->setSize(size);
+        textOverlayRight_->setSize(size);
+
+        textOverlayLeft_->setTextSize(getSize().y);
+        textOverlayRight_->setTextSize(getSize().y);
+    }
+
+    void HUDWeaponMode::updateSize()
+    {
+        this->setSize(weaponModeHUDActualSize_);
+        updatePosition();
+    }
+
+    void HUDWeaponMode::updatePosition()
+    {
+        this->setPosition(Vector2(weaponModeHUDActualSize_.x*weaponIndex_,weaponModeHUDActualSize_.y*weaponModeIndex_) + this->positionOffset_);
+    }      
+}
Index: /code/trunk/src/modules/overlays/hud/HUDWeaponMode.h
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDWeaponMode.h	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDWeaponMode.h	(revision 11052)
@@ -0,0 +1,115 @@
+
+/*
+ *   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 _HUDWeaponMode_H__
+#define _HUDWeaponMode_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+#include <string>
+
+#include <OgreOverlayManager.h>
+#include <OgrePanelOverlayElement.h> 
+
+#include "overlays/OrxonoxOverlay.h"
+#include "overlays/OverlayText.h"
+#include "tools/interfaces/Tickable.h"
+#include "worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
+#include "weaponsystem/ReplenishingMunition.h"
+#include "weaponsystem/WeaponMode.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDWeaponMode : public OrxonoxOverlay, public Tickable
+    {
+    public:
+        HUDWeaponMode(Context* context);
+        virtual ~HUDWeaponMode();
+
+        virtual void tick(float dt);
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+        virtual void changedOwner();
+        virtual void changedOverlayGroup();
+        virtual void changedVisibility();
+        virtual void changedName();
+        virtual void positionChanged();
+        virtual void sizeChanged();
+
+        virtual void setWeaponMode(WeaponMode* weaponMode);
+
+        inline void setWeaponModeHUDActualSize(Vector2 vector)
+            { weaponModeHUDActualSize_ = vector;
+              this->updateSize();
+            }
+        inline Vector2 getWeaponModeHUDActualSize() const
+            { return weaponModeHUDActualSize_; }
+        inline void setWeaponIndex(int index)
+            { weaponIndex_ = index;
+              this->updatePosition();
+            }
+        inline void setWeaponModeIndex(int index)
+            { weaponModeIndex_ = index;
+              this->updatePosition();
+            }
+        inline void setPositionOffset(Vector2 positionOffset)
+            {
+                this->positionOffset_ = positionOffset;
+                this->updatePosition();
+            }
+
+    private:
+        virtual void updateSize();
+        virtual void updatePosition();
+        virtual void positionHUDChilds();
+
+        WeakPtr<Pawn> owner_;
+        WeakPtr<WeaponMode> weaponMode_;
+
+        Ogre::PanelOverlayElement* overlayElementIcon_;
+        Ogre::PanelOverlayElement* overlayElementReplenish_;
+        Ogre::PanelOverlayElement* overlayElementMunition_;
+        Ogre::PanelOverlayElement* overlayElementState_;
+
+        std::string materialNameState_;
+
+        StrongPtr<OverlayText> textOverlayLeft_;
+        StrongPtr<OverlayText> textOverlayRight_;
+
+        Vector2 weaponModeHUDActualSize_;
+        Vector2 positionOffset_;
+        int weaponIndex_;
+        int weaponModeIndex_;
+    };
+}
+
+#endif /* _HUDWeaponMode_H__ */
Index: /code/trunk/src/modules/overlays/hud/HUDWeaponSystem.cc
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDWeaponSystem.cc	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDWeaponSystem.cc	(revision 11052)
@@ -0,0 +1,188 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "HUDWeaponSystem.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "weaponsystem/WeaponSystem.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/Weapon.h"
+#include "util/Convert.h"
+#include "core/class/Super.h"
+
+namespace orxonox
+{
+    RegisterClass(HUDWeaponSystem);
+
+    HUDWeaponSystem::HUDWeaponSystem(Context* context) : OrxonoxOverlay(context)
+    {
+        RegisterObject(HUDWeaponSystem);
+
+        weaponModeHUDSize_ = Vector2(0.0f,0.0f);
+        weaponModeHUDActualSize_ = Vector2(0.0f,0.0f);        
+
+        weapons_.clear();
+        hudWeapons_.clear();
+    }
+
+    HUDWeaponSystem::~HUDWeaponSystem()
+    {
+        if (this->isInitialized())
+        {
+            destroyHUDChilds();
+        }
+    }
+
+    void HUDWeaponSystem::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(HUDWeaponSystem, XMLPort, xmlelement, mode);
+
+        XMLPortParam(HUDWeaponSystem, "weaponModeHUDSize", setWeaponModeHUDSize, getWeaponModeHUDSize, xmlelement, mode);
+    }
+
+    void HUDWeaponSystem::positionChanged()
+    {
+        OrxonoxOverlay::positionChanged();
+
+        positionHUDChilds();
+    }
+
+    void HUDWeaponSystem::sizeChanged()
+    {
+        OrxonoxOverlay::sizeChanged();
+
+        weaponModeHUDActualSize_ = this->getActualSize();
+
+        positionHUDChilds();
+    }
+
+    void HUDWeaponSystem::changedOwner()
+    {
+        SUPER(HUDWeaponSystem, changedOwner);
+
+        this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
+
+        updateWeaponList();
+    }
+
+    void HUDWeaponSystem::changedOverlayGroup()
+    {
+        SUPER(HUDWeaponSystem, changedOverlayGroup);
+    }   
+
+    void HUDWeaponSystem::changedVisibility()
+    {
+        SUPER(HUDWeaponSystem, changedVisibility);
+
+        bool visible = this->isVisible();
+
+        for (std::vector<WeakPtr<HUDWeapon> >::iterator it = hudWeapons_.begin(); it != hudWeapons_.end(); ++it)
+        {
+            (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed
+            (*it)->setVisible(visible);
+        }
+    }
+
+    void HUDWeaponSystem::changedName()
+    {
+        SUPER(HUDWeaponSystem, changedName);
+    }  
+
+    void HUDWeaponSystem::updateWeaponList()
+    {
+        if (owner_ == NULL)
+        {
+            return;
+        }
+
+        weapons_.clear();
+
+        destroyHUDChilds();
+
+        std::vector<WeaponPack*>* weaponPacks = owner_->getAllWeaponPacks();
+
+        for (std::vector<WeaponPack*>::const_iterator itPacks = weaponPacks->begin(); itPacks != weaponPacks->end(); ++itPacks)
+        {
+            std::vector<Weapon*>* weapons = (*itPacks)->getAllWeapons();
+
+            for (std::vector<Weapon*>::const_iterator itWeapons = weapons->begin(); itWeapons != weapons->end(); ++itWeapons)
+            {
+                this->weapons_.push_back(*itWeapons);
+            }
+        }
+
+        createHUDChilds();
+        positionHUDChilds();
+    }
+
+    void HUDWeaponSystem::createHUDChilds()
+    {
+        int positionIndex = 0;
+
+        for (std::vector<WeakPtr<Weapon> >::iterator it = weapons_.begin(); it != weapons_.end(); ++it)
+        {
+            HUDWeapon* hudWeapon = new HUDWeapon(this->getContext());
+            hudWeapon->setOwner(owner_);
+            hudWeapon->setOverlayGroup(this->getOverlayGroup());
+            hudWeapon->setVisible(this->isVisible());
+            hudWeapon->setWeapon(*it);
+            hudWeapon->setAspectCorrection(false);
+            hudWeapon->setPickPoint(Vector2(0.0f,0.0f));
+
+            hudWeapons_.push_back(hudWeapon);
+
+            ++ positionIndex;
+        }
+    }      
+
+    void HUDWeaponSystem::positionHUDChilds()
+    {
+        int positionIndex = 0;
+        Vector2 offset = this->getPosition();
+
+        for (std::vector<WeakPtr<HUDWeapon> >::iterator it = hudWeapons_.begin(); it != hudWeapons_.end(); ++it)
+        {
+            (*it)->setPositionOffset(offset);
+            (*it)->setWeaponIndex(positionIndex);
+            (*it)->setWeaponModeHUDActualSize(this->weaponModeHUDActualSize_);
+
+            ++ positionIndex;
+        }
+    }  
+
+    void HUDWeaponSystem::destroyHUDChilds()
+    {
+        for (std::vector<WeakPtr<HUDWeapon> >::iterator it = hudWeapons_.begin(); it != hudWeapons_.end(); ++it)
+        {
+            (*it)->destroy();
+        } 
+
+        hudWeapons_.clear();     
+    }
+}
Index: /code/trunk/src/modules/overlays/hud/HUDWeaponSystem.h
===================================================================
--- /code/trunk/src/modules/overlays/hud/HUDWeaponSystem.h	(revision 11052)
+++ /code/trunk/src/modules/overlays/hud/HUDWeaponSystem.h	(revision 11052)
@@ -0,0 +1,81 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _HUDWeaponSystem_H__
+#define _HUDWeaponSystem_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <vector>
+#include <string>
+
+#include "overlays/OrxonoxOverlay.h"
+#include "worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
+#include "HUDWeapon.h"
+
+namespace orxonox
+{
+    class _OverlaysExport HUDWeaponSystem : public OrxonoxOverlay
+    {
+    public:
+        HUDWeaponSystem(Context* context);
+        virtual ~HUDWeaponSystem();
+
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+        virtual void changedOwner();
+        virtual void changedOverlayGroup();
+        virtual void changedVisibility();
+        virtual void changedName();
+        virtual void positionChanged();
+        virtual void sizeChanged();
+    protected:
+        inline void setWeaponModeHUDSize(Vector2 vector)
+            { weaponModeHUDSize_ = vector;
+                this->setSize(weaponModeHUDSize_);
+            }
+        inline Vector2 getWeaponModeHUDSize() const
+            { return weaponModeHUDSize_; }
+    private:
+        virtual void updateWeaponList();
+        virtual void createHUDChilds();
+        virtual void positionHUDChilds();
+        virtual void destroyHUDChilds();
+
+        WeakPtr<Pawn> owner_;
+
+        std::vector<WeakPtr<Weapon> > weapons_;
+        std::vector<WeakPtr<HUDWeapon> > hudWeapons_;
+
+        Vector2 weaponModeHUDSize_;
+        Vector2 weaponModeHUDActualSize_;
+    };
+}
+
+#endif /* _HUDWeaponSystem_H__ */
Index: /code/trunk/src/modules/pickup/PickupPrereqs.h
===================================================================
--- /code/trunk/src/modules/pickup/PickupPrereqs.h	(revision 11051)
+++ /code/trunk/src/modules/pickup/PickupPrereqs.h	(revision 11052)
@@ -85,4 +85,6 @@
     class ShrinkPickup;
     class DamageBoostPickup;
+    class MunitionPickup;
+    class MunitionContainer;
 }
 
Index: /code/trunk/src/modules/pickup/PickupRepresentation.cc
===================================================================
--- /code/trunk/src/modules/pickup/PickupRepresentation.cc	(revision 11051)
+++ /code/trunk/src/modules/pickup/PickupRepresentation.cc	(revision 11052)
@@ -187,5 +187,5 @@
         Billboard* icon = new Billboard(spawner->getContext());
         icon->setColour(ColourValue(0.89f, 0.79f, 0.08f));
-        icon->setMaterial("asterisk");
+        icon->setMaterial("Unknown");
         icon->setScale(0.5);
         sphere->attach(icon);
Index: /code/trunk/src/modules/pickup/items/BoostPickup.cc
===================================================================
--- /code/trunk/src/modules/pickup/items/BoostPickup.cc	(revision 11052)
+++ /code/trunk/src/modules/pickup/items/BoostPickup.cc	(revision 11052)
@@ -0,0 +1,147 @@
+/*
+ *   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 BoostPickup.cc
+    @brief Implementation of the BoostPickup class.
+*/
+
+#include "BoostPickup.h"
+
+#include <sstream>
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "worldentities/pawns/SpaceShip.h"
+
+namespace orxonox
+{
+    RegisterClass(BoostPickup);
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes the member variables.
+    */
+    BoostPickup::BoostPickup(Context* context) : Pickup(context)
+    {
+        RegisterObject(BoostPickup);
+
+        this->initialize();
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    BoostPickup::~BoostPickup()
+    {
+    }
+
+    /**
+    @brief
+        Initializes the member variables.
+    */
+    void BoostPickup::initialize(void)
+    {
+        this->boostRefill_ = 0.0f;
+        //Defines who is allowed to pick up the pickup.
+        this->addTarget(ClassIdentifier<SpaceShip>::getIdentifier());
+    }
+
+    /**
+    @brief
+        Method for creating a BoostPickup object through XML.
+    */
+    void BoostPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
+    {
+        SUPER(BoostPickup, XMLPort, xmlelement, mode);
+
+        XMLPortParam(BoostPickup, "boostrefill", setBoostRefill, getBoostRefill, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Set the boost refill of this pickup.
+    */
+    void BoostPickup::setBoostRefill(float boostRefill)
+    {
+        if(boostRefill >= 0.0f && boostRefill <= 1.0f)
+        {
+            this->boostRefill_ = boostRefill;
+        }
+    }
+
+    /**
+    @brief
+        Is called when the pickup has transisted from used to unused or the other way around.
+    */
+    void BoostPickup::changedUsed(void)
+    {
+        SUPER(BoostPickup, changedUsed);
+
+        SpaceShip* ship = this->carrierToSpaceShipHelper();
+        if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
+            this->Pickupable::destroy();
+
+        // If the pickup has transited to used.
+        if(this->isUsed())
+        {
+            float gainedBoostPower = ship->getInitialBoostPower() * boostRefill_;
+            ship->gainBoostPower(gainedBoostPower);
+
+            // This will destroy the pickp
+            this->setUsed(false);
+        }
+        else
+        {
+            this->Pickupable::destroy();
+        }
+    }
+
+    /**
+    @brief
+        Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
+    @return
+        A pointer to the SpaceShip, or NULL if the conversion failed.
+    */
+    SpaceShip* BoostPickup::carrierToSpaceShipHelper(void)
+    {
+        PickupCarrier* carrier = this->getCarrier();
+        SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier);
+
+        if(ship == NULL)
+        {
+            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in BoostPickup." << endl;
+        }
+
+        return ship;
+    }
+
+
+}
+
Index: /code/trunk/src/modules/pickup/items/BoostPickup.h
===================================================================
--- /code/trunk/src/modules/pickup/items/BoostPickup.h	(revision 11052)
+++ /code/trunk/src/modules/pickup/items/BoostPickup.h	(revision 11052)
@@ -0,0 +1,72 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file BoostPickup.h
+    @brief Declaration of the BoostPickup class.
+    @ingroup PickupItems
+*/
+
+#ifndef _BoostPickup_H__
+#define _BoostPickup_H__
+
+#include "pickup/PickupPrereqs.h"
+
+#include <string>
+
+#include "pickup/Pickup.h"
+
+namespace orxonox
+{
+
+    class _PickupExport BoostPickup : public Pickup
+    {
+        public:
+
+            BoostPickup(Context* context); //!< Constructor.
+            virtual ~BoostPickup(); //!< Destructor.
+
+            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a BoostPickup object through XML.
+
+            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
+            inline float getBoostRefill()
+                { return this->boostRefill_; }
+
+        protected:
+            void setBoostRefill(float boostRefill); //!< Sets the boost refill according to the XML.
+
+        private:
+            void initialize(void); //!< Initializes the member variables.
+            Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+            SpaceShip* carrierToSpaceShipHelper(void); //!< Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
+
+            float boostRefill_; //!< The amount of boost refilled by the user of the pickup. 1.0 means full refill, 0.5 means half refill.
+    };
+}
+
+#endif /* _BoostPickup_H__ */
Index: /code/trunk/src/modules/pickup/items/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/pickup/items/CMakeLists.txt	(revision 11051)
+++ /code/trunk/src/modules/pickup/items/CMakeLists.txt	(revision 11052)
@@ -8,3 +8,6 @@
   ShrinkPickup.cc
   DamageBoostPickup.cc
+  BoostPickup.cc
+  MunitionPickup.cc
+  MunitionContainer.cc
 )
Index: /code/trunk/src/modules/pickup/items/DronePickup.h
===================================================================
--- /code/trunk/src/modules/pickup/items/DronePickup.h	(revision 11051)
+++ /code/trunk/src/modules/pickup/items/DronePickup.h	(revision 11052)
@@ -43,5 +43,6 @@
 #include "tools/interfaces/Tickable.h"
 
-namespace orxonox {
+namespace orxonox
+{
 
     /**
@@ -80,7 +81,4 @@
             std::string droneTemplate_; //!< The name of the template, based upon which the Drone is created.
             Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
-
-
-
     };
 }
Index: /code/trunk/src/modules/pickup/items/MunitionContainer.cc
===================================================================
--- /code/trunk/src/modules/pickup/items/MunitionContainer.cc	(revision 11052)
+++ /code/trunk/src/modules/pickup/items/MunitionContainer.cc	(revision 11052)
@@ -0,0 +1,117 @@
+/*
+ *   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 MunitionContainer.cc
+    @brief Implementation of the MunitionContainer class. This class is only used by the MunitionPickup class to defines  how much munition of what type the pickup contains.
+*/
+
+#include "MunitionContainer.h"
+
+#include <sstream>
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(MunitionContainer);
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes the member variables.
+    */
+    MunitionContainer::MunitionContainer(Context* context) : BaseObject(context)
+    {
+        RegisterObject(MunitionContainer);
+
+        this->munitionName_ = "";
+        this->munitionAmount_ = 1;
+        this->magazinesAmount_ = 1;
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    MunitionContainer::~MunitionContainer()
+    {
+    }    
+
+    /**
+    @brief
+        Method for creating a MunitionContainer object through XML.
+    */
+    void MunitionContainer::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
+    {
+        SUPER(MunitionContainer, XMLPort, xmlelement, mode);
+
+        XMLPortParam(MunitionContainer, "munitiontype", setMunitionName, getMunitionName, xmlelement, mode).defaultValues("LaserMunition");
+        XMLPortParam(MunitionContainer, "munitionamount", setMunitionAmount, getMunitionAmount, xmlelement, mode).defaultValues(1);
+        XMLPortParam(MunitionContainer, "magazinesamount", setMagazinesAmount, getMagazinesAmount, xmlelement, mode).defaultValues(0);
+    }
+
+    void MunitionContainer::setMunitionName(const std::string& munitionName)
+    {
+        Identifier* identifier = ClassByString(munitionName);
+        if (identifier)
+        {
+            this->munitionName_ = munitionName;
+            this->munitionType_ = identifier;
+        }
+        else
+        {
+            this->munitionName_ = "";            
+            orxout(internal_warning) << "Invalid munition class defined in MunitionContainer." << endl;
+        }
+    }   
+
+    void MunitionContainer::setMunitionAmount(int munitionAmount)
+    {
+        if (munitionAmount > 0)
+        {
+            munitionAmount_ = munitionAmount;
+        }
+        else
+        {
+            munitionAmount_ = 0;
+        }
+    }
+
+    void MunitionContainer::setMagazinesAmount(int magazinesAmount)
+    {
+        if (magazinesAmount > 0)
+        {
+            magazinesAmount_ = magazinesAmount;
+        }
+        else
+        {
+            magazinesAmount_ = 0;
+        }
+    }         
+}
+
Index: /code/trunk/src/modules/pickup/items/MunitionContainer.h
===================================================================
--- /code/trunk/src/modules/pickup/items/MunitionContainer.h	(revision 11052)
+++ /code/trunk/src/modules/pickup/items/MunitionContainer.h	(revision 11052)
@@ -0,0 +1,80 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file MunitionContainer.h
+    @brief Declaration of the MunitionContainer class.
+    @ingroup PickupItems
+*/
+
+#ifndef _MunitionContainer_H__
+#define _MunitionContainer_H__
+
+#include "pickup/PickupPrereqs.h"
+
+#include <string>
+
+#include "pickup/Pickup.h"
+#include "core/class/SubclassIdentifier.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+    class _PickupExport MunitionContainer : public BaseObject
+    {
+        public:
+
+            MunitionContainer(Context* context);
+            virtual ~MunitionContainer();
+
+            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode);
+
+            inline const std::string& getMunitionName() const
+                { return this->munitionName_; }
+            inline int getMunitionAmount() const
+                { return this->munitionAmount_; }
+            inline int getMagazinesAmount() const
+                { return this->magazinesAmount_; }
+            inline SubclassIdentifier<Munition> getMunitionType() const
+                { return munitionType_; }            
+
+        protected:
+            void setMunitionName(const std::string& munitionName);
+            void setMunitionAmount(int munitionAmount);
+            void setMagazinesAmount(int magazinesAmount_);
+
+        private:
+            SubclassIdentifier<Munition> munitionType_; //!< Indentifier of the munition type.
+            std::string munitionName_; //!< String containing the class name of the munition type (e.g. "LaserMunition")
+            int munitionAmount_; //!< The amount of singe bullets added
+            int magazinesAmount_; //!< The amount of full magazines added
+
+    };    
+}
+
+#endif // _MunitionContainer_H__
Index: /code/trunk/src/modules/pickup/items/MunitionPickup.cc
===================================================================
--- /code/trunk/src/modules/pickup/items/MunitionPickup.cc	(revision 11052)
+++ /code/trunk/src/modules/pickup/items/MunitionPickup.cc	(revision 11052)
@@ -0,0 +1,156 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file MunitionPickup.cc
+    @brief Implementation of the MunitionPickup class.
+*/
+
+#include "MunitionPickup.h"
+
+#include <sstream>
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "worldentities/pawns/Pawn.h"
+
+namespace orxonox
+{
+    RegisterClass(MunitionPickup);
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes the member variables.
+    */
+    MunitionPickup::MunitionPickup(Context* context) : Pickup(context)
+    {
+        RegisterObject(MunitionPickup);
+
+        this->initialize();
+    }
+
+    /**
+    @brief
+        Destructor.
+    */
+    MunitionPickup::~MunitionPickup()
+    {
+    }
+
+    /**
+    @brief
+        Initializes the member variables.
+    */
+    void MunitionPickup::initialize(void)
+    {
+        //Defines who is allowed to pick up the pickup.
+        this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
+    }
+
+    /**
+    @brief
+        Method for creating a MunitionPickup object through XML.
+    */
+    void MunitionPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
+    {
+        SUPER(MunitionPickup, XMLPort, xmlelement, mode);
+
+        XMLPortObject(MunitionPickup, MunitionContainer, "munitioncontainers", addMunitionContainer, getMunitionContainer, xmlelement, mode);
+    }
+
+    void MunitionPickup::addMunitionContainer(MunitionContainer* munitionContainer)
+    {
+        OrxAssert(munitionContainer != NULL, "The munitionContainer cannot be NULL.");
+        this->munitionContainers_.push_back(munitionContainer);
+    }
+
+    MunitionContainer* MunitionPickup::getMunitionContainer(unsigned int index)
+    {
+        if(this->munitionContainers_.size() >= index)
+            return NULL;
+        else
+            return this->munitionContainers_[index];
+    }
+
+    /**
+    @brief
+        Is called when the pickup has transisted from used to unused or the other way around.
+    */
+    void MunitionPickup::changedUsed(void)
+    {
+        SUPER(MunitionPickup, changedUsed);
+
+        Pawn* pawn = this->carrierToPawnHelper();
+
+        if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+            this->Pickupable::destroy();
+
+        // If the pickup has transited to used.
+        if(this->isUsed())
+        {
+            for(std::vector<MunitionContainer*>::iterator it = this->munitionContainers_.begin(); it != this->munitionContainers_.end(); ++it)
+            {
+                //Get pointer to the appropriate munition
+                SubclassIdentifier<Munition> identifier = (*it)->getMunitionType();
+                Munition* munition = pawn->getMunition(&identifier);
+                if (munition)
+                {
+                    // Add munition and magzines
+                    munition->addMunition((*it)->getMunitionAmount());
+                    munition->addMagazines((*it)->getMagazinesAmount());
+                }
+                (*it)->destroy();
+            }
+            // This will destroy the pickp
+            this->setUsed(false);
+        }
+        else
+        {
+            this->Pickupable::destroy();
+        }
+    }    
+
+    /**
+    @brief
+        Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+    @return
+        A pointer to the Pawn, or NULL if the conversion failed.
+    */
+    Pawn* MunitionPickup::carrierToPawnHelper(void)
+    {
+        PickupCarrier* carrier = this->getCarrier();
+        Pawn* pawn = orxonox_cast<Pawn*>(carrier);
+
+        if(pawn == NULL)
+        {
+            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in MunitionPickup." << endl;
+        }
+        return pawn;
+    }      
+}
+
Index: /code/trunk/src/modules/pickup/items/MunitionPickup.h
===================================================================
--- /code/trunk/src/modules/pickup/items/MunitionPickup.h	(revision 11052)
+++ /code/trunk/src/modules/pickup/items/MunitionPickup.h	(revision 11052)
@@ -0,0 +1,77 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file MunitionPickup.h
+    @brief Declaration of the MunitionPickup class.
+    @ingroup PickupItems
+*/
+
+#ifndef _MunitionPickup_H__
+#define _MunitionPickup_H__
+
+#include "pickup/PickupPrereqs.h"
+
+#include <string>
+#include <vector>
+
+#include "pickup/Pickup.h"
+#include "pickup/items/MunitionContainer.h"
+#include "core/class/SubclassIdentifier.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        The MunitionPickup gives munition to the user (a @ref Pawn).
+    */
+    class _PickupExport MunitionPickup : public Pickup
+    {
+        public:
+
+            MunitionPickup(Context* context); //!< Constructor.
+            virtual ~MunitionPickup(); //!< Destructor.
+
+            virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a MunitionPickup object through XML.
+
+            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
+
+            virtual void addMunitionContainer(MunitionContainer* munitionContainer);
+            MunitionContainer* getMunitionContainer(unsigned int index);
+
+        private:            
+            void initialize(void); //!< Initializes the member variables.
+            Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+            
+            std::vector<MunitionContainer*> munitionContainers_;
+
+    };
+}
+
+#endif // _MunitionPickup_H__
Index: /code/trunk/src/modules/towerdefense/TowerDefenseSelecter.cc
===================================================================
--- /code/trunk/src/modules/towerdefense/TowerDefenseSelecter.cc	(revision 11051)
+++ /code/trunk/src/modules/towerdefense/TowerDefenseSelecter.cc	(revision 11052)
@@ -88,5 +88,5 @@
             {
                 moveDownPressed_ = false;
-            	selectedPos_->Set(selecterPosX, selecterPosY - 1);
+                selectedPos_->Set(selecterPosX, selecterPosY - 1);
                 updatePosition();
             }
@@ -100,5 +100,5 @@
             {
                 moveRightPressed_ = false;
-            	selectedPos_->Set(selecterPosX + 1, selecterPosY);
+                selectedPos_->Set(selecterPosX + 1, selecterPosY);
                 updatePosition();
             }
Index: /code/trunk/src/modules/towerdefense/TowerDefenseTower.cc
===================================================================
--- /code/trunk/src/modules/towerdefense/TowerDefenseTower.cc	(revision 11051)
+++ /code/trunk/src/modules/towerdefense/TowerDefenseTower.cc	(revision 11052)
@@ -61,12 +61,7 @@
         {
             upgrade++;
-            float reloadrate = getReloadRate();
-            float reloadwaittime = getReloadWaitTime();
             this->setDamageMultiplier((upgrade+1)*2.0f);
+
             //this->setRotationThrust(2*this->getRotationThrust());
-            reloadrate = 0.5f*reloadrate;
-            reloadwaittime = 0.5f*reloadwaittime;
-            setReloadRate(reloadrate);
-            setReloadWaitTime(reloadwaittime);
             //this->addTemplate("towerturret1");
         }
Index: /code/trunk/src/modules/weapons/WeaponsPrereqs.h
===================================================================
--- /code/trunk/src/modules/weapons/WeaponsPrereqs.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/WeaponsPrereqs.h	(revision 11052)
@@ -69,11 +69,15 @@
 {
     class MuzzleFlash;
+    class IceGunFreezer;
+    class RocketController;
 
     // munitions
     class FusionMunition;
     class LaserMunition;
-    class ReplenishingMunition;
     class RocketMunition;
     class GravityBombMuntion;
+    class IceMunition;
+    class LightningMunition;
+    class SplitMunition;
 
     // projectiles
@@ -81,5 +85,8 @@
     class LightningGunProjectile;
     class ParticleProjectile;
+    class IceProjectile;
+    class SplitProjectile;
     class Projectile;
+    class BasicProjectile;
     class Rocket;
     class RocketOld;
@@ -91,6 +98,9 @@
     class FusionFire;
     class HsW01;
+    class IceGun;
+    class SplitGun;
     class LaserFire;
     class LightningGun;
+    class MineGun;
     class RocketFire;
     class RocketFireOld;
Index: /code/trunk/src/modules/weapons/munitions/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/weapons/munitions/CMakeLists.txt	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/CMakeLists.txt	(revision 11052)
@@ -1,5 +1,5 @@
 ADD_SOURCE_FILES(WEAPONS_SRC_FILES
-  ReplenishingMunition.cc
   LaserMunition.cc
+  LightningMunition.cc
   FusionMunition.cc
   RocketMunition.cc
@@ -7,3 +7,4 @@
   IceMunition.cc
   SplitMunition.cc
+  MineMunition.cc
 )
Index: /code/trunk/src/modules/weapons/munitions/FusionMunition.cc
===================================================================
--- /code/trunk/src/modules/weapons/munitions/FusionMunition.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/FusionMunition.cc	(revision 11052)
@@ -28,5 +28,5 @@
 
 /**
-    @file FusionMunition.h
+    @file FusionMunition.cc
     @brief Implementation of the FusionMunition class.
 */
@@ -34,4 +34,5 @@
 #include "FusionMunition.h"
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 
 namespace orxonox
@@ -45,12 +46,19 @@
         this->maxMunitionPerMagazine_ = 10;
         this->maxMagazines_ = 10;
-        this->magazines_ = 10;
+        this->unassignedMagazines_ = 10;
 
-        this->bUseSeparateMagazines_ = true;
-        this->bStackMunition_ = false;
+        this->deployment_ = MunitionDeployment::Separate;
+
         this->reloadTime_ = 1.0f;
 
         this->bAllowMunitionRefilling_ = true;
         this->bAllowMultiMunitionRemovementUnderflow_ = true;
+
+        this->reloadTime_ = 0.5f;
+    }
+
+    void FusionMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(FusionMunition, XMLPort, xmlelement, mode);
     }
 }
Index: /code/trunk/src/modules/weapons/munitions/FusionMunition.h
===================================================================
--- /code/trunk/src/modules/weapons/munitions/FusionMunition.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/FusionMunition.h	(revision 11052)
@@ -53,4 +53,5 @@
             FusionMunition(Context* context);
             virtual ~FusionMunition() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     };
 }
Index: /code/trunk/src/modules/weapons/munitions/GravityBombMunition.cc
===================================================================
--- /code/trunk/src/modules/weapons/munitions/GravityBombMunition.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/GravityBombMunition.cc	(revision 11052)
@@ -7,4 +7,5 @@
 #include "GravityBombMunition.h"
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 
 namespace orxonox
@@ -17,13 +18,18 @@
         this->maxMunitionPerMagazine_ = 1;
         this->maxMagazines_ = 30;
-        this->magazines_ = 15;
+        this->unassignedMagazines_ = 15;
 
-        this->bUseSeparateMagazines_ = false;
-        this->bStackMunition_ = true;
+        this->deployment_ = MunitionDeployment::Stack;
 
         this->bAllowMunitionRefilling_ = true;
         this->bAllowMultiMunitionRemovementUnderflow_ = false;
+
+        this->reloadTime_ = 0.0f;
     }
 
+    void GravityBombMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(GravityBombMunition, XMLPort, xmlelement, mode);
+    }
 }
 
Index: /code/trunk/src/modules/weapons/munitions/GravityBombMunition.h
===================================================================
--- /code/trunk/src/modules/weapons/munitions/GravityBombMunition.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/GravityBombMunition.h	(revision 11052)
@@ -28,4 +28,5 @@
             GravityBombMunition(Context* context);
             virtual ~GravityBombMunition() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     };
 
Index: /code/trunk/src/modules/weapons/munitions/IceMunition.cc
===================================================================
--- /code/trunk/src/modules/weapons/munitions/IceMunition.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/IceMunition.cc	(revision 11052)
@@ -28,5 +28,5 @@
 
 /**
-    @file IceMunition.h
+    @file IceMunition.cc
     @brief Implementation of the IceMunition class.
 */
@@ -34,4 +34,5 @@
 #include "IceMunition.h"
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 
 namespace orxonox
@@ -45,11 +46,17 @@
         this->maxMunitionPerMagazine_ = 1;
         this->maxMagazines_ = 50;
-        this->magazines_ = 25;
+        this->unassignedMagazines_ = 25;
 
-        this->bUseSeparateMagazines_ = false;
-        this->bStackMunition_ = true;
+        this->deployment_ = MunitionDeployment::Stack;
 
-        this->bAllowMunitionRefilling_ = false;
+        this->bAllowMunitionRefilling_ = true;
         this->bAllowMultiMunitionRemovementUnderflow_ = false;
+
+        this->reloadTime_ = 0.5f;
+    }
+
+    void IceMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(IceMunition, XMLPort, xmlelement, mode);
     }
 }
Index: /code/trunk/src/modules/weapons/munitions/IceMunition.h
===================================================================
--- /code/trunk/src/modules/weapons/munitions/IceMunition.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/IceMunition.h	(revision 11052)
@@ -53,4 +53,5 @@
             IceMunition(Context* context);
             virtual ~IceMunition() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     };
 }
Index: /code/trunk/src/modules/weapons/munitions/LaserMunition.cc
===================================================================
--- /code/trunk/src/modules/weapons/munitions/LaserMunition.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/LaserMunition.cc	(revision 11052)
@@ -28,5 +28,5 @@
 
 /**
-    @file LaserMunition.h
+    @file LaserMunition.cc
     @brief Implementation of the LaserMunition class.
 */
@@ -34,4 +34,5 @@
 #include "LaserMunition.h"
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 
 namespace orxonox
@@ -44,15 +45,21 @@
 
         this->maxMunitionPerMagazine_ = 20;
-        this->maxMagazines_ = 1;
-        this->magazines_ = 1;
+        this->maxMagazines_ = 10;
+        this->unassignedMagazines_ = 10;
 
-        this->bUseSeparateMagazines_ = false;
-        this->bStackMunition_ = true;
+        this->deployment_ = MunitionDeployment::Separate;
 
         this->bAllowMunitionRefilling_ = true;
         this->bAllowMultiMunitionRemovementUnderflow_ = true;
 
-        this->replenishInterval_ = 0.5f;
-        this->replenishMunitionAmount_ = 1;
+        this->replenishInterval_ = 7.0f;
+        this->replenishAmount_ = 1;
+
+        this->reloadTime_ = 0.5f;
+    }
+
+    void LaserMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(LaserMunition, XMLPort, xmlelement, mode);
     }
 }
Index: /code/trunk/src/modules/weapons/munitions/LaserMunition.h
===================================================================
--- /code/trunk/src/modules/weapons/munitions/LaserMunition.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/LaserMunition.h	(revision 11052)
@@ -36,5 +36,5 @@
 
 #include "weapons/WeaponsPrereqs.h"
-#include "ReplenishingMunition.h"
+#include "weaponsystem/ReplenishingMunition.h"
 
 namespace orxonox
@@ -53,4 +53,5 @@
             LaserMunition(Context* context);
             virtual ~LaserMunition() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     };
 }
Index: /code/trunk/src/modules/weapons/munitions/LightningMunition.cc
===================================================================
--- /code/trunk/src/modules/weapons/munitions/LightningMunition.cc	(revision 11052)
+++ /code/trunk/src/modules/weapons/munitions/LightningMunition.cc	(revision 11052)
@@ -0,0 +1,62 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file LightningMunition.cc
+    @brief Implementation of the LightningMunition class.
+*/
+
+#include "LightningMunition.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(LightningMunition);
+
+    LightningMunition::LightningMunition(Context* context) : Munition(context)
+    {
+        RegisterObject(LightningMunition);
+
+        this->maxMunitionPerMagazine_ = 20;
+        this->maxMagazines_ = 1;
+        this->unassignedMagazines_ = 1;
+
+        this->deployment_ = MunitionDeployment::Share;
+
+        this->bAllowMunitionRefilling_ = true;
+        this->bAllowMultiMunitionRemovementUnderflow_ = true;
+
+        this->reloadTime_ = 0.5f;    
+    }
+
+    void LightningMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(LightningMunition, XMLPort, xmlelement, mode);
+    }
+}
Index: /code/trunk/src/modules/weapons/munitions/LightningMunition.h
===================================================================
--- /code/trunk/src/modules/weapons/munitions/LightningMunition.h	(revision 11052)
+++ /code/trunk/src/modules/weapons/munitions/LightningMunition.h	(revision 11052)
@@ -0,0 +1,59 @@
+/*
+ *   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 LightningMunition.h
+    @brief Definition of the LightningMunition class.
+*/
+
+#ifndef _LightningMunition_H__
+#define _LightningMunition_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        LightningMunition.
+    @author
+        Fabien Vultier
+    @ingroup WeaponsMunitions
+    */
+    class _WeaponsExport LightningMunition : public Munition
+    {
+        public:
+            LightningMunition(Context* context);
+            virtual ~LightningMunition() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+    };
+}
+
+#endif /* _LightningMunition_H__ */
Index: /code/trunk/src/modules/weapons/munitions/MineMunition.cc
===================================================================
--- /code/trunk/src/modules/weapons/munitions/MineMunition.cc	(revision 11052)
+++ /code/trunk/src/modules/weapons/munitions/MineMunition.cc	(revision 11052)
@@ -0,0 +1,61 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file MineMunition.h
+    @brief Implementation of the MineMunition class.
+*/
+
+#include "MineMunition.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    RegisterClass(MineMunition);
+
+    MineMunition::MineMunition(Context* context) : Munition(context)
+    {
+        RegisterObject(MineMunition);
+
+        this->maxMunitionPerMagazine_ = 1;
+        this->maxMagazines_ = 100;
+        this->unassignedMagazines_ = 25;
+
+        this->deployment_ = MunitionDeployment::Stack;
+
+        this->bAllowMunitionRefilling_ = true;
+        this->bAllowMultiMunitionRemovementUnderflow_ = false;
+
+        this->reloadTime_ = 0.5f;
+    }
+
+    void MineMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(MineMunition, XMLPort, xmlelement, mode);
+    }
+}
Index: /code/trunk/src/modules/weapons/munitions/MineMunition.h
===================================================================
--- /code/trunk/src/modules/weapons/munitions/MineMunition.h	(revision 11052)
+++ /code/trunk/src/modules/weapons/munitions/MineMunition.h	(revision 11052)
@@ -0,0 +1,59 @@
+/*
+ *   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 MineMunition.h
+    @brief Definition of the MineMunition class.
+*/
+
+#ifndef _MineMunition_H__
+#define _MineMunition_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        MineMunition.
+    @author
+        Fabien Vultier
+    @ingroup WeaponsMunitions
+    */
+    class _WeaponsExport MineMunition : public Munition
+    {
+        public:
+            MineMunition(Context* context);
+            virtual ~MineMunition() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+    };
+}
+
+#endif /* _MineMunition_H__ */
Index: de/trunk/src/modules/weapons/munitions/ReplenishingMunition.cc
===================================================================
--- /code/trunk/src/modules/weapons/munitions/ReplenishingMunition.cc	(revision 11051)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file ReplenishingMunition.h
-    @brief Implementation of the ReplenishingMunition class.
-*/
-
-#include "ReplenishingMunition.h"
-
-#include "core/CoreIncludes.h"
-#include "core/command/Executor.h"
-
-namespace orxonox
-{
-    RegisterClass(ReplenishingMunition);
-
-    ReplenishingMunition::ReplenishingMunition(Context* context) : Munition(context)
-    {
-        RegisterObject(ReplenishingMunition);
-
-        this->replenishInterval_ = 1.0f;
-        this->replenishMunitionAmount_ = 1;
-
-        // Use the timer to initialize itself after the first tick (because the real values for
-        // replenishIntervall_ and replenishMunitionAmount_ will be set in the constructor of the
-        // inheriting class, which comes after this constructor)
-        this->replenishingTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&ReplenishingMunition::initializeTimer, this)));
-    }
-
-    void ReplenishingMunition::initializeTimer()
-    {
-        // Initialize the timer
-        this->replenishingTimer_.setTimer(this->replenishInterval_, true, createExecutor(createFunctor(&ReplenishingMunition::replenish, this)));
-    }
-
-    void ReplenishingMunition::replenish()
-    {
-        // Make a temporary copy of bAllowMunitionRefilling_, because this might be disallowed in every
-        // case except the internal munition replenishing
-        bool temp = this->bAllowMunitionRefilling_;
-        this->bAllowMunitionRefilling_ = true;
-
-        // Replenish munition
-        this->addMunition(this->replenishMunitionAmount_);
-
-        // Write back the temporary value
-        this->bAllowMunitionRefilling_ = temp;
-    }
-}
Index: de/trunk/src/modules/weapons/munitions/ReplenishingMunition.h
===================================================================
--- /code/trunk/src/modules/weapons/munitions/ReplenishingMunition.h	(revision 11051)
+++ 	(revision )
@@ -1,70 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file ReplenishingMunition.h
-    @brief Definition of the ReplenishingMunition class.
-*/
-
-#ifndef _ReplenishingMunition_H__
-#define _ReplenishingMunition_H__
-
-#include "weapons/WeaponsPrereqs.h"
-
-#include "tools/Timer.h"
-#include "weaponsystem/Munition.h"
-
-namespace orxonox
-{
-
-    /**
-    @brief
-        Munition that is replenished by a certain amount each time interval.
-    @author
-        Fabian 'x3n' Landau
-    @ingroup WeaponsMunitions
-    */
-    class _WeaponsExport ReplenishingMunition : public Munition
-    {
-        public:
-            ReplenishingMunition(Context* context);
-            virtual ~ReplenishingMunition() {}
-
-        protected:
-            float replenishInterval_; //!< The interval in which the munition is replenished.
-            unsigned int replenishMunitionAmount_; //!< The amount by which it is replenished.
-
-        private:
-            void replenish();
-            void initializeTimer();
-
-            Timer replenishingTimer_; //!< Timer to do the replenishing.
-    };
-}
-
-#endif /* _ReplenishingMunition_H__ */
Index: /code/trunk/src/modules/weapons/munitions/RocketMunition.cc
===================================================================
--- /code/trunk/src/modules/weapons/munitions/RocketMunition.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/RocketMunition.cc	(revision 11052)
@@ -28,5 +28,5 @@
 
 /**
-    @file RocketMunition.h
+    @file RocketMunition.cc
     @brief Implementation of the RocketMunition class.
 */
@@ -34,4 +34,5 @@
 #include "RocketMunition.h"
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 
 namespace orxonox
@@ -45,11 +46,17 @@
         this->maxMunitionPerMagazine_ = 1;
         this->maxMagazines_ = 30;
-        this->magazines_ = 10;
+        this->unassignedMagazines_ = 10;
 
-        this->bUseSeparateMagazines_ = false;
-        this->bStackMunition_ = true;
+        this->deployment_ = MunitionDeployment::Stack;
 
-        this->bAllowMunitionRefilling_ = false;
+        this->bAllowMunitionRefilling_ = true;
         this->bAllowMultiMunitionRemovementUnderflow_ = false;
+
+        this->reloadTime_ = 0.5f;
+    }
+
+    void RocketMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(RocketMunition, XMLPort, xmlelement, mode);
     }
 }
Index: /code/trunk/src/modules/weapons/munitions/RocketMunition.h
===================================================================
--- /code/trunk/src/modules/weapons/munitions/RocketMunition.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/RocketMunition.h	(revision 11052)
@@ -53,4 +53,5 @@
             RocketMunition(Context* context);
             virtual ~RocketMunition() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     };
 }
Index: /code/trunk/src/modules/weapons/munitions/SplitMunition.cc
===================================================================
--- /code/trunk/src/modules/weapons/munitions/SplitMunition.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/SplitMunition.cc	(revision 11052)
@@ -28,5 +28,5 @@
 
 /**
-    @file SplitMunition.h
+    @file SplitMunition.cc
     @brief Implementation of the SplitMunition class.
 */
@@ -34,4 +34,5 @@
 #include "SplitMunition.h"
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 
 namespace orxonox
@@ -43,13 +44,19 @@
         RegisterObject(SplitMunition);
 
-        this->maxMunitionPerMagazine_ = 1;
-        this->maxMagazines_ = 100;
-        this->magazines_ = 25;
+        this->maxMunitionPerMagazine_ = 5;
+        this->maxMagazines_ = 10;
+        this->unassignedMagazines_ = 5;
 
-        this->bUseSeparateMagazines_ = false;
-        this->bStackMunition_ = true;
+        this->deployment_ = MunitionDeployment::Share;
 
         this->bAllowMunitionRefilling_ = true;
         this->bAllowMultiMunitionRemovementUnderflow_ = false;
+
+        this->reloadTime_ = 0.5f;
+    }
+
+    void SplitMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SplitMunition, XMLPort, xmlelement, mode);
     }
 }
Index: /code/trunk/src/modules/weapons/munitions/SplitMunition.h
===================================================================
--- /code/trunk/src/modules/weapons/munitions/SplitMunition.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/munitions/SplitMunition.h	(revision 11052)
@@ -53,4 +53,5 @@
             SplitMunition(Context* context);
             virtual ~SplitMunition() {}
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     };
 }
Index: /code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc	(revision 11052)
@@ -68,5 +68,5 @@
     @brief
         The function called when a projectile hits another thing.
-        Calls the hit-function, starts the reload countdown, displays visual hit effects defined in Pawn.
+        Calls the hit-function, starts the shield recharge countdown, displays visual hit effects defined in Pawn.
         Needs to be called in the collidesAgainst() function by every Class directly inheriting from BasicProjectile.
     @param otherObject
@@ -97,5 +97,5 @@
             {
                 victim->hit(this->getShooter(), contactPoint, cs, this->getDamage(), this->getHealthDamage(), this->getShieldDamage());
-                victim->startReloadCountdown();
+                victim->startShieldRechargeCountdown();
             }
 
Index: /code/trunk/src/modules/weapons/projectiles/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/CMakeLists.txt	(revision 11051)
+++ /code/trunk/src/modules/weapons/projectiles/CMakeLists.txt	(revision 11052)
@@ -12,3 +12,4 @@
   GravityBomb.cc
   GravityBombField.cc
+  MineProjectile.cc
 )
Index: /code/trunk/src/modules/weapons/projectiles/GravityBombField.cc
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/GravityBombField.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/projectiles/GravityBombField.cc	(revision 11052)
@@ -164,5 +164,4 @@
         if (lifetime_ <= -4)
         {
-            orxout(debug_output) << "Timeout. Destroying field." << endl;
             this->destroy();
         }
Index: /code/trunk/src/modules/weapons/projectiles/IceGunProjectile.cc
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/IceGunProjectile.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/projectiles/IceGunProjectile.cc	(revision 11052)
@@ -34,10 +34,19 @@
 #include "IceGunProjectile.h"
 
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+
 #include "core/CoreIncludes.h"
 #include "graphics/Model.h"
+#include "graphics/ParticleSpawner.h"
+#include "Scene.h"
+#include "core/command/Executor.h"
+#include "tools/ParticleInterface.h"
 
 namespace orxonox
 {
     RegisterClass(IceGunProjectile);
+
+    const float IceGunProjectile::particleDestructionDelay_ = 15.0f;
 
     IceGunProjectile::IceGunProjectile(Context* context) : Projectile(context)
@@ -55,4 +64,26 @@
         this->attach(model);
         model->setPosition(Vector3(0,0,0));
+
+        // Add effect.
+        spawner_ = new ParticleSpawner(this->getContext());
+        this->attach(spawner_);
+        spawner_->setOrientation(this->getOrientation());
+        spawner_->setSource("Orxonox/ice");
+        spawner_->setDeleteWithParent(false);
+        spawner_->setDestroydelay(particleDestructionDelay_);
+    }
+
+    IceGunProjectile::~IceGunProjectile()
+    {
+        if (this->isInitialized())
+        {
+            const Vector3& pos = spawner_->getWorldPosition();
+            const Quaternion& rot = spawner_->getWorldOrientation();
+            this->detach(spawner_);
+            spawner_->setPosition(pos);
+            spawner_->setOrientation(rot);
+            this->getScene()->getRootSceneNode()->addChild(const_cast<Ogre::SceneNode*>(spawner_->getNode()));
+            this->spawner_->stop(true);
+        }
     }
 
Index: /code/trunk/src/modules/weapons/projectiles/IceGunProjectile.h
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/IceGunProjectile.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/projectiles/IceGunProjectile.h	(revision 11052)
@@ -56,5 +56,5 @@
         public:
             IceGunProjectile(Context* context);
-            virtual ~IceGunProjectile() {}
+            virtual ~IceGunProjectile();
 
             virtual void setFreezeTime(float freezeTime);
@@ -63,5 +63,7 @@
         protected:
             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
-        private:         
+            static const float particleDestructionDelay_;
+        private:
+            ParticleSpawner* spawner_;
             float freezeTime_; //The duration of the freezing effect on a target
             float freezeFactor_; //The strength of the freezing effect
Index: /code/trunk/src/modules/weapons/projectiles/MineProjectile.cc
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/MineProjectile.cc	(revision 11052)
+++ /code/trunk/src/modules/weapons/projectiles/MineProjectile.cc	(revision 11052)
@@ -0,0 +1,281 @@
+/*
+ *   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:
+ *      Jannis Holzer
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file MineProjectile.h
+    @brief Implementation of the MineProjectile class.
+*/
+
+#include "MineProjectile.h"
+
+#include "core/CoreIncludes.h"
+#include "graphics/Model.h"
+#include "core/command/Executor.h"
+#include "graphics/ParticleSpawner.h"
+#include "worldentities/pawns/Pawn.h"
+#include "core/EventIncludes.h"
+#include "sound/WorldSound.h"
+
+namespace orxonox
+{
+    RegisterClass(MineProjectile);
+
+    const float MineProjectile::collisionShapeRadius_ = 15.0f;
+    const float MineProjectile::damageRadius_ = 200.0f;
+    const float MineProjectile::triggerRadius_ = 100.0f;
+
+    MineProjectile::MineProjectile(Context* context) : MovableEntity(context), BasicProjectile()
+    {
+        RegisterObject(MineProjectile);
+
+        this->bAllowExplosion_ = false;
+        this->maxTimeUntilExplosion_ = 10.0f;
+        this->timeUntilActivation_ = 1.0f;
+
+        //Create movable entities
+        rings1_ = new MovableEntity(this->getContext());
+        this->attach(rings1_);
+        rings1_->setPosition(Vector3(0.0,0.0,0.0));
+        rings1_->setAngularVelocity(Vector3(0.0,5.0,0.0));
+
+        rings2_ = new MovableEntity(this->getContext());
+        this->attach(rings2_);
+        rings2_->setPosition(Vector3(0.0,0.0,0.0));
+        rings2_->setAngularVelocity(Vector3(0.0,0.0,5.0));
+
+        core_ = new MovableEntity(this->getContext());
+        this->attach(core_);
+        core_->setPosition(Vector3(0.0,0.0,0.0));
+        core_->setAngularVelocity(Vector3(2.5,2.5,0.0));
+
+        //Create Models
+        //Core
+        modelCore_ = new Model(this->getContext());
+        modelCore_->setMeshSource("Mine_Core.mesh");
+        modelCore_->setScale(15.0);
+        core_->attach(modelCore_);
+        modelCore_->setPosition(Vector3(0,0,0));
+
+        //Ring 1
+        modelRing1_ = new Model(this->getContext());
+        modelRing1_->setMeshSource("Mine_Ring.mesh");
+        modelRing1_->setScale(15.0);
+        rings1_->attach(modelRing1_);
+        modelRing1_->setPosition(Vector3(0,0,0));
+        modelRing1_->yaw(Degree(0));
+        //Ring 2
+        modelRing2_ = new Model(this->getContext());
+        modelRing2_->setMeshSource("Mine_Ring.mesh");
+        modelRing2_->setScale(15.0);
+        rings1_->attach(modelRing2_);
+        modelRing2_->setPosition(Vector3(0,0,0));
+        modelRing2_->yaw(Degree(180));
+        //Ring 3
+        modelRing3_ = new Model(this->getContext());
+        modelRing3_->setMeshSource("Mine_Ring.mesh");
+        modelRing3_->setScale(15.0);
+        rings2_->attach(modelRing3_);
+        modelRing3_->setPosition(Vector3(0,0,0));
+        modelRing3_->yaw(Degree(90));
+        //Ring 4
+        modelRing4_ = new Model(this->getContext());
+        modelRing4_->setMeshSource("Mine_Ring.mesh");
+        modelRing4_->setScale(15.0);
+        rings2_->attach(modelRing4_);
+        modelRing4_->setPosition(Vector3(0,0,0));
+        modelRing4_->yaw(Degree(270));
+
+        emitter_ = NULL;
+
+        if (GameMode::isMaster())
+        {
+            this->setMass(10.0f);
+            this->setLinearDamping(0.5f);
+            this->setAngularDamping(0.1f);
+            this->enableCollisionCallback();
+            this->setCollisionResponse(true);
+            this->setCollisionType(Dynamic);
+
+            // Create a sphere collision shape and attach it to the projectile.
+            collisionShape_ = new SphereCollisionShape(this->getContext());
+            collisionShape_->setRadius(collisionShapeRadius_);
+            this->attachCollisionShape(collisionShape_);
+            collisionShape_->setPosition(Vector3(0,0,0));
+
+            // Create a distance trigger and attach it to the projectile.
+            distanceTrigger_ = new DistanceTrigger(this->getContext());
+            this->attach(distanceTrigger_);
+            distanceTrigger_->setPosition(Vector3(0,0,0));
+            distanceTrigger_->setDistance(triggerRadius_);
+            distanceTrigger_->addTarget("Pawn");
+            distanceTrigger_->setStayActive(false);
+
+            this->addEventSource(distanceTrigger_, "explode");
+        }
+    }
+
+    MineProjectile::~MineProjectile()
+    {
+        if (this->isInitialized())
+        {
+            modelCore_->destroy();
+            modelRing1_->destroy();
+            modelRing2_->destroy();
+            modelRing3_->destroy();
+            modelRing4_->destroy();
+
+            if (distanceTrigger_)
+            {
+                distanceTrigger_->destroy();
+            }
+            if (emitter_)
+            {
+                emitter_->destroy();
+            }
+        }
+    }
+
+    /**
+    @brief
+        XMLPort for MineProjectile.
+    */
+    void MineProjectile::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(MineProjectile, XMLEventPort, xmlelement, mode);
+        XMLPortEventState(MineProjectile, BaseObject, "explode", explode, xmlelement, mode);
+    }
+
+    /**
+    @brief
+        Max Time; after this time runs out,the Mine explodes.
+    */
+    void MineProjectile::setMaxTimeUntilExplosion(float maxTimeUntilExplosion)
+    {
+        if (maxTimeUntilExplosion >= 0)
+        {
+            this->maxTimeUntilExplosion_ = maxTimeUntilExplosion;
+            if (GameMode::isMaster())
+            {
+                this->explodeTimer_.setTimer(this->maxTimeUntilExplosion_, false, createExecutor(createFunctor(&MineProjectile::explode, this)));
+            }
+        }
+        else
+        {
+            this->maxTimeUntilExplosion_ = 0;
+        }
+    }
+
+    /**
+    @brief
+        The mine can only explode when the activation time has run out.
+    */
+    void MineProjectile::setTimeUntilActivation(float timeUntilActivation)
+    {
+        timeUntilActivation_ = timeUntilActivation;
+
+        if (GameMode::isMaster())
+        {
+            this->activationTimer_.setTimer(this->timeUntilActivation_, false, createExecutor(createFunctor(&MineProjectile::allowExplosion, this)));
+        }
+    }
+
+    /**
+    @brief
+        Mine explodes, deals damage to pawn within range and destroys itself.
+    */
+    void MineProjectile::explode()
+    {
+        if (bAllowExplosion_)
+        {
+            if (GameMode::isMaster())
+            {
+                // Damage all pawns within the damage radius
+                for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
+                {
+                    Vector3 distanceVector = it->getWorldPosition()-this->getWorldPosition();
+                    if(distanceVector.length()< damageRadius_)
+                    {
+                        it->hit(this->getShooter(), it->getWorldPosition(), NULL, this->getDamage(), this->getHealthDamage(), this->getShieldDamage());
+                    }
+                }
+            }
+
+            this->destructionEffect();
+            this->destroyLater();
+        }
+    }
+
+    /**
+    @brief
+        Mine is ready to explode.
+    */
+    void MineProjectile::allowExplosion()
+    {
+        // Allow explosion
+        bAllowExplosion_ = true;
+        // Add particle effect
+        emitter_ = new ParticleEmitter(this->getContext());
+        this->attach(emitter_);
+        emitter_->setOrientation(this->getOrientation());
+        emitter_->setSource("Orxonox/mineparticle");  
+    }
+
+    void MineProjectile::destructionEffect()
+    {
+        ParticleSpawner *effect1, *effect2, *effect3;
+       
+        effect1 = new ParticleSpawner(this->getContext());
+        effect2 = new ParticleSpawner(this->getContext());
+        effect3 = new ParticleSpawner(this->getContext());
+
+        effect1->setPosition(this->getPosition());
+        effect1->setOrientation(this->getOrientation());
+        effect1->setDestroyAfterLife(true);
+        effect1->setSource("Orxonox/MineExpl");
+        effect1->setLifetime(2.5f);
+
+        effect2->setPosition(this->getPosition());
+        effect2->setOrientation(this->getOrientation());
+        effect2->setDestroyAfterLife(true);
+        effect2->setSource("Orxonox/MineExpl1");
+        effect2->setLifetime(2.5f);
+
+        effect3->setPosition(this->getPosition());
+        effect3->setOrientation(this->getOrientation());
+        effect3->setDestroyAfterLife(true);
+        effect3->setSource("Orxonox/MineExpl2");
+        effect3->setLifetime(2.5f);
+
+        // Explosion sound effect.
+        WeakPtr<WorldSound> explosionSound_ = new WorldSound(getContext());
+        explosionSound_->setSource("sounds/minesound.ogg");
+        explosionSound_->setVolume(1.0);
+        explosionSound_->play();
+    }
+}
Index: /code/trunk/src/modules/weapons/projectiles/MineProjectile.h
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/MineProjectile.h	(revision 11052)
+++ /code/trunk/src/modules/weapons/projectiles/MineProjectile.h	(revision 11052)
@@ -0,0 +1,92 @@
+/*
+ *   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:
+ *      Jannis Holzer
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file MineProjectile.h
+    @brief Definition of the MineProjectile class.
+*/
+
+#ifndef _MineProjectile_H__
+#define _MineProjectile_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "tools/Timer.h"
+#include "worldentities/MovableEntity.h"
+#include "objects/collisionshapes/SphereCollisionShape.h"
+#include "objects/triggers/DistanceTrigger.h"
+#include "BasicProjectile.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        TODO
+    @ingroup WeaponsProjectiles
+    */
+    class _WeaponsExport MineProjectile : public MovableEntity, public BasicProjectile
+    {
+        public:
+            MineProjectile(Context* context);
+            virtual ~MineProjectile();
+
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void setMaxTimeUntilExplosion(float maxTimeUntilExplosion);
+            virtual void setTimeUntilActivation(float timeUntilActivation);
+        protected:
+            static const float triggerRadius_;
+            static const float damageRadius_;
+            static const float collisionShapeRadius_;
+        private:
+            bool bAllowExplosion_; // The mine can only explode if it is active
+            float maxTimeUntilExplosion_;
+            float timeUntilActivation_;
+            Timer activationTimer_;
+            Timer explodeTimer_;
+            Model* modelCore_;
+            Model* modelRing1_;
+            Model* modelRing2_;
+            Model* modelRing3_;
+            Model* modelRing4_;
+            MovableEntity* rings1_;
+            MovableEntity* rings2_;
+            MovableEntity* core_;
+            ParticleEmitter* emitter_;
+
+            WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile.
+            WeakPtr<DistanceTrigger> distanceTrigger_;
+
+            virtual void destructionEffect();
+            virtual void allowExplosion();
+            virtual void explode();
+    };
+}
+
+#endif /* _MineProjectile_H__ */
Index: /code/trunk/src/modules/weapons/projectiles/Projectile.h
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/Projectile.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/projectiles/Projectile.h	(revision 11052)
@@ -69,9 +69,9 @@
         protected:
             virtual void setCollisionShapeRadius(float radius);
+            float lifetime_; //!< The time the projectile exists.
 
         private:
-            float lifetime_; //!< The time the projectile exists.
             Timer destroyTimer_; //!< Timer to destroy the projectile after its lifetime has run out.
-            WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile.            
+            WeakPtr<SphereCollisionShape> collisionShape_; // The collision shape of the projectile.
     };
 }
Index: /code/trunk/src/modules/weapons/projectiles/Rocket.cc
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/Rocket.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/projectiles/Rocket.cc	(revision 11052)
@@ -66,5 +66,5 @@
 
         this->localAngularVelocity_ = 0;
-        this->lifetime_ = 100.0f;
+        this->lifetime_ = 20.0f;
 
         if (GameMode::isMaster())
@@ -76,5 +76,5 @@
             Model* model = new Model(this->getContext());
             model->setMeshSource("rocket.mesh");
-            model->scale(0.7f);
+            model->scale(1.0f);
             this->attach(model);
 
@@ -100,6 +100,4 @@
             this->attachCollisionShape(collisionShape);
 
-            this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this)));
-
             // Add sound
             this->defSndWpnEngine_ = new WorldSound(this->getContext());
@@ -114,4 +112,6 @@
             this->defSndWpnLaunch_->setVolume(1.0f);
             this->attach(defSndWpnLaunch_);
+
+            this->setHudTemplate("rockethud");
         }
         else
@@ -320,3 +320,13 @@
     }
 
+    float Rocket::getFuel() const
+    {
+        return this->destroyTimer_.getRemainingTime();
+    }
+
+    void Rocket::setMaxFuel(float fuel)
+    {
+        this->lifetime_ = fuel;
+        this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&BasicProjectile::destroyObject, this)));
+    }
 }
Index: /code/trunk/src/modules/weapons/projectiles/Rocket.h
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/Rocket.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/projectiles/Rocket.h	(revision 11052)
@@ -118,4 +118,15 @@
             virtual void fired(unsigned int firemode);
 
+            /**
+            @brief Set the maximum lifetime of the rocket.
+            */
+            virtual void setMaxFuel(float fuel);
+            /**
+            @brief Get the maximum lifetime of the rocket.
+            */
+            inline float getMaxFuel() const
+                { return lifetime_; }
+            virtual float getFuel() const;
+
         private:
             Vector3 localAngularVelocity_; //!< Variable to temporarily store accumulated steering command input.
Index: /code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc
===================================================================
--- /code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc	(revision 11052)
@@ -76,5 +76,5 @@
             Model* model = new Model(this->getContext());
             model->setMeshSource("rocket.mesh");
-            model->scale(0.7f);
+            model->scale(1.0f);
             this->attach(model);
 
Index: /code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/CMakeLists.txt	(revision 11052)
@@ -11,3 +11,4 @@
   SimpleRocketFire.cc
   GravityBombFire.cc
+  MineGun.cc
 )
Index: /code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/EnergyDrink.cc	(revision 11052)
@@ -63,4 +63,6 @@
         this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&EnergyDrink::shot, this)));
         this->delayTimer_.stopTimer();
+
+        hudImageString_ = "Orxonox/WSHUD_WM_EnergyDrink";
     }
 
Index: /code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/FusionFire.cc	(revision 11052)
@@ -58,4 +58,6 @@
 
         this->setMunitionName("FusionMunition");
+
+        hudImageString_ = "Orxonox/WSHUD_WM_FusionFire";
     }
 
Index: /code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/GravityBombFire.cc	(revision 11052)
@@ -31,4 +31,6 @@
         this->setMunitionName("GravityBombMunition");
         this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.8);    ///< sets sound of the bomb as it is fired.
+
+        hudImageString_ = "Orxonox/WSHUD_WM_GravityBombFire";
     }
 
Index: /code/trunk/src/modules/weapons/weaponmodes/HsW01.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/HsW01.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/HsW01.cc	(revision 11052)
@@ -69,4 +69,6 @@
 
         this->setDefaultSound(this->sound_);
+
+        hudImageString_ = "Orxonox/WSHUD_WM_HsW01";
     }
 
Index: /code/trunk/src/modules/weapons/weaponmodes/IceGun.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/IceGun.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/IceGun.cc	(revision 11052)
@@ -59,6 +59,8 @@
         this->setFreezeFactor(0.5);
 
-        this->setMunitionName("LaserMunition");
+        this->setMunitionName("IceMunition");
         this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
+
+        hudImageString_ = "Orxonox/WSHUD_WM_IceGun";
     }
 
Index: /code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/LaserFire.cc	(revision 11052)
@@ -56,4 +56,6 @@
 
         this->setMunitionName("LaserMunition");
+
+        hudImageString_ = "Orxonox/WSHUD_WM_LaserFire";
     }
 
Index: /code/trunk/src/modules/weapons/weaponmodes/LightningGun.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/LightningGun.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/LightningGun.cc	(revision 11052)
@@ -54,6 +54,8 @@
         this->speed_ = 750.0f;
 
-        this->setMunitionName("LaserMunition");
+        this->setMunitionName("LightningMunition");
         this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
+
+        hudImageString_ = "Orxonox/WSHUD_WM_LightningGun";
     }
 
Index: /code/trunk/src/modules/weapons/weaponmodes/MineGun.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/MineGun.cc	(revision 11052)
+++ /code/trunk/src/modules/weapons/weaponmodes/MineGun.cc	(revision 11052)
@@ -0,0 +1,101 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file MineGun.cc
+    @brief Implementation of the MineGun class.
+*/
+
+#include "MineGun.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"    
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/WeaponSystem.h"
+#include "worldentities/pawns/Pawn.h"
+
+#include "weapons/projectiles/MineProjectile.h"
+
+namespace orxonox
+{
+    RegisterClass(MineGun);
+
+    MineGun::MineGun(Context* context) : WeaponMode(context)
+    {
+        RegisterObject(MineGun);
+
+        this->speed_ = 1000.0f;
+        this->reloadTime_ = 1.0f;
+        this->damage_ = 0.0f;
+        this->maxTimeUntilExplosion_ = 0.0f;
+
+        this->setMunitionName("MineMunition");
+        this->setDefaultSound("sounds/mineactivate.ogg");
+
+        hudImageString_ = "Orxonox/WSHUD_WM_MineGun";
+    }
+
+    MineGun::~MineGun()
+    {
+    }
+
+    /**
+    @brief
+        XMLPort for the MineGun.
+    */
+    void MineGun::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(MineGun, XMLPort, xmlelement, mode);
+
+        XMLPortParam(MineGun, "maxtimeuntilexplosion", setMaxTimeUntilExplosion, getMaxTimeUntilExplosion, xmlelement, mode).defaultValues(10.0f);
+        XMLPortParam(MineGun, "timeuntilactivation", setTimeUntilActivation, getTimeUntilActivation, xmlelement, mode).defaultValues(3.0f);
+    }
+
+    /**
+    @brief
+        Fires the weapon. Creates a projectile and fires it.
+    */
+    void MineGun::fire()
+    {
+        MineProjectile* projectile = new MineProjectile(this->getContext());
+
+        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
+        projectile->setOrientation(this->getMuzzleOrientation());
+        projectile->setPosition(this->getMuzzlePosition());
+        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
+
+        projectile->setMaxTimeUntilExplosion(getMaxTimeUntilExplosion());
+        projectile->setTimeUntilActivation(getTimeUntilActivation());
+
+        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        projectile->setDamage(this->getDamage());
+        projectile->setShieldDamage(this->getShieldDamage());
+        projectile->setHealthDamage(this->getHealthDamage());
+    }
+}
Index: /code/trunk/src/modules/weapons/weaponmodes/MineGun.h
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/MineGun.h	(revision 11052)
+++ /code/trunk/src/modules/weapons/weaponmodes/MineGun.h	(revision 11052)
@@ -0,0 +1,80 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabien Vultier
+ *      Jannis Holzer
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file MineGun.h
+    @brief
+
+    Mine is a weapon that explodes if a spaceship goes bellow the mines trigger radius. The mine deals damage too all
+    spaceships within the damageradius.
+
+    The activation time regulates when the mine is live and ready to explode.
+    The mine destroys itself after it exceeds a certain life time.
+*/
+
+#ifndef _MineGun_H__
+#define _MineGun_H__
+
+#include "weapons/WeaponsPrereqs.h"
+#include "weaponsystem/WeaponMode.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        A Weapon that drops mines to space.
+    @ingroup WeaponsWeaponModes
+    */
+    class _WeaponsExport MineGun : public WeaponMode
+    {
+        public:
+            MineGun(Context* context);
+            virtual ~MineGun();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void fire();
+
+            inline float getMaxTimeUntilExplosion() const
+                { return this->maxTimeUntilExplosion_; }
+            inline float getTimeUntilActivation() const
+                { return this->timeUntilActivation_; }
+        protected:
+            inline void setMaxTimeUntilExplosion(float maxTimeUntilExplosion)
+                { this->maxTimeUntilExplosion_ = maxTimeUntilExplosion; }
+            inline void setTimeUntilActivation(float timeUntilActivation)
+                { this->timeUntilActivation_ = timeUntilActivation; }
+        private:
+            float speed_; //The speed of the fired projectile.
+            float maxTimeUntilExplosion_;
+            float timeUntilActivation_;
+    };
+}
+
+#endif /* _MineGun_H__ */
Index: /code/trunk/src/modules/weapons/weaponmodes/RocketFire.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/RocketFire.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/RocketFire.cc	(revision 11052)
@@ -41,5 +41,5 @@
 #include "weaponsystem/WeaponSystem.h"
 #include "worldentities/pawns/Pawn.h"
-
+#include "core/XMLPort.h"
 #include "weapons/projectiles/Rocket.h"
 
@@ -56,11 +56,25 @@
         this->damage_ = 0.0f;
         this->speed_ = 500.0f;
+        this->fuel_ = 10.0f;
 
         this->setMunitionName("RocketMunition");
         // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
+
+        hudImageString_ = "Orxonox/WSHUD_WM_RocketFire";
     }
 
     RocketFire::~RocketFire()
     {
+    }
+
+    /**
+    @brief
+        XMLPort for the RocketFire. You can define the maximum lifetime of the rockets
+    */
+    void RocketFire::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(RocketFire, XMLPort, xmlelement, mode);
+
+        XMLPortParam(RocketFire, "fuel", setFuel, getFuel, xmlelement, mode);
     }
 
@@ -77,5 +91,5 @@
         rocket->setPosition(this->getMuzzlePosition());
         rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
-        rocket->scale(2);
+        rocket->scale(1.0f);
 
         rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
@@ -83,4 +97,5 @@
         rocket->setShieldDamage(this->getShieldDamage());
         rocket->setHealthDamage(this->getHealthDamage());
+        rocket->setMaxFuel(this->fuel_);
     }
 }
Index: /code/trunk/src/modules/weapons/weaponmodes/RocketFire.h
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/RocketFire.h	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/RocketFire.h	(revision 11052)
@@ -54,8 +54,15 @@
             virtual ~RocketFire();
 
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
             virtual void fire();
+            inline void setFuel(float fuel)
+                { this->fuel_ = fuel; }
+            inline float getFuel() const
+                { return this->fuel_; }
 
         private:
             float speed_; //!< The speed of the Rocket.
+            float fuel_; //!< The maximum lifetime of the rocket
     };
 }
Index: /code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/RocketFireOld.cc	(revision 11052)
@@ -59,4 +59,6 @@
         this->setMunitionName("RocketMunition");
         // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
+
+        hudImageString_ = "Orxonox/WSHUD_WM_SimpleRocketFire";
     }
 
Index: /code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/SimpleRocketFire.cc	(revision 11052)
@@ -64,4 +64,6 @@
         this->setDefaultSoundWithVolume("sounds/Rocket_launch.ogg",0.4f);
         // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
+
+        hudImageString_ = "Orxonox/WSHUD_WM_SimpleRocketFire";
     }
 
@@ -83,4 +85,5 @@
         rocket->setVelocity(this->getMuzzleDirection()*this->speed_);
         rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        rocket->scale(1.0f);
 
         rocket->setDamage(this->damage_);
@@ -89,5 +92,6 @@
 
         WorldEntity* pawn = static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget();
-        if (pawn) controller->setTarget(pawn);
+        if (pawn)
+            controller->setTarget(pawn);
     }
 }
Index: /code/trunk/src/modules/weapons/weaponmodes/SplitGun.cc
===================================================================
--- /code/trunk/src/modules/weapons/weaponmodes/SplitGun.cc	(revision 11051)
+++ /code/trunk/src/modules/weapons/weaponmodes/SplitGun.cc	(revision 11052)
@@ -35,5 +35,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/XMLPort.h"    
+#include "core/XMLPort.h"
 #include "weaponsystem/Weapon.h"
 #include "weaponsystem/WeaponPack.h"
@@ -62,4 +62,6 @@
         this->setMunitionName("SplitMunition");
         this->setDefaultSound("sounds/Weapon_LightningGun.ogg");
+
+        hudImageString_ = "Orxonox/WSHUD_WM_SplitGun";
     }
 
Index: /code/trunk/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- /code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 11051)
+++ /code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 11052)
@@ -167,4 +167,5 @@
     class DefaultWeaponmodeLink;
     class Munition;
+    class ReplenishingMunition;
     class Weapon;
     class WeaponMode;
@@ -175,5 +176,4 @@
 
     // worldentities
-    class BigExplosion;
     class CameraPosition;
     class ControllableEntity;
Index: /code/trunk/src/orxonox/controllers/ActionpointController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/ActionpointController.cc	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/ActionpointController.cc	(revision 11052)
@@ -0,0 +1,762 @@
+/*
+ *   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:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ActionpointController.h"
+
+#include "core/XMLPort.h"
+#include <algorithm>
+#include "worldentities/Actionpoint.h"
+namespace orxonox
+{
+
+    RegisterClass(ActionpointController);
+
+    ActionpointController::ActionpointController(Context* context) : FightingController(context)
+    {
+        this->ticks_ = 0;
+        this->bPatrolling_ = false;
+        this->bInLoop_ = false;
+        this->bLoop_ = false;
+        this->bEndLoop_ = false;
+        loopActionpoints_.clear();
+        parsedActionpoints_.clear();
+        actionpoints_.clear();
+        this->bTakenOver_ = false;
+        this->action_ = Action::NONE;
+        this->squaredaccuracy_ = 2500;
+        this->bStartedDodging_ = false;
+        this->bDefaultPatrol_ = true;
+        this->bDefaultFightAll_ = true;
+        RegisterObject(ActionpointController);
+
+    }
+    void ActionpointController::XMLPort( Element& xmlelement, XMLPort::Mode mode )
+    {
+        SUPER( ActionpointController, XMLPort, xmlelement, mode );
+
+        XMLPortObject(ActionpointController, WorldEntity, "actionpoints", addActionpoint, getActionpoint,  xmlelement, mode);
+        XMLPortParam(ActionpointController, "defaultFightAll", setDefaultFightAll, getDefaultFightAll, xmlelement, mode).defaultValues(true);
+        XMLPortParam(ActionpointController, "defaultPatrol", setDefaultPatrol, getDefaultPatrol, xmlelement, mode).defaultValues(true);
+    }
+
+    ActionpointController::~ActionpointController()
+    {
+        loopActionpoints_.clear();
+        parsedActionpoints_.clear();
+        actionpoints_.clear();
+
+    }
+    void ActionpointController::tick(float dt)
+    {
+        if (!this || !this->getControllableEntity() || !this->isActive())
+            return;
+
+        //count ticks, ticks_ is unsigned, so overflow is not a problem
+        ++this->ticks_;
+        if (this->ticks_ == 1)
+        {
+            //those vectors are in reversed order after being set by XML.
+            std::reverse(parsedActionpoints_.begin(), parsedActionpoints_.end());
+            std::reverse(actionpoints_.begin(), actionpoints_.end());
+        }
+
+        if (!this || !this->getControllableEntity())
+            return;
+        //fly
+        if (this->bHasTargetPosition_)
+        {
+            this->moveToTargetPosition(dt);
+        }//or just rotate
+        else if (this->bLookAtTarget_)
+        {
+            this->lookAtTarget(dt);
+        }
+        
+
+        if (!this || !this->getControllableEntity())
+            return;
+        //don't fire rocket each tick
+        if (timeout_ <= 0)
+        {    
+            this->bFiredRocket_ = false;
+        }
+        else if (this->bFiredRocket_)
+        {
+            --this->timeout_;
+        }
+
+        if (!this || !this->getControllableEntity())
+            return;
+        //sometimes dodge, sometimes attack
+        if (this->ticks_ % 80 <= 10)
+        {
+            this->bDodge_ = false;
+        }
+        else
+        {
+            this->bDodge_ = true;
+        }
+
+        if (!this || !this->getControllableEntity())
+            return;
+        //fire if you can
+        if (this->bShooting_)
+        {
+            this->doFire();
+        }
+        SUPER(ActionpointController, tick, dt);
+    }
+     
+    /**
+    @brief
+        action() manages the state machine.
+    */
+
+    void ActionpointController::action()
+    {
+        if (!this || !this->getControllableEntity() || !this->isActive())
+            return;
+
+        //deltaHp is used to know if this got attacked
+        this->deltaHp = orxonox_cast<Pawn*> (this->getControllableEntity())->getHealth() - this->previousHp;
+        this->previousHp = orxonox_cast<Pawn*> (this->getControllableEntity())->getHealth();
+
+        //look out for enemies
+        if (this->bDefaultPatrol_ || (this->action_ != Action::FLY && this->action_ != Action::NONE))
+        {
+            this->startAttackingEnemiesThatAreClose();
+        }
+        if (!this || !this->getControllableEntity())
+            return;
+
+        //No action -> pop one from stack
+        if (this->action_ == Action::NONE || this->bTakenOver_)
+        {
+            //if default behaviour is fighting all, push it onto the stack
+            if (this->parsedActionpoints_.empty() && this->loopActionpoints_.empty() && this->bDefaultFightAll_)
+            {
+                if (!this || !this->getControllableEntity())
+                    return;
+                Point p = { Action::FIGHTALL, "", Vector3::ZERO, false };
+                this->parsedActionpoints_.push_back (p);
+            }
+            if (!this || !this->getControllableEntity())
+                return;
+            this->executeActionpoint();
+            if (!this || !this->getControllableEntity())
+                return;
+            this->bTakenOver_ = false;
+        }
+        if (!this || !this->getControllableEntity())
+            return;
+
+        //Action fightall -> fight till nobody alive
+        if (this->action_ == Action::FIGHTALL)
+        {
+
+            if (!this->hasTarget())
+            {
+                ControllableEntity* newTarget = this->closestTarget();    
+                if (newTarget)
+                {
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    this->setAction (Action::FIGHTALL, newTarget);
+                }
+                else
+                {
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    this->nextActionpoint();
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    this->executeActionpoint();
+    
+                }
+            }
+        }
+        //Action fight -> fight as long as enemies in range
+        else if (this->action_ == Action::FIGHT)
+        {
+            if (!this->hasTarget() )
+            {
+                //----find a target----
+                ControllableEntity* newTarget = this->closestTarget();  
+                if (!this || !this->getControllableEntity())
+                    return;  
+                if (newTarget && 
+                        CommonController::distance (this->getControllableEntity(), newTarget) < this->attackRange_)
+                {
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    this->setAction (Action::FIGHT, newTarget);
+                }
+                else
+                {
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    this->nextActionpoint();
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    this->executeActionpoint();
+                }
+            }
+            else if (this->hasTarget())
+            {
+                //----fly in formation if far enough----
+                Vector3 diffVector = this->positionOfTarget_ - this->getControllableEntity()->getWorldPosition();         
+                    
+                if (diffVector.length() > this->attackRange_)
+                {
+                    ControllableEntity* newTarget = this->closestTarget();
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    if (newTarget && 
+                        CommonController::distance (this->getControllableEntity(), newTarget) < this->attackRange_)
+                    {
+                        if (!this || !this->getControllableEntity())
+                            return;
+                        this->setAction (Action::FIGHT, newTarget);
+                    }
+                    else
+                    {
+                        if (!this || !this->getControllableEntity())
+                            return;
+                        this->nextActionpoint();
+                        if (!this || !this->getControllableEntity())
+                            return;
+                        this->executeActionpoint();
+                    }
+                }
+            }
+        }
+        else if (this->action_ == Action::FLY)
+        {
+            if (this->squaredDistanceToTarget() <= this->squaredaccuracy_)
+            {
+                if (!this || !this->getControllableEntity())
+                    return;
+                this->nextActionpoint();   
+                if (!this || !this->getControllableEntity())
+                    return;
+                this->executeActionpoint();
+            }
+        }
+        else if (this->action_ == Action::PROTECT)
+        {
+            if (!this->getProtect())
+            {
+                if (!this || !this->getControllableEntity())
+                    return;
+                this->nextActionpoint();
+                if (!this || !this->getControllableEntity())
+                    return;
+                this->executeActionpoint(); 
+            }
+            if (!this || !this->getControllableEntity())
+                return;
+            this->stayNearProtect();
+        }
+        else if (this->action_ == Action::ATTACK)
+        {   
+            if (!this || !this->getControllableEntity())
+                return;
+            if (!this->hasTarget())
+            {
+                if (!this || !this->getControllableEntity())
+                    return;
+                this->nextActionpoint();
+                if (!this || !this->getControllableEntity())
+                    return;
+                this->executeActionpoint();
+            }
+        }
+    }
+    /**
+    @brief
+        if action is protect, this follows protect_ and fights enemies that are close
+    */
+    void ActionpointController::setProtect (ControllableEntity* protect)
+    {
+        this->protect_ = protect;
+    }
+    ControllableEntity* ActionpointController::getProtect ()
+    {
+        return this->protect_;
+    }
+    //XML method
+    void ActionpointController::addActionpoint(WorldEntity* actionpoint)
+    {
+        std::string actionName;
+        Vector3 position;
+        std::string targetName;
+        bool inLoop = false;
+        Point p;
+        if (actionpoint->getIdentifier()->getName() == "Actionpoint")
+        {
+            Actionpoint* ap = orxonox_cast<Actionpoint*> (actionpoint);
+            actionName = ap->getActionXML();
+            targetName = ap->getName();
+            position = ap->getWorldPosition();
+
+            if (this->bEndLoop_)
+            {
+                this->bInLoop_ = false;
+            }
+            if (!this->bInLoop_ && ap->getLoopStart())
+            {
+                this->bInLoop_ = true;
+            }
+            if (this->bInLoop_ && ap->getLoopEnd())
+            {
+                this->bEndLoop_ = true;
+            }
+            inLoop = this->bInLoop_;
+
+            Action::Value value;
+            
+            if ( actionName == "FIGHT" )
+            { value = Action::FIGHT; }
+            else if ( actionName == "FLY" )
+            { value = Action::FLY; }
+            else if ( actionName == "PROTECT" )
+            { value = Action::PROTECT; }
+            else if ( actionName == "NONE" )
+            { value = Action::NONE; }
+            else if ( actionName == "FIGHTALL" )
+            { value = Action::FIGHTALL; }
+            else if ( actionName == "ATTACK" )
+            { value = Action::ATTACK; }
+            else
+                ThrowException( ParseError, std::string( "Attempting to set an unknown Action: '" )+ actionName + "'." );
+            p.action = value; p.name = targetName; p.position = position; p.inLoop = inLoop;
+        }
+        else
+        {
+            inLoop = true;
+            p.action = Action::FLY; p.name = ""; p.position = actionpoint->getWorldPosition(); p.inLoop = inLoop;
+        }
+            parsedActionpoints_.push_back(p);
+            this->actionpoints_.push_back(actionpoint);
+    }
+    //XML method
+    WorldEntity* ActionpointController::getActionpoint(unsigned int index) const
+    {
+        if (index < this->actionpoints_.size())
+            return this->actionpoints_[index];
+        else
+            return 0;
+    }
+    //XML method
+    Action::Value ActionpointController::getAction ()
+    {
+        return this->action_;
+    }
+    //XML method
+    std::string ActionpointController::getActionName()
+    {
+        switch ( this->action_ )
+        {
+            case Action::FIGHT:
+            { return "FIGHT"; }
+            case Action::FLY:
+            { return "FLY"; }
+            case Action::PROTECT:
+            { return "PROTECT"; }
+            case Action::NONE:
+            { return "NONE"; }
+            case Action::FIGHTALL:
+            { return "FIGHTALL"; }
+            case Action::ATTACK:
+            { return "ATTACK"; }
+            default:
+                return "NONE";
+                break;
+        }
+    }
+    //XML method
+    void ActionpointController::setAction (Action::Value action)
+    {
+        this->action_ = action;
+    }
+    //set action and target/protect
+    void ActionpointController::setAction (Action::Value action, ControllableEntity* target)
+    {
+        if (!this || !this->getControllableEntity())
+            return;
+        this->action_ = action;
+        if (action == Action::FIGHT || action == Action::FIGHTALL || action == Action::ATTACK)
+        {   
+            if (target)
+                this->setTarget (target);
+        }
+        else if (action == Action::PROTECT)
+        {
+            if (target)
+                this->setProtect (target);
+        }
+    }
+    //set action and target position
+    void ActionpointController::setAction (Action::Value action, const Vector3& target)
+    {
+        if (!this || !this->getControllableEntity())
+            return;
+        this->action_ = action;
+        if (action == Action::FLY)
+        {
+            this->setTargetPosition (target);
+        }
+    }
+    //set action and target position and orientation
+    void ActionpointController::setAction (Action::Value action, const Vector3& target,  const Quaternion& orient )
+    {
+        if (!this || !this->getControllableEntity())
+            return;
+        this->action_ = action;
+        if (action == Action::FLY)
+        {
+            this->setTargetPosition (target);
+            this->setTargetOrientation (orient);
+        }  
+    }
+    
+    //------------------------------------------------------------------------------
+    //------------------------------Actionpoint methods-----------------------------
+    //------------------------------------------------------------------------------
+
+    //POST: this starts doing what was asked by the last element of parsedActionpoints_,
+    //if last element was failed to be parsed, next element will be executed.
+    void ActionpointController::executeActionpoint()
+    {
+        if (!this || !this->getControllableEntity())
+            return;
+
+        Point p;
+        if (this->bLoop_ && !loopActionpoints_.empty())
+        {
+            p = loopActionpoints_.back();
+        }
+        else if (this->bLoop_)
+        {
+            this->bLoop_ = false;
+            return;
+        }
+        else if (!this->bLoop_ && !parsedActionpoints_.empty())
+        {
+            p = parsedActionpoints_.back();
+        }
+        else
+        {
+            if (!this || !this->getControllableEntity())
+                return;
+
+            this->setTarget(0);
+            this->setTargetPosition(this->getControllableEntity()->getWorldPosition());
+            this->action_ = Action::NONE;
+            return;
+        }
+        if (!this || !this->getControllableEntity())
+            return;
+        if (!this->bLoop_ && this->parsedActionpoints_.back().inLoop)
+        {
+            //MOVES all points that are in loop to a loop vector
+            this->fillLoop();
+            if (!this || !this->getControllableEntity())
+                return;
+            this->bLoop_ = true;
+            executeActionpoint();
+            return;
+        }
+        if (!this || !this->getControllableEntity())
+            return;
+        this->setAction (p.action);
+        if (!this || !this->getControllableEntity())
+            return;
+
+        switch (this->action_)
+        {
+            case Action::FIGHT:
+            {
+                std::string targetName = p.name;
+                if (targetName == "")
+                    break;
+                for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
+                {
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    if (CommonController::getName(*itP) == targetName)
+                    {
+                        this->setTarget (static_cast<ControllableEntity*>(*itP));
+                    }
+                }
+                break;
+            }
+            case Action::FLY:
+            {
+                this->setTargetPosition( p.position );
+                if (!this || !this->getControllableEntity())
+                    return;
+                if (this->squaredDistanceToTarget() <= this->squaredaccuracy_)
+                {
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    this->nextActionpoint();
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    this->executeActionpoint();
+                }
+                break;
+            }
+            case Action::PROTECT:
+            {
+                if (!this || !this->getControllableEntity())
+                    return;
+
+                std::string protectName = p.name;
+                if (protectName == "reservedKeyword:human")
+                {
+                    for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
+                    {
+                        if (orxonox_cast<ControllableEntity*>(*itP) && ((*itP)->getController()) && ((*itP)->getController()->getIdentifier()->getName() == "NewHumanController"))
+                        {
+                            this->setProtect (static_cast<ControllableEntity*>(*itP));
+                        }
+                    }
+                }
+                else
+                {
+                    for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
+                    {
+                        if (CommonController::getName(*itP) == protectName)
+                        {
+                            this->setProtect (static_cast<ControllableEntity*>(*itP));
+                        }
+                    }                            
+                }
+                if (!this->getProtect())
+                {
+                    this->nextActionpoint();
+                    this->executeActionpoint();
+                }
+                break;
+            }
+            case Action::NONE:
+            {
+                break;
+            }
+            case Action::FIGHTALL:
+            {
+                break;
+            }
+            case Action::ATTACK:
+            {
+                std::string targetName = p.name;
+
+                for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
+                {
+                    if (CommonController::getName(*itP) == targetName)
+                    {
+                        if (!this || !this->getControllableEntity())
+                            return;
+                        this->setTarget (static_cast<ControllableEntity*>(*itP));
+                    }
+                }
+                if (!this->hasTarget())
+                {
+                    this->nextActionpoint();
+                    if (!this || !this->getControllableEntity())
+                        return;
+                    this->executeActionpoint();
+                }
+                break;
+            }
+            default:
+                break;
+        }   
+    }
+
+    //calculate where in world coordinates this ship has to be, so that it keeps distance to protect_, and fly there
+    void ActionpointController::stayNearProtect()
+    {
+        if (!this || !this->getControllableEntity())
+            return;
+
+        Vector3 targetRelativePosition(0, 300, 300);
+        if (!this->getProtect())
+        {
+            this->nextActionpoint();
+            return;
+        }  
+        Vector3 targetAbsolutePosition = ((this->getProtect()->getWorldPosition()) + 
+            (this->getProtect()->getWorldOrientation()* (targetRelativePosition)));
+        this->setTargetPosition(targetAbsolutePosition);
+        if (!this->getProtect())
+        {
+            this->nextActionpoint();
+            return;
+        }  
+        this->setTargetOrientation(this->getProtect()->getWorldOrientation());
+    }
+    //remove current point from the stack
+    void ActionpointController::nextActionpoint()
+    {
+        if (!this || !this->getControllableEntity())
+            return;
+        if (this->bLoop_)
+        {
+            if (this->bPatrolling_)
+            {
+                this->loopActionpoints_.pop_back();
+                this->bPatrolling_ = false;
+            }
+            else if (!this->loopActionpoints_.empty())
+            {
+                this->moveBackToTop();
+            }
+        }
+        else
+        {
+            if (!this->parsedActionpoints_.empty())
+            {
+                this->parsedActionpoints_.pop_back();
+            }            
+        }
+        this->setAction(Action::NONE);
+        this->bHasTargetPosition_ = false;
+    }
+    //if looping, instead of erasing point, move it to the top (back is what gets executed, so it's kinda reversed stack)
+    void ActionpointController::moveBackToTop()
+    {
+        if (!this || !this->getControllableEntity())
+            return;
+
+        Point temp = loopActionpoints_.back();
+        loopActionpoints_.pop_back();
+        std::reverse (loopActionpoints_.begin(), loopActionpoints_.end());
+        loopActionpoints_.push_back(temp);
+        std::reverse (loopActionpoints_.begin(), loopActionpoints_.end());
+    }
+    //POST: moves all consecutive points that are in loop to the loop stack
+    void ActionpointController::fillLoop()
+    {
+        loopActionpoints_.clear();
+        fillLoopReversed();
+        std::reverse (loopActionpoints_.begin(), loopActionpoints_.end());
+    }
+    void ActionpointController::fillLoopReversed()
+    {
+        if (parsedActionpoints_.back().inLoop)
+        {
+            loopActionpoints_.push_back(parsedActionpoints_.back());
+            parsedActionpoints_.pop_back();
+        }
+        if (parsedActionpoints_.back().inLoop)
+        {
+            fillLoopReversed();
+        }
+    }
+    //copy other ship's stacks so that if it dies, this can finish that ship's actions
+    void ActionpointController::takeActionpoints (const std::vector<Point>& vector, const std::vector<Point>& loop, bool b)
+    {
+        if (!this || !this->getControllableEntity())
+            return;
+        this->parsedActionpoints_ = vector;
+        if (!this || !this->getControllableEntity())
+            return;
+        this->loopActionpoints_ = loop;
+        this->bLoop_ = b;
+        this->bTakenOver_ = true;
+    }
+    //attack closest target
+    void ActionpointController::setClosestTarget()
+    {
+        this->setTarget (static_cast<ControllableEntity*>( closestTarget() ) ); 
+    }
+    //find closest target
+    Pawn* ActionpointController::closestTarget()
+    {
+        if (!this || !this->getControllableEntity())
+            return 0;
+
+        Pawn* closestTarget = 0;
+        float minDistance =  std::numeric_limits<float>::infinity();
+        Gametype* gt = this->getGametype();
+        for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
+        {
+            if (!this || !this->getControllableEntity())
+                return 0;
+            if ( CommonController::sameTeam (this->getControllableEntity(), static_cast<ControllableEntity*>(*itP), gt) )
+                continue;
+
+            float distance = CommonController::distance (*itP, this->getControllableEntity());
+            if (distance < minDistance)
+            {
+                closestTarget = *itP;
+                minDistance = distance;
+            }
+        }
+        if (closestTarget)
+        {
+           return closestTarget;
+        } 
+        return 0;  
+    }
+    //push action FIGHT to the stack and set target to the closest enemy
+    void ActionpointController::startAttackingEnemiesThatAreClose()
+    {
+        if (!this || !this->getControllableEntity())
+            return;
+        
+        if (!this->target_ || (this->target_ && CommonController::distance (this->getControllableEntity(), this->target_) > this->attackRange_))
+        {
+            if (!this || !this->getControllableEntity())
+                return;
+            Pawn* newTarget = this->closestTarget();
+            if ( newTarget && 
+                CommonController::distance (this->getControllableEntity(), static_cast<ControllableEntity*>(newTarget))
+                    <= this->attackRange_ )
+            {
+                if (!this || !this->getControllableEntity())
+                    return;
+                this->setTarget(newTarget);
+                if (this->bLoop_ && !this->bPatrolling_)
+                {
+                    Point p = { Action::FIGHT, "", Vector3::ZERO, true };
+                    this->loopActionpoints_.push_back(p);
+                }
+                else if (!this->bPatrolling_)
+                {
+                    Point p = { Action::FIGHT, "", Vector3::ZERO, false };
+                    this->parsedActionpoints_.push_back(p);
+                }
+                this->bPatrolling_ = true;
+                this->executeActionpoint();
+            }
+        }
+    }
+}   
Index: /code/trunk/src/orxonox/controllers/ActionpointController.h
===================================================================
--- /code/trunk/src/orxonox/controllers/ActionpointController.h	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/ActionpointController.h	(revision 11052)
@@ -0,0 +1,261 @@
+/*
+ *   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:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ActionpointController_H__
+#define _ActionpointController_H__
+
+#include "controllers/FightingController.h"
+#include "tools/Timer.h"
+#include "tools/interfaces/Tickable.h"
+#include "../modules/pickup/PickupSpawner.h"
+#include <map>
+
+#include <boost/shared_ptr.hpp>
+
+
+namespace orxonox
+{
+    /**
+    @brief
+        ActionpointController is a state machine with states:
+            1) NONE
+            2) FLY: fly towards a point
+            3) FIGHT: fight enemies that are in attackRange_ (see FightingController)
+            4) PROTECT: follow this->protect_
+            5) FIGHTALL: fight all enemies on the map
+            6) ATTACK: fight a specific spaceship
+        This controller always executes an action that is in the back of the vector being used.
+        After current this->action_ is completed, next action becomes the top action (one that will
+        be returned by someVector.back()), and current action either will be removed (if not looping),
+        or moved to the top (if looping).
+
+        Every second action(), which is once in two seconds, this searches the area for enemies that are in attack range, if finds anyone,
+        pushes Action::FIGHT to the stack. That makes spaceship fight enemies inside of a sphere, and when all enemies in range are dead,
+        Action::FIGHT is removed from the stack, and spaceship resumes doing whatever action was being executed before.
+
+        In XML one has to attack Actionpoints in order to achieve any complex behaviour, but in Controller all actionpoints are effectively 
+        being stored in an array of type Point::Value.
+    @note
+        ActionpointController will not work, if there is no MasterController in the level!
+        All the demos are in a file called AITest.oxw. In the menu look for New AI Testing Level.
+    */
+    namespace Action
+    {  
+        enum Value
+        {
+            NONE, FLY, FIGHT, PROTECT, FIGHTALL, ATTACK
+        };
+        
+    }
+    
+    struct Point {
+        Action::Value action;
+        std::string name;
+        Vector3 position;
+        bool inLoop;
+    } ;
+    namespace PickupType
+    {
+        enum Value
+        {  
+            NONE, DAMAGE, HEALTH, SPEED, PORTAL
+        };
+    }
+
+    class _OrxonoxExport ActionpointController : public FightingController, public Tickable
+    {
+        public:
+           
+            ActionpointController(Context* context);
+            virtual ~ActionpointController();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);          
+               
+            /**
+            @brief
+                tick is called every tick by Game (?).
+                In tick ship flies and fires.
+            */
+            virtual void tick(float dt);   
+            /**
+            @brief
+                XML method, example XML usage:
+                <SpaceShip position="-2000, 1500, -1000" lookat="0,0,0" team=0 name="ss2">
+                  <templates>
+                    <Template link=spaceshipassff />
+                  </templates>
+                  <controller>
+                    <DivisionController team=0 formationMode="finger4">
+                      <actionpoints>
+                        <Actionpoint position="0,0,0" action="FLY" /> 
+                        <Actionpoint position="-1000,750,-500" action="ATTACK" attack="attack" />
+                        <Actionpoint position="-1000,750,-500" action="PROTECt" protectMe=true />
+                        <Actionpoint position="-1000,750,-500" action="PROTECt" protect="protect" /> 
+                        <Actionpoint position="-1000,750,-500" action="FIGHTALL" />
+                       </actionpoints>
+                    </DivisionController>
+                  </controller>
+                </SpaceShip>
+                
+                Full description:
+                Adds an Actionpoint to this->actionpoints_. Actionpoint can take arguments like action="attack" attack="name".
+                For documentation on Actionpoint XML arguments, check out Actionpoint.h class
+                If any WorldEntity that is not Actionpoint or its child being sent to actionpoints through XML,
+                action would be assumed to be Action::FLY and target position to be position of the entity. Also, if not Actionpoint
+                is passed, it is assumed to be in a loop. How it works is: in <actionpoints> first all Actionpoints between 
+                first Actionpoint with loopStart=true and first following Actionpoint with loopEnd=true are included in a single loop.
+                If they are adjacent (in the input array) with WorldEntity, then WorldEntity is also in a loop.
+                All the Worldentities are assumed to be in loop. 
+               
+                Loop example:
+                <SpaceShip position="-1500, 1500, -1000" lookat="0,0,0" team=0 name="ss1">
+                  <templates>
+                    <Template link=spaceshipassff />
+                  </templates>
+                  <controller>
+                    <DivisionController team=0 formationMode="wall">
+                      <actionpoints>
+                        <Actionpoint position="  0,2000,-600" action="FLY" loopStart=true/>
+                        <Actionpoint position="  0,2000,-1000" action="FLY"  />
+                        <Actionpoint position="400,2000,-1000" action="FLY" />
+                        <Actionpoint position="400,2000,-600" action="FLY" loopEnd=true />
+                      </actionpoints>
+                    </DivisionController>
+                  </controller>
+                </SpaceShip>
+               
+                other loop example:
+                <SpaceShip position="-1500, -1500, -1500" lookat="0,0,0" team=0 name="ss1">
+                  <templates>
+                    <Template link=spaceshipassff />
+                  </templates>
+                  <controller>
+                    <DivisionController team=0 formationMode="diamond">
+                      <actionpoints>
+                        <Model mesh="cube.mesh" scale=8 position="  0,2000,-600" />
+                        <Model mesh="cube.mesh" scale=8 position="  0,2000,-1000" />
+                        <Model mesh="cube.mesh" scale=8 position="400,2000,-1000" />
+                        <Model mesh="cube.mesh" scale=8 position="400,2000,-600" />
+                      </actionpoints>
+                    </DivisionController>
+                  </controller>
+                </SpaceShip> 
+
+            @note
+                Don't use several loops, and don't use WorldEntities as input to <actionpoints> as I didn't test it well, but you
+                can try if feeling lucky.  
+            */
+            void addActionpoint(WorldEntity* actionpoint); 
+            WorldEntity* getActionpoint(unsigned int index) const;    
+            void setDefaultFightAll(bool value)
+                { this->bDefaultFightAll_ = value; }
+            bool getDefaultFightAll ()
+                { return this->bDefaultFightAll_; }
+            void setDefaultPatrol(bool value)
+                { this->bDefaultPatrol_ = value; }
+            bool getDefaultPatrol ()
+                { return this->bDefaultPatrol_; }
+               
+
+            virtual void stayNearProtect();
+            virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour. Only gets called by MasterController
+            virtual void takeActionpoints (const std::vector<Point>& vector, const std::vector<Point>& loop, bool b);
+
+            virtual Action::Value getAction ();
+            virtual std::string getActionName();
+
+            void setAction (Action::Value action);
+            void setAction (Action::Value action, ControllableEntity* target);
+            void setAction (Action::Value action, const Vector3& target);
+            void setAction (Action::Value action, const Vector3& target,  const Quaternion& orient );
+
+            virtual bool setWingman(ActionpointController* wingman)
+                { return false; }
+            virtual bool hasWingman()
+                { return true; }
+            virtual bool setFollower(ActionpointController* myFollower)
+                { return false; }
+            virtual bool hasFollower()
+                { return true; }
+
+
+        protected:
+                void startAttackingEnemiesThatAreClose();
+                WeakPtr<ActionpointController> myWingman_;
+                WeakPtr<ActionpointController> myFollower_;
+                WeakPtr<ActionpointController> myDivisionLeader_;
+            //----[Actionpoint information]----
+                Action::Value action_;
+                std::string protectName_;
+                std::string targetName_;
+                std::vector<WeakPtr<WorldEntity> > actionpoints_;
+                float squaredaccuracy_;
+                std::vector<Point > parsedActionpoints_;//<! actionpoints as they are stored here after being parsed from XML
+                std::vector<Point > loopActionpoints_;  //<! actionpoints that are to be looped
+                bool bInLoop_;                          //<! variable for addActionpoint method
+                bool bLoop_;                            //<! is state machine looping?
+                bool bEndLoop_;                         //<! variable for addActionpoint method
+                bool bTakenOver_;                       //<! are actionpoints taken over from the leader when he died? if yes, top actionpoint 
+                                                        //<! is to be executed for the state machine to start working
+            //----[/Actionpoint information]----
+                void setProtect (ControllableEntity* protect);
+                ControllableEntity* getProtect (); 
+                WeakPtr<ControllableEntity> protect_;   //<! entity that is to be protected if this->action_ == Action::PROTECT
+                void fillLoop();                        //<! moves actionpoints that are should be in loop from parsedActionpoints_ to loopActionpoints_
+                void fillLoopReversed();
+                void moveBackToTop();                   //<! analog of removing back actionpoint for loopActionpoints_: instead of removing it, 
+                                                        //<! move it to the top, so that it will be executed later on.
+                void setClosestTarget();
+                Pawn* closestTarget();
+            //----[Actionpoint methods]----
+                /**
+                @brief
+                    Sets this->target_, this->targetPosition_, this->protect_ and this->action_ depending
+                    on the current actionpoint in the vector parsedActionpoints_ if not looping or
+                    loopActionpoints_ if looping.
+                @note
+                */
+                void executeActionpoint();  
+                /**
+                @brief
+                    If this->bLoop_, move back action to top (back is the current one, top is the last),
+                    otherwise remove back actionpoint.
+                @note
+                    actionpoints_ is only used for XML, real state stacks are parsedActionpoints_ and loopActionpoints_
+                */            
+                void nextActionpoint();                 
+            //----[Actionpoint methods]----          
+
+                bool bDefaultFightAll_;     //<! if true, when no action set, this will fight all
+
+                bool bPatrolling_;        //<! true if current action_ is FIGHT because this found enemies that are close, need this to correctly go back to looping if was looping
+                bool bDefaultPatrol_;       //<! if true, this will look out for enemies that are close if this is just flying or doing nothing
+                unsigned int ticks_;     //<! local tick counter            
+    };
+}
+
+#endif /* _ActionpointController_H__ */
Index: /code/trunk/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/ArtificialController.cc	(revision 11051)
+++ /code/trunk/src/orxonox/controllers/ArtificialController.cc	(revision 11052)
@@ -94,7 +94,7 @@
             return;
 
-        static const float hardcoded_projectile_speed = 750;
-
-        this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getWorldPosition(), hardcoded_projectile_speed, this->target_->getWorldPosition(), this->target_->getVelocity());
+        static const float HARDCODED_PROJECTILE_SPEED = 750;
+
+        this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getWorldPosition(), HARDCODED_PROJECTILE_SPEED, this->target_->getWorldPosition(), this->target_->getVelocity());
         this->bHasTargetPosition_ = (this->targetPosition_ != Vector3::ZERO);
 
Index: /code/trunk/src/orxonox/controllers/CMakeLists.txt
===================================================================
--- /code/trunk/src/orxonox/controllers/CMakeLists.txt	(revision 11051)
+++ /code/trunk/src/orxonox/controllers/CMakeLists.txt	(revision 11052)
@@ -11,3 +11,11 @@
   FormationController.cc
   ControllerDirector.cc
+  DivisionController.cc
+  WingmanController.cc
+  SectionController.cc
+  CommonController.cc
+  ActionpointController.cc
+  FlyingController.cc
+  FightingController.cc
+  MasterController.cc
 )
Index: /code/trunk/src/orxonox/controllers/CommonController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/CommonController.cc	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/CommonController.cc	(revision 11052)
@@ -0,0 +1,216 @@
+/*
+ *   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:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+#include "controllers/CommonController.h"
+
+//here starts stuff for sameTeam function copied from FormationController
+#include "gametypes/TeamDeathmatch.h"
+#include "gametypes/Gametype.h"
+#include "controllers/DroneController.h"
+#include "gametypes/Dynamicmatch.h"
+
+#include "worldentities/pawns/TeamBaseMatchBase.h"
+
+namespace orxonox
+{
+    const float CommonController::HARDCODED_PROJECTILE_SPEED = 750;
+
+    RegisterClass(CommonController);
+    CommonController::CommonController(Context* context): Controller(context)
+    {
+        RegisterObject(CommonController);
+    }
+    CommonController::~CommonController() 
+    {
+        //no member variables - nothing to destroy
+    }
+    /**
+    @brief
+      PRE: a < b.
+      returns random float between a and b.
+    */
+    float CommonController::randomInRange(float a, float b)
+    {
+        return a + rnd(1.0f) * (b - a);
+    }
+    /**
+    @brief
+      returns distance between two entities, if either is zero pointer, returns infinity
+    */    
+    float CommonController::distance (const ControllableEntity* entity1, const ControllableEntity* entity2)
+    {
+        if (!entity1 || !entity2)
+            return std::numeric_limits<float>::infinity();
+        return (entity1->getPosition() - entity2->getPosition()).length();
+    }
+    /**
+    @brief
+      bad function from FormationController that returns true if both entities have same team
+    */    
+    bool CommonController::sameTeam (ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)
+    {
+        
+        if (!entity1 || !entity2)
+            return false;
+        if (entity1 == entity2)
+            return true;
+
+        int team1 = entity1->getTeam();
+        int team2 = entity2->getTeam();
+
+        Controller* controller = 0;
+        if (entity1->getController())
+            controller = entity1->getController();
+        else
+            controller = entity1->getXMLController();
+        if (controller)
+        {
+            if (controller->getIdentifier()->getName() == "MasterController")
+                return true;
+            CommonController* ac = orxonox_cast<CommonController*>(controller);
+            if (ac)
+                team1 = ac->getTeam();
+        }
+
+        if (entity2->getController())
+            controller = entity2->getController();
+        else
+            controller = entity2->getXMLController();
+        if (controller)
+        {
+            if (controller->getIdentifier()->getName() == "MasterController")
+                return true;
+            CommonController* ac = orxonox_cast<CommonController*>(controller);
+            if (ac)
+                team2 = ac->getTeam();
+        }
+
+        TeamGametype* tdm = orxonox_cast<TeamGametype*>(gametype);
+        if (tdm)
+        {
+            if (entity1->getPlayer())
+                team1 = tdm->getTeam(entity1->getPlayer());
+
+            if (entity2->getPlayer())
+                team2 = tdm->getTeam(entity2->getPlayer());
+        }
+
+        TeamBaseMatchBase* base = 0;
+        base = orxonox_cast<TeamBaseMatchBase*>(entity1);
+        if (base)
+        {
+            switch (base->getState())
+            {
+                case BaseState::ControlTeam1:
+                    team1 = 0;
+                    break;
+                case BaseState::ControlTeam2:
+                    team1 = 1;
+                    break;
+                case BaseState::Uncontrolled:
+                default:
+                    team1 = -1;
+            }
+        }
+        base = orxonox_cast<TeamBaseMatchBase*>(entity2);
+        if (base)
+        {
+            switch (base->getState())
+            {
+                case BaseState::ControlTeam1:
+                    team2 = 0;
+                    break;
+                case BaseState::ControlTeam2:
+                    team2 = 1;
+                    break;
+                case BaseState::Uncontrolled:
+                default:
+                    team2 = -1;
+            }
+        }
+
+        DroneController* droneController = 0;
+        droneController = orxonox_cast<DroneController*>(entity1->getController());
+        if (droneController && static_cast<ControllableEntity*>(droneController->getOwner()) == entity2)
+            return true;
+        droneController = orxonox_cast<DroneController*>(entity2->getController());
+        if (droneController && static_cast<ControllableEntity*>(droneController->getOwner()) == entity1)
+            return true;
+        DroneController* droneController1 = orxonox_cast<DroneController*>(entity1->getController());
+        DroneController* droneController2 = orxonox_cast<DroneController*>(entity2->getController());
+        if (droneController1 && droneController2 && droneController1->getOwner() == droneController2->getOwner())
+            return true;
+
+        Dynamicmatch* dynamic = orxonox_cast<Dynamicmatch*>(gametype);
+        if (dynamic)
+        {
+            if (dynamic->notEnoughPigs||dynamic->notEnoughKillers||dynamic->notEnoughChasers) {return false;}
+
+            if (entity1->getPlayer())
+                team1 = dynamic->getParty(entity1->getPlayer());
+
+            if (entity2->getPlayer())
+                team2 = dynamic->getParty(entity2->getPlayer());
+
+            if (team1 ==-1 ||team2 ==-1) {return false;}
+            else if (team1 == dynamic->chaser && team2 != dynamic->chaser) {return false;}
+            else if (team1 == dynamic->piggy && team2 == dynamic->chaser) {return false;}
+            else if (team1 == dynamic->killer && team2 == dynamic->chaser) {return false;}
+            else return true;
+        }
+
+        return (team1 == team2 && team1 != -1);
+    }
+    /**
+    @brief
+      returns true if entityThatLooks does look at entityBeingLookeAt with a tolerance of angle.
+    */    
+    bool CommonController::isLooking(const ControllableEntity* entityThatLooks, const ControllableEntity* entityBeingLookedAt, float angle)
+    {
+        if (!entityThatLooks || !entityBeingLookedAt)
+            return false;
+        return (getAngle(entityThatLooks ->getPosition() , 
+            entityThatLooks->getOrientation()  * WorldEntity::FRONT, 
+            entityBeingLookedAt->getWorldPosition()) < angle);
+    }
+    /**
+    @brief
+      returns a name of a Pawn entity, if no name set, returns string representing address of the Pawn.
+    */    
+    std::string CommonController::getName(const Pawn* entity)
+    {
+        std::string name = entity->getName();
+        if (name == "")
+        {
+            const void * address = static_cast<const void*>(entity);
+            std::stringstream ss;
+            ss << address;  
+            name = ss.str();            
+        }
+        return name;
+    }
+}
Index: /code/trunk/src/orxonox/controllers/CommonController.h
===================================================================
--- /code/trunk/src/orxonox/controllers/CommonController.h	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/CommonController.h	(revision 11052)
@@ -0,0 +1,59 @@
+/*
+ *   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:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _CommonController_H__
+#define _CommonController_H__
+
+
+#include "controllers/Controller.h"                 //that's what I inherit from
+
+#include <limits>                                   //I use limits pretty much in every class, so might as well include it in the parent class
+
+#include "worldentities/ControllableEntity.h"       //same for ControllableEntity
+#include "worldentities/pawns/Pawn.h"               //and Pawn
+
+
+namespace orxonox
+{
+    class _OrxonoxExport CommonController : public Controller
+    {
+
+        public:
+            static const float HARDCODED_PROJECTILE_SPEED; //<! FightingController uses it to predict enemy position
+
+            CommonController(Context* context);
+            virtual ~CommonController();
+            static float randomInRange(float a, float b);   //<! returns random number from a to b
+            static float distance(const ControllableEntity* entity1, const ControllableEntity* entity2);    //<! returns distance between arguments
+            static bool sameTeam (ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gt);
+            static bool isLooking(const ControllableEntity* entityThatLooks, const ControllableEntity* entityBeingLookedAt, float angle) ;
+            static std::string getName(const Pawn* entity) ;           
+    };
+}
+
+#endif /* _CommonController_H__ */
Index: /code/trunk/src/orxonox/controllers/DivisionController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/DivisionController.cc	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/DivisionController.cc	(revision 11052)
@@ -0,0 +1,148 @@
+/*
+ *   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:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DivisionController.h"
+#include "infos/PlayerInfo.h"
+
+namespace orxonox
+{
+
+    RegisterClass(DivisionController);
+
+    //Leaders share the fact that they have Wingmans
+    DivisionController::DivisionController(Context* context) : ActionpointController(context)
+    {
+        RegisterObject(DivisionController);
+        this->setFormationMode(FormationMode::DIAMOND);
+        this->target_ = 0;
+        this->myFollower_ = 0;
+        this->myWingman_ = 0;
+    }
+
+    DivisionController::~DivisionController()
+    {
+        for (size_t i = 0; i < this->actionpoints_.size(); ++i)
+        {
+            if(this->actionpoints_[i])
+                this->actionpoints_[i]->destroy();
+        }
+        this->parsedActionpoints_.clear();
+        this->actionpoints_.clear();
+    } 
+
+    void DivisionController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(DivisionController, XMLPort, xmlelement, mode);
+        
+    }
+    void DivisionController::tick(float dt)
+    {   
+        if (!this->isActive())
+            return;   
+        
+        SUPER(DivisionController, tick, dt);
+        
+    }
+    void DivisionController::action()
+    {   
+        if (!this || !this->getControllableEntity() || !this->isActive())
+            return;
+        
+        ActionpointController::action();
+        if (!this || !this->getControllableEntity())
+            return;
+        if (!(this->parsedActionpoints_.empty() && this->loopActionpoints_.empty()))
+        {
+            //when this dies, its follower will execute all its actionpoints, if follower dies before this, wingman will do this
+            if (this->myFollower_)
+            {
+                this->myFollower_->takeActionpoints(this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
+            }
+            else if (this->myWingman_)
+            {
+                this->myWingman_->takeActionpoints(this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
+            }    
+        }
+
+        
+    }
+    //I wanted to do it different here, but at this point I think nothing will change if I delete that method
+    void DivisionController::stayNearProtect()
+    {
+        ActionpointController::stayNearProtect();
+    }
+    
+    bool DivisionController::setWingman(ActionpointController* newWingman)
+    {
+        if (!this->myWingman_)
+        {
+            this->myWingman_ = newWingman;
+            if (!this->hasFollower())
+                newWingman->takeActionpoints (this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+    bool DivisionController::setFollower(ActionpointController* newFollower)
+    {
+        if (!this->myFollower_)
+        {
+            this->myFollower_ = newFollower;
+            if (this->hasWingman())
+            {
+                this->myWingman_->takeActionpoints (std::vector<Point>(), std::vector<Point>(), false);
+            }
+
+            newFollower->takeActionpoints (this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
+            
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+    bool DivisionController::hasWingman()
+    {
+        if (this->myWingman_)
+            return true;
+        else
+            return false;
+    }
+    bool DivisionController::hasFollower()
+    {
+        if (this->myFollower_)
+            return true;
+        
+        return false;
+    }
+
+}
Index: /code/trunk/src/orxonox/controllers/DivisionController.h
===================================================================
--- /code/trunk/src/orxonox/controllers/DivisionController.h	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/DivisionController.h	(revision 11052)
@@ -0,0 +1,79 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _DivisionController_H__
+#define _DivisionController_H__
+
+#include "controllers/ActionpointController.h"
+
+
+
+namespace orxonox
+{
+    /**
+        @note
+        ActionpointController will not work, if there is no MasterController in the level!
+        All the demos are in a file called AITest.oxw. In the menu look for New AI Testing Level.
+    */
+    class _OrxonoxExport DivisionController : public ActionpointController
+    {
+        public:
+            //----[language demanded functions]----            
+                DivisionController(Context* context);
+
+                virtual ~DivisionController();
+            //----[/language demanded functions]----            
+
+            //----[orxonox demanded functions]----
+                virtual void tick(float dt); 
+
+                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);          
+            //----[orxonox demanded functions]----
+
+            //----[own functions]----
+                virtual bool setFollower(ActionpointController* newFollower);
+                virtual bool setWingman(ActionpointController* newWingman);
+                virtual bool hasWingman();
+                virtual bool hasFollower();
+                
+            //----[/own functions]----
+            virtual void stayNearProtect();
+
+        protected:
+            //----action must only be managed by this----
+            virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour.
+
+        private:
+            //----private variables-----
+            Timer actionTimer_; //<! Regularly calls action().
+   
+
+    };
+}
+
+#endif /* _DivisionController_H__ */
Index: /code/trunk/src/orxonox/controllers/FightingController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/FightingController.cc	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/FightingController.cc	(revision 11052)
@@ -0,0 +1,372 @@
+/*
+ *   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:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      Fabian 'x3n' Landau, Dominik Solenicki
+ *
+ */
+#include "controllers/FightingController.h"
+#include "core/XMLPort.h"
+#include "util/Math.h"
+
+
+#include "worldentities/pawns/SpaceShip.h"
+
+#include "weaponsystem/WeaponMode.h"
+#include "weaponsystem/WeaponPack.h"
+#include "weaponsystem/Weapon.h"
+#include "weaponsystem/WeaponSlot.h"
+#include "weaponsystem/WeaponSystem.h"
+#include "weaponsystem/Munition.h"
+
+namespace orxonox
+{
+
+    RegisterClass (FightingController);
+    
+    FightingController::FightingController( Context* context ): FlyingController( context )
+    {
+        this->attackRange_ = 2500;
+        this->stopLookingAtTarget();
+        this->bSetupWorked = false;
+        this->timeout_ = 0;
+        RegisterObject( FightingController );
+    }
+    FightingController::~FightingController() 
+    {
+        
+    }
+    void FightingController::XMLPort( Element& xmlelement, XMLPort::Mode mode )
+    {
+        SUPER( FightingController, XMLPort, xmlelement, mode );
+    }
+    void FightingController::lookAtTarget(float dt)
+    {
+        if (!this || !this->getControllableEntity())
+            return;
+        ControllableEntity* entity = this->getControllableEntity();
+        if ( !entity )
+            return;
+        Vector2 coord = get2DViewCoordinates
+            ( entity->getPosition() , 
+            entity->getOrientation()  * WorldEntity::FRONT, 
+            entity->getOrientation()  * WorldEntity::UP, 
+            positionOfTarget_ );
+
+        //rotates should be in range [-1,+1], clamp cuts off all that is not
+        float rotateX = -clamp( coord.x * 10, -1.0f, 1.0f );
+        float rotateY = clamp( coord.y * 10, -1.0f, 1.0f ); 
+   
+        //Yaw and Pitch are enough to start facing the target
+        this->getControllableEntity() ->rotateYaw( ROTATEFACTOR * rotateX * dt );
+        this->getControllableEntity() ->rotatePitch( ROTATEFACTOR * rotateY * dt );
+    }
+    void FightingController::stopLookingAtTarget()
+    {
+        this->bLookAtTarget_ = false;
+    }
+    void FightingController::startLookingAtTarget()
+    {
+        this->bLookAtTarget_ = true;
+    }
+    bool FightingController::hasTarget() const
+    {
+        if ( this->target_ )
+            return true;
+        return false;
+    }
+
+    void FightingController::setTarget( ControllableEntity* target )
+    {
+        this->target_ = target;        
+        if ( this->target_ )
+        {
+            this->setPositionOfTarget( target_->getWorldPosition() );
+        }
+    }
+    void FightingController::setPositionOfTarget( const Vector3& target )
+    {
+        this->positionOfTarget_ = target;
+        this->bHasPositionOfTarget_ = true;
+    }
+    void FightingController::setOrientationOfTarget( const Quaternion& orient )
+    {
+        this->orientationOfTarget_=orient;
+        this->bHasOrientationOfTarget_=true;
+    }
+    
+    void FightingController::maneuver() 
+    {
+        if ( !this->target_ || !this->getControllableEntity())
+            return;
+
+
+        Vector3 thisPosition = this->getControllableEntity()->getWorldPosition();
+        this->setPositionOfTarget(this->target_->getWorldPosition());
+        //this->setOrientationOfTarget(this->target_->getOrientation());
+        Vector3 diffVector = this->positionOfTarget_ - thisPosition;
+        float diffLength = diffVector.length();
+        Vector3 diffUnit = diffVector/diffLength;
+
+        if (!this || !this->getControllableEntity())
+            return;
+
+        //too far? well, come closer then
+        if (diffLength > this->attackRange_)
+        {
+            this->spread_ = 400;
+            this->formationMode_ = FormationMode::DIAMOND;
+            this->bKeepFormation_ = true;
+            
+            this->setTargetPosition(this->positionOfTarget_ - diffUnit * 100.0f);
+        }
+        else
+        {   
+            bool bTargetIsLookingAtThis = CommonController::isLooking (this->target_, this->getControllableEntity(), math::pi/20.0f)
+                || this->deltaHp < 0;
+            this->bKeepFormation_ = false;
+
+            if (!this || !this->getControllableEntity())
+                return;
+            if (!this->bDodge_)
+            {
+                this->bStartedDodging_ = false;
+
+                this->setTargetPosition(this->positionOfTarget_ - diffUnit * 50.0f);   
+                return;
+            }
+            else if (bTargetIsLookingAtThis || diffLength < 700.0f)
+            {
+                if (!this->bStartedDodging_)
+                {
+                    this->bStartedDodging_ = true;
+                    dodge(thisPosition, diffLength, diffUnit);        
+                }
+            }
+            else
+            {
+                if (diffLength < 1000)
+                {
+                    this->stopMoving();
+                    this->startLookingAtTarget();
+
+                }
+                else
+                {
+                    this->setTargetPosition(this->positionOfTarget_ - diffUnit * 300.0f);
+                }
+            }
+        }
+    }
+    
+    void FightingController::dodge(const Vector3& thisPosition, float diffLength, Vector3& diffUnit)
+    {
+        //d.x*x + d.y*y + d.z*z == 0
+        //z = 1/d.z * (-d.y*y - d.x * x)
+        float x = CommonController::randomInRange (300, 800) * (CommonController::randomInRange(0,1) <= 0.5 ? 1 : -1);
+        float y = CommonController::randomInRange (300, 800) * (CommonController::randomInRange(0,1) <= 0.5 ? 1 : -1);
+        float z = diffUnit.z == 0 ? 0 : (1/diffUnit.z) * (-x * diffUnit.x - y * diffUnit.y);
+        if (diffLength < 150.0f)
+        {
+            this->setTargetPosition(this->positionOfTarget_ + Vector3(z,x,y));
+        }
+        else
+        {
+        this->setTargetPosition(thisPosition + Vector3(x,y,z) + (this->deltaHp < 0 ? -diffUnit * 450.0f : 
+            (diffLength < 700.0f ? -diffUnit*700.0f : diffUnit * 50.0f)));
+
+        }
+        this->boostControl();
+
+    }
+    bool FightingController::canFire() 
+    {
+        //no target? why fire?
+        if (!this->target_ || !this->getControllableEntity())
+            return false;
+        Vector3 newPositionOfTarget = getPredictedPosition(this->getControllableEntity()->getWorldPosition(), 
+                                                           HARDCODED_PROJECTILE_SPEED, this->target_->getWorldPosition(),
+                                                           this->target_->getVelocity());
+        if (!this->target_ || !this->getControllableEntity())
+            return false;
+        //Vector3.isNaN() is what I used on my machine and it worked...
+        if (!(std::isnan(newPositionOfTarget.x) || std::isnan(newPositionOfTarget.y) || std::isnan(newPositionOfTarget.z)))
+        {
+            this->setPositionOfTarget(newPositionOfTarget);
+        }
+
+        return squaredDistanceToTarget() < this->attackRange_*this->attackRange_ && this->isLookingAtTarget(math::pi / 20.0f);
+    }
+
+
+    float FightingController::squaredDistanceToTarget()  const
+    {
+        if (!this || !this->getControllableEntity())
+            return 0;
+        if (!this->target_ || !this->getControllableEntity())
+            return (this->getControllableEntity()->getPosition().squaredDistance(this->targetPosition_));
+        else
+            return (this->getControllableEntity()->getPosition().squaredDistance(this->positionOfTarget_));
+    }
+    bool FightingController::isLookingAtTarget( float angle ) const
+    {
+        if ( !this->getControllableEntity()  || !this->target_ )
+            return false;
+        return CommonController::isLooking(this->getControllableEntity(), this->getTarget(), angle);
+    }
+    void FightingController::setClosestTarget()
+    {
+        this->setTarget (static_cast<ControllableEntity*>( closestTarget() ) ); 
+    }
+    
+    Pawn* FightingController::closestTarget() const
+    {
+        if (!this || !this->getControllableEntity())
+            return 0;
+
+        Pawn* closestTarget = 0;
+        float minDistance =  std::numeric_limits<float>::infinity();
+        Gametype* gt = this->getGametype();
+        for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
+        {
+            if ( CommonController::sameTeam (this->getControllableEntity(), static_cast<ControllableEntity*>(*itP), gt) )
+                continue;
+
+            float distance = CommonController::distance (*itP, this->getControllableEntity());
+            if (distance < minDistance)
+            {
+                closestTarget = *itP;
+                minDistance = distance;
+            }
+        }
+        if (closestTarget)
+        {
+           return closestTarget;
+        } 
+        return 0;  
+    }
+    //I checked it out, rockets DO NOT cause any problems! this->getControllableEntity() is always a SpaceShip
+    void FightingController::doFire()
+    {
+        if (!this->bSetupWorked)
+        {
+            this->setupWeapons();
+        }
+        if (!this->target_ || !this->getControllableEntity())
+        {
+            return;
+        }
+
+        Pawn* pawn = orxonox_cast<Pawn*> (this->getControllableEntity());
+        if (pawn)
+            pawn->setAimPosition (this->positionOfTarget_);
+
+        int firemode;
+        float distance = CommonController::distance (this->getControllableEntity(), this->target_);
+
+
+       
+        if (distance < 1500)
+        {
+            if (this->rocketsLeft_ > 0 && !this->bFiredRocket_)
+            {
+                firemode = getFiremode ("RocketFire");
+            }
+            else
+            {
+                if (distance > 800)
+                    firemode = getFiremode ("HsW01");
+                else
+                    firemode = getFiremode ("LightningGun");
+            }
+
+        } 
+    
+
+        else if (distance < 2000)
+        {
+            firemode = getFiremode ("HsW01");
+        }
+        else
+        {
+            firemode = getFiremode ("LightningGun");
+        }
+        if (firemode < 0)
+        {
+            //assuming there is always some weapon with index 0
+            firemode = 0;
+        }
+        if (firemode == getFiremode("RocketFire"))
+        {
+            this->timeout_ = 5;
+            this->rocketsLeft_--;
+            this->bFiredRocket_ = true;
+        }
+        if (firemode == getFiremode("SimpleRocketFire"))
+        {
+            this->rocketsLeft_--;
+        }
+              
+        this->getControllableEntity()->fire(firemode);
+        
+    }
+    void FightingController::setupWeapons() //TODO: Make this function generic!! (at the moment is is based on conventions)
+    {
+        this->bSetupWorked = false;
+        if(this->getControllableEntity())
+        {
+            Pawn* pawn = orxonox_cast<Pawn*>(this->getControllableEntity());
+            if(pawn && pawn->isA(Class(SpaceShip))) //fix for First Person Mode: check for SpaceShip
+            {
+                this->weaponModes_.clear(); // reset previous weapon information
+                WeaponSlot* wSlot = 0;
+                for(int l=0; (wSlot = pawn->getWeaponSlot(l)) ; l++)
+                {
+                    WeaponMode* wMode = 0;
+                    for(int i=0; (wMode = wSlot->getWeapon()->getWeaponmode(i)) ; i++)
+                    {
+                        std::string wName = wMode->getIdentifier()->getName();
+                        // SubclassIdentifier<Munition> munition =  ClassByString(wName);
+                        if (wName == "RocketFire")
+                            this->rocketsLeft_ = 10;
+                        if(this->getFiremode(wName) == -1) //only add a weapon, if it is "new"
+                            weaponModes_[wName] = wMode->getMode();
+                    }
+                }
+                if(weaponModes_.size())//at least one weapon detected
+                    this->bSetupWorked = true;
+            }
+        }
+
+    }
+
+    int FightingController::getFiremode(std::string name)
+    {
+        for (std::map< std::string, int >::iterator it = this->weaponModes_.begin(); it != this->weaponModes_.end(); ++it)
+        {
+            if (it->first == name)
+                return it->second;
+        }
+        return -1;
+    }
+}
Index: /code/trunk/src/orxonox/controllers/FightingController.h
===================================================================
--- /code/trunk/src/orxonox/controllers/FightingController.h	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/FightingController.h	(revision 11052)
@@ -0,0 +1,106 @@
+/*
+ *   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:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      Fabian 'x3n' Landau, Dominik Solenicki
+ *
+ */
+
+#ifndef _FightingController_H__
+#define _FightingController_H__
+
+
+#include "controllers/FlyingController.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        FightingController stores all the fighting methods and member variables of AI.
+        Main methods here are maneuver() and dodge().
+    
+    @note
+        ActionpointController will not work, if there is no MasterController in the level!
+    */
+    class _OrxonoxExport FightingController : public FlyingController
+    {
+
+        public:
+            FightingController(Context* context);
+            virtual ~FightingController();
+            
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+       
+            float squaredDistanceToTarget() const;
+            bool isLookingAtTarget(float angle) const;
+            bool hasTarget() const;
+            ControllableEntity* getTarget() const
+                { return this->target_; }
+            bool bKeepFormation_;   //even if action_ == FIGHT, you might still want to keep formation if far enough form the target
+            virtual void maneuver(); //<! sets this->targetPosition_, which is a Vector3 of where this ship flies. Decision is made based on
+                             //<! the distance to enemy, if being attacked, dodge() is called, otherwise ship just flies towards this->target_.
+            bool bShooting_;    //<! if true, ship shoots each tick
+            bool canFire(); //<! check if target_ is in radius and if this is looking at target_
+        protected:
+            void setTarget(ControllableEntity* target); //set a target to shoot at
+
+            void setPositionOfTarget(const Vector3& target);    //good to know where target is
+            void setOrientationOfTarget(const Quaternion& orient);  //I don't really use that
+            void stopLookingAtTarget();     //<! target dead -> you need to be able to fly
+            void startLookingAtTarget();    //<! if close to target, no need to fly, just rotate yourself
+            void lookAtTarget(float dt);    //<! rotate yourself towards target
+
+            void dodge(const Vector3& thisPosition, float diffLength,  Vector3& diffUnit); //<! choose a random Vector3 perpendicular to the difference vector between
+                                                                        //<! this and target_ plus or minus some amount in difference vector direction,
+                                                                        //<! depending on whether it is better to close up or survive.
+            void dodgeTowards (Vector3& position);  //fly towards position and awoid being hit
+            void doFire();  //<! choose weapon, set aim at target_ and fire
+            WeakPtr<ControllableEntity> target_;
+            void setClosestTarget();
+         
+            bool bHasPositionOfTarget_;
+            Vector3 positionOfTarget_;
+            bool bHasOrientationOfTarget_;
+            Quaternion orientationOfTarget_;
+            Pawn* closestTarget() const;
+
+            bool bDodge_;
+            int attackRange_;
+            bool bLookAtTarget_; 
+            float deltaHp;
+            float previousHp;
+            bool bStartedDodging_;
+            //WEAPONSYSTEM DATA
+            int rocketsLeft_;
+            int timeout_;
+            bool bFiredRocket_;
+            std::map<std::string, int> weaponModes_; //<! Links each "weapon" to it's weaponmode - managed by setupWeapons()
+            //std::vector<int> projectiles_; //<! Displays amount of projectiles of each weapon. - managed by setupWeapons()
+            void setupWeapons(); //<! Defines which weapons are available for a bot. Is recalled whenever a bot was killed.
+            bool bSetupWorked; //<! If false, setupWeapons() is called.
+            int getFiremode(std::string name);
+          
+    };
+}
+
+#endif /* _FightingController_H__ */
Index: /code/trunk/src/orxonox/controllers/FlyingController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/FlyingController.cc	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/FlyingController.cc	(revision 11052)
@@ -0,0 +1,289 @@
+/*
+ *   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:
+ *      Gani Aliguzhinov
+
+ *   Co-authors:
+ *   ...
+ *
+ */
+#include <OgreMatrix3.h>                        //for Quaternion manipulations
+
+#include "util/Math.h"                          
+#include "core/XMLPort.h"
+#include "controllers/FlyingController.h"
+
+#include "worldentities/pawns/SpaceShip.h"      //for boosting
+
+namespace orxonox
+{    
+    const float FlyingController::SPEED = 0.9f/0.02f;
+    const float FlyingController::ROTATEFACTOR = 0.6f/0.02f;
+
+    RegisterClass (FlyingController);
+    
+    FlyingController::FlyingController(Context* context): CommonController(context)
+    {
+        RegisterObject(FlyingController);        
+        this->rotationProgress_ = 0;
+        this->spread_ = 200;
+        this->tolerance_ = 80;
+        this->bCopyOrientation_ = true;
+    }
+    FlyingController::~FlyingController() 
+    {
+    }
+
+    void FlyingController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        XMLPortParam(FlyingController, "spread", setSpread, getSpread,  xmlelement, mode);
+        XMLPortParam(FlyingController, "formationMode", setFormationModeXML, getFormationModeXML,  xmlelement, mode);
+        SUPER(FlyingController, XMLPort, xmlelement, mode);
+    }
+   
+    void FlyingController::setFormationModeXML(std::string val)
+    {
+        const std::string valUpper = getUppercase(val);
+        FormationMode::Value value;
+        
+        if (valUpper == "WALL")
+            value = FormationMode::WALL;
+        else if (valUpper == "FINGER4")
+            value = FormationMode::FINGER4;
+        else if (valUpper == "DIAMOND")
+            value = FormationMode::DIAMOND;
+        else
+            ThrowException(ParseError, std::string("Attempting to set an unknown FormationMode: '")+ val + "'.");
+        this->setFormationMode(value);
+    }
+    std::string FlyingController::getFormationModeXML() const
+    {
+        switch (this->formationMode_)
+        {
+            case FormationMode::WALL:
+            { return "WALL"; }
+            case FormationMode::FINGER4:
+            { return "FINGER4"; }
+            case FormationMode::DIAMOND:
+            { return "DIAMOND"; }
+            default:
+                return "DIAMOND";
+        }
+    }
+    void FlyingController::stopMoving()
+    {
+        this->bHasTargetPosition_ = false;
+    }
+    /**
+    @brief
+      if distance to targetPosition is smaller than this->tolerance_, no moving should be made, otherwise
+      find amount of yaw and pitch that have to be applied, so that ship looks at targetPosition, then
+      ship is moved forward towards targetPosition. Also target orientation is being applied.
+    */
+    void FlyingController::moveToPosition(const Vector3& targetPosition, float dt)
+    {
+        if (!this->getControllableEntity())
+            return;
+        ControllableEntity* entity = this->getControllableEntity();
+
+        float distance = (targetPosition - entity->getPosition()).length();
+
+        if (distance >= this->tolerance_)
+        {
+            //function that calculates how much yaw and pitch are to be applied
+            Vector2 coord = get2DViewCoordinates
+                (entity->getPosition() , 
+                entity->getOrientation()  * WorldEntity::FRONT, 
+                entity->getOrientation()  * WorldEntity::UP, 
+                targetPosition);
+            //limit yaw and pitch by [-1,1]
+            float rotateX = -clamp(coord.x * 10, -1.0f, 1.0f);
+            float rotateY = clamp(coord.y * 10, -1.0f, 1.0f);
+
+            if (!entity)
+                return;
+
+            //apply yaw and pitch
+            entity->rotateYaw(ROTATEFACTOR * rotateX * dt);
+            entity->rotatePitch(ROTATEFACTOR * rotateY * dt);
+            
+            if (!entity)
+                return;
+           
+            //only move either if ship looks at target with a certain tolerance, or if ship is far enough for it to be ok to move in a curve.
+            if (distance > this->tolerance_*1.5f || (rotateX > -0.03 && rotateX < 0.03 && rotateY > -0.03 && rotateY < 0.03))
+                entity->moveFrontBack(SPEED * dt);
+            //roll
+            copyTargetOrientation(dt);
+        }
+        else
+        {      
+            bHasTargetPosition_ = false;
+        }
+    }
+    /**
+    @brief
+      fly towards a preset targetPosition_
+    */
+    void FlyingController::moveToTargetPosition(float dt)
+    {
+        this->moveToPosition (this->targetPosition_, dt);
+    }
+    /**
+    @brief
+      roll ship so that it has same roll as orient
+    */
+    void FlyingController::copyOrientation(const Quaternion& orient, float dt)
+    {
+        //copied from
+        //http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Quaternion+and+Rotation+Primer&structure=Tutorials#Q._How_can_I_make_my_objects_rotate_smoothly_You_mentioned_slerp_etc_
+        //how can I make my objects rotate smoothly?
+        if (!this->getControllableEntity())
+            return;
+        Quaternion myOrient = this->getControllableEntity()->getOrientation();
+        this->rotationProgress_ += dt;
+
+        if (this->rotationProgress_ > 1)
+        {
+            this->rotationProgress_ = 0;
+            this->bHasTargetOrientation_ = false;
+        }
+        else
+        {
+            Quaternion deltaOrientation = Quaternion::Slerp(rotationProgress_, myOrient, orient, true);
+            
+            Matrix3 deltaMatrix, myMatrix;
+
+            deltaOrientation.ToRotationMatrix(deltaMatrix);
+            myOrient.ToRotationMatrix (myMatrix);
+
+            Radian yawDelta, pitchDelta, rollDelta, yawMy, pitchMy, rollMy;
+            deltaMatrix.ToEulerAnglesYXZ(yawDelta, pitchDelta, rollDelta);
+            myMatrix.ToEulerAnglesYXZ (yawMy, pitchMy, rollMy);
+
+            if (!this->getControllableEntity())
+                return;
+            this->getControllableEntity()->rotateRoll ((rollDelta.valueRadians() - rollMy.valueRadians())*ROTATEFACTOR*dt);
+        }
+    }
+    /**
+    @brief
+      roll ship so that it has same roll as a preset targetOrientation_
+    */
+    void FlyingController::copyTargetOrientation(float dt)
+    {
+        if (bHasTargetOrientation_)
+        {   
+            this->copyOrientation(targetOrientation_, dt);
+        }
+    }
+    /**
+    @brief
+      set Vector to fly to
+    */
+    void FlyingController::setTargetPosition(const Vector3& target)
+    {
+        this->targetPosition_ = target;
+        this->bHasTargetPosition_ = true;
+    }
+    /**
+    @brief
+      set orientation to apply
+    */
+    void FlyingController::setTargetOrientation(const Quaternion& orient)
+    {
+        this->targetOrientation_=orient;
+        this->bHasTargetOrientation_=true;
+    }
+    /**
+    @brief
+      set orientation to apply
+    */
+    void FlyingController::setTargetOrientation(ControllableEntity* target)
+    {
+        if (target)
+            this->setTargetOrientation(target->getOrientation());
+    }
+    /**
+    @brief
+      boost if you can
+    */
+    void FlyingController::boostControl()
+    {
+        if (!this->getControllableEntity())
+            return;
+        SpaceShip* ship = orxonox_cast<SpaceShip*>(this->getControllableEntity());
+        if(ship == NULL) return;
+        if(ship->getBoostPower()*1.5f > ship->getInitialBoostPower()) //upper limit ->boost
+        {
+            this->getControllableEntity()->boost(true);
+        }
+        else if(ship->getBoostPower()*4.0f < ship->getInitialBoostPower()) //lower limit ->do not boost
+        {
+           this->getControllableEntity()->boost(false);
+        }
+    }
+    /**
+    @brief
+      keep this ship in a formation with its division
+    */
+    void FlyingController::keepFormation(const ControllableEntity* leaderEntity, Vector3& targetRelativePosition)
+    {
+        if (!this->getControllableEntity())
+            return;
+        ControllableEntity* myEntity = this->getControllableEntity();
+        Vector3 myPosition = myEntity->getWorldPosition();
+
+        if (!leaderEntity)
+        {
+            return;
+        }
+        Quaternion orient = leaderEntity->getWorldOrientation();
+        Vector3 leaderPosition = leaderEntity->getWorldPosition();
+
+        if (!leaderEntity)
+        {
+            return;
+        }
+        //calculate where in world coordinates this ship should fly
+        Vector3 targetAbsolutePosition = 
+            (leaderPosition + (orient*WorldEntity::FRONT) * (leaderEntity->getVelocity().length()/5)
+             + (orient* (targetRelativePosition)));
+        //let ship finish rotating. also don't call copyOrientation too often as it is a slow function. Don't know how to do it different
+        if (this->bCopyOrientation_)
+            this->setTargetOrientation (orient);
+        //set a position to fly to
+        this->setTargetPosition (targetAbsolutePosition);
+
+        //boost if too far
+        if ((targetAbsolutePosition - myPosition).length() > this->tolerance_ * 1.5f)
+        {
+            this->boostControl();
+        }
+        else
+        {
+            if (!this->getControllableEntity())
+                return;
+            this->getControllableEntity()->boost(false);
+        }
+    }
+}
Index: /code/trunk/src/orxonox/controllers/FlyingController.h
===================================================================
--- /code/trunk/src/orxonox/controllers/FlyingController.h	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/FlyingController.h	(revision 11052)
@@ -0,0 +1,105 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      Dominik Solenicki
+ *
+ */
+
+#ifndef _FlyingController_H__
+#define _FlyingController_H__
+
+
+#include "controllers/CommonController.h"
+
+namespace orxonox
+{   
+    /**
+    @brief
+        FlyingController stores all the flying methods and member variables of AI.
+    */
+
+    //Formation mode for the divisions
+    namespace FormationMode
+    {
+        enum Value
+        {
+            FINGER4, DIAMOND, WALL
+        };
+    }
+
+    class _OrxonoxExport FlyingController : public CommonController
+    {
+
+        public:
+            static const float SPEED;              //<! ship's speed
+            static const float ROTATEFACTOR;       //<! ship's rotation factor
+ 
+            FlyingController(Context* context);
+            virtual ~FlyingController();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void setSpread (int spread)                         //<! spread is a multiplier for formation flight, should be bigger than 100
+                { this->spread_ = spread; }
+            int getSpread () const                              
+                { return this->spread_; }
+
+            void setFormationModeXML(std::string val);
+            std::string getFormationModeXML() const;
+
+            void setFormationMode(FormationMode::Value val)
+                { this->formationMode_ = val; }
+            FormationMode::Value getFormationMode() const
+                { return this->formationMode_; }
+            bool bCopyOrientation_;                             //<! set to true by default, MasterController sets it in its tick(),
+                                                                //<! if true, this will set its leader orientation as target orientation in action()
+        protected:
+            void stopMoving();                                  //<! don't call moveToTargetPosition() in tick, call lookAtTarget() from FightingController instead
+
+            void moveToPosition(const Vector3& target, float dt);   //<! move towards a vector
+            void moveToTargetPosition(float dt);                    //<! move to the preset position. Don't mix with positionOfTarget!
+
+            void copyOrientation(const Quaternion& orient, float dt);   //<! roll to have same roll as orient
+            void copyTargetOrientation(float dt);                       //<! roll to have a preset orient
+
+            void setTargetPosition(const Vector3& target);              //<! preset a Vector to fly to
+            void setTargetOrientation(const Quaternion& orient);        //<! preset a desired orientation
+            void setTargetOrientation(ControllableEntity* target);      //<! preset a desired orientation
+            virtual void boostControl();                                //<! boost if you can
+            void keepFormation (const ControllableEntity* leaderEntity, 
+                                Vector3& targetRelativePosition);   //<! preset targetPosition, so that 
+                                                                    //<! this stays in a certain position relative to leader      
+            
+            FormationMode::Value formationMode_;
+          
+            float rotationProgress_;    //<! for slerping 
+            bool bHasTargetPosition_;
+            Vector3 targetPosition_;    //<! vector to fly to
+            bool bHasTargetOrientation_;
+            Quaternion targetOrientation_;  //<! orientation to take
+            int spread_;                //<! spread is a multiplier for formation flight, should be bigger than 100
+            int tolerance_;             //<! if this ship is tolerance_ away from targetPosition_, ship decides that it finished moving
+    };
+}
+
+#endif /* _FlyingController_H__ */
Index: /code/trunk/src/orxonox/controllers/FormationController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/FormationController.cc	(revision 11051)
+++ /code/trunk/src/orxonox/controllers/FormationController.cc	(revision 11052)
@@ -277,5 +277,5 @@
         }
 
-        Vector2 coord = get2DViewcoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
+        Vector2 coord = get2DViewCoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
         float distance = (target - this->getControllableEntity()->getPosition()).length();
         float rotateX = clamp(coord.x * 10, -1.0f, 1.0f);
@@ -970,4 +970,6 @@
         if (controller)
         {
+            if (controller->getIdentifier()->getName() == "MasterController")
+                return true;
             FormationController* ac = orxonox_cast<FormationController*>(controller);
             if (ac)
@@ -981,4 +983,6 @@
         if (controller)
         {
+            if (controller->getIdentifier()->getName() == "MasterController")
+                return true;
             FormationController* ac = orxonox_cast<FormationController*>(controller);
             if (ac)
@@ -1069,5 +1073,5 @@
             return;
 
-        Vector2 coord = get2DViewcoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
+        Vector2 coord = get2DViewCoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
         float distance = (target - this->getControllableEntity()->getPosition()).length();
 
Index: /code/trunk/src/orxonox/controllers/HumanController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/HumanController.cc	(revision 11051)
+++ /code/trunk/src/orxonox/controllers/HumanController.cc	(revision 11052)
@@ -199,5 +199,5 @@
     @brief
         Starts the boosting mode.
-        Resets the boosting timeout and ells the ControllableEntity to boost (or not boost anymore).
+        Resets the boosting timeout and tells the ControllableEntity to boost (or not boost anymore).
     */
     void HumanController::startBoosting(void)
Index: /code/trunk/src/orxonox/controllers/MasterController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/MasterController.cc	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/MasterController.cc	(revision 11052)
@@ -0,0 +1,129 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "MasterController.h"
+#include "controllers/ActionpointController.h"
+namespace orxonox
+{
+
+    RegisterClass(MasterController);
+
+    //Leaders share the fact that they have Wingmans
+    MasterController::MasterController(Context* context) : Controller(context)
+    {
+        RegisterObject(MasterController);
+        this->controllers_.clear();
+        this->numberOfTicksPassedSinceLastActionCall_ = 0;
+        this->indexOfCurrentController_ = 0;
+        this->ticks_ = 0;
+    }
+
+    MasterController::~MasterController()
+    {
+        this->controllers_.clear();
+    } 
+    /*HACK*/
+    //the whole idea is a hack
+    void MasterController::tick(float dt)
+    {   
+        if (!this->isActive())
+            return;  
+        ++this->ticks_;
+        if (this->ticks_ == 1)
+        {
+            //fill the vector in the first tick
+            for (ObjectList<ActionpointController>::iterator it = ObjectList<ActionpointController>::begin(); it; ++it)
+            {
+                //----0ptr?----
+                if (!it)
+                    continue;
+                this->controllers_.push_back(*it);
+            }
+        }
+        else
+        {
+            if (this->controllers_.empty())
+                return;
+
+            //iterate over vecotr with the index, keep index in boundaries 
+            if (this->indexOfCurrentController_ >= this->controllers_.size())
+            {
+                this->indexOfCurrentController_ = 0;
+            }
+            //each 9 ticks index is incremented
+            if (this->numberOfTicksPassedSinceLastActionCall_ >= 9)
+            {
+                this->numberOfTicksPassedSinceLastActionCall_ = 0;
+            }
+
+            if (this->numberOfTicksPassedSinceLastActionCall_ > 0)
+            {
+                if (this->numberOfTicksPassedSinceLastActionCall_ == 3)
+                {
+                    //check if 0ptr
+                    if (!this->controllers_.at(this->indexOfCurrentController_))
+                    {
+                        this->controllers_.erase(this->controllers_.begin() + this->indexOfCurrentController_);
+                        return;
+                    }
+                    //call maneuver for current index
+                    this->controllers_.at(this->indexOfCurrentController_)->maneuver();
+                }
+                else if (this->numberOfTicksPassedSinceLastActionCall_ == 6)
+                {
+                    //check if 0ptr
+                    if (!this->controllers_.at(this->indexOfCurrentController_))
+                    {
+                        this->controllers_.erase(this->controllers_.begin() + this->indexOfCurrentController_);
+                        return;
+                    }
+                    //call canFire for current index
+                    this->controllers_.at(this->indexOfCurrentController_)->bShooting_ = this->controllers_.at(this->indexOfCurrentController_)->canFire();   
+                }
+                ++this->numberOfTicksPassedSinceLastActionCall_;
+            }
+            else
+            {
+                //check if 0ptr
+                if (!this->controllers_.at(this->indexOfCurrentController_))
+                {
+                    this->controllers_.erase(this->controllers_.begin() + this->indexOfCurrentController_);
+                    return;
+                }
+                //call action for current index
+                this->controllers_.at(this->indexOfCurrentController_)->action();   
+                 
+                //bCopyOrientation makes ship oscillate like crazy if set to true all the time.s
+                this->controllers_.at(this->indexOfCurrentController_)->bCopyOrientation_ = this->ticks_ % 3 == 0;
+
+                ++this->numberOfTicksPassedSinceLastActionCall_;
+                ++this->indexOfCurrentController_;
+            }
+        }
+    }
+}
Index: /code/trunk/src/orxonox/controllers/MasterController.h
===================================================================
--- /code/trunk/src/orxonox/controllers/MasterController.h	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/MasterController.h	(revision 11052)
@@ -0,0 +1,78 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _MasterController_H__
+#define _MasterController_H__
+
+#include "controllers/Controller.h"
+#include "controllers/ActionpointController.h"
+#include "tools/interfaces/Tickable.h"
+
+
+
+namespace orxonox
+{
+    /**
+    @brief
+      calles action(), maneuver() and canFire() methods of all the ActionpointControllers in level.
+      Only one instance of MasterController is to be placed in level.
+      If no MasterController is initialized, none of ActionpointControllers will work.
+      Example:
+      <Pawn position = "100000, 100000, 100000">
+        <controller>
+          <MasterController>
+          </MasterController>
+        </controller>
+      </Pawn>
+    */
+    class _OrxonoxExport MasterController : public Controller, public Tickable
+    {
+        public:
+            //----[language demanded functions]----            
+                MasterController(Context* context);
+
+                virtual ~MasterController();
+            //----[/language demanded functions]----            
+
+            //----[orxonox demanded functions]----
+                virtual void tick(float dt); 
+
+            //----[orxonox demanded functions]----
+
+        protected:
+          
+        private:
+            std::vector<WeakPtr<ActionpointController> > controllers_;  //<! vector of controllers, which action(), canFire() and maneuver() methods are to be called
+            size_t indexOfCurrentController_;                        //<! index of current controller
+            unsigned int numberOfTicksPassedSinceLastActionCall_;
+            unsigned int ticks_;                                     //<! local tick counter            
+
+    };
+}
+
+#endif /* _MasterController_H__ */
Index: /code/trunk/src/orxonox/controllers/SectionController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/SectionController.cc	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/SectionController.cc	(revision 11052)
@@ -0,0 +1,285 @@
+/*
+ *   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:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "SectionController.h"
+
+namespace orxonox
+{
+
+    RegisterClass(SectionController);
+
+    //Leaders share the fact that they have Wingmans
+    SectionController::SectionController(Context* context) : ActionpointController(context)
+    {
+        RegisterObject(SectionController);
+        this->setFormationMode(FormationMode::FINGER4);
+
+        this->myWingman_ = 0;
+        this->myDivisionLeader_ = 0;
+        this->bFirstAction_ = true;
+
+    }
+   
+    SectionController::~SectionController()
+    {
+       for (size_t i = 0; i < this->actionpoints_.size(); ++i)
+        {
+            if(this->actionpoints_[i])
+                this->actionpoints_[i]->destroy();
+        }
+        this->parsedActionpoints_.clear();
+        this->actionpoints_.clear();
+    }
+    void SectionController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SectionController, XMLPort, xmlelement, mode);
+    }
+
+    //----in tick, move (or look) and shoot----
+    void SectionController::tick(float dt)
+    {
+        if (!this->isActive())
+            return;
+   
+        SUPER(SectionController, tick, dt);
+        
+    }
+
+    void SectionController::action()
+    {
+        if (!this || !this->getControllableEntity() || !this->isActive())
+            return;
+
+        //----If no leader, find one----  
+        if (!myDivisionLeader_)
+        {
+            ActionpointController* newDivisionLeader = findNewDivisionLeader();
+            if (!this || !this->getControllableEntity())
+                return;
+
+            this->myDivisionLeader_ = newDivisionLeader;
+        }
+        //----If have leader----
+        else
+        {
+        }
+        if (!myDivisionLeader_)
+        {
+            ActionpointController::action();
+            if (!this || !this->getControllableEntity())
+                return;
+            if (!(this->parsedActionpoints_.empty() && this->loopActionpoints_.empty()))
+            {
+                if (this->myWingman_)
+                {
+                    this->myWingman_->takeActionpoints(this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
+                }    
+            }
+        }
+        else if (myDivisionLeader_)
+        {
+            if (this->myDivisionLeader_->bKeepFormation_ || !(this->myDivisionLeader_->getAction() == Action::FIGHT 
+                || this->myDivisionLeader_->getAction() == Action::FIGHTALL
+                || this->myDivisionLeader_->getAction() == Action::ATTACK))
+            {
+                this->keepFormation();
+            }
+            else if (!this->myDivisionLeader_->bKeepFormation_)
+            {
+                if (!this || !this->getControllableEntity())
+                    return;
+
+                if (!this->hasTarget())
+                {
+                    this->chooseTarget(); 
+                }
+
+            }
+        }
+
+    }
+
+    
+    //PRE: myDivisionLeader_ != 0 && myDivisionLeader_->action_ == Action::FIGHT
+    //POST: this->target_ is set unless division leader doesn't have one
+    void SectionController::chooseTarget()
+    {
+        //----If division leader fights, cover him by fighting emenies close to his target----
+        Action::Value action = this->myDivisionLeader_->getAction();
+
+        if (action == Action::FIGHT || action == Action::FIGHTALL || action == Action::ATTACK)
+        {
+            Pawn* target;
+            //----if he has a target----
+            if (this->myDivisionLeader_->hasTarget())
+            {
+                //----try to find a new target if division leader has wingman (doing fine) and no good target already set----
+                if ( this->myDivisionLeader_->hasWingman() && 
+                    !( this->hasTarget() && this->getTarget() != this->myDivisionLeader_->getTarget() ) )
+                {
+                    bool foundTarget = false;
+                    //----new target should be close to division's target----
+                    Vector3 divisionTargetPosition = this->myDivisionLeader_->getTarget()->getWorldPosition();
+                    Gametype* gt = this->getGametype();
+                    for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
+                    {
+                        //----is enemy?----
+                        if ( CommonController::sameTeam (this->getControllableEntity(), static_cast<ControllableEntity*>(*itP), gt) )
+                            continue;           
+                        //----in range?----
+                        if (((*itP)->getWorldPosition() - divisionTargetPosition).length() < 3000 && 
+                            (*itP) != this->myDivisionLeader_->getTarget())
+                        {
+                            foundTarget = true;
+                            target =  (*itP);
+                            break; 
+                        }
+                    }
+                    //----no target? then attack same target as division leader----
+                    if (!foundTarget)
+                    {
+                        target = orxonox_cast<Pawn*>(this->myDivisionLeader_->getTarget());
+                    }
+                }
+                //----if division leader doesn't have a wingman, support his fire----
+                else
+                {
+                    target = orxonox_cast<Pawn*>(this->myDivisionLeader_->getTarget());
+                }
+            }
+            //----If he fights but doesn't have a target, wait for him to get one----
+            else
+            {
+
+            }
+            this->setTarget (orxonox_cast<ControllableEntity*>(target));
+        }
+        else
+        {
+        } 
+    }
+    Vector3 SectionController::getFormationPosition ()
+    {
+        this->setFormationMode( this->myDivisionLeader_->getFormationMode() );
+        this->spread_ = this->myDivisionLeader_->getSpread();
+        Vector3* targetRelativePosition;
+        switch (this->formationMode_){
+            case FormationMode::WALL:
+            {
+                targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 0);   
+                break;
+            }
+            case FormationMode::FINGER4: 
+            {
+                targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 1.0f*this->spread_);   
+                break;
+            }
+            
+            case FormationMode::DIAMOND: 
+            {
+                targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 1.0f*this->spread_);
+                break;
+            }
+        }
+        Vector3 result = *targetRelativePosition;
+        delete targetRelativePosition;
+        return result;
+    }
+
+    void SectionController::keepFormation()
+    {
+        this->bKeepFormation_ = true;
+        ControllableEntity* leaderEntity = this->myDivisionLeader_->getControllableEntity();
+        Vector3 targetRelativePosition = this->getFormationPosition();
+        if (!leaderEntity)
+            return;
+        FlyingController::keepFormation(leaderEntity, targetRelativePosition);
+    }
+
+    ActionpointController* SectionController::findNewDivisionLeader()
+    {
+
+        if (!this->getControllableEntity())
+            return 0;
+
+        ActionpointController* closestLeader = 0;
+        float minDistance =  std::numeric_limits<float>::infinity();
+        //go through all pawns
+        for (ObjectList<ActionpointController>::iterator it = ObjectList<ActionpointController>::begin(); it; ++it)
+        {
+            //0ptr or not DivisionController?
+            if (!(it) || !((it)->getIdentifier()->getName() == "DivisionController") || !(it->getControllableEntity()))
+                continue;
+            //same team?
+            if ((this->getControllableEntity()->getTeam() != (it)->getControllableEntity()->getTeam()))
+                continue;
+
+            //is equal to this?
+            if (orxonox_cast<ControllableEntity*>(*it) == this->getControllableEntity())
+                continue;
+
+            float distance = CommonController::distance (it->getControllableEntity(), this->getControllableEntity());
+            
+            if (distance < minDistance && !(it->hasFollower()))
+            {
+                closestLeader = *it;
+                minDistance = distance;
+            }
+          
+        }
+        if (closestLeader)
+        {
+            if (closestLeader->setFollower(this))
+                return closestLeader;
+        }
+        return 0;
+    }
+
+    bool SectionController::setWingman(ActionpointController* newWingman)
+    {
+
+        if (!this->myWingman_)
+        {
+            this->myWingman_ = newWingman;
+            newWingman->takeActionpoints (this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+    
+    bool SectionController::hasWingman()
+    {
+        if (this->myWingman_)
+            return true;
+        else
+            return false;
+    }
+}
Index: /code/trunk/src/orxonox/controllers/SectionController.h
===================================================================
--- /code/trunk/src/orxonox/controllers/SectionController.h	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/SectionController.h	(revision 11052)
@@ -0,0 +1,79 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _SectionController_H__
+#define _SectionController_H__
+
+#include "controllers/ActionpointController.h"
+
+
+namespace orxonox
+{
+    /**
+        @note
+        ActionpointController will not work, if there is no MasterController in the level!
+        All the demos are in a file called AITest.oxw. In the menu look for New AI Testing Level.
+    */
+    class _OrxonoxExport SectionController : public ActionpointController
+    {
+        public:
+            //----[language demanded functions]----            
+                SectionController(Context* context);
+
+                virtual ~SectionController();
+            //----[/language demanded functions]----
+            
+            //----[orxonox demanded functions]----
+                virtual void tick(float dt); 
+                
+                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            //----[/orxonox demanded functions]----
+            
+            //----[own functions]----
+                ActionpointController* findNewDivisionLeader();
+
+                virtual bool setWingman(ActionpointController* newWingman);
+                virtual bool hasWingman();
+                virtual bool hasFollower()
+                    { return false; }
+                void chooseTarget();
+            //----[/own functions]----
+
+        protected:       
+            //----action must only be managed by this----     
+                virtual void action(); //<! action() is called in regular intervals by MasterController managing the bot's behaviour.
+                Vector3 getFormationPosition ();
+                void keepFormation();
+        private:
+            //----private variables-----
+                bool bFirstAction_;
+                
+    };
+}
+
+#endif /* _SectionController_H__ */
Index: /code/trunk/src/orxonox/controllers/WingmanController.cc
===================================================================
--- /code/trunk/src/orxonox/controllers/WingmanController.cc	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/WingmanController.cc	(revision 11052)
@@ -0,0 +1,227 @@
+/*
+ *   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:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "WingmanController.h"
+
+
+namespace orxonox
+{
+
+    RegisterClass(WingmanController);
+    
+    //ActionpointController contains all common functionality of AI Controllers
+    WingmanController::WingmanController(Context* context) : ActionpointController(context)
+    {
+        RegisterObject(WingmanController);
+        this->myLeader_ = 0;
+        this->bFirstAction_ = true;
+
+    }
+
+    WingmanController::~WingmanController()
+    {
+        for (size_t i = 0; i < this->actionpoints_.size(); ++i)
+        {
+            if(this->actionpoints_[i])
+                this->actionpoints_[i]->destroy();
+        }
+        this->parsedActionpoints_.clear();
+        this->actionpoints_.clear();
+    }
+  
+    void WingmanController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(WingmanController, XMLPort, xmlelement, mode);
+    }
+    
+    //----in tick, move (or look) and shoot----
+    void WingmanController::tick(float dt)
+    {   
+        if (!this->isActive())
+            return; 
+        
+        SUPER(WingmanController, tick, dt);
+
+    }
+    
+    //----action for hard calculations----
+    void WingmanController::action()
+    {
+        if (!this || !this->getControllableEntity() || !this->isActive())
+            return;
+        //----If no leader, find one----
+        if (!this->myLeader_)
+        {
+            ActionpointController* newLeader = (findNewLeader());
+            if (!this || !this->getControllableEntity())
+                return;
+
+            this->myLeader_ = newLeader;
+            if (this->myLeader_)
+            {
+               
+            }
+        }
+        //----If have leader, he will deal with logic----
+        else
+        {
+
+        }
+        if (!this->myLeader_)
+        {
+            ActionpointController::action();
+        }
+        else if (this->myLeader_)
+        {
+            if (this->myLeader_->bKeepFormation_ || !(this->myLeader_->getAction() == Action::FIGHT 
+                || this->myLeader_->getAction() == Action::FIGHTALL
+                || this->myLeader_->getAction() == Action::ATTACK))
+            {
+                this->keepFormation();
+            }
+            else if (!this->myLeader_->bKeepFormation_)
+            {
+                if (!this || !this->getControllableEntity())
+                    return;
+
+                if (!this->hasTarget())
+                {
+                    this->setTarget(this->myLeader_->getTarget());
+                }
+                
+            }
+        }
+    }
+     
+   
+    Vector3 WingmanController::getFormationPosition ()
+    {
+
+
+        this->setFormationMode( this->myLeader_->getFormationMode() );
+        Vector3* targetRelativePosition;
+        this->spread_ = this->myLeader_->getSpread();
+        if (this->myLeader_->getIdentifier()->getName() == "DivisionController")
+        {
+            switch (this->formationMode_){
+                case FormationMode::WALL:
+                {
+                    targetRelativePosition = new Vector3 (2.0f*this->spread_, 0, 0 - 1.0f*this->tolerance_);
+                    break;
+                }
+                case FormationMode::FINGER4: 
+                {
+                    targetRelativePosition = new Vector3 (2.0f*this->spread_, 0, this->spread_ - 1.0f*this->tolerance_);
+                    break;
+                }
+                case FormationMode::DIAMOND: 
+                {
+                    targetRelativePosition = new Vector3 (2.0f*this->spread_, 0, this->spread_ - 1.0f*this->tolerance_);
+                    break;
+                }
+            }
+        }
+        else
+        {
+            switch (this->formationMode_){
+                case FormationMode::WALL:
+                {
+                    targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, 0 - 1.0f*this->tolerance_);
+                    break;
+                }
+                case FormationMode::FINGER4: 
+                {
+                    targetRelativePosition = new Vector3 (-2.0f*this->spread_, 0, this->spread_ - 1.0f*this->tolerance_);
+                    break;
+                }
+                case FormationMode::DIAMOND: 
+                {
+                    targetRelativePosition = new Vector3 (2.0f*this->spread_, -1.0f*this->spread_, 0 - 1.0f*this->tolerance_);
+                    break;
+                }
+            }
+        }
+        Vector3 result = *targetRelativePosition;
+        delete targetRelativePosition;
+        return result;
+    }
+    void WingmanController::keepFormation()
+    {
+        this->bKeepFormation_ = true;
+        ControllableEntity* leaderEntity = this->myLeader_->getControllableEntity();
+        Vector3 targetRelativePosition = this->getFormationPosition();
+        if (!leaderEntity)
+            return;
+        FlyingController::keepFormation (leaderEntity, targetRelativePosition);
+    }
+    //----POST: closest leader that is ready to take a new wingman is returned----
+    ActionpointController* WingmanController::findNewLeader()
+    {
+
+        if (!this->getControllableEntity())
+            return 0;
+
+        //----vars for finding the closest leader----
+        ActionpointController* closestLeader = 0;
+        float minDistance =  std::numeric_limits<float>::infinity();
+        Gametype* gt = this->getGametype();
+
+        for (ObjectList<ActionpointController>::iterator it = ObjectList<ActionpointController>::begin(); it; ++it)
+        {
+            //----0ptr or not a leader or dead?----
+            if (!it || 
+                (it->getIdentifier()->getName() != "SectionController" && it->getIdentifier()->getName() != "DivisionController") || 
+                !(it->getControllableEntity()))
+                continue;
+            
+            //----same team?----
+            if ( !CommonController::sameTeam (this->getControllableEntity(), (it)->getControllableEntity(), gt) )
+                continue;
+            
+            //----check distance----
+            float distance = CommonController::distance (it->getControllableEntity(), this->getControllableEntity());
+            if (distance < minDistance && !(it->hasWingman()))
+            {
+                closestLeader = *it;
+                minDistance = distance;
+            }
+        }
+        if (closestLeader)
+        {
+            //----Racing conditions----
+            /*TODO: racing condition check is wrong and redundant, as there is no multithreading here, ticks get called one after another,
+            so it can be simplified to a check of whether leader got a wingman*/
+            if (closestLeader->setWingman(orxonox_cast<ActionpointController*>(this)))
+            {
+                return closestLeader;
+            }
+        }
+        return 0;
+    }
+
+}
Index: /code/trunk/src/orxonox/controllers/WingmanController.h
===================================================================
--- /code/trunk/src/orxonox/controllers/WingmanController.h	(revision 11052)
+++ /code/trunk/src/orxonox/controllers/WingmanController.h	(revision 11052)
@@ -0,0 +1,81 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _WingmanController_H__
+#define _WingmanController_H__
+
+
+#include "controllers/ActionpointController.h"
+
+
+namespace orxonox
+{
+    /**
+        @note
+        ActionpointController will not work, if there is no MasterController in the level!
+        All the demos are in a file called AITest.oxw. In the menu look for New AI Testing Level.
+    */
+    class _OrxonoxExport WingmanController : public ActionpointController
+    {
+        public:
+            //----[language demanded functions]----
+                WingmanController(Context* context);
+
+                virtual ~WingmanController();
+            //----[/language demanded functions]----
+            
+            //----[orxonox demanded functions]----
+                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+                virtual void tick(float dt); 
+                virtual bool hasWingman()
+                    { return false; }
+                virtual bool hasFollower()
+                    { return false; }
+            //----[/orxonox demanded functions]----
+
+            //----[own functions]----
+               ActionpointController* findNewLeader();
+            //----[/own functions]----
+
+        protected:
+            //----action must only be managed by this----
+                virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour.
+                Vector3 getFormationPosition ();
+                void keepFormation();
+                
+        private:
+            //----private variables-----
+                WeakPtr<ActionpointController> myLeader_;
+                bool bFirstAction_;
+
+
+    };
+}
+
+#endif /* _WingmanController_H__ */
Index: /code/trunk/src/orxonox/gametypes/Dynamicmatch.cc
===================================================================
--- /code/trunk/src/orxonox/gametypes/Dynamicmatch.cc	(revision 11051)
+++ /code/trunk/src/orxonox/gametypes/Dynamicmatch.cc	(revision 11052)
@@ -86,4 +86,10 @@
     }
 
+    Dynamicmatch::~Dynamicmatch()
+    {
+        for (std::set<Timer*>::iterator it = this->piggyTimers_.begin(); it != this->piggyTimers_.end(); ++it)
+            delete (*it);
+    }
+
     void Dynamicmatch::setConfigValues()
     {
@@ -312,6 +318,8 @@
             spaceship->addSpeedFactor(5);
             ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this));
-            executor->setDefaultValue(0, spaceship);
-            new Timer(10, false, executor, true);
+            Timer* timer = new Timer(10, false, executor);
+            executor->setDefaultValue(0, spaceship); // TODO: use WeakPtr because spaceship can be destroyed in the meantime
+            executor->setDefaultValue(1, timer);
+            this->piggyTimers_.insert(timer);
         }
     }
@@ -590,5 +598,5 @@
     }
 
-    void Dynamicmatch::resetSpeedFactor(SpaceShip* spaceship)// helper function
+    void Dynamicmatch::resetSpeedFactor(SpaceShip* spaceship, Timer* timer)// helper function
     {
         if (spaceship)
@@ -596,4 +604,7 @@
             spaceship->addSpeedFactor(1.0f/5.0f);
         }
+
+        this->piggyTimers_.erase(timer);
+        delete timer;
     }
 
Index: /code/trunk/src/orxonox/gametypes/Dynamicmatch.h
===================================================================
--- /code/trunk/src/orxonox/gametypes/Dynamicmatch.h	(revision 11051)
+++ /code/trunk/src/orxonox/gametypes/Dynamicmatch.h	(revision 11052)
@@ -33,4 +33,5 @@
 
 #include <map>
+#include <set>
 #include <vector>
 
@@ -45,5 +46,5 @@
         public:
             Dynamicmatch(Context* context);
-            virtual ~Dynamicmatch() {}
+            virtual ~Dynamicmatch();
 
             bool notEnoughPigs;
@@ -77,5 +78,5 @@
             virtual void rewardPig();
             void grantPigBoost(SpaceShip* spaceship); // Grant the piggy a boost.
-            void resetSpeedFactor(SpaceShip* spaceship);
+            void resetSpeedFactor(SpaceShip* spaceship, Timer* timer);
             void tick (float dt);// used to end the game
             SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
@@ -88,4 +89,5 @@
             std::map< PlayerInfo*, int > playerParty_; //player's parties are recorded here
             std::vector<ColourValue> partyColours_; //aus TeamDeathmatch
+            std::set<Timer*> piggyTimers_;
             unsigned int numberOf[3]; //array to count number of chasers, pigs, killers
             float pointsPerTime;
Index: /code/trunk/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- /code/trunk/src/orxonox/infos/PlayerInfo.cc	(revision 11051)
+++ /code/trunk/src/orxonox/infos/PlayerInfo.cc	(revision 11052)
@@ -202,4 +202,8 @@
 
         this->changedControllableEntity();
+
+         // HACK-ish
+        if(this->isHumanPlayer())
+            entity->createHud();
     }
 
@@ -252,4 +256,6 @@
         if( !entity || this->previousControllableEntity_.size() == 0 )
             return;
+
+        entity->destroyHud(); // HACK-ish
 
         this->controllableEntity_->setController(0);
Index: /code/trunk/src/orxonox/items/ShipPart.cc
===================================================================
--- /code/trunk/src/orxonox/items/ShipPart.cc	(revision 11051)
+++ /code/trunk/src/orxonox/items/ShipPart.cc	(revision 11052)
@@ -41,5 +41,4 @@
 #include "worldentities/StaticEntity.h"
 #include "items/PartDestructionEvent.h"
-#include "worldentities/BigExplosion.h"
 #include "chat/ChatManager.h"
 
@@ -105,8 +104,8 @@
     void ShipPart::explode()
     {
-        BigExplosion* chunk = new BigExplosion(this->getContext());
-        chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * (this->explosionPosition_));
-        //chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * Vector3(this->entityList_[0]->getLocalInertia()));
-        chunk->setVelocity(this->parent_->getVelocity());
+        // BigExplosion* chunk = new BigExplosion(this->getContext());
+        // chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * (this->explosionPosition_));
+        // //chunk->setPosition(this->parent_->getPosition() + this->parent_->getOrientation() * Vector3(this->entityList_[0]->getLocalInertia()));
+        // chunk->setVelocity(this->parent_->getVelocity());
 
         // this->explosionSound_->setPosition(this->parent_->getPosition());
Index: /code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- /code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 11051)
+++ /code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 11052)
@@ -450,3 +450,11 @@
         tempTx->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, colour);
     }
+
+    void OrxonoxOverlay::setZOrder(unsigned short order)
+    {
+        if (this->overlay_)
+        {
+            this->overlay_->setZOrder(order);
+        }
+    }
 }
Index: /code/trunk/src/orxonox/overlays/OrxonoxOverlay.h
===================================================================
--- /code/trunk/src/orxonox/overlays/OrxonoxOverlay.h	(revision 11051)
+++ /code/trunk/src/orxonox/overlays/OrxonoxOverlay.h	(revision 11052)
@@ -65,5 +65,5 @@
           only for displaying a picture).
         - Reacts to changes of the window aspect
-        - Last but not least: On demand you can tell the overlay to automatically resale to correct for
+        - Last but not least: On demand you can tell the overlay to automatically rescale to correct for
           aspect distortion. E.g. if you play 1024x768 you wouldn't want a round object to be oval.
           Remark: This can (due to the Ogre::Overlay transformation order) only work for angle that are
@@ -186,4 +186,5 @@
         virtual void changedOverlayGroup()
             { this->changedVisibility(); }
+        virtual void setZOrder(unsigned short order);
 
     protected:
Index: /code/trunk/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- /code/trunk/src/orxonox/overlays/OverlayGroup.cc	(revision 11051)
+++ /code/trunk/src/orxonox/overlays/OverlayGroup.cc	(revision 11052)
@@ -42,10 +42,25 @@
 namespace orxonox
 {
+    namespace autocompletion
+    {
+        /**
+            @brief Returns the names of all currently existing OverlayGroups.
+        */
+        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(overlaygroupnames)();
+        ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(overlaygroupnames)()
+        {
+            ArgumentCompletionList names;
+            for (ObjectList<OverlayGroup>::iterator it = ObjectList<OverlayGroup>::begin(); it; ++it)
+                names.push_back(ArgumentCompletionListElement(it->getName(), getLowercase(it->getName())));
+            return names;
+        }
+    }
+
+    SetConsoleCommand("OverlayGroup", "toggleVisibility", &OverlayGroup::toggleVisibility).argumentCompleter(0, autocompletion::overlaygroupnames());
+    SetConsoleCommand("OverlayGroup", "show",             &OverlayGroup::show            ).argumentCompleter(0, autocompletion::overlaygroupnames());
+    SetConsoleCommand("OverlayGroup", "scaleGroup",       &OverlayGroup::scaleGroup      ).argumentCompleter(0, autocompletion::overlaygroupnames());
+    SetConsoleCommand("OverlayGroup", "scrollGroup",      &OverlayGroup::scrollGroup     ).argumentCompleter(0, autocompletion::overlaygroupnames());
+
     RegisterClass(OverlayGroup);
-
-    SetConsoleCommand("OverlayGroup", "toggleVisibility", &OverlayGroup::toggleVisibility);
-    SetConsoleCommand("OverlayGroup", "show", &OverlayGroup::show);
-    SetConsoleCommand("OverlayGroup", "scaleGroup",       &OverlayGroup::scaleGroup);
-    SetConsoleCommand("OverlayGroup", "scrollGroup",      &OverlayGroup::scrollGroup);
 
     OverlayGroup::OverlayGroup(Context* context)
Index: /code/trunk/src/orxonox/weaponsystem/CMakeLists.txt
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/CMakeLists.txt	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/CMakeLists.txt	(revision 11052)
@@ -1,4 +1,5 @@
 ADD_SOURCE_FILES(ORXONOX_SRC_FILES
   Munition.cc
+  ReplenishingMunition.cc
   Weapon.cc
   WeaponMode.cc
Index: /code/trunk/src/orxonox/weaponsystem/Munition.cc
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/Munition.cc	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/Munition.cc	(revision 11052)
@@ -24,5 +24,5 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Fabien Vultier
  *
  */
@@ -32,4 +32,5 @@
 #include "core/CoreIncludes.h"
 #include "core/command/Executor.h"
+#include "core/XMLPort.h"
 
 namespace orxonox
@@ -43,23 +44,33 @@
         this->maxMunitionPerMagazine_ = 10;
         this->maxMagazines_ = 10;
-        this->magazines_ = 10;
-
-        this->bUseSeparateMagazines_ = false;
-        this->bStackMunition_ = true;
+        this->unassignedMagazines_ = 10;
+
+        this->deployment_ = MunitionDeployment::Stack;
         this->bAllowMunitionRefilling_ = true;
         this->bAllowMultiMunitionRemovementUnderflow_ = true;
 
-        this->reloadTime_ = 0;
+        this->reloadTime_ = 0.5f;
+
+        this->lastFilledWeaponMode_ = NULL;
     }
 
     Munition::~Munition()
     {
-        for (std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
+        for (std::map<WeaponMode*, Magazine*>::iterator it = this->assignedMagazines_.begin(); it != this->assignedMagazines_.end(); ++it)
             delete it->second;
     }
 
+    void Munition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Munition, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Munition, "initialmagazines", setNumMagazines, getNumMagazines, xmlelement, mode);
+        XMLPortParam(Munition, "maxmagazines", setMaxMagazines, getMaxMagazines, xmlelement, mode);
+        XMLPortParam(Munition, "munitionpermagazine", setMaxMunitionPerMagazine, getMaxMunitionPerMagazine, xmlelement, mode);
+    }
+
     Munition::Magazine* Munition::getMagazine(WeaponMode* user) const
     {
-        if (this->bUseSeparateMagazines_)
+        if (deployment_ == MunitionDeployment::Separate)
         {
             // For separated magazines we definitively need a given user
@@ -68,6 +79,6 @@
 
             // Use the map to get the magazine assigned to the given user
-            std::map<WeaponMode*, Magazine*>::const_iterator it = this->currentMagazines_.find(user);
-            if (it != this->currentMagazines_.end())
+            std::map<WeaponMode*, Magazine*>::const_iterator it = this->assignedMagazines_.find(user);
+            if (it != this->assignedMagazines_.end())
                 return it->second;
         }
@@ -75,6 +86,6 @@
         {
             // We don't use separate magazines for each user, so just take the first magazine
-            if (this->currentMagazines_.size() > 0)
-                return this->currentMagazines_.begin()->second;
+            if (this->assignedMagazines_.size() > 0)
+                return this->assignedMagazines_.begin()->second;
         }
 
@@ -87,7 +98,7 @@
         if (magazine)
         {
-            if (this->bStackMunition_)
+            if (deployment_ == MunitionDeployment::Stack)
                 // With stacked munition every magazine contributes to the total amount
-                return this->maxMunitionPerMagazine_ * this->magazines_ + magazine->munition_;
+                return this->maxMunitionPerMagazine_ * this->unassignedMagazines_ + magazine->munition_;
             else
                 // Wihtout stacked munition we just consider the current magazine
@@ -109,18 +120,23 @@
     unsigned int Munition::getNumMagazines() const
     {
-        if (this->bStackMunition_)
+        if (deployment_ == MunitionDeployment::Stack)
         {
             // If we stack munition and the current magazine is still full, it counts too
             Magazine* magazine = this->getMagazine(0);
             if (magazine && magazine->munition_ == this->maxMunitionPerMagazine_)
-                return this->magazines_ + 1;
-        }
-
-        return this->magazines_;
+                return this->unassignedMagazines_ + 1;
+        }
+
+        return this->unassignedMagazines_;
+    }
+
+    void Munition::setNumMagazines(unsigned int numMagazines)
+    {
+        this->unassignedMagazines_ = numMagazines;
     }
 
     unsigned int Munition::getMaxMunition() const
     {
-        if (this->bStackMunition_)
+        if (deployment_ == MunitionDeployment::Stack)
             return this->maxMunitionPerMagazine_ * this->maxMagazines_;
         else
@@ -135,17 +151,26 @@
             unsigned int munition = magazine->munition_;
 
-            // If we stack munition, we con't care about the current magazine - we just need enough munition in total
-            if (this->bStackMunition_)
-                munition += this->maxMunitionPerMagazine_ * this->magazines_;
+            // If we stack munition, we don't care about the current magazine - we just need enough munition in total
+            if (deployment_ == MunitionDeployment::Stack)
+            {
+                munition += this->maxMunitionPerMagazine_ * this->unassignedMagazines_;
+            }
 
             if (munition == 0)
+            {
                 // Absolutely no munition - no chance to take munition
                 return false;
+            }
             else if (this->bAllowMultiMunitionRemovementUnderflow_)
+            {
                 // We're not empty AND we allow underflow, so this will always work
                 return true;
+            }
             else
+            {
                 // We don't allow underflow, so we have to check the amount
                 return (munition >= amount);
+            }
+
         }
         return false;
@@ -169,5 +194,5 @@
             {
                 // Not enough munition
-                if (this->bStackMunition_)
+                if (deployment_ == MunitionDeployment::Stack)
                 {
                     // We stack munition, so just take what we can and then load the next magazine
@@ -175,5 +200,5 @@
                     magazine->munition_ = 0;
 
-                    if (this->reload(0))
+                    if (this->reload(NULL))
                         // Successfully reloaded, continue recursively
                         return this->takeMunition(amount, 0);
@@ -199,5 +224,5 @@
     {
         // As long as we have enough magazines (and don't stack munition) we can reload
-        return (this->magazines_ > 0 && !this->bStackMunition_);
+        return (this->unassignedMagazines_ > 0 && deployment_ != MunitionDeployment::Stack);
     }
 
@@ -207,5 +232,5 @@
         if (magazine)
         {
-            if (this->bStackMunition_)
+            if (deployment_ == MunitionDeployment::Stack)
                 // With stacked munition, we never have to reload
                 return false;
@@ -227,26 +252,32 @@
 
         // Check if we actually can reload
-        if (this->magazines_ == 0)
+        if (this->unassignedMagazines_ == 0)
             return false;
 
         // If we use separate magazines for each user, we definitively need a user given
-        if (this->bUseSeparateMagazines_ && !user)
+        if (deployment_ == MunitionDeployment::Separate && !user)
             return false;
 
         // If we don't use separate magazines, set user to 0
-        if (!this->bUseSeparateMagazines_)
-            user = 0;
+        if (deployment_ != MunitionDeployment::Separate)
+        {
+            user = NULL;
+        }
 
         // Remove the current magazine for the given user
-        std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.find(user);
-        if (it != this->currentMagazines_.end())
-        {
+        std::map<WeaponMode*, Magazine*>::iterator it = this->assignedMagazines_.find(user);
+        if (it != this->assignedMagazines_.end())
+        {
+            if (it->first == lastFilledWeaponMode_)
+            {
+                lastFilledWeaponMode_ = NULL;
+            }            
             delete it->second;
-            this->currentMagazines_.erase(it);
+            this->assignedMagazines_.erase(it);
         }
 
         // Load a new magazine
-        this->currentMagazines_[user] = new Magazine(this, bUseReloadTime);
-        this->magazines_--;
+        this->assignedMagazines_[user] = new Magazine(this, bUseReloadTime);
+        this->unassignedMagazines_--;
 
         return true;
@@ -260,5 +291,5 @@
             return false;
 
-        if (this->bStackMunition_)
+        if (deployment_ == MunitionDeployment::Stack)
         {
             // If we stack munition, we can always add munition until we reach the limit
@@ -268,5 +299,5 @@
         {
             // Return true if any of the current magazines is not full (loading counts as full although it returns 0 munition)
-            for (std::map<WeaponMode*, Magazine*>::const_iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
+            for (std::map<WeaponMode*, Magazine*>::const_iterator it = this->assignedMagazines_.begin(); it != this->assignedMagazines_.end(); ++it)
                 if (it->second->munition_ < this->maxMunitionPerMagazine_ && it->second->bLoaded_)
                     return true;
@@ -281,8 +312,8 @@
             return false;
 
-        if (this->bStackMunition_)
+        if (deployment_ == MunitionDeployment::Stack)
         {
             // Stacking munition means, if a magazine gets full, the munition adds to a new magazine
-            Magazine* magazine = this->getMagazine(0);
+            Magazine* magazine = this->getMagazine(NULL);
             if (magazine)
             {
@@ -294,11 +325,11 @@
                 {
                     magazine->munition_ -= this->maxMunitionPerMagazine_;
-                    this->magazines_++;
+                    this->unassignedMagazines_++;
                 }
 
-                // If we reached the limit, reduze both magazines and munition to the maximum
-                if (this->magazines_ >= this->maxMagazines_)
-                {
-                    this->magazines_ = this->maxMagazines_ - 1;
+                // If we reached the limit, reduce both magazines and munition to the maximum
+                if (this->unassignedMagazines_ >= this->maxMagazines_)
+                {
+                    this->unassignedMagazines_ = this->maxMagazines_;
                     magazine->munition_ = this->maxMunitionPerMagazine_;
                 }
@@ -312,9 +343,24 @@
         else
         {
+            std::map<WeaponMode*, Magazine*>::iterator it;
+
+            // If the pointer to the weapon mode whose magazine got munition added to is NULL, then set the iterator to the beginning of the map
+            // Otherwise set it to the next weapon mode
+            if (lastFilledWeaponMode_ == NULL)
+            {
+                it = this->assignedMagazines_.begin();
+            }
+            else
+            {
+                it = this->assignedMagazines_.find(lastFilledWeaponMode_);
+                ++ it;
+            }
+
             // Share the munition equally to the current magazines
+            bool firstLoop = true;
             while (amount > 0)
             {
                 bool change = false;
-                for (std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
+                while (it != this->assignedMagazines_.end())
                 {
                     // Add munition if the magazine isn't full (but only to loaded magazines)
@@ -323,11 +369,20 @@
                         it->second->munition_++;
                         amount--;
+                        lastFilledWeaponMode_ = it->first;
                         change = true;
                     }
+
+                    ++it;
                 }
 
                 // If there was no change in a loop, all magazines are full (or locked due to loading)
-                if (!change)
+                // Because the first loop does not start at the beginning of the map we have to treat is separately
+                if (!change && !firstLoop)
+                {
                     break;
+                }                    
+
+                it = this->assignedMagazines_.begin();
+                firstLoop = false;
             }
 
@@ -340,34 +395,38 @@
         // TODO: 'amount' is not used
 
-        if (this->bStackMunition_)
+        if (deployment_ == MunitionDeployment::Stack)
             // If we stack munition, we can always add new magazines because they contribute directly to the munition
             return (this->getNumMunition(0) < this->getMaxMunition());
         else
             // If we don't stack munition, we're more limited
-            return ((this->currentMagazines_.size() + this->magazines_) < this->maxMagazines_);
-    }
-
-    bool Munition::addMagazines(unsigned int amount)
-    {
+            return ((this->assignedMagazines_.size() + this->unassignedMagazines_) < this->maxMagazines_);
+    }
+
+    unsigned int Munition::addMagazines(unsigned int amount)
+    {
+        unsigned int addedMagazines = 0;
+
         if (!this->canAddMagazines(amount))
-            return false;
+            return 0;
 
         // Calculate how many magazines are needed
-        int needed_magazines = this->maxMagazines_ - this->magazines_ - this->currentMagazines_.size();
+        int needed_magazines = this->maxMagazines_ - this->unassignedMagazines_ - this->assignedMagazines_.size();
 
         // If zero or less magazines are needed, we definitively don't need more magazines (unless we stack munition - then a magazine contributes directly to the munition)
-        if (needed_magazines <= 0 && !this->bStackMunition_)
-            return false;
+        if (needed_magazines <= 0 && deployment_ != MunitionDeployment::Stack)
+            return 0;
 
         if (amount <= static_cast<unsigned int>(needed_magazines))
         {
             // We need more magazines than we get, so just add them
-            this->magazines_ += amount;
+            this->unassignedMagazines_ += amount;
+            addedMagazines = amount;
         }
         else
         {
             // We get more magazines than we need, so just add the needed amount
-            this->magazines_ += needed_magazines;
-            if (this->bStackMunition_)
+            this->unassignedMagazines_ += needed_magazines;
+            addedMagazines = needed_magazines;
+            if (deployment_ == MunitionDeployment::Stack)
             {
                 // We stack munition, so the additional amount contributes directly to the munition of the current magazine
@@ -378,17 +437,31 @@
         }
 
-        return true;
+        // Reload as many empty magazines as possible
+        // Double loop and break is needed because the reload function changes the assigned magazines. This may confuse the iterator.
+        for (unsigned int i = 0; i < addedMagazines; ++i)
+        {
+            for (std::map<WeaponMode*, Magazine*>::iterator it = this->assignedMagazines_.begin(); it != this->assignedMagazines_.end(); ++it)
+            {
+                if (needReload(it->first))
+                {
+                    reload(it->first);
+                    break;
+                }
+            }
+        }
+
+        return addedMagazines;
     }
 
     bool Munition::canRemoveMagazines(unsigned int amount) const
     {
-        if (this->bStackMunition_)
-        {
-            if (this->magazines_ >= amount)
+        if (deployment_ == MunitionDeployment::Stack)
+        {
+            if (this->unassignedMagazines_ >= amount)
             {
                 // We have enough magazines
                 return true;
             }
-            else if (this->magazines_ == amount - 1)
+            else if (this->unassignedMagazines_ == amount - 1)
             {
                 // We lack one magazine, check if the current magazine is still full, if yes we're fine
@@ -406,5 +479,5 @@
         {
             // In case we're not stacking munition, just check the number of magazines
-            return (this->magazines_ >= amount);
+            return (this->unassignedMagazines_ >= amount);
         }
 
@@ -417,13 +490,13 @@
             return false;
 
-        if (this->magazines_ >= amount)
+        if (this->unassignedMagazines_ >= amount)
         {
             // We have enough magazines, just remove the amount
-            this->magazines_ -= amount;
-        }
-        else if (this->bStackMunition_)
+            this->unassignedMagazines_ -= amount;
+        }
+        else if (deployment_ == MunitionDeployment::Stack)
         {
             // We don't have enough magazines, but we're stacking munition, so additionally remove the bullets from the current magazine
-            this->magazines_ = 0;
+            this->unassignedMagazines_ = 0;
             Magazine* magazine = this->getMagazine(0);
             if (magazine)
@@ -437,17 +510,21 @@
     {
         // If we use separate magazines, we need a user
-        if (this->bUseSeparateMagazines_ && !user)
+        if (deployment_ == MunitionDeployment::Separate && !user)
             return false;
 
         // If we don't use separate magazines, set user to 0
-        if (!this->bUseSeparateMagazines_)
-            user = 0;
+        if (deployment_ != MunitionDeployment::Separate)
+            user = NULL;
 
         // Remove the current magazine for the given user
-        std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.find(user);
-        if (it != this->currentMagazines_.end())
-        {
+        std::map<WeaponMode*, Magazine*>::iterator it = this->assignedMagazines_.find(user);
+        if (it != this->assignedMagazines_.end())
+        {
+            if (it->first == lastFilledWeaponMode_)
+            {
+                lastFilledWeaponMode_ = NULL;
+            }
             delete it->second;
-            this->currentMagazines_.erase(it);
+            this->assignedMagazines_.erase(it);           
             return true;
         }
@@ -465,5 +542,5 @@
         this->bLoaded_ = false;
 
-        if (bUseReloadTime && munition->reloadTime_ > 0 && !munition->bStackMunition_)
+        if (bUseReloadTime && munition->reloadTime_ > 0 && munition->deployment_ != MunitionDeployment::Stack)
         {
             const ExecutorPtr& executor = createExecutor(createFunctor(&Magazine::loaded, this));
Index: /code/trunk/src/orxonox/weaponsystem/Munition.h
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/Munition.h	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/Munition.h	(revision 11052)
@@ -24,5 +24,5 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Fabien Vultier
  *
  */
@@ -39,6 +39,16 @@
 namespace orxonox
 {
+    namespace MunitionDeployment
+    {
+        enum Value
+        {
+            Separate, // Every comsuming weapon mode has its own magazine. It is possible that one weapon mode is out of ammo while another still has some.
+            Share, // All comsuming weapon modes take their munition from the same magazine. If this magazine is empty a new one is loaded.
+            Stack // There is only one magazine where all the munition is stored. Use this deployment mode for heavy weapons loke rockets, bombs, ...
+        };
+    }
+
     class _OrxonoxExport Munition : public BaseObject
-    {
+    {        
         struct Magazine
         {
@@ -59,4 +69,6 @@
             virtual ~Munition();
 
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
             unsigned int getNumMunition(WeaponMode* user) const;
             unsigned int getNumMunitionInCurrentMagazine(WeaponMode* user) const;
@@ -68,4 +80,7 @@
             inline unsigned int getMaxMunitionPerMagazine() const
                 { return this->maxMunitionPerMagazine_; }
+            inline MunitionDeployment::Value getMunitionDeployment() const
+                { return deployment_; }
+
 
             bool canTakeMunition(unsigned int amount, WeaponMode* user) const;
@@ -82,5 +97,10 @@
 
             bool canAddMagazines(unsigned int amount) const;
-            bool addMagazines(unsigned int amount);
+            /**
+            @brief Try to add magazines.
+            @param amount The amount of magazines tried to add.
+            @return The amount of magazines sucessfully added.
+            */
+            unsigned int addMagazines(unsigned int amount);
 
             bool canRemoveMagazines(unsigned int amount) const;
@@ -92,16 +112,22 @@
             unsigned int maxMunitionPerMagazine_;
             unsigned int maxMagazines_;
-            unsigned int magazines_;
-            std::map<WeaponMode*, Magazine*> currentMagazines_;
+            unsigned int unassignedMagazines_; // Number of magazines that are not assigned to a weapon mode. These are alway treated as full.
+            std::map<WeaponMode*, Magazine*> assignedMagazines_; // Maps weapon modes to magazines that are currently used.
 
-            bool bUseSeparateMagazines_;
-            bool bStackMunition_;
+            MunitionDeployment::Value deployment_; // Defines the behaviour how munition and magazines are distributed to the consuming weapon modes.
+
             bool bAllowMunitionRefilling_;
             bool bAllowMultiMunitionRemovementUnderflow_;
 
-            float reloadTime_;
+            float reloadTime_; // The time needed to replace a magazine by a new one.
+            WeaponMode* lastFilledWeaponMode_; // Pointer to the weapon mode that got the last munition during the last call of addMunition.
 
         private:
             Magazine* getMagazine(WeaponMode* user) const;
+            inline void setMaxMagazines(unsigned int maxMagazines)
+                { this->maxMagazines_ = maxMagazines; }
+            inline void setMaxMunitionPerMagazine(unsigned int maxMunitionPerMagazine)
+                { this->maxMunitionPerMagazine_ = maxMunitionPerMagazine; }
+            void setNumMagazines(unsigned int numMagazines);
     };
 }
Index: /code/trunk/src/orxonox/weaponsystem/ReplenishingMunition.cc
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/ReplenishingMunition.cc	(revision 11052)
+++ /code/trunk/src/orxonox/weaponsystem/ReplenishingMunition.cc	(revision 11052)
@@ -0,0 +1,92 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file ReplenishingMunition.h
+    @brief Implementation of the ReplenishingMunition class.
+*/
+
+#include "ReplenishingMunition.h"
+
+#include "core/CoreIncludes.h"
+#include "core/command/Executor.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    RegisterClass(ReplenishingMunition);
+
+    ReplenishingMunition::ReplenishingMunition(Context* context) : Munition(context)
+    {
+        RegisterObject(ReplenishingMunition);
+
+        this->replenishInterval_ = 1.0f;
+        this->replenishAmount_ = 1;
+
+        // Use the timer to initialize itself after the first tick (because the real values for
+        // replenishIntervall_ and replenishMunitionAmount_ will be set in the constructor of the
+        // inheriting class, which comes after this constructor)
+        this->replenishingTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&ReplenishingMunition::initializeTimer, this)));
+    }
+
+    void ReplenishingMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ReplenishingMunition, XMLPort, xmlelement, mode);
+
+        XMLPortParam(ReplenishingMunition, "replenishamount", setReplenishAmount, getReplenishAmount, xmlelement, mode);
+        XMLPortParam(ReplenishingMunition, "replenishinterval", setReplenishInterval, getReplenishInterval, xmlelement, mode);
+    }    
+
+    float ReplenishingMunition::getProgress()
+    {
+        return replenishingTimer_.getRemainingTime()/this->replenishInterval_;
+    }
+
+    void ReplenishingMunition::initializeTimer()
+    {
+        // Initialize the timer
+        this->replenishingTimer_.setTimer(this->replenishInterval_, true, createExecutor(createFunctor(&ReplenishingMunition::replenish, this)));
+    }
+
+    void ReplenishingMunition::replenish()
+    {
+        if (this->canAddMagazines(this->replenishAmount_))
+        {
+            // Make a temporary copy of bAllowMunitionRefilling_, because this might be disallowed in every
+            // case except the internal munition replenishing
+            bool temp = this->bAllowMunitionRefilling_;
+            this->bAllowMunitionRefilling_ = true;
+
+            // Replenish munition
+            this->addMagazines(this->replenishAmount_);
+
+            // Write back the temporary value
+            this->bAllowMunitionRefilling_ = temp;            
+        }
+    }
+}
Index: /code/trunk/src/orxonox/weaponsystem/ReplenishingMunition.h
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/ReplenishingMunition.h	(revision 11052)
+++ /code/trunk/src/orxonox/weaponsystem/ReplenishingMunition.h	(revision 11052)
@@ -0,0 +1,81 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file ReplenishingMunition.h
+    @brief Definition of the ReplenishingMunition class.
+*/
+
+#ifndef _ReplenishingMunition_H__
+#define _ReplenishingMunition_H__
+
+#include "tools/Timer.h"
+#include "Munition.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Munition that is replenished by a certain amount each time interval.
+    @author
+        Fabian 'x3n' Landau
+    @ingroup WeaponsMunitions
+    */
+    class _OrxonoxExport ReplenishingMunition : public Munition
+    {
+        public:
+            ReplenishingMunition(Context* context);
+            virtual ~ReplenishingMunition() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            
+            virtual float getProgress();
+            inline unsigned int getReplenishAmount() const
+                { return replenishAmount_; }
+            inline float getReplenishInterval() const
+                { return replenishInterval_; }
+
+        protected:                          
+            float replenishInterval_; //!< The interval in which the munition is replenished.
+            unsigned int replenishAmount_; //!< The amount of magazines by which it is replenished.
+
+        private:
+            void replenish(); //!< Every call of this function replenishes the munition. This function is called by the timer.
+            void initializeTimer();
+
+            Timer replenishingTimer_; //!< Timer to do the replenishing.
+
+            inline void setReplenishAmount(unsigned int replenishAmount)
+                { this->replenishAmount_ = replenishAmount; }
+            inline void setReplenishInterval(float replenishInterval)
+                { this->replenishInterval_ = replenishInterval; }              
+    };
+}
+
+#endif /* _ReplenishingMunition_H__ */
Index: /code/trunk/src/orxonox/weaponsystem/Weapon.cc
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/Weapon.cc	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/Weapon.cc	(revision 11052)
@@ -134,4 +134,8 @@
     }
 
+    /**
+    @brief
+        Reload all @ref orxonox::WeaponMode weapon modes of this weapon.
+    */
     void Weapon::reload()
     {
@@ -151,3 +155,9 @@
             it->second->setWeapon(this);
     }
+
+    void Weapon::updateMunition()
+    {
+        for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
+            it->second->updateMunition();
+    }
 }
Index: /code/trunk/src/orxonox/weaponsystem/Weapon.h
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/Weapon.h	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/Weapon.h	(revision 11052)
@@ -57,4 +57,8 @@
             void addWeaponmode(WeaponMode* weaponmode);
             WeaponMode* getWeaponmode(unsigned int index) const;
+            inline std::multimap<unsigned int, WeaponMode*>* getAllWeaponmodes()
+                { return &weaponmodes_; }
+            inline int getNumWeaponModes() const
+                { return weaponmodes_.size(); }
 
             /**
@@ -75,4 +79,5 @@
             inline WeaponSlot * getWeaponSlot() const
                 { return this->weaponSlot_; }
+            void updateMunition();
 
         private:
Index: /code/trunk/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/WeaponMode.cc	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/WeaponMode.cc	(revision 11052)
@@ -75,4 +75,6 @@
         this->muzzleOrientation_ = Quaternion::IDENTITY;
 
+        hudImageString_ = "Orxonox/WSHUD_WM_Unknown";
+
         if( GameMode::isMaster() )
         {
@@ -125,5 +127,6 @@
             this->bSoundAttached_ = true;
         }
-
+        
+        // Fireing is only possible if this weapon mode is not reloading and there is enough munition
         if (!this->bReloading_ && this->munition_ && this->munition_->takeMunition(this->munitionPerShot_, this))
         {
@@ -134,11 +137,19 @@
                 if (this->munition_->reload(this))
                 {
+                    // If true, the weapon reloads in parallel to the magazine reloading
                     if (this->bParallelReload_)
+                    {
+                        // The time needed to reload is the maximum of the reload time of the weapon mode and the magazine.
                         tempReloadtime = std::max(this->reloadTime_, this->munition_->getReloadTime());
+                    }                        
                     else
+                    {
+                        // The time needed to reload is the sum of the reload time of the weapon mode and the magazine.
                         tempReloadtime = this->reloadTime_ + this->munition_->getReloadTime();
+                    }                        
                 }
             }
 
+            // Mark this weapon mode as reloading and start the reload timer
             this->bReloading_ = true;
             this->reloadTimer_.setInterval(tempReloadtime);
@@ -232,5 +243,7 @@
         }
         else
-            this->munition_ = 0;
+        {
+            this->munition_ = NULL;
+        }
     }
 
@@ -283,6 +296,8 @@
     }
 
-    void WeaponMode::setDefaultSoundWithVolume(const std::string& soundPath, const float soundVolume){
-        if (this->defSndWpnFire_) {
+    void WeaponMode::setDefaultSoundWithVolume(const std::string& soundPath, const float soundVolume)
+    {
+        if (this->defSndWpnFire_)
+        {
             this->defSndWpnFire_->setSource(soundPath);
             this->defSndWpnFire_->setVolume(soundVolume);
Index: /code/trunk/src/orxonox/weaponsystem/WeaponMode.h
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/WeaponMode.h	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/WeaponMode.h	(revision 11052)
@@ -38,4 +38,5 @@
 #include "core/class/SubclassIdentifier.h"
 #include "tools/Timer.h"
+#include "Munition.h"
 
 namespace orxonox
@@ -104,4 +105,6 @@
             inline bool getParallelReload() const
                 { return this->bParallelReload_; }
+            inline bool getReloading() const
+                { return this->bReloading_; }
 
 
@@ -147,4 +150,8 @@
             Vector3 getTarget();
 
+            inline const std::string& getHUDImageString() const
+                { return this->hudImageString_; }            
+
+            void updateMunition();
         protected:
             virtual void fire() = 0;
@@ -155,6 +162,6 @@
 
             float reloadTime_;
-            bool bAutoReload_;
-            bool bParallelReload_;
+            bool bAutoReload_; // If true, the weapon reloads the magazine automatically.
+            bool bParallelReload_; // If true, the weapon reloads in parallel to the magazine reloading.
 
             float damage_;
@@ -163,6 +170,7 @@
             Vector3 muzzleOffset_;
 
-        private:
-            void updateMunition();
+            std::string hudImageString_;
+
+        private:            
             void reloaded();
 
@@ -175,5 +183,5 @@
 
             Timer reloadTimer_;
-            bool bReloading_;
+            bool bReloading_; // If true, this weapon mode is marked as reloading.
 
             Vector3 muzzlePosition_;
@@ -181,5 +189,5 @@
 
             WorldSound* defSndWpnFire_;
-            bool        bSoundAttached_;
+            bool bSoundAttached_;
     };
 }
Index: /code/trunk/src/orxonox/weaponsystem/WeaponPack.cc
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/WeaponPack.cc	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/WeaponPack.cc	(revision 11052)
@@ -124,4 +124,9 @@
     }
 
+    std::vector<Weapon*>* WeaponPack::getAllWeapons()
+    {
+        return &weapons_;        
+    }    
+
     void WeaponPack::addDefaultWeaponmodeLink(DefaultWeaponmodeLink* link)
     {
@@ -156,3 +161,9 @@
             (*it)->setWeaponPack(this);
     }
+
+    void WeaponPack::updateMunition()
+    {
+        for (std::vector<Weapon *>::const_iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)
+            (*it)->updateMunition();
+    }
 }
Index: /code/trunk/src/orxonox/weaponsystem/WeaponPack.h
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/WeaponPack.h	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/WeaponPack.h	(revision 11052)
@@ -52,4 +52,5 @@
             void removeWeapon(Weapon * weapon);
             Weapon * getWeapon(unsigned int index) const;
+            std::vector<Weapon*>* getAllWeapons();
 
             inline size_t getNumWeapons() const
@@ -65,4 +66,5 @@
             inline WeaponSystem * getWeaponSystem() const
                 { return this->weaponSystem_; }
+            void updateMunition();
 
         private:
Index: /code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc	(revision 11052)
@@ -240,4 +240,9 @@
     }
 
+    std::vector<WeaponPack *> * WeaponSystem::getAllWeaponPacks()
+    {
+        return &weaponPacks_;
+    }    
+
     bool WeaponSystem::swapWeaponSlots(WeaponSlot * wSlot1, WeaponSlot * wSlot2)
     {
@@ -310,13 +315,35 @@
             return it->second;
         }
-        else if (identifier->getIdentifier()->isA(Class(Munition)))
-        {
-            Munition* munition = identifier->fabricate(this->getContext());
-            this->munitions_[identifier->getIdentifier()] = munition;
-            return munition;
-        }
         else
         {
-            return 0;
+            return NULL;
+        }
+    }
+
+    void WeaponSystem::addMunition(Munition* munition)
+    {
+        if (munition == NULL)
+        {
+            return;
+        }
+
+        SubclassIdentifier<Munition> identifier = munition->getIdentifier();
+
+        if (identifier)
+        {
+            this->munitions_[identifier] = munition;
+            updateMunition();
+        }
+        else
+        {
+            orxout(internal_warning) << "Adding munition failed. identifier == NULL " << endl;
+        }
+    }
+
+    void WeaponSystem::updateMunition()
+    {
+        for (std::vector<WeaponPack*>::iterator it = this->weaponPacks_.begin(); it != this->weaponPacks_.end(); ++it)
+        {
+            (*it)->updateMunition();
         }
     }
Index: /code/trunk/src/orxonox/weaponsystem/WeaponSystem.h
===================================================================
--- /code/trunk/src/orxonox/weaponsystem/WeaponSystem.h	(revision 11051)
+++ /code/trunk/src/orxonox/weaponsystem/WeaponSystem.h	(revision 11052)
@@ -67,4 +67,5 @@
             void removeWeaponPack(WeaponPack * wPack);
             WeaponPack * getWeaponPack(unsigned int index) const;
+            std::vector<WeaponPack *> * getAllWeaponPacks();
 
             // configure slots and firemodes
@@ -76,4 +77,5 @@
 
             Munition * getMunition(SubclassIdentifier<Munition> * identifier);
+            void addMunition(Munition* munition);
 
             inline void setPawn(Pawn * pawn)
@@ -95,4 +97,6 @@
 
         private:
+            void updateMunition();
+            
             std::map<unsigned int, WeaponSet *> weaponSets_;
             std::vector<WeaponSlot *> weaponSlots_;
Index: /code/trunk/src/orxonox/worldentities/Actionpoint.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/Actionpoint.cc	(revision 11052)
+++ /code/trunk/src/orxonox/worldentities/Actionpoint.cc	(revision 11052)
@@ -0,0 +1,85 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Actionpoint.h"
+
+namespace orxonox
+{
+    RegisterClass(Actionpoint);
+
+    Actionpoint::Actionpoint(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(Actionpoint);
+        
+        this->actionName_ = "";
+        this->name_ = "";
+        
+        this->bLoopStart_ = false;
+        this->bLoopEnd_ = false;
+        this->bProtectMe_ = false;
+    }
+    
+    void Actionpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Actionpoint, XMLPort, xmlelement, mode);
+        
+        XMLPortParam(Actionpoint, "action", setActionXML, getActionXML,  xmlelement, mode);
+        XMLPortParam(Actionpoint, "protect", setProtectXML, getProtectXML,  xmlelement, mode);
+        XMLPortParam(Actionpoint, "attack", setAttackXML, getAttackXML,  xmlelement, mode);
+        XMLPortParam(Actionpoint, "protectMe", setProtectMeXML, getProtectMeXML,  xmlelement, mode).defaultValues(false);
+        XMLPortParam(Actionpoint, "loopStart", setLoopStart, getLoopStart,  xmlelement, mode).defaultValues(false);
+        XMLPortParam(Actionpoint, "loopEnd", setLoopEnd, getLoopEnd,  xmlelement, mode).defaultValues(false);
+    }
+    /**
+    @brief
+        action is ATTACK -> returns name of object to attack
+        action is PROTECT -> returns name of object to protect 
+        if asked to protect human, returns a special string.
+    @return
+        name of an object to interact with.
+    @note
+        never use more than one of following arguments for XMLPort:
+        attack, protect, protectMe or
+        loopStart and loopEnd.
+    */
+    std::string Actionpoint::getName() const
+    {
+        if (this->name_ != "")
+        {
+            return this->name_;
+        }
+        else if (this->bProtectMe_)
+        {
+            return "reservedKeyword:human";
+        }
+        else
+        {
+            return "";
+        }
+    }    
+}
Index: /code/trunk/src/orxonox/worldentities/Actionpoint.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/Actionpoint.h	(revision 11052)
+++ /code/trunk/src/orxonox/worldentities/Actionpoint.h	(revision 11052)
@@ -0,0 +1,156 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Gani Aliguzhinov
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Actionpoint_H__
+#define _Actionpoint_H__
+
+#include <string>                           //need string for XML input
+
+#include "core/XMLPort.h"                   //need XMLPort
+#include "worldentities/StaticEntity.h"     //this is a child of StaticEntity
+
+namespace orxonox
+{ 
+    /**
+    @brief
+        Actionpoints are used by ActionpointController and all derived classes.
+        Such classes will execute actions set in Actionpoints.
+
+        In XML file one can pass an array of Actionpoints to a controller. Each
+        Actionpoint can take action type, string and boolean or 
+        action and two booleans as an argument.
+        If action is set to fly, Actionpoint's position is assumed to be the desired
+        location.
+        Example XML code:
+
+        <SpaceShip position="-2000, 1500, -1000" lookat="0,0,0" team=0 name="thisShipName">
+          <templates>
+            <Template link=spaceshipassff />
+          </templates>
+          <controller>
+            <DivisionController team=0 formationMode="WALL">
+              <actionpoints>
+                <Actionpoint position="0,0,0" action="FLY" /> 
+                <Actionpoint position="-1000,750,-500" action="ATTACK" attack="someShipName" />
+                <Actionpoint position="-1000,750,-500" action="PROTECT" protectMe=true />
+                <Actionpoint position="-1000,750,-500" action="PROTECT" protect="otherShipName" /> 
+                <Actionpoint position="-1000,750,-500" action="FIGHTALL" />
+               </actionpoints>
+            </DivisionController>
+          </controller>
+        </SpaceShip>
+        
+        Example with loops:
+
+        <SpaceShip position="-1500, 1500, -1000" lookat="0,0,0" team=0 name="thisShipName">
+          <templates>
+            <Template link=spaceshipassff />
+          </templates>
+          <controller>
+            <DivisionController team=0 formationMode="finger4">
+              <actionpoints>
+                <Actionpoint position="  0,2000,-600" action="FLY" loopStart=true/>
+                <Actionpoint position="  0,2000,-700" action="FLY"  />
+                <Actionpoint position="100,2000,-700" action="FLY" />
+                <Actionpoint position="100,2000,-600" action="FLY" loopEnd=true />
+              </actionpoints>
+            </DivisionController>
+          </controller>
+        </SpaceShip>
+        
+        One can also use other Worldentities instead of Actionpoints just like Waypoints, but those points
+        will be included in loop.
+        For more information read descriptions of the methods.
+    */
+    class _OrxonoxExport Actionpoint : public StaticEntity
+    {
+        public:
+            Actionpoint(Context* context);
+            virtual ~Actionpoint() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            /** @brief Decides what AI will do. @param val action to execute */
+            void setActionXML(std::string val)
+                { this->actionName_ = getUppercase (val); }
+            std::string getActionXML() const
+                { return this->actionName_; }
+
+            /** @brief Makes AI follow an entity. @param val name of entity to protect */
+            void setProtectXML(std::string val)
+                { this->name_ = val; }
+            std::string getProtectXML() const
+                { return this->name_; }
+
+            /** @brief Makes AI attack an entity. @param val name of entity to attack */
+            void setAttackXML(std::string val)
+                { this->name_ = val; }
+            std::string getAttackXML() const
+                { return this->name_; }
+
+            /** @brief Makes AI follow human player. @param c protect Human? */
+            void setProtectMeXML(bool c)
+                { this->bProtectMe_ = c; }
+            bool getProtectMeXML() const
+                { return this->bProtectMe_; }
+
+            /** @brief Starts a loop of Actionpoints. @param value start loop? */
+            void setLoopStart(bool value)
+                { this->bLoopStart_ = value; }
+            bool getLoopStart() const
+                { return this->bLoopStart_; }
+            /** @brief Ends a loop of Actionpoints. @param value end loop? */
+            void setLoopEnd (bool value)
+                { this->bLoopEnd_ = value; }
+            bool getLoopEnd() const
+                { return this->bLoopEnd_; }
+
+            std::string getName() const;
+
+        private:    
+            std::string actionName_;    //!< can be set to "FLY", "ATTACK",
+                                        //!< "PROTECT", "FIGHT", "FIGHTALL"
+                                        //!< or "NONE".
+
+            std::string name_;          //!< name of the ship that is to be
+                                        //!< attacked or protected.
+
+            bool bLoopStart_;           //!< if true, this and all following Actionpoints
+                                        //!< until the first Actionpoint with bLoopEnd_
+                                        //!< set to true are executed in a loop.
+
+            bool bLoopEnd_;             //!< if true, this is the last element of
+                                        //!< a loop started by loopStart=true argument
+
+            bool bProtectMe_;           //!< if player is to be protected,
+                                        //!< instead of passing name, one has
+                                        //!< to set protectMe to true.
+    };
+}
+
+#endif /* _Actionpoint_H__ */
Index: de/trunk/src/orxonox/worldentities/BigExplosion.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/BigExplosion.cc	(revision 11051)
+++ 	(revision )
@@ -1,345 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Benjamin de Capitani
- *   Co-authors:
- *      ...
- *
- */
-
-#include "BigExplosion.h"
-
-#include "util/Exception.h"
-#include "core/CoreIncludes.h"
-#include "core/GameMode.h"
-#include "core/command/Executor.h"
-#include "tools/ParticleInterface.h"
-#include "Scene.h"
-#include "graphics/ParticleSpawner.h"
-#include "graphics/Model.h"
-#include "MovableEntity.h"
-
-namespace orxonox
-{
-    RegisterClass(BigExplosion);
-
-    BigExplosion::BigExplosion(Context* context) : MobileEntity(context)
-    {
-        RegisterObject(BigExplosion);
-
-        if ( GameMode::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )
-            ThrowException(AbortLoading, "Can't create BigExplosion, no scene or no scene manager given.");
-
-        this->bStop_ = false;
-        this->LOD_ = LODParticle::Normal;
-
-        if ( GameMode::showsGraphics() )
-        {
-            try
-            {
-                this->init();
-            }
-            catch (const std::exception& ex)
-            {
-                orxout(internal_error) << "Couldn't load particle effect in BigExplosion: " << ex.what() << endl;
-                this->initZero();
-            }
-        }
-        else
-        {
-            this->initZero();
-        }
-
-        if (GameMode::isMaster())
-        {
-            this->destroyTimer_.setTimer(rnd(2, 4), false, createExecutor(createFunctor(&BigExplosion::stop, this)));
-        }
-
-        this->registerVariables();
-    }
-
-    void BigExplosion::init()
-    {
-        this->debrisEntity1_ = new MovableEntity(this->getContext());
-        this->debrisEntity2_ = new MovableEntity(this->getContext());
-        this->debrisEntity3_ = new MovableEntity(this->getContext());
-        this->debrisEntity4_ = new MovableEntity(this->getContext());
-
-        this->debrisEntity1_->setSyncMode(0);
-        this->debrisEntity2_->setSyncMode(0);
-        this->debrisEntity3_->setSyncMode(0);
-        this->debrisEntity4_->setSyncMode(0);
-
-        this->debris1_ = new Model(this->getContext());
-        this->debris2_ = new Model(this->getContext());
-        this->debris3_ = new Model(this->getContext());
-        this->debris4_ = new Model(this->getContext());
-
-        this->debris1_->setSyncMode(0);
-        this->debris2_->setSyncMode(0);
-        this->debris3_->setSyncMode(0);
-        this->debris4_->setSyncMode(0);
-
-        this->explosion_ = new StaticEntity(this->getContext());
-        this->explosion_->setSyncMode(0);
-
-        this->debrisSmoke1_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/smoke7", this->LOD_);
-        this->debrisSmoke2_ =  new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/smoke7", this->LOD_);
-        this->debrisSmoke3_ =  new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/smoke7", this->LOD_);
-        this->debrisSmoke4_ =  new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/smoke7", this->LOD_);
-
-        this->debrisFire1_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/fire4", this->LOD_);
-        this->debrisFire2_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/fire4", this->LOD_);
-        this->debrisFire3_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/fire4", this->LOD_);
-        this->debrisFire4_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/fire4", this->LOD_);
-
-        this->debris1_->attachOgreObject(this->debrisSmoke1_->getParticleSystem());
-        this->debris1_->attachOgreObject(this->debrisFire1_->getParticleSystem());
-        this->debris2_->attachOgreObject(this->debrisSmoke2_->getParticleSystem());
-        this->debris2_->attachOgreObject(this->debrisFire2_->getParticleSystem());
-        this->debris3_->attachOgreObject(this->debrisSmoke3_->getParticleSystem());
-        this->debris3_->attachOgreObject(this->debrisFire3_->getParticleSystem());
-        this->debris4_->attachOgreObject(this->debrisSmoke4_->getParticleSystem());
-        this->debris4_->attachOgreObject(this->debrisFire4_->getParticleSystem());
-
-        this->debris1_->setMeshSource("CockpitDebris.mesh");
-        this->debris2_->setMeshSource("WingDebris1.mesh");
-        this->debris3_->setMeshSource("BodyDebris1.mesh");
-        this->debris4_->setMeshSource("WingDebris2.mesh");
-
-        this->debrisEntity1_->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(50,100));
-        this->debrisEntity1_->setAngularVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)).normalisedCopy() * Degree(400).valueRadians());
-        this->debrisEntity1_->setScale(4);
-
-        this->debrisEntity2_->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(50,100));
-        this->debrisEntity2_->setAngularVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)).normalisedCopy() * Degree(400).valueRadians());
-        this->debrisEntity2_->setScale(4);
-
-        this->debrisEntity3_->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(50,100));
-        this->debrisEntity3_->setAngularVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)).normalisedCopy() * Degree(400).valueRadians());
-        this->debrisEntity3_->setScale(4);
-
-        this->debrisEntity4_->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(50,100));
-        this->debrisEntity4_->setAngularVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)).normalisedCopy() * Degree(400).valueRadians());
-        this->debrisEntity4_->setScale(4);
-
-        this->debrisEntity1_->attach(debris1_);
-        this->debrisEntity2_->attach(debris2_);
-        this->debrisEntity3_->attach(debris3_);
-        this->debrisEntity4_->attach(debris4_);
-
-        ParticleSpawner* effect = new ParticleSpawner(this->getContext());
-        effect->setDestroyAfterLife(true);
-        effect->setSource("Orxonox/explosion2b");
-        effect->setLifetime(4.0f);
-        effect->setSyncMode(0);
-
-        ParticleSpawner* effect2 = new ParticleSpawner(this->getContext());
-        effect2->setDestroyAfterLife(true);
-        effect2->setSource("Orxonox/smoke6");
-        effect2->setLifetime(4.0f);
-        effect2->setSyncMode(0);
-
-        this->explosion_->attach(effect);
-        this->explosion_->attach(effect2);
-
-        this->attach(explosion_);
-        this->attach(debrisEntity1_);
-        this->attach(debrisEntity2_);
-        this->attach(debrisEntity3_);
-        this->attach(debrisEntity4_);
-
-
-        for(int i=0;i<10;i++)
-        {
-            Model* part1 = new Model(this->getContext());
-            Model* part2 = new Model(this->getContext());
-
-            MovableEntity* partEntity1 = new MovableEntity(this->getContext());
-            MovableEntity* partEntity2 = new MovableEntity(this->getContext());
-
-            part1->setSyncMode(0);
-            part2->setSyncMode(0);
-            partEntity1->setSyncMode(0);
-            partEntity2->setSyncMode(0);
-
-            partEntity1->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(10,100));
-            partEntity1->setAngularVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)).normalisedCopy() * Degree(400).valueRadians());
-            partEntity1->setScale(rnd(1, 3));
-
-            partEntity2->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(10, 100));
-            partEntity2->setAngularVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)).normalisedCopy() * Degree(400).valueRadians());
-            partEntity2->setScale(rnd(1, 3));
-
-            part1->setMeshSource("SmallPart1.mesh");
-            part2->setMeshSource("SmallPart2.mesh");
-
-            partEntity1->attach(part1);
-            partEntity2->attach(part2);
-
-            this->attach(partEntity1);
-            this->attach(partEntity2);
-        }
-    }
-
-    void BigExplosion::initZero()
-    {
-        this->debrisFire1_ = 0;
-        this->debrisFire2_ = 0;
-        this->debrisFire3_ = 0;
-        this->debrisFire4_ = 0;
-
-        this->debrisSmoke1_ = 0;
-        this->debrisSmoke2_ = 0;
-        this->debrisSmoke3_ = 0;
-        this->debrisSmoke4_ = 0;
-
-        this->explosionSmoke_=0;
-        this->explosionFire_=0;
-    }
-
-    BigExplosion::~BigExplosion()
-    {
-        if (this->isInitialized())
-        {
-            if (this->debrisFire1_)
-            {
-                this->debris1_->detachOgreObject(this->debrisFire1_->getParticleSystem());
-                delete this->debrisFire1_;
-            }
-            if (this->debrisSmoke1_)
-            {
-                this->debris1_->detachOgreObject(this->debrisSmoke1_->getParticleSystem());
-                delete this->debrisSmoke1_;
-            }
-
-            if (this->debrisFire2_)
-            {
-                this->debris2_->detachOgreObject(this->debrisFire2_->getParticleSystem());
-                delete this->debrisFire2_;
-            }
-            if (this->debrisSmoke2_)
-            {
-                this->debris2_->detachOgreObject(this->debrisSmoke2_->getParticleSystem());
-                delete this->debrisSmoke2_;
-            }
-
-            if (this->debrisFire3_)
-            {
-                this->debris3_->detachOgreObject(this->debrisFire3_->getParticleSystem());
-                delete this->debrisFire3_;
-            }
-            if (this->debrisSmoke3_)
-            {
-                this->debris3_->detachOgreObject(this->debrisSmoke3_->getParticleSystem());
-                delete this->debrisSmoke3_;
-            }
-
-            if (this->debrisFire4_)
-            {
-                this->debris4_->detachOgreObject(this->debrisFire4_->getParticleSystem());
-                delete this->debrisFire4_;
-            }
-            if (this->debrisSmoke4_)
-            {
-                this->debris4_->detachOgreObject(this->debrisSmoke4_->getParticleSystem());
-                delete this->debrisSmoke4_;
-            }
-        }
-    }
-
-    void BigExplosion::registerVariables()
-    {
-        registerVariable((int&)(this->LOD_), VariableDirection::ToClient, new NetworkCallback<BigExplosion>(this, &BigExplosion::LODchanged));
-        registerVariable(this->bStop_,       VariableDirection::ToClient, new NetworkCallback<BigExplosion>(this, &BigExplosion::checkStop));
-    }
-
-    void BigExplosion::LODchanged()
-    {
-        if (this->debrisFire1_)
-            this->debrisFire1_->setDetailLevel(this->LOD_);
-        if (this->debrisSmoke1_)
-            this->debrisSmoke1_->setDetailLevel(this->LOD_);
-
-        if (this->debrisFire2_)
-            this->debrisFire2_->setDetailLevel(this->LOD_);
-        if (this->debrisSmoke2_)
-            this->debrisSmoke2_->setDetailLevel(this->LOD_);
-
-        if (this->debrisFire3_)
-            this->debrisFire3_->setDetailLevel(this->LOD_);
-        if (this->debrisSmoke3_)
-            this->debrisSmoke3_->setDetailLevel(this->LOD_);
-
-        if (this->debrisFire4_)
-            this->debrisFire4_->setDetailLevel(this->LOD_);
-        if (this->debrisSmoke4_)
-            this->debrisSmoke4_->setDetailLevel(this->LOD_);
-    }
-
-    void BigExplosion::checkStop()
-    {
-        if (this->bStop_)
-            this->stop();
-    }
-
-    void BigExplosion::stop()
-    {
-        if (this->debrisFire1_)
-            this->debrisFire1_->setEnabled(false);
-        if (this->debrisSmoke1_)
-            this->debrisSmoke1_->setEnabled(false);
-
-        if (this->debrisFire2_)
-            this->debrisFire2_->setEnabled(false);
-        if (this->debrisSmoke2_)
-            this->debrisSmoke2_->setEnabled(false);
-
-        if (this->debrisFire3_)
-            this->debrisFire3_->setEnabled(false);
-        if (this->debrisSmoke3_)
-            this->debrisSmoke3_->setEnabled(false);
-
-        if (this->debrisFire4_)
-            this->debrisFire4_->setEnabled(false);
-        if (this->debrisSmoke4_)
-            this->debrisSmoke4_->setEnabled(false);
-
-        if (GameMode::isMaster())
-        {
-            this->bStop_ = true;
-            this->destroyTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&BigExplosion::destroy, this)));
-        }
-    }
-
-/* TODO
-
-    void BigExplosion::setDebrisMeshes()
-    {
-
-    }
-    void BigExplosion::getDebrisMeshes()
-    {
-
-    }
-*/
-}
Index: de/trunk/src/orxonox/worldentities/BigExplosion.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/BigExplosion.h	(revision 11051)
+++ 	(revision )
@@ -1,94 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Benjamin de Capitani
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _BigExplosion_H__
-#define _BigExplosion_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "tools/Timer.h"
-#include "MobileEntity.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport BigExplosion : public MobileEntity
-    {
-        public:
-            BigExplosion(Context* context);
-            virtual ~BigExplosion();
-
-            inline void setLOD(LODParticle::Value level)
-                { this->LOD_ = level; this->LODchanged(); }
-            inline LODParticle::Value getLOD() const
-                { return this->LOD_; }
-
-        private:
-            void registerVariables();
-
-            void LODchanged();
-            void checkStop();
-            void stop();
-            void init();
-            void initZero();
-
-
-            bool                  bStop_;
-
-            StaticEntity*         explosion_;
-
-            MovableEntity*        debrisEntity1_;
-            MovableEntity*        debrisEntity2_;
-            MovableEntity*        debrisEntity3_;
-            MovableEntity*        debrisEntity4_;
-
-            Model*                debris1_;
-            Model*                debris2_;
-            Model*                debris3_;
-            Model*                debris4_;
-
-
-
-            ParticleInterface*    debrisSmoke1_;
-            ParticleInterface*    debrisSmoke2_;
-            ParticleInterface*    debrisSmoke3_;
-            ParticleInterface*    debrisSmoke4_;
-
-            ParticleInterface*    debrisFire1_;
-            ParticleInterface*    debrisFire2_;
-            ParticleInterface*    debrisFire3_;
-            ParticleInterface*    debrisFire4_;
-
-            ParticleInterface*    explosionSmoke_;
-            ParticleInterface*    explosionFire_;
-
-            LODParticle::Value    LOD_;
-            Timer                 destroyTimer_;
-    };
-}
-
-#endif /* _BigExplosion_H__ */
Index: /code/trunk/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- /code/trunk/src/orxonox/worldentities/CMakeLists.txt	(revision 11051)
+++ /code/trunk/src/orxonox/worldentities/CMakeLists.txt	(revision 11052)
@@ -6,5 +6,4 @@
   ControllableEntity.cc
   Drone.cc
-  BigExplosion.cc
   EffectContainer.cc
   ExplosionChunk.cc
@@ -12,4 +11,6 @@
   SpawnPoint.cc
   TeamSpawnPoint.cc
+  ExplosionPart.cc
+  Actionpoint.cc
 )
 
Index: /code/trunk/src/orxonox/worldentities/ExplosionPart.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/ExplosionPart.cc	(revision 11052)
+++ /code/trunk/src/orxonox/worldentities/ExplosionPart.cc	(revision 11052)
@@ -0,0 +1,260 @@
+/*
+ *   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:
+ *      Vedat Aydin
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+
+#include "ExplosionPart.h"
+#include "core/XMLPort.h"
+
+
+namespace orxonox
+{
+
+    RegisterClass(ExplosionPart);
+
+    ExplosionPart::ExplosionPart(Context* context) : MovableEntity(context)
+    {
+        RegisterObject(ExplosionPart);
+        this->bStop_ = false;
+        this->LOD_ = LODParticle::Normal;
+        this->mesh_ = "";
+        this->effect1_ = "";
+        this->effect2_ = "";
+        this->model_= new Model(this->getContext());
+        this->effect1Particle_= NULL;
+        this->effect2Particle_= NULL;
+        this->explosionEntity_ = new MovableEntity(this->getContext());
+        this->posOffset_ = Vector3::ZERO;
+
+
+
+    }
+
+
+    ExplosionPart::~ExplosionPart()
+    {
+        if (this->isInitialized())
+        {
+            if (this->effect1Particle_)
+            {
+                this->model_->detachOgreObject(this->effect1Particle_->getParticleSystem());
+                delete this->effect1Particle_;
+            }
+            if (this->effect2Particle_)
+            {
+                this->model_->detachOgreObject(this->effect2Particle_->getParticleSystem());
+                delete this->effect2Particle_;
+            }
+        }
+    }
+
+
+    void ExplosionPart::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(ExplosionPart, XMLPort, xmlelement, mode);
+
+        XMLPortParam(ExplosionPart, "mesh", setMesh, getMesh, xmlelement, mode).defaultValues(""); //Define mesh file, that is going to fly out
+        XMLPortParam(ExplosionPart, "minspeed", setMinSpeed, getMinSpeed, xmlelement, mode).defaultValues(50); //Minimum velocity at which parts fly out
+        XMLPortParam(ExplosionPart, "maxspeed", setMaxSpeed, getMaxSpeed, xmlelement, mode).defaultValues(100); //Maximum velocity at which parts fly out, set both minspeed and maxspeed to 0 to have stationary effects
+        XMLPortParam(ExplosionPart, "effect1", setEffect1, getEffect1, xmlelement, mode).defaultValues(""); //particle effect 1
+        XMLPortParam(ExplosionPart, "effect2", setEffect2, getEffect2, xmlelement, mode).defaultValues(""); //particle effect 2
+        XMLPortParam(ExplosionPart, "offset", setOffset, getOffset, xmlelement, mode).defaultValues(Vector3::ZERO); //Offset of the position if you need to have an explosion off-center
+        XMLPortParam(ExplosionPart, "direction", setDirection, getDirection, xmlelement, mode).defaultValues(Vector3(1,1,1)); //general direction the parts fly in
+        XMLPortParam(ExplosionPart, "angle", setAngle, getAngle, xmlelement, mode).defaultValues(180); //defines a cone shape with direction "direction" and angle "angle" inside which the parts fly out of
+        XMLPortParam(ExplosionPart, "delay", setDelay, getDelay, xmlelement, mode).defaultValues(0); //delay to the explosion in seconds
+    }
+
+
+    void ExplosionPart::Explode()
+    {
+        this->destroyTimer_.setTimer(delay_, false, createExecutor(createFunctor(&ExplosionPart::ActuallyExplode, this)));
+    }
+
+    void ExplosionPart::stop()
+    {
+        if (this->effect1Particle_)
+            this->effect1Particle_->setEnabled(false);
+        if (this->effect2Particle_)
+            this->effect2Particle_->setEnabled(false);
+        if (this->model_)
+            this->model_->setVisible(false);
+
+        if (GameMode::isMaster())
+        {
+            this->bStop_ = true;
+            this->destroyTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&ExplosionPart::destroy, this)));
+        }
+    }
+
+    void ExplosionPart::ActuallyExplode()
+    {
+        this->model_->setVisible(true);
+
+        //this->explosionEntity_->setSyncMode(0);
+
+        //this->model_->setSyncMode(0);
+
+
+        if(effect1_ != "")
+        {
+            this->effect1Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect1_, this->LOD_);
+            this->effect1Particle_->setDimensions(this->getScale());
+            this->model_->attachOgreObject(this->effect1Particle_->getParticleSystem());
+        }
+
+        if(effect2_ != "")
+        {
+            this->effect2Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect2_, this->LOD_);
+            this->effect2Particle_->setDimensions(this->getScale());
+            this->model_->attachOgreObject(this->effect2Particle_->getParticleSystem());
+        }
+
+
+
+
+        Vector3 velocityOffset = direction_.perpendicular();
+        velocityOffset.normalise();
+        Degree offsetDirection = Degree(rnd(0,360));
+        velocityOffset = Quaternion(offsetDirection, direction_.normalisedCopy()) * velocityOffset;
+        velocityOffset.normalise();
+        direction_.normalise();
+
+        Vector3 finalDirection = direction_ + sin((rnd(0, angle_))*math::pi/180)*velocityOffset;
+
+        this->explosionEntity_->setVelocity(finalDirection*rnd(minSpeed_,maxSpeed_));
+        this->explosionEntity_->setAngularVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)).normalisedCopy() * Degree(400).valueRadians());
+        this->explosionEntity_->setScale(this->getScale() * 4);
+
+
+        this->explosionEntity_->attach(model_);
+
+
+        this->attach(explosionEntity_);
+
+        if (GameMode::isMaster())
+        {
+            this->destroyTimer_.setTimer(rnd(2, 4), false, createExecutor(createFunctor(&ExplosionPart::stop, this)));
+        }
+    }
+
+
+
+
+    void ExplosionPart::setMesh(const std::string& newString)
+    {
+        if(newString != "")
+        {
+            this->mesh_ = newString;
+            this->model_->setMeshSource(mesh_);
+            this->model_->setVisible(false);
+        }
+    }
+
+    void ExplosionPart::setEffect1(const std::string& newString)
+    {
+        this->effect1_ = newString;
+    }
+
+    void ExplosionPart::setEffect2(const std::string& newString)
+    {
+        this->effect2_ = newString;
+    }
+
+    void ExplosionPart::setMinSpeed(float speed)
+    {
+        this->minSpeed_ = speed;
+    }
+
+    void ExplosionPart::setMaxSpeed(float speed)
+    {
+        this->maxSpeed_ = speed;
+    }
+
+    void ExplosionPart::setOffset(Vector3 newVector)
+    {
+        this->posOffset_ = newVector;
+        this->explosionEntity_->setPosition(this->getPosition() + this->posOffset_ / this->getScale());
+    }
+
+    void ExplosionPart::setDirection(Vector3 newDirection)
+    {
+        this->direction_ = newDirection;
+    }
+
+    void ExplosionPart::setAngle(float newAngle)
+    {
+        this->angle_ = newAngle;
+    }
+
+    void ExplosionPart::setDelay(float newDelay)
+    {
+        this->delay_ = newDelay;
+    }
+
+    std::string& ExplosionPart::getMesh()
+    { return this->mesh_; }
+
+    std::string& ExplosionPart::getEffect1()
+    { return this->effect1_; }
+
+    std::string& ExplosionPart::getEffect2()
+    { return this->effect2_; }
+
+    float ExplosionPart::getMinSpeed()
+    {
+        return this->minSpeed_;
+    }
+
+    float ExplosionPart::getMaxSpeed()
+    {
+        return this->maxSpeed_;
+    }
+
+    Vector3 ExplosionPart::getOffset()
+    {
+        return this->posOffset_;
+    }
+
+    Vector3 ExplosionPart::getDirection()
+    {
+        return direction_;
+    }
+
+    float ExplosionPart::getAngle()
+    {
+        return angle_;
+    }
+
+    float ExplosionPart::getDelay()
+    {
+        return delay_;
+    }
+
+
+
+}
Index: /code/trunk/src/orxonox/worldentities/ExplosionPart.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/ExplosionPart.h	(revision 11052)
+++ /code/trunk/src/orxonox/worldentities/ExplosionPart.h	(revision 11052)
@@ -0,0 +1,108 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Vedat Aydin
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ExplosionPart_H__
+#define _ExplosionPart_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "graphics/Model.h"
+#include "tools/ParticleInterface.h"
+#include "MovableEntity.h"
+#include "graphics/ParticleSpawner.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "util/Exception.h"
+#include "core/command/Executor.h"
+#include "Scene.h"
+#include "tools/Timer.h"
+
+
+ namespace orxonox
+{
+    class _OrxonoxExport ExplosionPart : public MovableEntity
+    {
+        public:
+            ExplosionPart(Context* context);
+            ~ExplosionPart();
+            void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            void Explode();
+            void stop();
+            void ActuallyExplode();
+
+            void setMesh(const std::string& newString);
+            std::string& getMesh();
+            void setEffect1(const std::string& newString);
+            std::string& getEffect1();
+            void setEffect2(const std::string& newString);
+            std::string& getEffect2();
+            void setMinSpeed(float speed);
+            float getMinSpeed();
+            void setMaxSpeed(float speed);
+            float getMaxSpeed();
+            void setOffset(Vector3 newVector);
+            Vector3 getOffset();
+            void setDirection(Vector3 newDirection);
+            Vector3 getDirection();
+            void setAngle(float newAgnle);
+            float getAngle();
+            void setDelay(float newDelay);
+            float getDelay();
+         
+
+        private:
+
+            bool bStop_;
+            LODParticle::Value LOD_;
+
+
+            Model* model_;
+            ParticleInterface* effect1Particle_;
+            ParticleInterface* effect2Particle_;
+
+
+            float minSpeed_;
+            float maxSpeed_;
+            std::string mesh_;
+            std::string effect1_;
+            std::string effect2_;
+            Vector3 posOffset_;
+            Vector3 direction_;
+            float angle_;
+            float delay_;
+
+            MovableEntity* explosionEntity_;
+
+            Timer destroyTimer_;
+
+
+
+    };
+}
+
+#endif /* _ExplosionPart_H__ */
Index: /code/trunk/src/orxonox/worldentities/MobileEntity.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/MobileEntity.h	(revision 11051)
+++ /code/trunk/src/orxonox/worldentities/MobileEntity.h	(revision 11052)
@@ -47,4 +47,6 @@
         linear velocity. Then the linear velocity is multiplied by the time since the last call of tick and then added to the position. The same happens with
         the angular acceleration and velocity. With this procedure MobileEntities can change their position and orientation with time.
+
+        A MobileEntity can only have the collisition type WorldEntity::None, WorldEntity::Dynamic or WorldEntity::Kinematic. The collsion type WorldEntity::Static is illegal.
     */
 
Index: /code/trunk/src/orxonox/worldentities/SpawnPoint.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/SpawnPoint.h	(revision 11051)
+++ /code/trunk/src/orxonox/worldentities/SpawnPoint.h	(revision 11052)
@@ -55,5 +55,5 @@
                 { return this->template_; }
 
-            Pawn* spawn();
+            virtual Pawn* spawn();
             void spawn(ControllableEntity* entity);
 
Index: /code/trunk/src/orxonox/worldentities/StaticEntity.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/StaticEntity.h	(revision 11051)
+++ /code/trunk/src/orxonox/worldentities/StaticEntity.h	(revision 11052)
@@ -44,4 +44,6 @@
         it is called StaticEntity. It will keep the same position (always with respect to its parent) forever unless you call the
         function @see setPosition to changee it.
+
+        A StaticEntity can only have the collisition type WorldEntity::None or WorldEntity::Static. The collsion types WorldEntity::Dynamic and WorldEntity::Kinematic are illegal.
     */
 
Index: /code/trunk/src/orxonox/worldentities/TeamSpawnPoint.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/TeamSpawnPoint.cc	(revision 11051)
+++ /code/trunk/src/orxonox/worldentities/TeamSpawnPoint.cc	(revision 11052)
@@ -49,3 +49,9 @@
         XMLPortParam(TeamSpawnPoint, "team", setTeamNumber, getTeamNumber, xmlelement, mode).defaultValues(0);
     }
+    Pawn* TeamSpawnPoint::spawn()
+    {
+        Pawn* entity = SpawnPoint::spawn();
+        static_cast<ControllableEntity*>(entity)->setTeam (this->teamNumber_);
+        return entity;
+    }
 }
Index: /code/trunk/src/orxonox/worldentities/TeamSpawnPoint.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/TeamSpawnPoint.h	(revision 11051)
+++ /code/trunk/src/orxonox/worldentities/TeamSpawnPoint.h	(revision 11052)
@@ -49,7 +49,8 @@
             unsigned int getTeamNumber() const
                 { return this->teamNumber_; }
+            virtual Pawn* spawn();
 
         private:
-            unsigned int teamNumber_;
+            int teamNumber_;
     };
 }
Index: /code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 11051)
+++ /code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 11052)
@@ -34,4 +34,5 @@
 #include "core/GameMode.h"
 #include "core/XMLPort.h"
+#include "core/EventIncludes.h"
 #include "network/NetworkFunction.h"
 
@@ -41,9 +42,10 @@
 #include "graphics/ParticleSpawner.h"
 #include "worldentities/ExplosionChunk.h"
-#include "worldentities/BigExplosion.h"
+#include "worldentities/ExplosionPart.h"
 #include "weaponsystem/WeaponSystem.h"
 #include "weaponsystem/WeaponSlot.h"
 #include "weaponsystem/WeaponPack.h"
 #include "weaponsystem/WeaponSet.h"
+#include "weaponsystem/Munition.h"
 #include "sound/WorldSound.h"
 
@@ -61,5 +63,5 @@
 
         this->bAlive_ = true;
-        this->bReload_ = false;
+        this->bVulnerable_ = true;
 
         this->health_ = 0;
@@ -71,8 +73,7 @@
         this->maxShieldHealth_ = 100; //otherwise shield might increase to float_max
         this->shieldAbsorption_ = 0.5;
-
-        this->reloadRate_ = 0;
-        this->reloadWaitTime_ = 1.0f;
-        this->reloadWaitCountdown_ = 0;
+        this->shieldRechargeRate_ = 0;
+        this->shieldRechargeWaitTime_ = 1.0f;
+        this->shieldRechargeWaitCountdown_ = 0;
 
         this->lastHitOriginator_ = 0;
@@ -84,4 +85,6 @@
 
         this->aimPosition_ = Vector3::ZERO;
+
+        //this->explosionPartList_ = NULL;
 
         if (GameMode::isMaster())
@@ -135,14 +138,18 @@
         XMLPortParam(Pawn, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode).defaultValues(0);
 
+        XMLPortParam(Pawn, "vulnerable", setVulnerable, isVulnerable, xmlelement, mode).defaultValues(true);
+
         XMLPortParam(Pawn, "spawnparticlesource", setSpawnParticleSource, getSpawnParticleSource, xmlelement, mode);
         XMLPortParam(Pawn, "spawnparticleduration", setSpawnParticleDuration, getSpawnParticleDuration, xmlelement, mode).defaultValues(3.0f);
-        XMLPortParam(Pawn, "explosionchunks", setExplosionChunks, getExplosionChunks, xmlelement, mode).defaultValues(7);
+        XMLPortParam(Pawn, "explosionchunks", setExplosionChunks, getExplosionChunks, xmlelement, mode).defaultValues(0);
 
         XMLPortObject(Pawn, WeaponSlot, "weaponslots", addWeaponSlot, getWeaponSlot, xmlelement, mode);
         XMLPortObject(Pawn, WeaponSet, "weaponsets", addWeaponSet, getWeaponSet, xmlelement, mode);
-        XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode);
-
-        XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
-        XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
+        XMLPortObject(Pawn, WeaponPack, "weaponpacks", addWeaponPackXML, getWeaponPack, xmlelement, mode);
+        XMLPortObject(Pawn, Munition, "munition", addMunitionXML, getMunitionXML, xmlelement, mode);
+
+        XMLPortObject(Pawn, ExplosionPart, "explosion", addExplosionPart, getExplosionPart, xmlelement, mode);
+        XMLPortParam(Pawn, "shieldrechargerate", setShieldRechargeRate, getShieldRechargeRate, xmlelement, mode).defaultValues(0);
+        XMLPortParam(Pawn, "shieldrechargewaittime", setShieldRechargeWaitTime, getShieldRechargeWaitTime, xmlelement, mode).defaultValues(1.0f);
 
         XMLPortParam(Pawn, "explosionSound",  setExplosionSound,  getExplosionSound,  xmlelement, mode);
@@ -151,31 +158,37 @@
     }
 
+    void Pawn::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Pawn, XMLEventPort, xmlelement, mode);
+
+        XMLPortEventState(Pawn, BaseObject, "vulnerability", setVulnerable, xmlelement, mode);
+    }
+
     void Pawn::registerVariables()
     {
-        registerVariable(this->bAlive_,           VariableDirection::ToClient);
-        registerVariable(this->health_,           VariableDirection::ToClient);
-        registerVariable(this->maxHealth_,        VariableDirection::ToClient);
-        registerVariable(this->shieldHealth_,     VariableDirection::ToClient);
-        registerVariable(this->maxShieldHealth_,  VariableDirection::ToClient);
-        registerVariable(this->shieldAbsorption_, VariableDirection::ToClient);
-        registerVariable(this->bReload_,          VariableDirection::ToServer);
-        registerVariable(this->aimPosition_,      VariableDirection::ToServer);  // For the moment this variable gets only transfered to the server
+        registerVariable(this->bAlive_,            VariableDirection::ToClient);
+        registerVariable(this->health_,            VariableDirection::ToClient);
+        registerVariable(this->maxHealth_,         VariableDirection::ToClient);
+        registerVariable(this->shieldHealth_,      VariableDirection::ToClient);
+        registerVariable(this->maxShieldHealth_,   VariableDirection::ToClient);
+        registerVariable(this->shieldAbsorption_,  VariableDirection::ToClient);
+        registerVariable(this->aimPosition_,       VariableDirection::ToServer);  // For the moment this variable gets only transfered to the server
     }
 
     void Pawn::tick(float dt)
     {
+        //BigExplosion* chunk = new BigExplosion(this->getContext());
         SUPER(Pawn, tick, dt);
 
-        this->bReload_ = false;
-
+        // Recharge the shield
         // TODO: use the existing timer functions instead
-        if(this->reloadWaitCountdown_ > 0)
-        {
-            this->decreaseReloadCountdownTime(dt);
-        }
-        else
-        {
-            this->addShieldHealth(this->getReloadRate() * dt);
-            this->resetReloadCountdown();
+        if(this->shieldRechargeWaitCountdown_ > 0)
+        {
+            this->decreaseShieldRechargeCountdownTime(dt);
+        }
+        else
+        {
+            this->addShieldHealth(this->getShieldRechargeRate() * dt);
+            this->resetShieldRechargeCountdown();
         }
 
@@ -229,21 +242,32 @@
     }
 
-    void Pawn::setReloadRate(float reloadrate)
-    {
-        this->reloadRate_ = reloadrate;
-    }
-
-    void Pawn::setReloadWaitTime(float reloadwaittime)
-    {
-        this->reloadWaitTime_ = reloadwaittime;
-    }
-
-    void Pawn::decreaseReloadCountdownTime(float dt)
-    {
-        this->reloadWaitCountdown_ -= dt;
+    void Pawn::setShieldRechargeRate(float shieldRechargeRate)
+    {
+        this->shieldRechargeRate_ = shieldRechargeRate;
+    }
+
+    void Pawn::setShieldRechargeWaitTime(float shieldRechargeWaitTime)
+    {
+        this->shieldRechargeWaitTime_ = shieldRechargeWaitTime;
+    }
+
+    void Pawn::decreaseShieldRechargeCountdownTime(float dt)
+    {
+        this->shieldRechargeWaitCountdown_ -= dt;
+    }
+
+    void Pawn::changedVulnerability()
+    {
+
     }
 
     void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
     {
+        // A pawn can only get damaged if it is vulnerable
+        if (!isVulnerable())
+        {
+            return;
+        }
+
         // Applies multiplier given by the DamageBoost Pickup.
         if (originator)
@@ -252,4 +276,8 @@
         if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
         {
+            // Health-damage cannot be absorbed by shields.
+            // Shield-damage only reduces shield health. 
+            // Normal damage can be (partially) absorbed by shields.
+
             if (shielddamage >= this->getShieldHealth())
             {
@@ -366,5 +394,4 @@
             if (GameMode::isMaster())
             {
-                this->deatheffect();
                 this->goWithStyle();
             }
@@ -373,99 +400,25 @@
     void Pawn::goWithStyle()
     {
+
         this->bAlive_ = false;
         this->setDestroyWhenPlayerLeft(false);
 
-        BigExplosion* chunk = new BigExplosion(this->getContext());
-        chunk->setPosition(this->getPosition());
-        chunk->setVelocity(this->getVelocity());
+        while(!explosionPartList_.empty())
+        {
+            explosionPartList_.back()->setPosition(this->getPosition());
+            explosionPartList_.back()->setVelocity(this->getVelocity());
+            explosionPartList_.back()->setOrientation(this->getOrientation());
+            explosionPartList_.back()->Explode();
+            explosionPartList_.pop_back();
+        }
+
+        for (unsigned int i = 0; i < this->numexplosionchunks_; ++i)
+        {
+            ExplosionChunk* chunk = new ExplosionChunk(this->getContext());
+            chunk->setPosition(this->getPosition());
+        }
 
         this->explosionSound_->setPosition(this->getPosition());
         this->explosionSound_->play();
-    }
-    void Pawn::deatheffect()
-    {
-        // play death effect
-        /*{
-            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
-            effect->setPosition(this->getPosition());
-            effect->setOrientation(this->getOrientation());
-            effect->setDestroyAfterLife(true);
-            effect->setSource("Orxonox/explosion2b");
-            effect->setLifetime(4.0f);
-        }
-        {
-            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
-            effect->setPosition(this->getPosition());
-            effect->setOrientation(this->getOrientation());
-            effect->setDestroyAfterLife(true);
-            effect->setSource("Orxonox/smoke6");
-            effect->setLifetime(4.0f);
-        }
-        {
-            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
-            effect->setPosition(this->getPosition());
-            effect->setOrientation(this->getOrientation());
-            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());
-            chunk->setPosition(this->getPosition());
-        }
     }
 
@@ -474,13 +427,9 @@
         Check whether the Pawn has a @ref Orxonox::WeaponSystem and fire it with the specified firemode if it has one.
     */
+
     void Pawn::fired(unsigned int firemode)
     {
         if (this->weaponSystem_)
             this->weaponSystem_->fire(firemode);
-    }
-
-    void Pawn::reload()
-    {
-        this->bReload_ = true;
     }
 
@@ -491,4 +440,14 @@
             this->spawneffect();
     }
+
+
+    void Pawn::addExplosionPart(ExplosionPart* ePart)
+    {this->explosionPartList_.push_back(ePart);}
+
+
+    ExplosionPart * Pawn::getExplosionPart()
+    {return this->explosionPartList_.back();}
+
+
 
     /* WeaponSystem:
@@ -554,8 +513,39 @@
     }
 
+    std::vector<WeaponPack *> * Pawn::getAllWeaponPacks()
+    {
+        if (this->weaponSystem_)
+            return this->weaponSystem_->getAllWeaponPacks();
+        else
+            return 0;        
+    }
+
+    void Pawn::addMunitionXML(Munition* munition)
+    {
+        if (this->weaponSystem_ && munition)
+        {
+            this->weaponSystem_->addMunition(munition);
+        }
+    }
+
+    Munition* Pawn::getMunitionXML() const
+    {
+        return NULL;
+    }
+
+    Munition* Pawn::getMunition(SubclassIdentifier<Munition> * identifier)
+    {
+        if (weaponSystem_)
+        {
+            return weaponSystem_->getMunition(identifier);
+        }
+
+        return NULL;
+    }
+
     //Tell the Map (RadarViewable), if this is a playership
     void Pawn::startLocalHumanControl()
     {
-//        SUPER(ControllableEntity, changedPlayer());
+//        SUPER(ControllableEntity, startLocalHumanControl());
         ControllableEntity::startLocalHumanControl();
         this->isHumanShip_ = true;
Index: /code/trunk/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 11051)
+++ /code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 11052)
@@ -33,7 +33,9 @@
 
 #include <string>
+#include <vector>
 #include "interfaces/PickupCarrier.h"
 #include "interfaces/RadarViewable.h"
 #include "worldentities/ControllableEntity.h"
+#include "worldentities/ExplosionPart.h"
 
 
@@ -42,9 +44,9 @@
     /**
     @brief
-        Everything in Orxonoy that has a health attribute is a Pawn. After a Pawn is spawned its health is set to
+        Everything in Orxonox that has a health attribute is a Pawn. After a Pawn is spawned its health is set to
         its initial health. In every call of the Pawns tick function the game checks whether the pawns health is at
         or below zero. If it is, the pawn gets killed.
 
-        Pawns can carry pickups and fire weapons. The can also have shields.
+        Pawns can carry pickups and fire weapons. They can also have shields.
 
         Notice that every Pawn is a ControllableEntity.
@@ -62,4 +64,5 @@
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
             virtual void tick(float dt);
 
@@ -116,26 +119,37 @@
                 { return this->shieldAbsorption_; }
 
-            // TODO: Rename to shieldRechargeRate
-            virtual void setReloadRate(float reloadrate);
-            inline float getReloadRate() const
-                { return this->reloadRate_; }
-
-            virtual void setReloadWaitTime(float reloadwaittime);
-            inline float getReloadWaitTime() const
-                { return this->reloadWaitTime_; }
-
-            inline void resetReloadCountdown()
-                { this->reloadWaitCountdown_ = 0; }
-
-            inline void startReloadCountdown()
-                { this->reloadWaitCountdown_ = this->getReloadWaitTime(); } // TODO: Implement in Projectile.cc
-
-            virtual void decreaseReloadCountdownTime(float dt);
+            virtual void setShieldRechargeRate(float shieldRechargeRate);
+            inline float getShieldRechargeRate() const
+                { return this->shieldRechargeRate_; }
+
+            virtual void setShieldRechargeWaitTime(float shieldRechargeWaitTime);
+            inline float getShieldRechargeWaitTime() const
+                { return this->shieldRechargeWaitTime_; }
+
+            inline void resetShieldRechargeCountdown()
+                { this->shieldRechargeWaitCountdown_ = 0; }
+
+            inline void startShieldRechargeCountdown()
+                { this->shieldRechargeWaitCountdown_ = this->getShieldRechargeWaitTime(); } // TODO: Implement in Projectile.cc
+
+            virtual void decreaseShieldRechargeCountdownTime(float dt);
+
+            /** @brief Sets the state of the pawns vulnerability. @param bVulnerable */
+            inline void setVulnerable(bool bVulnerable)
+            {
+                if (this->bVulnerable_ != bVulnerable)
+                {
+                    this->bVulnerable_ = bVulnerable;
+                    this->changedVulnerability();
+                }
+            }
+            /** @brief Returns the state of the pawns vulnerability. @return The state of the vulnerability */
+            inline const bool& isVulnerable() const { return this->bVulnerable_; }
+            /** @brief This function gets called if the vulnerability of the pawn changes. */
+            virtual void changedVulnerability();
 
             inline ControllableEntity* getLastHitOriginator() const
                 { return this->lastHitOriginator_; }
 
-            //virtual void hit(Pawn* originator, const Vector3& force, float damage);
-            //virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage);
             virtual void hit(Pawn* originator, const Vector3& force, const btCollisionShape* cs, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
             virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, const btCollisionShape* cs, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
@@ -144,6 +158,8 @@
 
             virtual void fired(unsigned int firemode);
-            virtual void reload();
             virtual void postSpawn();
+
+            void addExplosionPart(ExplosionPart* ePart);
+            ExplosionPart * getExplosionPart();
 
             void addWeaponSlot(WeaponSlot * wSlot);
@@ -154,4 +170,10 @@
             void addWeaponPackXML(WeaponPack * wPack);
             WeaponPack * getWeaponPack(unsigned int index) const;
+            std::vector<WeaponPack *> * getAllWeaponPacks();
+
+            void addMunitionXML(Munition* munition);
+            Munition* getMunitionXML() const;
+            
+            Munition* getMunition(SubclassIdentifier<Munition> * identifier);
 
             virtual void addedWeaponPack(WeaponPack* wPack) {}
@@ -194,4 +216,7 @@
             const std::string& getExplosionSound();
 
+            virtual const WeaponSystem* getWeaponSystem() const
+                { return this->weaponSystem_; }
+
         protected:
             virtual void preDestroy();
@@ -204,11 +229,10 @@
             virtual Controller* getSlave();
             virtual void goWithStyle();
-            virtual void deatheffect();
             virtual void spawneffect();
 
-            //virtual void damage(float damage, Pawn* originator = 0);
             virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL, const btCollisionShape* cs = NULL);
 
             bool bAlive_;
+            bool bVulnerable_; ///< If false the pawn may not ged damaged
 
             virtual std::vector<PickupCarrier*>* getCarrierChildren(void) const
@@ -226,7 +250,7 @@
             float initialShieldHealth_;
             float shieldAbsorption_; ///< Has to be between 0 and 1
-            float reloadRate_;
-            float reloadWaitTime_;
-            float reloadWaitCountdown_;
+            float shieldRechargeRate_;
+            float shieldRechargeWaitTime_;
+            float shieldRechargeWaitCountdown_;
 
             float damageMultiplier_; ///< Used by the Damage Boost Pickup.
@@ -235,9 +259,10 @@
 
             WeaponSystem* weaponSystem_;
-            bool bReload_;
 
             std::string spawnparticlesource_;
             float spawnparticleduration_;
             unsigned int numexplosionchunks_;
+
+            std::vector<ExplosionPart*> explosionPartList_;
 
         private:
Index: /code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 11051)
+++ /code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 11052)
@@ -115,4 +115,6 @@
 
         XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode);
+
+        
     }
 
@@ -297,4 +299,22 @@
         }
     }
+
+    void SpaceShip::gainBoostPower(float gainedBoostPower)
+    {
+        this->boostPower_ += gainedBoostPower;
+        
+        if (this->boostPower_ > this->initialBoostPower_)
+        {
+            this->boostPower_ = this->initialBoostPower_;
+        }
+
+        // If the booster is in cooldown mode and we gained boost power, the abort the cooldown.
+        if (this->isBoostCoolingDown() && this->boostPower_ > 0.0f)
+        {
+            timer_.stopTimer();
+            this->boostCooledDown();
+        }
+    }
+
     /**
     @brief
Index: /code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- /code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 11051)
+++ /code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 11052)
@@ -53,5 +53,7 @@
         - The <b>boost</b>, there are quite some parameters pertaining to boosting. The boost is a special move of the SpaceShip, where, for a limited amount of time, it can fly considerably faster than usual. The <b>boostPower</b> is the amount of power available for boosting. The <b>boostPowerRate</b> is the rate at which the boost power is replenished. The <b>boostRate</b> is the rate at which boosting uses power. And the <b>boostCooldownDuration</b> is the time the SpaceShip cannot boost, once all the boost power has been used up. Naturally all of these parameters must be non-negative.
         - The <b>boost shaking</b>, when the SpaceShip boosts, the camera shakes to create a more immersive effect. Two parameters can be used to adjust the effect. The <b>shakeFrequency</b> is the frequency with which the camera shakes. And the <b>shakeAmplitude</b> is the amount with which the camera shakes. Again these parameters must bee non-negative.
-        - The <b>lift</b> creates a more natural flight feeling through the addition of a lift force. There are again tow parameters that can be specified. The <b>lift</b> which is the lift force that is applied. And the <b>stallSpeed</b> which is the forward speed after which no more lift is generated.
+        - The <b>lift</b> creates a more natural flight feeling through the addition of a lift force. There are again two parameters that can be specified. The <b>lift</b> which is the lift force that is applied. And the <b>stallSpeed</b> which is the forward speed after which no more lift is generated.
+
+        A spaceship always needs to have the collision type "dynamic". Other collision types are illegal.
 
         As mentioned @ref orxonox::Engine Engines can be mounted on the SpaceShip. Here is a (primitive) example of a SpaceShip defined in XML:
@@ -250,4 +252,9 @@
             inline float getShakeAmplitude() const
                 { return this->shakeAmplitude_; }
+            /**
+            @brief Add boost power. Is non-negative.
+            @return Returns the current boost power.
+            */
+            void gainBoostPower(float gainedBoostPower);
 
         protected:
@@ -262,5 +269,5 @@
             bool bBoostCooldown_;         //!< Whether the SpaceShip is currently in boost cooldown, during which boosting is impossible.
             float initialBoostPower_;     //!< The initial (and maximal) boost power.
-            float boostPower_;            //!< The current boost power.
+            float boostPower_;            //!< The current boost power. If the boost power is reduced to zero the boost cooldown will start.
             float boostPowerRate_;        //!< The rate at which the boost power is recharged.
             float boostRate_;             //!< The rate at which boost power is used up.
@@ -289,5 +296,5 @@
             std::vector<Engine*> engineList_; //!< The list of all Engines mounted on this SpaceShip.
 
-            Timer timer_;                          //!< Timer for the cooldown duration.
+            Timer timer_;                          //!< Timer for the cooldown of the boost.
             float shakeDt_;                        //!< Temporary variable for the shaking of the camera.
             Vector3 cameraOriginalPosition_;       //!< The original position of the camera before shaking it.
Index: /code/trunk/test/core/class/IdentifierNestedClassHierarchyTest.cc
===================================================================
--- /code/trunk/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 11051)
+++ /code/trunk/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 11052)
Index: /code/trunk/test/util/MathTest.cc
===================================================================
--- /code/trunk/test/util/MathTest.cc	(revision 11051)
+++ /code/trunk/test/util/MathTest.cc	(revision 11052)
@@ -337,5 +337,5 @@
     getAngle
     get2DViewdirection
-    get2DViewcoordinates
+    get2DViewCoordinates
     getPredictedPosition
 */
