[Orxonox-commit 4601] r9272 - in code/branches/presentation2012merge: data/gui/layouts data/gui/scripts data/levels data/levels/includes data/levels/old data/levels/templates data/overlays src/modules/gametypes src/modules/pickup/items src/modules/towerdefense src/orxonox src/orxonox/controllers src/orxonox/gametypes src/orxonox/infos src/orxonox/interfaces src/orxonox/worldentities src/orxonox/worldentities/pawns
landauf at orxonox.net
landauf at orxonox.net
Sun Jun 3 18:05:25 CEST 2012
Author: landauf
Date: 2012-06-03 18:05:24 +0200 (Sun, 03 Jun 2012)
New Revision: 9272
Modified:
code/branches/presentation2012merge/data/gui/layouts/GUILayout.xsd
code/branches/presentation2012merge/data/gui/layouts/InGamePickupHUD.layout
code/branches/presentation2012merge/data/gui/layouts/ShipSelectionMenu.layout
code/branches/presentation2012merge/data/gui/scripts/ShipSelectionMenu.lua
code/branches/presentation2012merge/data/gui/scripts/SingleplayerMenu.lua
code/branches/presentation2012merge/data/levels/Spacerace2.oxw
code/branches/presentation2012merge/data/levels/SurfaceRacePresentation.oxw
code/branches/presentation2012merge/data/levels/asteroidField.oxw
code/branches/presentation2012merge/data/levels/dynamicMatch.oxw
code/branches/presentation2012merge/data/levels/includes/CuboidSpaceStation.lua
code/branches/presentation2012merge/data/levels/includes/asteroidField.lua
code/branches/presentation2012merge/data/levels/includes/weaponSettingsFPS.oxi
code/branches/presentation2012merge/data/levels/lastManStanding.oxw
code/branches/presentation2012merge/data/levels/lastTeamStanding.oxw
code/branches/presentation2012merge/data/levels/old/CuboidSpaceStation.oxw
code/branches/presentation2012merge/data/levels/presentationFS10Ed.oxw
code/branches/presentation2012merge/data/levels/presentationHS11.oxw
code/branches/presentation2012merge/data/levels/surfaceRace.oxw
code/branches/presentation2012merge/data/levels/templates/FPS.oxt
code/branches/presentation2012merge/data/levels/templates/tower.oxt
code/branches/presentation2012merge/data/levels/testStars.oxw
code/branches/presentation2012merge/data/levels/towerDefense.oxw
code/branches/presentation2012merge/data/overlays/towerdefenseHUD.oxo
code/branches/presentation2012merge/src/modules/gametypes/SpaceRaceManager.cc
code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc
code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h
code/branches/presentation2012merge/src/modules/towerdefense/CMakeLists.txt
code/branches/presentation2012merge/src/modules/towerdefense/TDEnemy.h
code/branches/presentation2012merge/src/modules/towerdefense/Tower.cc
code/branches/presentation2012merge/src/modules/towerdefense/Tower.h
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.cc
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.h
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.h
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.cc
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.h
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.cc
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.h
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePrereqs.h
code/branches/presentation2012merge/src/orxonox/LevelInfo.h
code/branches/presentation2012merge/src/orxonox/ShipManager.cc
code/branches/presentation2012merge/src/orxonox/controllers/FormationController.cc
code/branches/presentation2012merge/src/orxonox/gametypes/Mission.cc
code/branches/presentation2012merge/src/orxonox/infos/PlayerInfo.cc
code/branches/presentation2012merge/src/orxonox/interfaces/RadarViewable.h
code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.cc
code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.h
code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.cc
code/branches/presentation2012merge/src/orxonox/worldentities/pawns/SpaceShip.cc
Log:
replaced tabs with spaces (no code changed)
Modified: code/branches/presentation2012merge/data/gui/layouts/GUILayout.xsd
===================================================================
--- code/branches/presentation2012merge/data/gui/layouts/GUILayout.xsd 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/gui/layouts/GUILayout.xsd 2012-06-03 16:05:24 UTC (rev 9272)
@@ -1,63 +1,63 @@
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
- <xsd:element name="GUILayout" type="GUILayoutType"/>
-
- <xsd:complexType name="GUILayoutType">
- <xsd:sequence>
- <xsd:element name="Window" type="WindowType" />
- </xsd:sequence>
- <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
- </xsd:complexType>
-
- <xsd:complexType name="WindowType">
- <xsd:sequence>
- <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" />
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="Window" type="WindowType" />
- <xsd:element name="AutoWindow" type="AutoWindowType" />
- </xsd:choice>
- <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="Type" type="xsd:string" use="required"/>
- <xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
- </xsd:complexType>
+ <xsd:element name="GUILayout" type="GUILayoutType"/>
- <xsd:complexType name="AutoWindowType">
- <xsd:sequence>
- <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
- <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" />
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="Window" type="WindowType" />
- <xsd:element name="AutoWindow" type="AutoWindowType" />
- </xsd:choice>
- <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
- </xsd:complexType>
+ <xsd:complexType name="GUILayoutType">
+ <xsd:sequence>
+ <xsd:element name="Window" type="WindowType" />
+ </xsd:sequence>
+ <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
+ </xsd:complexType>
- <xsd:complexType name="PropertyType">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="Name" type="xsd:string" use="required"/>
- <xsd:attribute name="Value" type="xsd:string" use="optional"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
+ <xsd:complexType name="WindowType">
+ <xsd:sequence>
+ <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="Window" type="WindowType" />
+ <xsd:element name="AutoWindow" type="AutoWindowType" />
+ </xsd:choice>
+ <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="Type" type="xsd:string" use="required"/>
+ <xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
+ </xsd:complexType>
- <xsd:complexType name="LayoutImportType">
- <xsd:attribute name="Filename" type="xsd:string" use="required"/>
- <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
- <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" />
- </xsd:complexType>
+ <xsd:complexType name="AutoWindowType">
+ <xsd:sequence>
+ <xsd:element name="LayoutImport" type="LayoutImportType" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="Event" type="EventType" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="Window" type="WindowType" />
+ <xsd:element name="AutoWindow" type="AutoWindowType" />
+ </xsd:choice>
+ <xsd:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
+ </xsd:complexType>
- <xsd:complexType name="EventType">
- <xsd:attribute name="Name" type="xsd:string" use="required"/>
- <xsd:attribute name="Function" type="xsd:string" use="required"/>
- </xsd:complexType>
+ <xsd:complexType name="PropertyType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="Name" type="xsd:string" use="required"/>
+ <xsd:attribute name="Value" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="LayoutImportType">
+ <xsd:attribute name="Filename" type="xsd:string" use="required"/>
+ <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
+ <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional" default="" />
+ </xsd:complexType>
+
+ <xsd:complexType name="EventType">
+ <xsd:attribute name="Name" type="xsd:string" use="required"/>
+ <xsd:attribute name="Function" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
</xsd:schema>
Modified: code/branches/presentation2012merge/data/gui/layouts/InGamePickupHUD.layout
===================================================================
--- code/branches/presentation2012merge/data/gui/layouts/InGamePickupHUD.layout 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/gui/layouts/InGamePickupHUD.layout 2012-06-03 16:05:24 UTC (rev 9272)
@@ -1,53 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout>
- <Window Type="DefaultWindow" Name="orxonox/InGamePickupHUD_RootWindow" >
- <Property Name="InheritsAlpha" Value="False" />
- <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
- <Window Type="TaharezLook/StaticImage" Name="orxonox/InGamePickupHUD_Overview" >
- <Property Name="Font" Value="BlueHighway-12" />
- <Property Name="Text" Value="Pickup List" />
- <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0,5},{0.15,0},{0.2,0},{0.45,0}}" />
- <Property Name="Alpha" Value="0.3" />
- <!--Event Name="Clicked" Function="InGameMenu.button_return_clicked"/-->
- <Window Type="TaharezLook/StaticText" Name="orxonox/InGamePickupHUD_PickupTitle" >
- <Property Name="Alpha" Value="0.8"/>
- <Property Name="Text" Value="Pickup List" />
- <Property Name="Font" Value="BlueHighway-10" />
- <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,-20},{0,20}}" />
- </Window>
- <Window Type="TaharezLook/Button" Name="orxonox/InGamePickupHUD_closeButton" >
- <Property Name="Alpha" Value="0.8" />
- <Property Name="Font" Value="BlueHighway-12" />
- <Property Name="Text" Value="X" />
- <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{1,-20},{0,0},{1,0},{0,20}}" />
- <!-- alle Grössen / anordnungen angepasst - da überschneidungen von absoluten
- und relativen Positionsangaben (problematisch bei kleinen auflösungen) -->
- <Event Name="Clicked" Function="InGamePickupHUD.close_button_clicked"/>
- </Window>
- <Window Type="TaharezLook/Listbox" Name="orxonox/InGamePickupHUD_PickupListBox">
- <Property Name="Alpha" Value="0.8" />
- <Property Name="Font" Value="BlueHighway-12" />
- <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0,5},{0,25},{1,-5},{1,-5}}" />
- <!--
- <Window Type="TaharezLook/ListboxItem" Name="orxonox/InGamePickupHUD_TestPickupOne">
- <Property Name="Alpha" Value="0.8" />
- <Property Name="Font" Value="BlueHighway-12" />
- <Property Name="Text" Value="First Pickup" />
- <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,30},{1,0}}" />
- </Window>
- -->
- </Window>
-
- </Window>
-
-
- </Window>
-
+ <Window Type="DefaultWindow" Name="orxonox/InGamePickupHUD_RootWindow" >
+ <Property Name="InheritsAlpha" Value="False" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+ <Window Type="TaharezLook/StaticImage" Name="orxonox/InGamePickupHUD_Overview" >
+ <Property Name="Font" Value="BlueHighway-12" />
+ <Property Name="Text" Value="Pickup List" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0,5},{0.15,0},{0.2,0},{0.45,0}}" />
+ <Property Name="Alpha" Value="0.3" />
+ <!--Event Name="Clicked" Function="InGameMenu.button_return_clicked"/-->
+ <Window Type="TaharezLook/StaticText" Name="orxonox/InGamePickupHUD_PickupTitle" >
+ <Property Name="Alpha" Value="0.8"/>
+ <Property Name="Text" Value="Pickup List" />
+ <Property Name="Font" Value="BlueHighway-10" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,-20},{0,20}}" />
+ </Window>
+ <Window Type="TaharezLook/Button" Name="orxonox/InGamePickupHUD_closeButton" >
+ <Property Name="Alpha" Value="0.8" />
+ <Property Name="Font" Value="BlueHighway-12" />
+ <Property Name="Text" Value="X" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{1,-20},{0,0},{1,0},{0,20}}" />
+ <!-- alle Grössen / anordnungen angepasst - da überschneidungen von absoluten
+ und relativen Positionsangaben (problematisch bei kleinen auflösungen) -->
+ <Event Name="Clicked" Function="InGamePickupHUD.close_button_clicked"/>
+ </Window>
+ <Window Type="TaharezLook/Listbox" Name="orxonox/InGamePickupHUD_PickupListBox">
+ <Property Name="Alpha" Value="0.8" />
+ <Property Name="Font" Value="BlueHighway-12" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0,5},{0,25},{1,-5},{1,-5}}" />
+ <!--
+ <Window Type="TaharezLook/ListboxItem" Name="orxonox/InGamePickupHUD_TestPickupOne">
+ <Property Name="Alpha" Value="0.8" />
+ <Property Name="Font" Value="BlueHighway-12" />
+ <Property Name="Text" Value="First Pickup" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,30},{1,0}}" />
+ </Window>
+ -->
+ </Window>
+ </Window>
+ </Window>
</GUILayout>
Modified: code/branches/presentation2012merge/data/gui/layouts/ShipSelectionMenu.layout
===================================================================
--- code/branches/presentation2012merge/data/gui/layouts/ShipSelectionMenu.layout 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/gui/layouts/ShipSelectionMenu.layout 2012-06-03 16:05:24 UTC (rev 9272)
@@ -8,7 +8,7 @@
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Property Name="BackgroundEnabled" Value="False" />
- <!-- -->
+ <!-- -->
<Window Type="MenuWidgets/StaticText" Name="orxonox/ShipSelectionWindow" >
<Property Name="Text" Value="ShipSelection" />
<Property Name="Alpha" Value="0.8" />
@@ -16,17 +16,17 @@
<Property Name="HorzFormatting" Value="HorzCentred" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="VertFormatting" Value="TopAligned" />
- <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.15,0},{0.8,0},{0.7,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.15,0},{0.8,0},{0.7,0}}" />
<Window Type="MenuWidgets/TabControl" Name="orxonox/ShipSelectionTabControl" >
<Property Name="TabHeight" Value="{0,26.4388}" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="TabPanePosition" Value="Top" />
- <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1,0},{0.95,0},{0.925,0}}" />
-
- </Window>
-
- <!-- TODO: Ship Description and Image
- <Window Type="MenuWidgets/StaticImage" Name="orxonox/ShipSelectionShipImage" >
+ <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1,0},{0.95,0},{0.925,0}}" />
+
+ </Window>
+
+ <!-- TODO: Ship Description and Image
+ <Window Type="MenuWidgets/StaticImage" Name="orxonox/ShipSelectionShipImage" >
<Property Name="AlwaysOnTop" Value="True" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.55,0},{0.25,0},{0.9,0},{0.675,0}}" />
@@ -37,8 +37,8 @@
<Property Name="VertScrollbar" Value="True" />
<Property Name="HorzScrollbar" Value="True" />
<Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.725,0},{0.9,0},{0.875,0}}" />
- </Window>-->
-
+ </Window>-->
+
</Window>
<Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionStartButton" >
<Property Name="Text" Value="Start" />
@@ -47,13 +47,13 @@
<Event Name="Clicked" Function="ShipSelectionMenu.ShipSelectionStartButton_clicked"/>
</Window>
<!-- TODO: set ship properties
- <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionConfigButton" >
+ <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionConfigButton" >
<Property Name="Text" Value="Configure" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
<Property Name="UnifiedAreaRect" Value="{{0.425,0},{0.725,0},{0.575,0},{0.775,0}}" />
<Property Name="Disabled" Value="True" />
<Event Name="Clicked" Function="ShipSelectionMenu.ShipSelectionConfigButton_clicked"/>
- </Window> -->
+ </Window> -->
<Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionBackButton" >
<Property Name="Text" Value="Back" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
Modified: code/branches/presentation2012merge/data/gui/scripts/ShipSelectionMenu.lua
===================================================================
--- code/branches/presentation2012merge/data/gui/scripts/ShipSelectionMenu.lua 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/gui/scripts/ShipSelectionMenu.lua 2012-06-03 16:05:24 UTC (rev 9272)
@@ -11,17 +11,17 @@
if string.sub(package.config,1,1) == '\\' then
-- Windows
dircmd = "dir /b/s"
- end]]
- P.createFilterTab("All Ships")
+ end]]
+ P.createFilterTab("All Ships")
end
function P.createShipList() --generates list with tagged shipmodels
P.shipList = {}
for line in io.lines("../levels/templates/.shipmodels") do --checks if shipmodel is included in level file
- if selectedlevel:hasShip(string.lower(line)) then
- P.shipList[#P.shipList+1] = string.lower(line)
- end
- end
+ if selectedlevel:hasShip(string.lower(line)) then
+ P.shipList[#P.shipList+1] = string.lower(line)
+ end
+ end
end
function P.update() --updates listbox with found models
@@ -45,11 +45,11 @@
function P.createFilterTab(name) -- generates filter tab and list box, sets handler for selection changes
tabName = "orxonox/ShipSelectionLevelTab"
-- create new tab window with desired name
- listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName))
+ listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName))
listbox:setText(name)
listbox:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}")
- --[[TODO: smaller list if image and description is implemented.
- listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]]
+ --[[TODO: smaller list if image and description is implemented.
+ listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]]
listbox:setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}")
-- fill listbox with items
P.update()
@@ -106,11 +106,11 @@
function P.ShipSelectionStartButton_clicked(e)
if (selectedlevel ~= nil and P.ShipSelectionGetSelectedModel() ~= nil) then
- selectedlevel:selectShip(P.ShipSelectionGetSelectedModel())
+ selectedlevel:selectShip(P.ShipSelectionGetSelectedModel())
orxonox.execute("startGame " .. "_temp.oxw")
hideAllMenuSheets()
else
- orxonox.execute("orxout user_warning no ship model selected or no tagged shipmodel installed")
+ orxonox.execute("orxout user_warning no ship model selected or no tagged shipmodel installed")
end
end
@@ -127,6 +127,6 @@
function P.ShipSelectionBackButton_clicked(e)
orxonox.execute("keyESC")
-end
+end
return P
Modified: code/branches/presentation2012merge/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/branches/presentation2012merge/data/gui/scripts/SingleplayerMenu.lua 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/gui/scripts/SingleplayerMenu.lua 2012-06-03 16:05:24 UTC (rev 9272)
@@ -9,7 +9,7 @@
function P.onLoad()
P.createLevelList()
-
+
-- create tabs with desired tab as argument (nil for all)
P.createFilterTab("Gametypes", "gametype")
P.createFilterTab("Missions", "mission")
@@ -18,10 +18,10 @@
P.createFilterTab("Presentations", "presentation")
P.createFilterTab("Tests", "test")
P.createFilterTab("Show All", nil)
-
+
-- update description and screenshot boxes
P.SingleplayerSelectionChanged()
-
+
--buttons are arranged in a 1x3 matrix
P:setButton(1, 1, {
["button"] = winMgr:getWindow("orxonox/SingleplayerStartButton"),
@@ -47,7 +47,7 @@
while index < size do
level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw") then
- --os.execute("echo " .. level:getXMLFilename() .." >> ~/outputorx")
+ --os.execute("echo " .. level:getXMLFilename() .." >> ~/outputorx")
local levelXMLFilename = level:getXMLFilename()
-- create an imageset for each screenshot
local imageName = level:getScreenshot()
@@ -150,7 +150,7 @@
else
orxonox.execute("startGame " .. selectedlevel:getXMLFilename())
hideAllMenuSheets()
- end
+ end
end
end
Modified: code/branches/presentation2012merge/data/levels/Spacerace2.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/Spacerace2.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/Spacerace2.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -11,7 +11,7 @@
include("templates/lodInformation.oxt")
include("templates/spaceshipAssff.oxt")
-
+
?>
<?lua
@@ -36,61 +36,61 @@
<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"/>
-
- <SpaceRaceManager>
-<checkpoints>
- <RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false" nextcheckpoints="1,2,-1">
- <attached>
- <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
- </attached>
- <collisionShapes>
- <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />
- <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />
- <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />
- <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />
- </collisionShapes>
- </RaceCheckPoint>
-<RaceCheckPoint name="checkpoint2" position="0,2100,2300" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false" nextcheckpoints="3,-1,-1">
- <attached>
- <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
- </attached>
- <collisionShapes>
- <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />
- <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />
- <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />
- <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />
- </collisionShapes>
- </RaceCheckPoint>
+ <SpaceRaceManager>
+ <checkpoints>
+ <RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false" nextcheckpoints="1,2,-1">
+ <attached>
+ <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />
+ <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />
+ <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />
+ <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />
+ </collisionShapes>
+ </RaceCheckPoint>
-<RaceCheckPoint name="checkpoint3" position="0,700,2700" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false" nextcheckpoints="3,-1,-1">
- <attached>
- <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
- </attached>
- <collisionShapes>
- <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />
- <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />
- <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />
- <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />
- </collisionShapes>
- </RaceCheckPoint>
+ <RaceCheckPoint name="checkpoint2" position="0,2100,2300" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false" nextcheckpoints="3,-1,-1">
+ <attached>
+ <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />
+ <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />
+ <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />
+ <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />
+ </collisionShapes>
+ </RaceCheckPoint>
-<RaceCheckPoint name="checkpoint4" position="0,-400,300" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="true">
- <attached>
- <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
- </attached>
- <collisionShapes>
- <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />
- <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />
- <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />
- <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />
- </collisionShapes>
- </RaceCheckPoint>
-</checkpoints>
-</SpaceRaceManager>
+ <RaceCheckPoint name="checkpoint3" position="0,700,2700" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false" nextcheckpoints="3,-1,-1">
+ <attached>
+ <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />
+ <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />
+ <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />
+ <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />
+ </collisionShapes>
+ </RaceCheckPoint>
-
-<SpaceShip position="0,0,200" lookat="0,0,0">
+ <RaceCheckPoint name="checkpoint4" position="0,-400,300" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="true">
+ <attached>
+ <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,55" halfExtents="55, 10, 10" />
+ <BoxCollisionShape position="0,0,-55" halfExtents="55, 10, 10" />
+ <BoxCollisionShape position="55,0,0" halfExtents="10, 10, 55" />
+ <BoxCollisionShape position="-55,0,0" halfExtents="10, 10, 55" />
+ </collisionShapes>
+ </RaceCheckPoint>
+ </checkpoints>
+ </SpaceRaceManager>
+
+
+ <SpaceShip position="0,0,200" lookat="0,0,0">
<templates>
<Template link=spaceshipassff />
</templates>
@@ -201,7 +201,7 @@
</MovableEntity>
-
+
</Scene>
</Level>
Modified: code/branches/presentation2012merge/data/levels/SurfaceRacePresentation.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/SurfaceRacePresentation.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/SurfaceRacePresentation.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -15,7 +15,7 @@
include("templates/spaceshipGhost.oxt")
include("templates/spaceshipSpacecruiser.oxt")
include("templates/pickupRepresentationTemplates.oxt")
-
+
?>
<Level
@@ -55,8 +55,8 @@
<Model position="4200,8050,-1000" scale=10 mesh="debris-pile01.mesh" shadow=true />
<Model position="4200,8050,-1000" scale=10 mesh="debris-pile02.mesh" shadow=true />
<Model position="4200,8050,-1000" scale=10 mesh="debris-pile03.mesh" shadow=true />
-
- <MovableEntity position="-700,8090,-300" velocity="80,0,0" rotationaxis="1,0,1" rotationrate=200>
+
+ <MovableEntity position="-700,8090,-300" velocity="80,0,0" rotationaxis="1,0,1" rotationrate=200>
<attached>
<Model position="0,0,-20" scale=10 mesh="cokebottle.mesh" />
</attached>
@@ -64,20 +64,20 @@
<SpaceRaceManager>
- <checkpoints>
- <RaceCheckPoint name="checkpoint1" position="0,8050,-1000" direction="0,1,0" collisionType="static" scale="4" distance="150" checkpointindex="0" islast="false" nextcheckpoints="1,-1,-1">
+ <checkpoints>
+ <RaceCheckPoint name="checkpoint1" position="0,8050,-1000" direction="0,1,0" collisionType="static" scale="4" distance="150" checkpointindex="0" islast="false" nextcheckpoints="1,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
- <collisionShapes>
+ <collisionShapes>
<BoxCollisionShape position="0,0,220" halfExtents="220, 40, 40" />
<BoxCollisionShape position="0,0,-220" halfExtents="220, 40, 40" />
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
</collisionShapes>
</RaceCheckPoint>
-
- <RaceCheckPoint name="checkpoint2" position="1000,8050,-4000" direction="0,1,0" roll="45" collisionType="static" scale="4" distance="150" checkpointindex="1" islast="false" nextcheckpoints="2,-1,-1">
+
+ <RaceCheckPoint name="checkpoint2" position="1000,8050,-4000" direction="0,1,0" roll="45" collisionType="static" scale="4" distance="150" checkpointindex="1" islast="false" nextcheckpoints="2,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -89,7 +89,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint3" position="3000,8050,-4000" direction="0,1,0" roll="-45" collisionType="static" scale="4" distance="150" checkpointindex="2" islast="false" nextcheckpoints="3,-1,-1">
+ <RaceCheckPoint name="checkpoint3" position="3000,8050,-4000" direction="0,1,0" roll="-45" collisionType="static" scale="4" distance="150" checkpointindex="2" islast="false" nextcheckpoints="3,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -101,7 +101,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint4" position="4000,8050,-1000" direction="0,1,0" roll="0" collisionType="static" scale="4" distance="150" checkpointindex="3" islast="false" nextcheckpoints="4,-1,-1">
+ <RaceCheckPoint name="checkpoint4" position="4000,8050,-1000" direction="0,1,0" roll="0" collisionType="static" scale="4" distance="150" checkpointindex="3" islast="false" nextcheckpoints="4,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -113,7 +113,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint5" position="4000,8050,0" direction="0,1,0" roll="0" collisionType="static" scale="4" distance="150" checkpointindex="4" islast="false" nextcheckpoints="5,-1,-1">
+ <RaceCheckPoint name="checkpoint5" position="4000,8050,0" direction="0,1,0" roll="0" collisionType="static" scale="4" distance="150" checkpointindex="4" islast="false" nextcheckpoints="5,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -125,7 +125,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint6" position="3000,8050,1000" direction="0,1,0" roll="45" collisionType="static" scale="4" distance="150" checkpointindex="5" islast="false" nextcheckpoints="6,-1,-1">
+ <RaceCheckPoint name="checkpoint6" position="3000,8050,1000" direction="0,1,0" roll="45" collisionType="static" scale="4" distance="150" checkpointindex="5" islast="false" nextcheckpoints="6,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -137,7 +137,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint7" position="0,8050,2000" direction="0,1,0" roll="90" collisionType="static" scale="4" distance="150" checkpointindex="6" islast="false" nextcheckpoints="7,-1,-1">
+ <RaceCheckPoint name="checkpoint7" position="0,8050,2000" direction="0,1,0" roll="90" collisionType="static" scale="4" distance="150" checkpointindex="6" islast="false" nextcheckpoints="7,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -149,7 +149,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint8" position="-4000,8050,3000" direction="0,1,0" roll="45" collisionType="static" scale="4" distance="150" checkpointindex="7" islast="false" nextcheckpoints="8,-1,-1">
+ <RaceCheckPoint name="checkpoint8" position="-4000,8050,3000" direction="0,1,0" roll="45" collisionType="static" scale="4" distance="150" checkpointindex="7" islast="false" nextcheckpoints="8,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -161,7 +161,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint9" position="-4000,8050,5000" direction="0,1,0" roll="-45" collisionType="static" scale="4" distance="150" checkpointindex="8" islast="false" nextcheckpoints="9,-1,-1">
+ <RaceCheckPoint name="checkpoint9" position="-4000,8050,5000" direction="0,1,0" roll="-45" collisionType="static" scale="4" distance="150" checkpointindex="8" islast="false" nextcheckpoints="9,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -173,7 +173,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint10" position="-3000,8050,6000" direction="0,1,0" roll="90" collisionType="static" scale="4" distance="150" checkpointindex="9" islast="false" nextcheckpoints="10,-1,-1">
+ <RaceCheckPoint name="checkpoint10" position="-3000,8050,6000" direction="0,1,0" roll="90" collisionType="static" scale="4" distance="150" checkpointindex="9" islast="false" nextcheckpoints="10,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -185,7 +185,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint11" position="0,8050,6000" direction="0,1,0" roll="90" collisionType="static" scale="4" distance="120" checkpointindex="10" islast="false" nextcheckpoints="11,-1,-1">
+ <RaceCheckPoint name="checkpoint11" position="0,8050,6000" direction="0,1,0" roll="90" collisionType="static" scale="4" distance="120" checkpointindex="10" islast="false" nextcheckpoints="11,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -197,7 +197,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint12" position="6000,8050,6000" direction="0,1,0" roll="45" collisionType="static" scale="4" distance="150" checkpointindex="11" islast="false" nextcheckpoints="12,-1,-1">
+ <RaceCheckPoint name="checkpoint12" position="6000,8050,6000" direction="0,1,0" roll="45" collisionType="static" scale="4" distance="150" checkpointindex="11" islast="false" nextcheckpoints="12,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -209,7 +209,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint13" position="5500,8050,3000" direction="0,1,0" roll="0" collisionType="static" scale="4" distance="150" checkpointindex="12" islast="false" nextcheckpoints="13,-1,-1">
+ <RaceCheckPoint name="checkpoint13" position="5500,8050,3000" direction="0,1,0" roll="0" collisionType="static" scale="4" distance="150" checkpointindex="12" islast="false" nextcheckpoints="13,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -221,7 +221,7 @@
</collisionShapes>
</RaceCheckPoint>
- <RaceCheckPoint name="checkpoint14" position="6000,8050,-5000" direction="0,1,0" roll="0" collisionType="static" scale="4" distance="150" checkpointindex="13" islast="true" >
+ <RaceCheckPoint name="checkpoint14" position="6000,8050,-5000" direction="0,1,0" roll="0" collisionType="static" scale="4" distance="150" checkpointindex="13" islast="true" >
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -237,31 +237,31 @@
<SpawnPoint team=0 position="0,8050,0" lookat="0,8000,-8000" spawnclass=SpaceShip pawndesign=shipselection />
-
- <!-- -----------------------Zylinder---------------------------- -->
+
+ <!-- -----------------------Zylinder---------------------------- -->
<StaticEntity position="2750,8050,6000" direction="1,0,0" roll="90" scale="4" collisionType=static mass=100000 friction=0.01 >
<attached>
- <Model position="0,0,0" mesh="cylinder.mesh" scale3D="100,100,400" />
- <!--
- <Model position="0,80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
- <Model position="0,-80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
- <Model position="80,0,600" mesh="testcube.mesh" scale3D="18,90,-600" />
- <Model position="-80,0,600" mesh="testcube.mesh" scale3D="18,09,-600" />
- -->
+ <Model position="0,0,0" mesh="cylinder.mesh" scale3D="100,100,400" />
+ <!--
+ <Model position="0,80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
+ <Model position="0,-80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
+ <Model position="80,0,600" mesh="testcube.mesh" scale3D="18,90,-600" />
+ <Model position="-80,0,600" mesh="testcube.mesh" scale3D="18,09,-600" />
+ -->
</attached>
- <collisionShapes>
-
-
- <BoxCollisionShape position="0,320,2400" halfExtents="360,72,2400" />
- <BoxCollisionShape position="0,-320,2400" halfExtents="360,72,2400" />
- <BoxCollisionShape position="320,0,2400" halfExtents="72,360,2400" />
- <BoxCollisionShape position="-320,0,2400" halfExtents="72,360,2400" />
-
+ <collisionShapes>
-
+
+ <BoxCollisionShape position="0,320,2400" halfExtents="360,72,2400" />
+ <BoxCollisionShape position="0,-320,2400" halfExtents="360,72,2400" />
+ <BoxCollisionShape position="320,0,2400" halfExtents="72,360,2400" />
+ <BoxCollisionShape position="-320,0,2400" halfExtents="72,360,2400" />
+
+
+
</collisionShapes>
</StaticEntity>
@@ -269,38 +269,38 @@
<!-- ------------------Cube between gate 4 and 5----------------- -->
<StaticEntity position="4465,8050,-500" direction="0,0,0" scale="1" collisionType=static mass=100000 friction=0.01 >
<attached>
- <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
+ <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
<!--
- <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
- -->
+ <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
+ -->
</attached>
- <collisionShapes>
-
-
- <BoxCollisionShape position="0,0,0" halfExtents="450,600,50" />
+ <collisionShapes>
+
+ <BoxCollisionShape position="0,0,0" halfExtents="450,600,50" />
+
</collisionShapes>
</StaticEntity>
<StaticEntity position="3535,8050,-500" direction="0,0,0" scale="1" collisionType=static mass=100000 friction=0.01 >
<attached>
- <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
+ <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
<!--
- <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
- -->
+ <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
+ -->
</attached>
- <collisionShapes>
-
-
- <BoxCollisionShape position="0,0,0" halfExtents="450,600,50" />
+ <collisionShapes>
+
+ <BoxCollisionShape position="0,0,0" halfExtents="450,600,50" />
+
</collisionShapes>
</StaticEntity>
@@ -308,7 +308,7 @@
- <!-- ------------------Boden----------------- -->
+ <!-- ------------------Boden----------------- -->
<StaticEntity position="0,0,0" direction="0,0,0" collisionType=static mass=100000 friction=0.01>
<attached>
<Model position="0,0,0" mesh="CubeGround.mesh" scale3D="8000,8000,8000" />
@@ -316,7 +316,7 @@
<collisionShapes>
<BoxCollisionShape position="0,50,0" halfExtents="8000,8000,8000" />um j?:P"{
- </collisionShapes>
+ </collisionShapes>
</StaticEntity>
@@ -350,10 +350,10 @@
max = 15
for i = 0, max, 1
do
- x=-12000
- y=10000
- z=-12000
-
+ x=-12000
+ y=10000
+ z=-12000
+
?>
<?lua
for k = 1, 15, 1
Modified: code/branches/presentation2012merge/data/levels/asteroidField.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/asteroidField.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/asteroidField.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -38,27 +38,27 @@
<!-- Belt that's far away *** TURNED OFF FOR PERFORMANCE REASONS *** -->
- <!-- Generate asteroid field and asteroid belt -->
+ <!-- Generate asteroid field and asteroid belt -->
<!--
<?lua
- dofile("includes/asteroidField.lua")
- asteroidBelt(0, 0, 0, -48, -34, 70, 100, 200, 219900, 210000, 900, 1)
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(0, 0, 0, -48, -34, 70, 100, 200, 219900, 210000, 900, 1)
?>
-->
<!-- triple large belt around the planet -->
<?lua
- dofile("includes/asteroidField.lua")
- asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
?>
<?lua
- dofile("includes/asteroidField.lua")
- asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
?>
<?lua
- dofile("includes/asteroidField.lua")
- asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
?>
@@ -94,7 +94,7 @@
-
+
</Scene>
</Level>
Modified: code/branches/presentation2012merge/data/levels/dynamicMatch.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/dynamicMatch.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/dynamicMatch.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -89,10 +89,10 @@
<StaticEntity position="<?lua print(x + math.random() * 1000-500) ?>,<?lua print(y + math.random() * 1000-500) ?>,<?lua print(z + math.random() * 5000-2500) ?>" scale="<?lua print(j * 5) ?>" >
<attached>
<Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
- <attached><!-- ---------asteroid fog----- -->
+ <attached><!-- ---------asteroid fog----- -->
<ParticleEmitter position="0,0,0" source="Orxonox/Steam" />
</attached>
- </Model>
+ </Model>
</attached>
<?lua if i == 5 then ?><collisionShapes>
<SphereCollisionShape radius="<?lua print(j * 70) ?>" />
Modified: code/branches/presentation2012merge/data/levels/includes/CuboidSpaceStation.lua
===================================================================
--- code/branches/presentation2012merge/data/levels/includes/CuboidSpaceStation.lua 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/includes/CuboidSpaceStation.lua 2012-06-03 16:05:24 UTC (rev 9272)
@@ -1,19 +1,19 @@
----------------------------------------------------------------------------------------------------
-- This lua script creates a totally random generated space station for the orxonox computer game!--
--- (c) Wallah 2008, published under GPL licence! --
+-- (c) Wallah 2008, published under GPL licence! --
----------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- IMPORTANT: If you need more parameters, do the following: copy the actual function (just the headline and the end statement) to the end of the file, --
+-- IMPORTANT: If you need more parameters, do the following: copy the actual function (just the headline and the end statement) to the end of the file, --
-- like I did with createSpaceStation() and let that function call the new function where you can modify the parameters. For all parameters which the old function--
-- doesn't have you just give the standard default values, which I have defined. This is to make sure, that anyone else who uses the old function can still use it--
--- the same way he/she always did. If you want a function with less parameters, just create a new one at the end of the file and call this function with some --
--- default values. REMEMBER: Function overloading is not possible, be sure to call your function differently from others already existing ones. --
+-- the same way he/she always did. If you want a function with less parameters, just create a new one at the end of the file and call this function with some --
+-- default values. REMEMBER: Function overloading is not possible, be sure to call your function differently from others already existing ones. --
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- This function creates a randomly generated space station.
-- The first argument ranSeed, must be 0, or a positive Integer, if it is 0 your space station is always chosen randomly, if you give an integer,
--- your space station will be generated randomly, but once you have the space station it will always be the same.
+-- your space station will be generated randomly, but once you have the space station it will always be the same.
-- The argument xLength defines how large the space station will be into the x-direction.
-- The argument xVar defines how much the space station will vary at the ends in x-direction, this is so that the station is no cube.
-- The argument yLength is the same as xLength, but for the y-direction.
@@ -36,9 +36,9 @@
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create a randomseed, so that the math.random() function is actually random.
if ranSeed == 0 then
- math.randomseed(os.time())
+ math.randomseed(os.time())
else
- math.randomseed(ranSeed)
+ math.randomseed(ranSeed)
end
-- End create randomseed.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -51,11 +51,11 @@
-- Define the maximal size of the grid, this value is based on how large you define the area of bodyparts plus 20 gridpoints for attachparts.
sSSize=30
if xLength>=yLength and xLength>=zLength then
- sSSize=xLength+20
+ sSSize=xLength+20
elseif yLength>=xLength and yLength>=zLength then
- sSSize=yLength+20
+ sSSize=yLength+20
elseif zLength>=xLength and zLength>=yLength then
- sSSize=zLength+20
+ sSSize=zLength+20
end
-- Define how many parts the space station has, this value has to be exact, so be sure to increment it if you're adding a new part.
sSParts=9
@@ -77,7 +77,7 @@
-- It should be at least 1 bigger than the biggest part needs, because I guarantee that it works with odd numbers, to do so I use the math.floor function.
pDim=6
-- Define the griddimension, be sure this value matches the size of a single space station part plus the size of a connection part, which means your parts must be:
--- integer*(gridDim-connectionSize), then integer tells you how many griddimensions your part is.
+-- integer*(gridDim-connectionSize), then integer tells you how many griddimensions your part is.
gridDim=2.25
-- End define global parameters.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -88,26 +88,26 @@
-- This creates a 4-dimensional grid, which tells us if there is a part or not, and in which direction it has connections.
-- The parameters x,y,z are the axis of the space station, which iterate to sSSize, the maximal size of the space station.
-- The griddimension, this word I will use later, means that the distance of a point to the next point is gridDim in the game, so the absolute x-axis is x*gridDim*sSScale,
--- and so on for the other dimensions y and z.
+-- and so on for the other dimensions y and z.
-- grid[x][y][z][0] contains 0 if there is no part at the position (x,y,z), otherwise 1.
-- grid[x][y][z][1] contains 0 if there is no connection from (x,y,z) in x-direction, "+" if there is one in the positive x-direction,
--- "-" if there is one in the negative x-direction, "+-" if there are in both x-directions.
+-- "-" if there is one in the negative x-direction, "+-" if there are in both x-directions.
-- grid[x][y][z][2] contains 0 if there is no connection from (x,y,z) in y-direction, "+" if there is one in the positive y-direction,
--- "-" if there is one in the negative y-direction, "+-" if there are in both y-directions.
+-- "-" if there is one in the negative y-direction, "+-" if there are in both y-directions.
-- grid[x][y][z][3] contains 0 if there is no connection from (x,y,z) in z-direction, "+" if there is one in the positive z-direction,
--- "-" if there is one in the negative z-direction, "+-" if there are in both z-directions.
+-- "-" if there is one in the negative z-direction, "+-" if there are in both z-directions.
grid = {}
for x=-math.floor(sSSize/2),math.floor(sSSize/2) do
- grid[x] = {}
- for y=-math.floor(sSSize/2),math.floor(sSSize/2) do
- grid[x][y]= {}
- for z=-math.floor(sSSize/2),math.floor(sSSize/2) do
- grid[x][y][z]={}
- for i=0,3 do
- grid[x][y][z][i]=0
- end
- end
- end
+ grid[x] = {}
+ for y=-math.floor(sSSize/2),math.floor(sSSize/2) do
+ grid[x][y]= {}
+ for z=-math.floor(sSSize/2),math.floor(sSSize/2) do
+ grid[x][y][z]={}
+ for i=0,3 do
+ grid[x][y][z][i]=0
+ end
+ end
+ end
end
-- End create 4-dim grid.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -118,39 +118,39 @@
-- This creates an array which stores all the parts, it's size is depending on the global values pDim and sSParts.
-- The first parameter i, tells us how many parts fit into the array, so it iterates from 1 to sSParts, each part has his own value i.
-- The second, third and fourth parameters are the relative coordinates of the part, you have to start at (0,0,0) and be sure you fill the array into the right direction.
--- A short example: your part is 2 griddimensions long and you place it in the game, that the relative coordinate point is at (0,0,0) and the part lies in the positive
--- z-axis, then you have to use the coordinate point (0,0,1).
+-- A short example: your part is 2 griddimensions long and you place it in the game, that the relative coordinate point is at (0,0,0) and the part lies in the positive
+-- z-axis, then you have to use the coordinate point (0,0,1).
-- The fifth parameter is an array with size 4, at index=0, you have to set 1 if your part covers the gridpoint at (x,y,z), otherwise 0.
--- At index=1,2,3 you define the possible connection directions (1 for x, 2 for y and 3 for z), be sure to use the notation from above (0, "+-", "+", "-").
+-- At index=1,2,3 you define the possible connection directions (1 for x, 2 for y and 3 for z), be sure to use the notation from above (0, "+-", "+", "-").
bodyParts={}
for i=1,sSParts do
- bodyParts[i]={}
- for x=-math.floor(pDim/2),math.floor(pDim/2) do
- bodyParts[i][x]={}
- for y=-math.floor(pDim/2),math.floor(pDim/2) do
- bodyParts[i][x][y]={}
- for z=-math.floor(pDim/2),math.floor(pDim/2) do
- bodyParts[i][x][y][z]={}
- for k=0,3 do
- bodyParts[i][x][y][z][k]=0
- end
- end
- end
- end
- -- This contains the name of the mesh file.
- bodyParts[i][0][0][0][4]=""
- -- This contains the first possible rotation of your part, pitch=... yaw=... roll=... .
- bodyParts[i][0][0][0][5]=""
- -- This contains the second possible rotation of your part, pitch=... yaw=... roll=... .
- bodyParts[i][0][0][0][6]=""
- -- This contains the third possible rotation of your part, pitch=... yaw=... roll=... .
- bodyParts[i][0][0][0][7]=""
- -- Contains the movement rotation, rotationaxis=... rotationrate=... .
- bodyParts[i][0][0][0][8]=""
- -- Contains the attachment, if your part has an attachment, e.g. <ParticleEmitter .../>.
- bodyParts[i][0][0][0][9]=""
- -- Contains how many of this part you want to attach to your space station.
- bodyParts[i][0][0][0][10]=1
+ bodyParts[i]={}
+ for x=-math.floor(pDim/2),math.floor(pDim/2) do
+ bodyParts[i][x]={}
+ for y=-math.floor(pDim/2),math.floor(pDim/2) do
+ bodyParts[i][x][y]={}
+ for z=-math.floor(pDim/2),math.floor(pDim/2) do
+ bodyParts[i][x][y][z]={}
+ for k=0,3 do
+ bodyParts[i][x][y][z][k]=0
+ end
+ end
+ end
+ end
+ -- This contains the name of the mesh file.
+ bodyParts[i][0][0][0][4]=""
+ -- This contains the first possible rotation of your part, pitch=... yaw=... roll=... .
+ bodyParts[i][0][0][0][5]=""
+ -- This contains the second possible rotation of your part, pitch=... yaw=... roll=... .
+ bodyParts[i][0][0][0][6]=""
+ -- This contains the third possible rotation of your part, pitch=... yaw=... roll=... .
+ bodyParts[i][0][0][0][7]=""
+ -- Contains the movement rotation, rotationaxis=... rotationrate=... .
+ bodyParts[i][0][0][0][8]=""
+ -- Contains the attachment, if your part has an attachment, e.g. <ParticleEmitter .../>.
+ bodyParts[i][0][0][0][9]=""
+ -- Contains how many of this part you want to attach to your space station.
+ bodyParts[i][0][0][0][10]=1
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -192,7 +192,7 @@
-- End insert DoubleCuboidBody.
-- Insert the CuboidConnectionBody, it is three griddimensions long and one wide and high and can have only connections at griddimension 1
--- (except the side in direction of griddimension 2) and griddimension 3 (except the side in direction of griddimension 2).
+-- (except the side in direction of griddimension 2) and griddimension 3 (except the side in direction of griddimension 2).
bodyParts[3][0][0][0][4]="CuboidConnBody.mesh"
bodyParts[3][0][0][0][5]="pitch=-90"
@@ -372,115 +372,115 @@
--This function actualizes the grid, which I have to call always after I have added a new part to the space station.
function actualizeGrid(Index,x,y,z)
- for i=math.floor(-pDim/2)+1,math.floor(pDim/2) do
- for j=math.floor(-pDim/2)+1,math.floor(pDim/2) do
- for k=math.floor(-pDim/2)+1,math.floor(pDim/2) do
- if bodyParts[Index][i][j][k][0] == 1 then
- for l=0,3 do
- grid[x+i][y+j][z+k][l] = bodyParts[Index][i][j][k][l]
- end
- end
- end
- end
- end
+ for i=math.floor(-pDim/2)+1,math.floor(pDim/2) do
+ for j=math.floor(-pDim/2)+1,math.floor(pDim/2) do
+ for k=math.floor(-pDim/2)+1,math.floor(pDim/2) do
+ if bodyParts[Index][i][j][k][0] == 1 then
+ for l=0,3 do
+ grid[x+i][y+j][z+k][l] = bodyParts[Index][i][j][k][l]
+ end
+ end
+ end
+ end
+ end
end
-- End actualizeGrid.
-- This function checks wheter a given parts fits at that position or not.
-- If the part fits there it returns 1, otherwise 0.
function checkPart(Index,x,y,z)
- check=1
- for i=math.floor(-pDim/2)+1,math.floor(pDim/2) do
- for j=math.floor(-pDim/2)+1,math.floor(pDim/2) do
- for k=math.floor(-pDim/2)+1,math.floor(pDim/2) do
- -- If the part occupies the position (i,j,k), the grid must be empty there ((x+i, y+j, z+k)==0), if not, check is zero,
- -- which means that the part doesn't fit there.
- if bodyParts[Index][i][j][k][0] == 1 and grid[x+i][y+j][z+k][0] == 1 then
- check=0
- end
- end
- end
- end
- return check
+ check=1
+ for i=math.floor(-pDim/2)+1,math.floor(pDim/2) do
+ for j=math.floor(-pDim/2)+1,math.floor(pDim/2) do
+ for k=math.floor(-pDim/2)+1,math.floor(pDim/2) do
+ -- If the part occupies the position (i,j,k), the grid must be empty there ((x+i, y+j, z+k)==0), if not, check is zero,
+ -- which means that the part doesn't fit there.
+ if bodyParts[Index][i][j][k][0] == 1 and grid[x+i][y+j][z+k][0] == 1 then
+ check=0
+ end
+ end
+ end
+ end
+ return check
end
-- End checkPart function.
-- This function prints the model with tempPartIndex in the bodyParts array at position lx,ly,lz.
-- If you need to rotate the model around his own axis, then you have to set movEntity true and define the details of the rotation in
--- bodyParts[tempPartIndex][0][0][0][8].
+-- bodyParts[tempPartIndex][0][0][0][8].
-- If your model needs to be rotated like bodyParts[tempPartIndex][0][0][0][5], then side must be 1, for bodyParts[tempPartIndex][0][0][0][6] side must be 2,
--- for bodyParts[tempPartIndex][0][0][0][7] side must be 3.
+-- for bodyParts[tempPartIndex][0][0][0][7] side must be 3.
function printModel(lx,ly,lz,tempPartIndex,movEntity,side)
- if movEntity == true then
- print("<MovableEntity scale=1 position=\"") print(lx*gridDim*sSScale) print(",") print(ly*gridDim*sSScale) print(",") print(lz*gridDim*sSScale) print("\" ")
- print(bodyParts[tempPartIndex][0][0][0][8]) print(">")
- print("<attached>")
- lx=0 ly=0 lz=0
- end
+ if movEntity == true then
+ print("<MovableEntity scale=1 position=\"") print(lx*gridDim*sSScale) print(",") print(ly*gridDim*sSScale) print(",") print(lz*gridDim*sSScale) print("\" ")
+ print(bodyParts[tempPartIndex][0][0][0][8]) print(">")
+ print("<attached>")
+ lx=0 ly=0 lz=0
+ end
- print("<Model position=\"") print(lx*gridDim*sSScale) print(",") print(ly*gridDim*sSScale) print(",") print(lz*gridDim*sSScale)
- print("\" scale=") print(sSScale) print(" mesh= \"") print(bodyParts[tempPartIndex][0][0][0][4]) print("\"")
+ print("<Model position=\"") print(lx*gridDim*sSScale) print(",") print(ly*gridDim*sSScale) print(",") print(lz*gridDim*sSScale)
+ print("\" scale=") print(sSScale) print(" mesh= \"") print(bodyParts[tempPartIndex][0][0][0][4]) print("\"")
- if side == 1 then
- print(bodyParts[tempPartIndex][0][0][0][5]) print(">")
- elseif side == 2 then
- print(bodyParts[tempPartIndex][0][0][0][6]) print(">")
- elseif side == 3 then
- print(bodyParts[tempPartIndex][0][0][0][7]) print(">")
- end
+ if side == 1 then
+ print(bodyParts[tempPartIndex][0][0][0][5]) print(">")
+ elseif side == 2 then
+ print(bodyParts[tempPartIndex][0][0][0][6]) print(">")
+ elseif side == 3 then
+ print(bodyParts[tempPartIndex][0][0][0][7]) print(">")
+ end
- print("<attached>")
- print(bodyParts[tempPartIndex][0][0][0][9])
- print("</attached>")
+ print("<attached>")
+ print(bodyParts[tempPartIndex][0][0][0][9])
+ print("</attached>")
- print("</Model>")
+ print("</Model>")
- if movEntity == true then
- print("</attached>")
- print("</MovableEntity>")
- end
+ if movEntity == true then
+ print("</attached>")
+ print("</MovableEntity>")
+ end
end
-- End function printModel().
-- This function sets a part to a side of the space station.
-- The arguments lx,ly,lz are the coordinates of the grid, where you want to set the part.
-- The arguments xAxis,yAxis,zAxis can be 0 or 1, but only one argument out of the three can be 1. This means two of them must always be zero. You have to set xAxis to one,
--- if your part is attached to a side, which faces into the x-direction (negative or positive, this is later specified with Dir), that means the x-Axis is a normal vector
--- of the side to which you want to attach the part. The same for yAxis and zAxis.
+-- if your part is attached to a side, which faces into the x-direction (negative or positive, this is later specified with Dir), that means the x-Axis is a normal vector
+-- of the side to which you want to attach the part. The same for yAxis and zAxis.
-- The argument Dir must be 1 if your side, where you want to attach the part, faces into the positive direction, -1 if the side faces into the negative direction. The side
--- faces into the positive direction means, that the side of the side where the part will be attached is directed into the direction of the positive direction of the
--- corresponding axis.
+-- faces into the positive direction means, that the side of the side where the part will be attached is directed into the direction of the positive direction of the
+-- corresponding axis.
-- The argument index is the index of the part for the bodyParts array.
-- The argument printMovEnt must be false if your part doesn't need to be attached to an extra MovableEntity. If your part must be attached to an extra MovableEntity
--- this argument must be true. The extra MovableEntity is used to rotate the part around his own axis, or something like that.
+-- this argument must be true. The extra MovableEntity is used to rotate the part around his own axis, or something like that.
-- The argument printSide is like the argument side of the printModel() function. It defines how your part will be rotated. Read the commentary there.
-- The function returns 0 if the part couldn't be set, because it did not fit there or there was no side to attach the part. It returns 1 if the part is successfully set.
function setPart(lx,ly,lz,xAxis,yAxis,zAxis,Dir,index,printMovEnt,printSide)
- partSet=0
- -- For the bodyParts array I use 1 as x-, 2 as y- and 3 as z-Axis for the definition in which directions a part can have connections.
- coord=1*xAxis+2*yAxis+3*zAxis
- -- If I try to attach the part from the positive direction to the side of the space station, the part of the station (where I want to attach the new part) must have
- -- a connection into the positive direction. Otherwise I look from the negative side and so the part of the station must have a connection into the negative direction.
- if Dir==1 then
- conn="+"
- elseif Dir==-1 then
- conn="-"
- end
- -- I look from the direction defined through Dir, and here I check, whether I have reached a side of the space station, which means at position lx,ly,lz is nothing and
- -- at the next position is a part which can have a connection into the direction from where I look.
- if grid[lx][ly][lz][0] == 0 and grid[lx+(-1*xAxis*Dir)][ly+(-1*yAxis*Dir)][lz+(-1*zAxis*Dir)][0] == 1 and (grid[lx+(-1*xAxis*Dir)][ly+(-1*yAxis*Dir)][lz+(-1*zAxis*Dir)][coord]=="+-" or grid[lx+(-1*xAxis*Dir)][ly+(-1*yAxis*Dir)][lz+(-1*zAxis*Dir)][coord]==conn) then
- -- This checks whether the part fits at that position or not.
- check=checkPart(index,lx,ly,lz)
- if check == 1 then
- -- This prints the part.
- printModel(lx,ly,lz,index,printMovEnt,printSide)
- partSet=1
- -- This actualizes the grid array with the values of the array bodyParts at the position index.
- actualizeGrid(index,lx,ly,lz)
- end
- end
- return partSet
+ partSet=0
+ -- For the bodyParts array I use 1 as x-, 2 as y- and 3 as z-Axis for the definition in which directions a part can have connections.
+ coord=1*xAxis+2*yAxis+3*zAxis
+ -- If I try to attach the part from the positive direction to the side of the space station, the part of the station (where I want to attach the new part) must have
+ -- a connection into the positive direction. Otherwise I look from the negative side and so the part of the station must have a connection into the negative direction.
+ if Dir==1 then
+ conn="+"
+ elseif Dir==-1 then
+ conn="-"
+ end
+ -- I look from the direction defined through Dir, and here I check, whether I have reached a side of the space station, which means at position lx,ly,lz is nothing and
+ -- at the next position is a part which can have a connection into the direction from where I look.
+ if grid[lx][ly][lz][0] == 0 and grid[lx+(-1*xAxis*Dir)][ly+(-1*yAxis*Dir)][lz+(-1*zAxis*Dir)][0] == 1 and (grid[lx+(-1*xAxis*Dir)][ly+(-1*yAxis*Dir)][lz+(-1*zAxis*Dir)][coord]=="+-" or grid[lx+(-1*xAxis*Dir)][ly+(-1*yAxis*Dir)][lz+(-1*zAxis*Dir)][coord]==conn) then
+ -- This checks whether the part fits at that position or not.
+ check=checkPart(index,lx,ly,lz)
+ if check == 1 then
+ -- This prints the part.
+ printModel(lx,ly,lz,index,printMovEnt,printSide)
+ partSet=1
+ -- This actualizes the grid array with the values of the array bodyParts at the position index.
+ actualizeGrid(index,lx,ly,lz)
+ end
+ end
+ return partSet
end
-- End function setPart().
@@ -489,47 +489,47 @@
-- The argument index here must be an array, where you define the index for your part for the bodyParts array. The first used index is 1 and goes up to parts.
-- The argument parts is the number of different parts which you want to attach to a side.
function spiralSet(xAxis,yAxis,zAxis,Dir,index,parts,printMovEnt,printSide)
- if index[0] ~= false then
- -- The array vector contains the actual position where you try to set the part. vector[0],vector[1] and vector[3] contains the x,y,z-coordinate.
- vector={}
- -- This must be done, because there are different sides from where I try to attach a part.
- coord1=1*yAxis+2*zAxis
- coord2=math.mod(coord1+1,3)
- coord3=math.mod(coord2+1,3)
+ if index[0] ~= false then
+ -- The array vector contains the actual position where you try to set the part. vector[0],vector[1] and vector[3] contains the x,y,z-coordinate.
+ vector={}
+ -- This must be done, because there are different sides from where I try to attach a part.
+ coord1=1*yAxis+2*zAxis
+ coord2=math.mod(coord1+1,3)
+ coord3=math.mod(coord2+1,3)
- for pc=1,parts do
- tempIndex = index[pc]
- for eachPart=1,bodyParts[tempIndex][0][0][0][10] do
- partSet=0
- vector[coord1]=math.floor(Dir*sSSize/2)-2*Dir
- while vector[coord1]~=math.floor(-1*Dir*sSSize/2)+2*Dir and partSet==0 do
- round=0
- while round<=math.floor(sSSize/2)-2 and partSet==0 do
- vector[coord2]=round
- vector[coord3]=-round
- while vector[coord3]<=round and partSet==0 do
- partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
- vector[coord3]=vector[coord3]+1
- end
- while vector[coord2]>=-round and partSet==0 do
- partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
- vector[coord2]=vector[coord2]-1
- end
- while vector[coord3]>-round and partSet==0 do
- partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
- vector[coord3]=vector[coord3]-1
- end
- while vector[coord2]<=round and partSet==0 do
- partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
- vector[coord2]=vector[coord2]+1
- end
- round=round+1
- end
- vector[coord1]=vector[coord1]-Dir
- end
- end
- end
- end
+ for pc=1,parts do
+ tempIndex = index[pc]
+ for eachPart=1,bodyParts[tempIndex][0][0][0][10] do
+ partSet=0
+ vector[coord1]=math.floor(Dir*sSSize/2)-2*Dir
+ while vector[coord1]~=math.floor(-1*Dir*sSSize/2)+2*Dir and partSet==0 do
+ round=0
+ while round<=math.floor(sSSize/2)-2 and partSet==0 do
+ vector[coord2]=round
+ vector[coord3]=-round
+ while vector[coord3]<=round and partSet==0 do
+ partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
+ vector[coord3]=vector[coord3]+1
+ end
+ while vector[coord2]>=-round and partSet==0 do
+ partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
+ vector[coord2]=vector[coord2]-1
+ end
+ while vector[coord3]>-round and partSet==0 do
+ partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
+ vector[coord3]=vector[coord3]-1
+ end
+ while vector[coord2]<=round and partSet==0 do
+ partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
+ vector[coord2]=vector[coord2]+1
+ end
+ round=round+1
+ end
+ vector[coord1]=vector[coord1]-Dir
+ end
+ end
+ end
+ end
end
-- End function spiralSet().
@@ -553,37 +553,37 @@
-- Define at which position in the x-direction you're space station will end.
xMax=math.random(math.floor(xLength/2),math.floor(xLength/2)+xVar)
while x<xMax do
- -- The same for the y- and z-direction.
- y=math.random(-math.floor(yLength/2),-math.floor(yLength/2)+yVar)
- yMax=math.random(math.floor(yLength/2),math.floor(yLength/2)+yVar)
- while y<yMax do
- yMax=math.random(math.floor(yLength/2),math.floor(yLength/2)+yVar)
- z=math.random(-math.floor(zLength/2),-math.floor(zLength/2)+zVar)
- zMax=math.random(math.floor(zLength/2),math.floor(zLength/2)+zVar)
- while z<zMax do
- -- This loop choses a bodypart, which fits at position (x,y,z).
- -- If after the fifth time the part does still not fit we terminate the loop and set no part at postition (x,y,z).
- partSet=0
- counter=0
- while counter<5 and partSet==0 do
- -- This choses randomly a bodyPartIndex, which is the index used for the parts in the array bodyParts.
- tempBodyPartIndex=math.random(1,sSBodyParts)
- check=checkPart(tempBodyPartIndex,x,y,z)
- -- If check == 1, this means that the part fits there, so we put it there and break the while true loop, to go on.
- if check == 1 then
- -- This prints the chosen part at position (x*gridDim*sSScale,y*gridDim*sSScale,z*gridDim*sSScale).
- printModel(x,y,z,tempBodyPartIndex,false,1)
- -- This actualizes the grid array with the values of the array bodyParts at the position tempBodyPartIndex, which is our randomly chosen part.
- actualizeGrid(tempBodyPartIndex,x,y,z)
- partSet=1
- end
- counter=counter+1
- end
- z=z+1
- end
- y=y+1
- end
- x=x+1
+ -- The same for the y- and z-direction.
+ y=math.random(-math.floor(yLength/2),-math.floor(yLength/2)+yVar)
+ yMax=math.random(math.floor(yLength/2),math.floor(yLength/2)+yVar)
+ while y<yMax do
+ yMax=math.random(math.floor(yLength/2),math.floor(yLength/2)+yVar)
+ z=math.random(-math.floor(zLength/2),-math.floor(zLength/2)+zVar)
+ zMax=math.random(math.floor(zLength/2),math.floor(zLength/2)+zVar)
+ while z<zMax do
+ -- This loop choses a bodypart, which fits at position (x,y,z).
+ -- If after the fifth time the part does still not fit we terminate the loop and set no part at postition (x,y,z).
+ partSet=0
+ counter=0
+ while counter<5 and partSet==0 do
+ -- This choses randomly a bodyPartIndex, which is the index used for the parts in the array bodyParts.
+ tempBodyPartIndex=math.random(1,sSBodyParts)
+ check=checkPart(tempBodyPartIndex,x,y,z)
+ -- If check == 1, this means that the part fits there, so we put it there and break the while true loop, to go on.
+ if check == 1 then
+ -- This prints the chosen part at position (x*gridDim*sSScale,y*gridDim*sSScale,z*gridDim*sSScale).
+ printModel(x,y,z,tempBodyPartIndex,false,1)
+ -- This actualizes the grid array with the values of the array bodyParts at the position tempBodyPartIndex, which is our randomly chosen part.
+ actualizeGrid(tempBodyPartIndex,x,y,z)
+ partSet=1
+ end
+ counter=counter+1
+ end
+ z=z+1
+ end
+ y=y+1
+ end
+ x=x+1
end
-- End attach all bodyparts.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -592,31 +592,31 @@
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Attach backParts, if there are some.
- spiralSet(0,0,1,1,backPartsIndex,backParts,false,1)
+ spiralSet(0,0,1,1,backPartsIndex,backParts,false,1)
-- End attach backParts.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Attach frontParts, if there are.
- spiralSet(0,0,1,-1,frontPartsIndex,frontParts,false,1)
+ spiralSet(0,0,1,-1,frontPartsIndex,frontParts,false,1)
-- End attach frontParts.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Attach parts on the left side of the space station.
- spiralSet(1,0,0,-1,leftSidePartsIndex,leftSideParts,true,1)
+ spiralSet(1,0,0,-1,leftSidePartsIndex,leftSideParts,true,1)
-- End attach left side parts.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Attach parts on the right side of the space station.
- spiralSet(1,0,0,1,rightSidePartsIndex,rightSideParts,true,2)
+ spiralSet(1,0,0,1,rightSidePartsIndex,rightSideParts,true,2)
-- End attach right side parts.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Attach parts on top of the space station.
- spiralSet(0,1,0,1,topPartsIndex,topParts,true,1)
+ spiralSet(0,1,0,1,topPartsIndex,topParts,true,1)
-- End attach top parts.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -626,28 +626,28 @@
-- Attach all connectionparts.
-- This iterates through the whole grid array.
if connPartsIndex[0] ~= false then
- for x=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
- for y=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
- for z=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
- tempConnPartIndex=connPartsIndex[math.random(1,connParts)]
- -- This checks whether there has to be a connection part between (x,y,z) and (x+1,y,z) or not. First it checks if there is a part at (x,y,z) and
- -- then it checks if that part can have a connection into the positive x-direction, if it can, it checks if there is a part at (x+1,y,z) and
- -- if that part can have a connection into the negative x-direction, if both can, it prints the xml code to set a connection part.
- if grid[x][y][z][0]==1 and (grid[x][y][z][1]=="+" or grid[x][y][z][1]=="+-") and grid[x+1][y][z][0]==1 and (grid[x+1][y][z][1]=="-" or grid[x+1][y][z][1]=="+-") then
- -- This prints the connection part, the +1/2 is because the connection is set exactly in the middle of two gridpoints.
- printModel(x+1/2,y,z,tempConnPartIndex,false,1)
- end
- -- The same as in the x-direction, but for the y-direction.
- if grid[x][y][z][0]==1 and ( grid[x][y][z][2]=="+" or grid[x][y][z][2]=="+-" ) and grid[x][y+1][z][0]==1 and ( grid[x][y+1][z][2]=="-" or grid[x][y+1][z][2]=="+-" ) then
- printModel(x,y+1/2,z,tempConnPartIndex,false,2)
- end
- -- The same as in the x-direction, but for the z-direction.
- if grid[x][y][z][0]==1 and ( grid[x][y][z][3]=="+" or grid[x][y][z][3]=="+-" ) and grid[x][y][z+1][0]==1 and ( grid[x][y][z+1][3]=="-" or grid[x][y][z+1][3]=="+-" ) then
- printModel(x,y,z+1/2,tempConnPartIndex,false,3)
- end
- end
- end
- end
+ for x=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
+ for y=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
+ for z=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
+ tempConnPartIndex=connPartsIndex[math.random(1,connParts)]
+ -- This checks whether there has to be a connection part between (x,y,z) and (x+1,y,z) or not. First it checks if there is a part at (x,y,z) and
+ -- then it checks if that part can have a connection into the positive x-direction, if it can, it checks if there is a part at (x+1,y,z) and
+ -- if that part can have a connection into the negative x-direction, if both can, it prints the xml code to set a connection part.
+ if grid[x][y][z][0]==1 and (grid[x][y][z][1]=="+" or grid[x][y][z][1]=="+-") and grid[x+1][y][z][0]==1 and (grid[x+1][y][z][1]=="-" or grid[x+1][y][z][1]=="+-") then
+ -- This prints the connection part, the +1/2 is because the connection is set exactly in the middle of two gridpoints.
+ printModel(x+1/2,y,z,tempConnPartIndex,false,1)
+ end
+ -- The same as in the x-direction, but for the y-direction.
+ if grid[x][y][z][0]==1 and ( grid[x][y][z][2]=="+" or grid[x][y][z][2]=="+-" ) and grid[x][y+1][z][0]==1 and ( grid[x][y+1][z][2]=="-" or grid[x][y+1][z][2]=="+-" ) then
+ printModel(x,y+1/2,z,tempConnPartIndex,false,2)
+ end
+ -- The same as in the x-direction, but for the z-direction.
+ if grid[x][y][z][0]==1 and ( grid[x][y][z][3]=="+" or grid[x][y][z][3]=="+-" ) and grid[x][y][z+1][0]==1 and ( grid[x][y][z+1][3]=="-" or grid[x][y][z+1][3]=="+-" ) then
+ printModel(x,y,z+1/2,tempConnPartIndex,false,3)
+ end
+ end
+ end
+ end
end
-- End attach all connectionparts.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -670,7 +670,7 @@
-- This function is for the lazy guys, which do not care how the space station looks like, so I use some good standard values.
function createSpaceStation()
- createSpaceStationPar(0,4,1,2,1,6,1,100)
+ createSpaceStationPar(0,4,1,2,1,6,1,100)
end
-- End createSpaceStaion() function.
Modified: code/branches/presentation2012merge/data/levels/includes/asteroidField.lua
===================================================================
--- code/branches/presentation2012merge/data/levels/includes/asteroidField.lua 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/includes/asteroidField.lua 2012-06-03 16:05:24 UTC (rev 9272)
@@ -1,103 +1,101 @@
--[[ fog generator
generates fog
- posX, posY, posZ - position in space
- size - size of billboard
- brightness - [0,1] fog brightness
+ posX, posY, posZ - position in space
+ size - size of billboard
+ brightness - [0,1] fog brightness
--]]
function generateFog(posX, posY, posZ, size, brightness)
- print("<Billboard ")
- print("position = \"")
- print(posX) print(",")
- print(posY) print(",")
- print(posZ) print("\" ")
- print("colour=\"")
- print(brightness) print(",")
- print(brightness) print(",")
- print(brightness) print("\" ")
- print("material=\"Smoke/Smoke\" scale=")
- print(size)
- print(" />")
+ print("<Billboard ")
+ print("position = \"")
+ print(posX) print(",")
+ print(posY) print(",")
+ print(posZ) print("\" ")
+ print("colour=\"")
+ print(brightness) print(",")
+ print(brightness) print(",")
+ print(brightness) print("\" ")
+ print("material=\"Smoke/Smoke\" scale=")
+ print(size)
+ print(" />")
end
--[[ asteroid field generator
generates asteroid field
- posX, posY, posZ - position in space
- minSize, maxSize - size boundaries of each asteroid
- radius - size of the cube around position in space
- count - number of asteroids
- fog - enable fog 0/1
+ posX, posY, posZ - position in space
+ minSize, maxSize - size boundaries of each asteroid
+ radius - size of the cube around position in space
+ count - number of asteroids
+ fog - enable fog 0/1
--]]
function asteroidField(posX, posY, posZ, minSize, maxSize, radius, count, fog)
- for i = 1, count, 1
- do
- size = (math.random() * (maxSize - minSize)) + minSize
- pX = (2 * math.random() * radius) - radius + posX
- pY = (2 * math.random() * radius) - radius + posY
- pZ = (2 * math.random() * radius) - radius + posZ
- print("<StaticEntity ")
-
- print("position = \"")
- print(pX) print(",")
- print(pY) print(",")
- print(pZ) print("\" ")
-
- print("scale = \"") print(size) print("\" ")
-
- print("collisionType = static linearDamping = 0.8 angularDamping = 1 ")
- print("collisiondamage = 1000 enablecollisiondamage = true>")
-
- print("<attached>")
- print("<Model mass=\"") print(size * 10) print("\" ")
- print("mesh=\"ast") print(math.mod(i,6) + 1) print(".mesh\" />")
- print("</attached>")
-
- print("<collisionShapes> ")
- print("<SphereCollisionShape radius=\"")
- print(size * 2.5) print("\" />")
- print("</collisionShapes>")
-
- print("</StaticEntity>")
-
- if fog == 1 and i % 5 == 0 then
- generateFog(pX, pY, pZ, radius*0.04, 0.2)
- end
- end
+ for i = 1, count, 1 do
+ size = (math.random() * (maxSize - minSize)) + minSize
+ pX = (2 * math.random() * radius) - radius + posX
+ pY = (2 * math.random() * radius) - radius + posY
+ pZ = (2 * math.random() * radius) - radius + posZ
+ print("<StaticEntity ")
+
+ print("position = \"")
+ print(pX) print(",")
+ print(pY) print(",")
+ print(pZ) print("\" ")
+
+ print("scale = \"") print(size) print("\" ")
+
+ print("collisionType = static linearDamping = 0.8 angularDamping = 1 ")
+ print("collisiondamage = 1000 enablecollisiondamage = true>")
+
+ print("<attached>")
+ print("<Model mass=\"") print(size * 10) print("\" ")
+ print("mesh=\"ast") print(math.mod(i,6) + 1) print(".mesh\" />")
+ print("</attached>")
+
+ print("<collisionShapes> ")
+ print("<SphereCollisionShape radius=\"")
+ print(size * 2.5) print("\" />")
+ print("</collisionShapes>")
+
+ print("</StaticEntity>")
+
+ if fog == 1 and i % 5 == 0 then
+ generateFog(pX, pY, pZ, radius*0.04, 0.2)
+ end
+ end
end
--[[ asteroid belt generator
generates asteroid belt
- posX, posY, posZ - position in space
- yaw, pitch - rotation
- minSize, maxSize - size boundaries of each asteroid
- radius0, radius1 - inner/outer radius
- count - number of asteroids
- fog - enable fog 0/1
+ posX, posY, posZ - position in space
+ yaw, pitch - rotation
+ minSize, maxSize - size boundaries of each asteroid
+ radius0, radius1 - inner/outer radius
+ count - number of asteroids
+ fog - enable fog 0/1
--]]
function asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog)
- dPhi = (2 * math.pi) / segments
- width = math.abs(radius1 - radius0)
- radius = (radius1 + radius0) / 2
- segmentCount = count / segments
-
- print("<StaticEntity collisionType=static yaw=") print(yaw)
- print(" pitch=") print(pitch)
-
- print(" position = \"")
- print(centerX) print(",")
- print(centerY) print(",")
- print(centerZ) print("\"")
- print(">")
-
- print("<attached>")
-
- for i = 0, segments - 1, 1
- do
- asteroidField((radius * math.cos(i * dPhi)),
- (radius * math.sin(i * dPhi)),
- 0, minSize, maxSize, width, segmentCount, fog)
- end
-
- print("</attached>")
- print("</StaticEntity>")
+ dPhi = (2 * math.pi) / segments
+ width = math.abs(radius1 - radius0)
+ radius = (radius1 + radius0) / 2
+ segmentCount = count / segments
+
+ print("<StaticEntity collisionType=static yaw=") print(yaw)
+ print(" pitch=") print(pitch)
+
+ print(" position = \"")
+ print(centerX) print(",")
+ print(centerY) print(",")
+ print(centerZ) print("\"")
+ print(">")
+
+ print("<attached>")
+
+ for i = 0, segments - 1, 1 do
+ asteroidField((radius * math.cos(i * dPhi)),
+ (radius * math.sin(i * dPhi)),
+ 0, minSize, maxSize, width, segmentCount, fog)
+ end
+
+ print("</attached>")
+ print("</StaticEntity>")
end
Modified: code/branches/presentation2012merge/data/levels/includes/weaponSettingsFPS.oxi
===================================================================
--- code/branches/presentation2012merge/data/levels/includes/weaponSettingsFPS.oxi 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/includes/weaponSettingsFPS.oxi 2012-06-03 16:05:24 UTC (rev 9272)
@@ -1,8 +1,10 @@
<weaponslots>
<WeaponSlot position="0,0,0" yaw=0 pitch=0 roll=0 />
- <!-- <WeaponSlot position="-0.5,0.8,2.5" yaw=0 pitch=0 roll=0 />
+<!--
+ <WeaponSlot position="-0.5,0.8,2.5" yaw=0 pitch=0 roll=0 />
<WeaponSlot position="15,-1.5,-25" yaw=0 pitch=0 roll=0 />
- <WeaponSlot position="0,0,-45" yaw=0 pitch=0 roll=0 /> -->
+ <WeaponSlot position="0,0,-45" yaw=0 pitch=0 roll=0 />
+-->
</weaponslots>
<weaponsets>
<WeaponSet firemode=0 />
@@ -10,14 +12,14 @@
</weaponsets>
<weapons>
<WeaponPack firemode=0>
- <links>
+ <links>
<DefaultWeaponmodeLink firemode=0 weaponmode=0 />
<DefaultWeaponmodeLink firemode=1 weaponmode=1 />
<DefaultWeaponmodeLink firemode=2 weaponmode=2 />
</links>
- <Weapon>
- <HsW01 mode=0 munitionpershot=0 delay=0.0 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.7, -0.3, -3" />
- <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20/>
+ <Weapon>
+ <HsW01 mode=0 munitionpershot=0 delay=0.0 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.7, -0.3, -3" />
+ <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20/>
</Weapon>
<LaserGun
position="0,0,0"
@@ -27,7 +29,7 @@
speed="1000"
unlimitedMunition=true
/>
- <!-- <LaserGun
+ <!--LaserGun
position="0,0,0"
munitionType="LaserGunMunition"
bulletLoadingTime="0.2"
@@ -44,6 +46,6 @@
magazineLoadingTime="3"
speed="600"
unlimitedMunition=true
- /> -->
+ /-->
</WeaponPack>
</weapons>
Modified: code/branches/presentation2012merge/data/levels/lastManStanding.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/lastManStanding.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/lastManStanding.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -32,7 +32,7 @@
include("includes/pickups.oxi")
?>
-<!----- Spawnpoints
+<!----- Spawnpoints
<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="-1150,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
<SpawnPoint team=0 position="1150,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
@@ -43,7 +43,7 @@
<Bot />
<!-- ------------ middle asteroid -------------- -->
- <StaticEntity position="0,0,0" collisionType=static>
+ <StaticEntity position="0,0,0" collisionType=static>
<attached>
<MovableEntity position="0,20,0" rotationrate="-4.5" rotationaxis="0,1,0" >
<attached>
@@ -78,7 +78,7 @@
<StaticEntity position="<?lua print(y) ?>,0,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="<?lua print(j * 2) ?>,100,<?lua print(j * 2) ?>" position = "0,0,0" />
@@ -88,7 +88,7 @@
<StaticEntity position="<?lua print(y) ?>,100,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i+3,6) + 1) ?>.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
@@ -98,7 +98,7 @@
<StaticEntity position="<?lua print(y) ?>,200,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*5,6) + 1) ?>.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
@@ -108,7 +108,7 @@
<StaticEntity position="<?lua print(y) ?>,-100,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*13+1,6) + 1) ?>.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
@@ -118,7 +118,7 @@
<StaticEntity position="<?lua print(y) ?>,-200,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*17,6) + 1) ?>.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
@@ -129,7 +129,7 @@
<StaticEntity position="<?lua print(y) ?>,300,<?lua print(z) ?>" scale="<?lua print(j * 2.1) ?>" pitch="90" roll="180" yaw="<?lua print(-90+i*360/max) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=25 mesh="ast6.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="50,140,30" position="0,0,0"/>
Modified: code/branches/presentation2012merge/data/levels/lastTeamStanding.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/lastTeamStanding.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/lastTeamStanding.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -73,7 +73,7 @@
<StaticEntity position="<?lua print(y) ?>,0,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="<?lua print(j * 2) ?>,100,<?lua print(j * 2) ?>" position = "0,0,0" />
@@ -83,7 +83,7 @@
<StaticEntity position="<?lua print(y) ?>,100,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i+3,6) + 1) ?>.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
@@ -93,7 +93,7 @@
<StaticEntity position="<?lua print(y) ?>,200,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*5,6) + 1) ?>.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
@@ -103,7 +103,7 @@
<StaticEntity position="<?lua print(y) ?>,-100,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*13+1,6) + 1) ?>.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
@@ -113,7 +113,7 @@
<StaticEntity position="<?lua print(y) ?>,-200,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*17,6) + 1) ?>.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
@@ -124,7 +124,7 @@
<StaticEntity position="<?lua print(y) ?>,300,<?lua print(z) ?>" scale="<?lua print(j * 2.1) ?>" pitch="90" roll="180" yaw="<?lua print(-90+i*360/max) ?>" collisionType=static >
<attached>
<Model position="0,0,0" scale=25 mesh="ast6.mesh">
- </Model>
+ </Model>
</attached>
<collisionShapes>
<BoxCollisionShape halfExtents="50,140,30" position="0,0,0"/>
Modified: code/branches/presentation2012merge/data/levels/old/CuboidSpaceStation.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/old/CuboidSpaceStation.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/old/CuboidSpaceStation.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -1,25 +1,25 @@
<?lua
- include("HUDTemplates3.oxo")
+ include("HUDTemplates3.oxo")
?>
<?lua
- include("templates/spaceshipAssff.oxt")
+ include("templates/spaceshipAssff.oxt")
?>
<Level
- name = "SpaceStation test Space!"
- description = "All the new SpaceStations are created here!"
+ name = "SpaceStation test Space!"
+ description = "All the new SpaceStations are created here!"
>
- <Scene
- ambientlight = "0.5, 0.5, 0.5"
- skybox = "Orxonox/Starbox"
- >
+ <Scene
+ ambientlight = "0.5, 0.5, 0.5"
+ skybox = "Orxonox/Starbox"
+ >
<!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<?lua
- dofile("includes/CuboidSpaceStation.lua")
+ dofile("includes/CuboidSpaceStation.lua")
?>
<!-- The following examples insert some space station in various ways, so I guess you will understand how to use my .lua file and the functions of it.
@@ -28,7 +28,7 @@
<!-- Here I add a space station at position 0,0,0 without velocity and no rotation.
--->
<?lua
- createSpaceStation()
+ createSpaceStation()
?>
@@ -36,11 +36,11 @@
<!-- Here I add a space station at position 0,0,-5000 without velocity and no rotation.
--->
<PositionableEntity scale=1 position="0,0,-5000">
- <attached>
- <?lua
- createSpaceStation()
- ?>
- </attached>
+ <attached>
+ <?lua
+ createSpaceStation()
+ ?>
+ </attached>
</PositionableEntity>
@@ -48,11 +48,11 @@
<!-- Here I add a space station at position 5000,0,0 with velocity 50,0,0 and a rotation so that the space station faces into the positive x-axis.
--->
<MovableEntity scale=1 position="5000,0,0" velocity="50,0,0" yaw=-90>
- <attached>
- <?lua
- createSpaceStation()
- ?>
- </attached>
+ <attached>
+ <?lua
+ createSpaceStation()
+ ?>
+ </attached>
</MovableEntity>
@@ -60,11 +60,11 @@
<!-- Here I add a space station at position -5000,0,0 without velocity but rotation around his own y-axis.
--->
<MovableEntity scale=1 position="-5000,0,0" rotationaxis="0,1,0" rotationrate=5>
- <attached>
- <?lua
- createSpaceStation()
- ?>
- </attached>
+ <attached>
+ <?lua
+ createSpaceStation()
+ ?>
+ </attached>
</MovableEntity>
@@ -76,16 +76,16 @@
---- Then I rotate also the second MovableEntity around his own z-axis, so the space station rotates also around its own axis.
--->
<MovableEntity scale=1 position="0,0,0" rotationaxis="0,1,0" rotationrate=3>
- <attached>
- <MovableEntity scale=1 position="10000,0,0" rotationaxis="0,0,1" rotationrate=2>
- <attached>
- <?lua
- -- Here I use the createSpaceStationPar(...) function, which has 8 arguments, see the .lua file at the top to understand them.
- createSpaceStationPar(0,2,1,2,1,2,1,50)
- ?>
- </attached>
- </MovableEntity>
- </attached>
+ <attached>
+ <MovableEntity scale=1 position="10000,0,0" rotationaxis="0,0,1" rotationrate=2>
+ <attached>
+ <?lua
+ -- Here I use the createSpaceStationPar(...) function, which has 8 arguments, see the .lua file at the top to understand them.
+ createSpaceStationPar(0,2,1,2,1,2,1,50)
+ ?>
+ </attached>
+ </MovableEntity>
+ </attached>
</MovableEntity>
@@ -94,7 +94,7 @@
- <ParticleSpawner position="0,0,0" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
+ <ParticleSpawner position="0,0,0" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
<events>
<spawn>
<EventTrigger delay=1>
Modified: code/branches/presentation2012merge/data/levels/presentationFS10Ed.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/presentationFS10Ed.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/presentationFS10Ed.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -38,7 +38,7 @@
<BoxCollisionShape position="0,0,0" halfExtents="25,25,25" />
</collisionShapes>
</Pawn>
-
+
<Pawn health=100 position="0,-35,0" direction="0,-1,0" collisionType=dynamic mass=100000>
<attached>
<Model position="0,0,0" mesh="crate.mesh" scale3D="5,5,5" />
@@ -47,7 +47,7 @@
<BoxCollisionShape position="0,0,0" halfExtents="25,25,25" />
</collisionShapes>
</Pawn>
-
+
<StaticEntity position="0,-50,0" direction="0,-1,0" collisionType=static mass=100000 >
<attached>
<Model position="0,0,0" mesh="cube.mesh" scale3D="100,100,10" />
@@ -65,7 +65,7 @@
<BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
</collisionShapes>
</StaticEntity>
-
+
<StaticEntity position="600,-20,0" direction="0,-1,0" collisionType=static mass=100000 >
<attached>
<Model position="0,0,0" mesh="cube_green.mesh" scale3D="100,100,10" />
@@ -83,7 +83,7 @@
<BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
</collisionShapes>
</StaticEntity>
-
+
<StaticEntity position="600,40,250" direction="0,-1,0" collisionType=static mass=100000 >
<attached>
<Model position="0,0,0" mesh="cube.mesh" scale3D="100,100,10" />
@@ -92,8 +92,8 @@
<BoxCollisionShape position="0,0,0" halfExtents="100,100,10" />
</collisionShapes>
</StaticEntity>
-
-
+
+
<StaticEntity position="6000,0,10250" direction="0,0,0" collisionType=static mass=100000 >
<attached>
<Model position="0,0,0" mesh="cube_green.mesh" scale3D="10000,10,10000" />
@@ -102,7 +102,7 @@
<BoxCollisionShape position="0,0,0" halfExtents="10000,10,10000" />
</collisionShapes>
</StaticEntity>
-
+
<Pawn health=100 position="530,70,1450" direction="-1,0,0" collisionType=dynamic mass=1 >
<attached>
<Model position="0,0,0" mesh="cube_red.mesh" scale3D="60,60,10" />
@@ -111,7 +111,7 @@
<BoxCollisionShape position="0,0,0" halfExtents="60,60,10" />
</collisionShapes>
</Pawn>
-
+
<Pawn health=100 position="670,70,1450" direction="-1,0,0" collisionType=dynamic mass=1 >
<attached>
<Model position="0,0,0" mesh="cube_red.mesh" scale3D="60,60,10" />
@@ -120,7 +120,7 @@
<BoxCollisionShape position="0,0,0" halfExtents="60,60,10" />
</collisionShapes>
</Pawn>
-
+
<Pawn health=100 position="600,70,1500" direction="0,0,-1" collisionType=dynamic mass=1 >
<attached>
<Model position="0,0,0" mesh="cube_red.mesh" scale3D="60,60,10" />
@@ -129,7 +129,7 @@
<BoxCollisionShape position="0,0,0" halfExtents="60,60,10" />
</collisionShapes>
</Pawn>
-
+
<Pawn health=100 position="600,150,1450" direction="0,-1,0" collisionType=dynamic mass=1 >
<attached>
<Model position="0,0,0" mesh="cube.mesh" scale3D="90,80,10" />
@@ -138,7 +138,7 @@
<BoxCollisionShape position="0,0,0" halfExtents="90,80,10" />
</collisionShapes>
</Pawn>
-
+
<Pawn health=100 position="600,35,1450" direction="0,-1,0" collisionType=dynamic mass=1 >
<attached>
<Model position="0,0,0" mesh="crate.mesh" scale3D="5,5,5" />
@@ -147,8 +147,8 @@
<BoxCollisionShape position="0,0,0" halfExtents="25,25,25" />
</collisionShapes>
</Pawn>
-
+
<SpawnPoint position="0,300,0" direction="0, 0, 0" lookat="0,0,100000000" spawnclass=FpsPlayer pawndesign=fps />
@@ -162,10 +162,10 @@
<Pawn position="<?lua print( (math.random()+10) * 1000 - 9800) ?>,<?lua print(math.random()) ?>,<?lua print( (math.random()+10) * 2000 - 19500) ?>" direction="<?lua print( (math.random()+10) * 10 - 100) ?>,<?lua print(math.random()) ?>,<?lua print(math.random()) ?>" collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 100)?> >
<attached>
<Model position="0,0,0" scale3D="<?lua print(j*100) ?>,<?lua print(g*100) ?>,<?lua print(h*100) ?>" mesh="cube<?lua
- if math.mod(i,4)==0 then print('_green') end
- if math.mod(i,4)==1 then print('_red') end
- if math.mod(i,4)==2 then print('_orange') end
- ?>.mesh" /> <!--if it's 3, cube.mesh is taken -> yellow -->
+ if math.mod(i,4)==0 then print('_green') end
+ if math.mod(i,4)==1 then print('_red') end
+ if math.mod(i,4)==2 then print('_orange') end
+ ?>.mesh" /> <!--if it's 3, cube.mesh is taken -> yellow -->
</attached>
<collisionShapes>
<BoxCollisionShape position="0,0,0" halfExtents="<?lua print(j*100) ?>,<?lua print(g*100) ?>,<?lua print(h*100) ?>" />
Modified: code/branches/presentation2012merge/data/levels/presentationHS11.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/presentationHS11.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/presentationHS11.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -137,10 +137,10 @@
<!-- Generate asteroid field and asteroid belt -->
-<!-- asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog) -->
+<!-- asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog) -->
<?lua
- dofile("includes/asteroidField.lua")
- asteroidBelt(20000, 0, 13000, -48, -34, 70, 100, 200, 22000, 20000, 500, 1)
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(20000, 0, 13000, -48, -34, 70, 100, 200, 22000, 20000, 500, 1)
?>
Modified: code/branches/presentation2012merge/data/levels/surfaceRace.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/surfaceRace.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/surfaceRace.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -11,7 +11,7 @@
include("templates/lodInformation.oxt")
include("templates/spaceshipRace.oxt")
include("templates/pickupRepresentationTemplates.oxt")
-
+
?>
@@ -38,17 +38,17 @@
<SpaceRaceManager>
- <checkpoints>
- <RaceCheckPoint name="checkpoint1" position="0,8050,-1000" direction="0,1,0" collisionType="static" scale="4" distance="150" checkpointindex="0" islast="false" nextcheckpoints="1,-1,-1">
+ <checkpoints>
+ <RaceCheckPoint name="checkpoint1" position="0,8050,-1000" direction="0,1,0" collisionType="static" scale="4" distance="150" checkpointindex="0" islast="false" nextcheckpoints="1,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
-
-<!--
- <Model position="0,0,55" mesh="testcube.mesh" scale3D="110,20,20" />
- <Model position="0,0,-55" mesh="testcube.mesh" scale3D="110,20,20" />
- <Model position="55,0,0" mesh="testcube.mesh" scale3D="20,20,110" />
- <Model position="-55,0,0" mesh="testcube.mesh" scale3D="20,20,110" />
+<!--
+ <Model position="0,0,55" mesh="testcube.mesh" scale3D="110,20,20" />
+ <Model position="0,0,-55" mesh="testcube.mesh" scale3D="110,20,20" />
+ <Model position="55,0,0" mesh="testcube.mesh" scale3D="20,20,110" />
+ <Model position="-55,0,0" mesh="testcube.mesh" scale3D="20,20,110" />
+
-->
@@ -56,7 +56,7 @@
- <collisionShapes>
+ <collisionShapes>
<BoxCollisionShape position="0,0,220" halfExtents="220, 40, 40" />
@@ -64,27 +64,27 @@
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
-
+
</RaceCheckPoint>
<RaceCheckPoint name="checkpoint2" position="1000,8050,-4000" direction="0,1,0" roll="45" collisionType="static" scale="4" distance="150" checkpointindex="1" islast="false" nextcheckpoints="2,-1,-1">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
-
+
<collisionShapes>
<BoxCollisionShape position="0,0,220" halfExtents="220, 40, 40" />
<BoxCollisionShape position="0,0,-220" halfExtents="220, 40, 40" />
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -102,7 +102,7 @@
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -120,7 +120,7 @@
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -138,7 +138,7 @@
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -156,7 +156,7 @@
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -174,7 +174,7 @@
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -191,7 +191,7 @@
<BoxCollisionShape position="0,0,-220" halfExtents="220, 40, 40" />
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -208,7 +208,7 @@
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -226,7 +226,7 @@
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -243,7 +243,7 @@
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -260,7 +260,7 @@
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -277,7 +277,7 @@
<BoxCollisionShape position="0,0,-220" halfExtents="220, 40, 40" />
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -292,7 +292,7 @@
<BoxCollisionShape position="0,0,-220" halfExtents="220, 40, 40" />
<BoxCollisionShape position="220,0,0" halfExtents="40, 40, 220" />
<BoxCollisionShape position="-220,0,0" halfExtents="40, 40, 220" />
-
+
</collisionShapes>
</RaceCheckPoint>
@@ -302,31 +302,31 @@
<SpawnPoint team=0 position="0,8050,0" lookat="0,8000,-8000" spawnclass=SpaceShip pawndesign=spaceshipRace />
-
- <!-- -----------------------Zylinder---------------------------- -->
+
+ <!-- -----------------------Zylinder---------------------------- -->
<StaticEntity position="2750,8050,6000" direction="1,0,0" roll="90" scale="4" collisionType=static mass=100000 friction=0.01 >
<attached>
- <Model position="0,0,0" mesh="cylinder.mesh" scale3D="100,100,400" />
- <!--
- <Model position="0,80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
- <Model position="0,-80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
- <Model position="80,0,600" mesh="testcube.mesh" scale3D="18,90,-600" />
- <Model position="-80,0,600" mesh="testcube.mesh" scale3D="18,09,-600" />
- -->
+ <Model position="0,0,0" mesh="cylinder.mesh" scale3D="100,100,400" />
+ <!--
+ <Model position="0,80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
+ <Model position="0,-80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
+ <Model position="80,0,600" mesh="testcube.mesh" scale3D="18,90,-600" />
+ <Model position="-80,0,600" mesh="testcube.mesh" scale3D="18,09,-600" />
+ -->
</attached>
- <collisionShapes>
-
-
- <BoxCollisionShape position="0,320,2400" halfExtents="360,72,2400" />
- <BoxCollisionShape position="0,-320,2400" halfExtents="360,72,2400" />
- <BoxCollisionShape position="320,0,2400" halfExtents="72,360,2400" />
- <BoxCollisionShape position="-320,0,2400" halfExtents="72,360,2400" />
-
+ <collisionShapes>
-
+
+ <BoxCollisionShape position="0,320,2400" halfExtents="360,72,2400" />
+ <BoxCollisionShape position="0,-320,2400" halfExtents="360,72,2400" />
+ <BoxCollisionShape position="320,0,2400" halfExtents="72,360,2400" />
+ <BoxCollisionShape position="-320,0,2400" halfExtents="72,360,2400" />
+
+
+
</collisionShapes>
</StaticEntity>
@@ -334,38 +334,38 @@
<!-- ------------------Cube between gate 4 and 5----------------- -->
<StaticEntity position="4465,8050,-500" direction="0,0,0" scale="1" collisionType=static mass=100000 friction=0.01 >
<attached>
- <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
+ <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
<!--
- <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
- -->
+ <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
+ -->
</attached>
- <collisionShapes>
-
-
- <BoxCollisionShape position="0,0,0" halfExtents="450,600,50" />
+ <collisionShapes>
+
+ <BoxCollisionShape position="0,0,0" halfExtents="450,600,50" />
+
</collisionShapes>
</StaticEntity>
<StaticEntity position="3535,8050,-500" direction="0,0,0" scale="1" collisionType=static mass=100000 friction=0.01 >
<attached>
- <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
+ <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
<!--
- <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
- -->
+ <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
+ -->
</attached>
- <collisionShapes>
-
-
- <BoxCollisionShape position="0,0,0" halfExtents="450,600,50" />
+ <collisionShapes>
+
+ <BoxCollisionShape position="0,0,0" halfExtents="450,600,50" />
+
</collisionShapes>
</StaticEntity>
@@ -373,7 +373,7 @@
- <!-- ------------------Boden----------------- -->
+ <!-- ------------------Boden----------------- -->
<StaticEntity position="0,0,0" direction="0,0,0" collisionType=static mass=100000 friction=0.01>
<attached>
<Model position="0,0,0" mesh="CubeGround.mesh" scale3D="8000,8000,8000" />
@@ -381,7 +381,7 @@
<collisionShapes>
<BoxCollisionShape position="0,50,0" halfExtents="8000,8000,8000" />um j?:P"{
- </collisionShapes>
+ </collisionShapes>
</StaticEntity>
@@ -415,10 +415,10 @@
max = 15
for i = 0, max, 1
do
- x=-12000
- y=10000
- z=-12000
-
+ x=-12000
+ y=10000
+ z=-12000
+
?>
<?lua
for k = 1, 15, 1
Modified: code/branches/presentation2012merge/data/levels/templates/FPS.oxt
===================================================================
--- code/branches/presentation2012merge/data/levels/templates/FPS.oxt 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/templates/FPS.oxt 2012-06-03 16:05:24 UTC (rev 9272)
@@ -16,20 +16,20 @@
mass = 100
linearDamping = 0.7
angularDamping = 0.9999999
- friction = 0.01
-
+ friction = 0.01
+
weapon = "hs-w01.mesh"
>
<collisionShapes>
<BoxCollisionShape position="0,-20,0" halfExtents="15,25,15" />
</collisionShapes>
-
+
<camerapositions>
<CameraPosition position="-1,1,2.2" drag=false mouselook=true />
</camerapositions>
-
+
<?lua
- include("../includes/weaponSettingsFPS.oxi")
+ include("../includes/weaponSettingsFPS.oxi")
?>
</FpsPlayer>
@@ -39,14 +39,14 @@
<FpsPlayer>
<camerapositions>
<CameraPosition position="0,0,20" drag=false mouselook=true />
-
+
<!--
CameraPosition position="0,150,-25" pitch=-90 drag=true />
<CameraPosition position="0,0,-40" yaw=180 drag=true />
<CameraPosition position="0,3,-14" yaw=0 />
<CameraPosition position="-50,5,-8" yaw=-90 drag=true />
<CameraPosition position="50,5,-8" yaw=90 drag=true /
-
+
</camerapositions>
</FpsPlayer>
</Template>
Modified: code/branches/presentation2012merge/data/levels/templates/tower.oxt
===================================================================
--- code/branches/presentation2012merge/data/levels/templates/tower.oxt 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/templates/tower.oxt 2012-06-03 16:05:24 UTC (rev 9272)
@@ -1,7 +1,7 @@
<Template name=tower>
<Tower
-
+
explosionchunks = 6
reloadrate = 3
@@ -12,21 +12,21 @@
>
- <controller>
- <WaypointPatrolController alertnessradius=1000 team=5>
- <waypoints>
- <Model mesh="cube.mesh" scale=0 position=" 700, 200, 100" />
- </waypoints>
- </WaypointPatrolController>
- </controller>
+ <controller>
+ <WaypointPatrolController alertnessradius=1000 team=5>
+ <waypoints>
+ <Model mesh="cube.mesh" scale=0 position=" 700, 200, 100" />
+ </waypoints>
+ </WaypointPatrolController>
+ </controller>
<attached>
- <Model position="0,0,0" scale=45 mesh="Tower.mesh" />
+ <Model position="0,0,0" scale=45 mesh="Tower.mesh" />
</attached>
<!--collisionShapes>
-
+
</collisionShapes-->
<?lua
Modified: code/branches/presentation2012merge/data/levels/testStars.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/testStars.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/testStars.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -29,16 +29,16 @@
<!--Rocket position="-10, 3.5,800" velocity="0,0,-100">
<attached>
<Model pitch=180 position="0,0,0" scale=1.5 mesh="rocket_test.mesh" >
- <attached>
- <ParticleEmitter pitch=0 roll=0 position="0,5,0" source="Orxonox/laser" lifetime=2.0 loop=1 startdelay=3.0/>
- <ParticleEmitter pitch=-90 roll=0 position="0,-5,0" source="Orxonox/particlecanon" lifetime=2.0 loop=1 startdelay=3.0/>
- <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/rocketfire" lifetime=2.0 loop=1 startdelay=3.0 />
- <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/smoke" lifetime=2.0 loop=1 startdelay=3.0 />
+ <attached>
+ <ParticleEmitter pitch=0 roll=0 position="0,5,0" source="Orxonox/laser" lifetime=2.0 loop=1 startdelay=3.0/>
+ <ParticleEmitter pitch=-90 roll=0 position="0,-5,0" source="Orxonox/particlecanon" lifetime=2.0 loop=1 startdelay=3.0/>
+ <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/rocketfire" lifetime=2.0 loop=1 startdelay=3.0 />
+ <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/smoke" lifetime=2.0 loop=1 startdelay=3.0 />
</attached>
- </Model>
- </attached>
+ </Model>
+ </attached>
</Rocket-->
-
+
<CreateStars numStars="6000" material="Examples/Flare" colour="1,1,1" radius=10000 colourDiff=0.1/>
<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" />
Modified: code/branches/presentation2012merge/data/levels/towerDefense.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/towerDefense.oxw 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/levels/towerDefense.oxw 2012-06-03 16:05:24 UTC (rev 9272)
@@ -41,7 +41,7 @@
</Template>
-<!-- Template for a tower EDIT: new towertemplate is included with "templates/tower" -->
+<!-- Template for a tower EDIT: new towertemplate is included with "templates/tower" -->
<!--Template name=towertemplate>
<Tower>
<attached>
@@ -58,81 +58,81 @@
<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"/>
-
- <!-- Spawns the camera, attached to a crate -->
- <SpawnPoint team=0 position="0,0,0" spawnclass=Pawn pawndesign=centerpointmark />
- <!--TeamSpawnPoint team=1 position="-7,7,4" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff /-->
-
- <!--SpawnPoint team=1 position="0,0,10" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
- <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
-
- <SpaceShip position="-700,-500, 100" lookat="0,0,0" scale=3 team=1 >
+
+ <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+
+ <!-- Spawns the camera, attached to a crate -->
+ <SpawnPoint team=0 position="0,0,0" spawnclass=Pawn pawndesign=centerpointmark />
+ <!--TeamSpawnPoint team=1 position="-7,7,4" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff /-->
+
+ <!--SpawnPoint team=1 position="0,0,10" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
+ <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
+
+ <SpaceShip position="-700,-500, 100" lookat="0,0,0" scale=3 team=1 >
<templates>
<Template link=spaceshipassff />
</templates>
<controller>
<WaypointController accuracy=60>
<waypoints>
- <!-- 1,3 10,3 10,11, 13,11 -->
+ <!-- 1,3 10,3 10,11, 13,11 -->
<Model mesh="cube.mesh" scale=0 position="-700,-500, 150" />
<Model mesh="cube.mesh" scale=0 position=" 200,-500, 150" />
<Model mesh="cube.mesh" scale=0 position=" 200, 300, 150" />
<Model mesh="cube.mesh" scale=0 position=" 500, 300, 150" />
- <Model mesh="cube.mesh" scale=0 position=" 500, 700, 150" />
+ <Model mesh="cube.mesh" scale=0 position=" 500, 700, 150" />
</waypoints>
</WaypointController>
</controller>
</SpaceShip>
-
-
+
+
<!--invisible entity to attach towers to, since playfield is static and towers are dynamic-->
<StaticEntity position=0,0,0>
-
- <attached>
- <Model position="-50,-50,0" mesh="Playfield_ME.mesh" scale=80 />
- <!-- Base -->
- <Model position="500,700,100" mesh="sphere.mesh" scale=80 />
+
+ <attached>
+ <Model position="-50,-50,0" mesh="Playfield_ME.mesh" scale=80 />
+ <!-- Base -->
+ <Model position="500,700,100" mesh="sphere.mesh" scale=80 />
<!--Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /--> <!-- Only temporary needed to help align the collisionshape -->
- <!-- This was used to mark the playfield, let's let it be here for now -->
- <!--Model position="-8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
- <!--Model position="-8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
- <!--Model position="8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
- <!--Model position="8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
+ <!-- This was used to mark the playfield, let's let it be here for now -->
+ <!--Model position="-8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
+ <!--Model position="-8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
+ <!--Model position="8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
+ <!--Model position="8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
</attached>
<collisionShapes> <!-- The collisionshape forbids other worldentities that have a collisionShape to fly through it.
-
+
TODO: Find correct size for the collisionshape; since a collisionShape is invisible
I added the crate wich currently has the same dimensions as the collisionshape.
You have to adjust the crate's scale3D as well as the collisionshape's halfExtens to
find the proper shape. -->
<BoxCollisionShape position="0,0,0" halfExtents="400,400,100" />
</collisionShapes>
- </StaticEntity>
-
-
-
-
- <!-- PlayField -->
- <TowerDefenseCenterpoint
- name=towerdefensecenter
- width=16
- height=16
- tileScale=100
- towerTemplate=tower
- position="0,0,0"
- direction="0,0,0"
- collisionType=dynamic
- mass=100000>
-
+ </StaticEntity>
+
+
+
+
+ <!-- PlayField -->
+ <TowerDefenseCenterpoint
+ name=towerdefensecenter
+ width=16
+ height=16
+ tileScale=100
+ towerTemplate=tower
+ position="0,0,0"
+ direction="0,0,0"
+ collisionType=dynamic
+ mass=100000>
+
</TowerDefenseCenterpoint>
</Scene>
Modified: code/branches/presentation2012merge/data/overlays/towerdefenseHUD.oxo
===================================================================
--- code/branches/presentation2012merge/data/overlays/towerdefenseHUD.oxo 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/data/overlays/towerdefenseHUD.oxo 2012-06-03 16:05:24 UTC (rev 9272)
@@ -7,10 +7,8 @@
textsize = 0.05
colour = "1.0, 1.0, 1.0, 1.0"
align = "left"
-
- caption = "Hello World"
+
+ caption = "Hello World"
/>
-
-
</OverlayGroup>
</Template>
Modified: code/branches/presentation2012merge/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/gametypes/SpaceRaceManager.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/gametypes/SpaceRaceManager.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -148,7 +148,7 @@
gametype->end();
}
else
- {
+ {
// adjust the radarvisibility
gametype->newCheckpointReached(newCheckpoint, player);
this->updateRadarVisibility(oldCheckpoint, newCheckpoint);
Modified: code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -69,8 +69,8 @@
*/
void DamageBoostPickup::initialize(void)
{
- this->duration_ = 0.0f;
- this->damageMultiplier_ = 1.0f; //The default damage multiplier.
+ this->duration_ = 0.0f;
+ this->damageMultiplier_ = 1.0f; //The default damage multiplier.
//Defines who is allowed to pick up the pickup.
this->addTarget(ClassIdentifier<SpaceShip>::getIdentifier());
}
@@ -129,7 +129,7 @@
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();
+ this->Pickupable::destroy();
// If the pickup has transited to used.
Modified: code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h
===================================================================
--- code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -56,7 +56,7 @@
virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
- /**
+ /**
@brief Get the time the DamagePickup lasts.
@return Returns the time in seconds the DamagePickup lasts.
*/
@@ -94,7 +94,7 @@
float olddamageMultiplier_; //!< Helper to remember what the actual damage of the Pawn was before we changed it.
Timer durationTimer_; //!< Timer.
- float duration_; //! Duration of damage boost.
+ float duration_; //! Duration of damage boost.
};
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/CMakeLists.txt
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/CMakeLists.txt 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/CMakeLists.txt 2012-06-03 16:05:24 UTC (rev 9272)
@@ -4,7 +4,7 @@
TowerDefenseCenterpoint.cc
TowerDefenseHUDController.cc
TowerDefensePlayerStats.cc
-
+
)
ORXONOX_ADD_LIBRARY(TowerDefense
@@ -12,6 +12,6 @@
FIND_HEADER_FILES
LINK_LIBRARIES
orxonox
- overlays
+ overlays
SOURCE_FILES ${TOWERDEFENSE_SRC_FILES}
)
Modified: code/branches/presentation2012merge/src/modules/towerdefense/TDEnemy.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TDEnemy.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TDEnemy.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -12,9 +12,9 @@
{
private:
- float health;
- float speed;
- float armour;
+ float health;
+ float speed;
+ float armour;
Modified: code/branches/presentation2012merge/src/modules/towerdefense/Tower.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/Tower.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/Tower.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -16,11 +16,11 @@
namespace orxonox
{
CreateFactory(Tower);
-
+
/**
- @brief
- Constructor. Registers and initializes the object.
- */
+ @brief
+ Constructor. Registers and initializes the object.
+ */
Tower::Tower(BaseObject* creator) : Pawn(creator)
{
RegisterObject(Tower);
@@ -33,34 +33,34 @@
this->size_ = 10.0f;
this->delay_ = false;
this->delayTimer_.setTimer(0.2f, false, createExecutor(createFunctor(&TetrisStone::enableMovement, this)));
- */
+ */
}
-
- void Tower::setOrientation(const Quaternion& orientation)
- {
- static int ori;
- orxout() << "orientation " << ++ori << endl;
- }
-
- void Tower::rotateYaw(const Vector2& value)
- {
- static int yaw;
- orxout() << "rotateYaw " << ++yaw << endl;
- }
-
- void Tower::rotatePitch(const Vector2& value)
- {
- static int pitch;
- orxout() << "rotatePitch " << ++pitch << endl;
- }
-
- void Tower::rotateRoll(const Vector2& value)
- {
- static int roll;
- orxout() << "rotateRoll" << ++roll << endl;
- }
-
- // This function is called whenever a player presses the up or the down key.
+
+ void Tower::setOrientation(const Quaternion& orientation)
+ {
+ static int ori;
+ orxout() << "orientation " << ++ori << endl;
+ }
+
+ void Tower::rotateYaw(const Vector2& value)
+ {
+ static int yaw;
+ orxout() << "rotateYaw " << ++yaw << endl;
+ }
+
+ void Tower::rotatePitch(const Vector2& value)
+ {
+ static int pitch;
+ orxout() << "rotatePitch " << ++pitch << endl;
+ }
+
+ void Tower::rotateRoll(const Vector2& value)
+ {
+ static int roll;
+ orxout() << "rotateRoll" << ++roll << endl;
+ }
+
+ // This function is called whenever a player presses the up or the down key.
// You have to implement what happens when the up or the down key is pressed.
// value.x < 0 means: down key is pressed.
// I suggest to create a new class which is a controllable entity I will refer to as "TowerMover". This is the controllable entity that the
@@ -74,40 +74,40 @@
//How to place a tower: detach the tower from the TowerMover
/**
- @brief
- Overloaded the function to rotate the stone.
- @param value
- A vector whose first component is the angle by which to rotate.
- */
- /*
+ @brief
+ Overloaded the function to rotate the stone.
+ @param value
+ A vector whose first component is the angle by which to rotate.
+ */
+ /*
void Tower::moveFrontBack(const Vector2& value)
{
//orxout() << "frontBack.x: " << value.x << endl;
}
- */
-
+ */
+
/**
- @brief
- Overloaded the function to steer the stone right and left
- @param value
- A vector whose first component is the direction in which we want to steer the stone.
- */
- /*
+ @brief
+ Overloaded the function to steer the stone right and left
+ @param value
+ A vector whose first component is the direction in which we want to steer the stone.
+ */
+ /*
void Tower::moveRightLeft(const Vector2& value)
{
- //orxout() << "rightLeft.x: " << value.x << endl;
-
+ //orxout() << "rightLeft.x: " << value.x << endl;
+
if(!this->delay_)
{
const Vector3& position = this->getPosition();
Vector3 newPos = Vector3(position.x+value.x/abs(value.x)*this->size_, position.y, position.z);
if(!this->tetris_->isValidMove(this, newPos))
return;
-
+
this->setPosition(newPos);
this->delay_ = true;
this->delayTimer_.startTimer();
- }
+ }
}
- */
+ */
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/Tower.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/Tower.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/Tower.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -9,7 +9,7 @@
/**
@brief
See TowerDefenseReadme.txt for Information.
-
+
@ingroup TowerDefense
*/
@@ -19,32 +19,32 @@
#include "towerdefense/TowerDefensePrereqs.h"
#include "worldentities/pawns/SpaceShip.h"
-
+
namespace orxonox
{
class _TowerDefenseExport Tower : public Pawn
{
- public:
- Tower(BaseObject* creator);
- virtual ~Tower() {};
-
- // Maybe later override these to move towers with cursor keys
- /*
- virtual void moveFrontBack(const Vector2& value);
- virtual void moveRightLeft(const Vector2& value);
- */
-
- // Overriding these to stop towers from spasing out
- void setOrientation(const Quaternion& orientation);
+ public:
+ Tower(BaseObject* creator);
+ virtual ~Tower() {};
+
+ // Maybe later override these to move towers with cursor keys
+ /*
+ virtual void moveFrontBack(const Vector2& value);
+ virtual void moveRightLeft(const Vector2& value);
+ */
+
+ // Overriding these to stop towers from spasing out
+ void setOrientation(const Quaternion& orientation);
virtual void rotateYaw(const Vector2& value);
virtual void rotatePitch(const Vector2& value);
virtual void rotateRoll(const Vector2& value);
-
- void setGame(TowerDefense* towerdefense)
- { assert(towerdefense); game_ = towerdefense; }
- private:
- TowerDefense* game_;
+
+ void setGame(TowerDefense* towerdefense)
+ { assert(towerdefense); game_ = towerdefense; }
+ private:
+ TowerDefense* game_;
};
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -81,10 +81,10 @@
#include "worldentities/pawns/Pawn.h"
#include "worldentities/pawns/SpaceShip.h"
#include "controllers/WaypointController.h"
-
+
#include "graphics/Model.h"
#include "infos/PlayerInfo.h"
-
+
#include "chat/ChatManager.h"
/* Part of a temporary hack to allow the player to add towers */
@@ -93,216 +93,215 @@
namespace orxonox
{
CreateUnloadableFactory(TowerDefense);
-
- TowerDefense::TowerDefense(BaseObject* creator) : Deathmatch(creator)
+
+ TowerDefense::TowerDefense(BaseObject* creator) : Deathmatch(creator)
{
RegisterObject(TowerDefense);
-
+
this->setHUDTemplate("TowerDefenseHUD");
- this->stats_ = new TowerDefensePlayerStats();
+ this->stats_ = new TowerDefensePlayerStats();
- /* Temporary hack to allow the player to add towers */
- this->dedicatedAddTower_ = createConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) );
+ /* Temporary hack to allow the player to add towers */
+ this->dedicatedAddTower_ = createConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) );
}
-
+
TowerDefense::~TowerDefense()
{
- /* Part of a temporary hack to allow the player to add towers */
+ /* Part of a temporary hack to allow the player to add towers */
if (this->isInitialized())
{
if( this->dedicatedAddTower_ )
delete this->dedicatedAddTower_;
}
}
-
- void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint)
- {
- orxout() << "Centerpoint now setting..." << endl;
- this->center_ = centerpoint;
- orxout() << "Centerpoint now set..." << endl;
- }
-
+
+ void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint)
+ {
+ orxout() << "Centerpoint now setting..." << endl;
+ this->center_ = centerpoint;
+ orxout() << "Centerpoint now set..." << endl;
+ }
+
void TowerDefense::start()
{
Deathmatch::start();
-
- const int kInitialTowerCount = 3;
- Coordinate initialTowerCoordinates[kInitialTowerCount] = {{3,2}, {8,5}, {12,10}};
-
- for (int i = 0; i < kInitialTowerCount; i++)
- {
- Coordinate coordinate = initialTowerCoordinates[i];
- addTower(coordinate.x, coordinate.y);
- }
-
- ChatManager::message("Use the console command addTower x y to add towers");
- //TODO: let the player control his controllable entity && TODO: create a new ControllableEntity for the player
- }
-
- void TowerDefense::end()
- {
- Deathmatch::end();
-
- ChatManager::message("Match is over");
- }
-
- void TowerDefense::addTower(int x, int y)
- {
- const TowerCost towerCost = TDDefaultTowerCost;
-
- if (!this->hasEnoughCreditForTower(towerCost))
- {
- orxout() << "not enough credit: " << (this->stats_->getCredit()) << " available, " << TDDefaultTowerCost << " needed.";
- return;
- }
-
- if (this->towerExists(x,y))
- {
- orxout() << "tower exists!!" << endl;
- return;
- }
-
- /*
- unsigned int width = this->center_->getWidth();
- unsigned int height = this->center_->getHeight();
- */
-
- int tileScale = (int) this->center_->getTileScale();
-
- if (x > 15 || y > 15 || x < 0 || y < 0)
- {
- //Hard coded: TODO: let this depend on the centerpoint's height, width and fieldsize (fieldsize doesn't exist yet)
- orxout() << "Can not add Tower: x and y should be between 0 and 15" << endl;
- return;
- }
-
- orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl;
-
- // Add tower to coordinatesStack
- Coordinate newTowerCoordinates = {x, y};
- addedTowersCoordinates_.push_back(newTowerCoordinates);
-
- // Reduce credit
- this->stats_->buyTower(towerCost);
-
- // Create tower
- Tower* newTower = new Tower(this->center_);
- newTower->addTemplate(this->center_->getTowerTemplate());
+ const int kInitialTowerCount = 3;
+ Coordinate initialTowerCoordinates[kInitialTowerCount] = {{3,2}, {8,5}, {12,10}};
- newTower->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75);
- newTower->setGame(this);
- }
-
- bool TowerDefense::hasEnoughCreditForTower(TowerCost towerCost)
- {
- return ((this->stats_->getCredit()) >= towerCost);
- }
-
- bool TowerDefense::towerExists(int x, int y)
- {
- for(std::vector<Coordinate>::iterator it = addedTowersCoordinates_.begin(); it != addedTowersCoordinates_.end(); ++it)
- {
- Coordinate currentCoordinates = (Coordinate) (*it);
- if (currentCoordinates.x == x && currentCoordinates.y == y)
- return true;
- }
-
- return false;
- }
-
-
- void TowerDefense::tick(float dt)
+ for (int i = 0; i < kInitialTowerCount; i++)
+ {
+ Coordinate coordinate = initialTowerCoordinates[i];
+ addTower(coordinate.x, coordinate.y);
+ }
+
+ ChatManager::message("Use the console command addTower x y to add towers");
+
+ //TODO: let the player control his controllable entity && TODO: create a new ControllableEntity for the player
+ }
+
+ void TowerDefense::end()
{
+ Deathmatch::end();
+
+ ChatManager::message("Match is over");
+ }
+
+ void TowerDefense::addTower(int x, int y)
+ {
+ const TowerCost towerCost = TDDefaultTowerCost;
+
+ if (!this->hasEnoughCreditForTower(towerCost))
+ {
+ orxout() << "not enough credit: " << (this->stats_->getCredit()) << " available, " << TDDefaultTowerCost << " needed.";
+ return;
+ }
+
+ if (this->towerExists(x,y))
+ {
+ orxout() << "tower exists!!" << endl;
+ return;
+ }
+
+ /*
+ unsigned int width = this->center_->getWidth();
+ unsigned int height = this->center_->getHeight();
+ */
+
+ int tileScale = (int) this->center_->getTileScale();
+
+ if (x > 15 || y > 15 || x < 0 || y < 0)
+ {
+ //Hard coded: TODO: let this depend on the centerpoint's height, width and fieldsize (fieldsize doesn't exist yet)
+ orxout() << "Can not add Tower: x and y should be between 0 and 15" << endl;
+ return;
+ }
+
+ orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl;
+
+ // Add tower to coordinatesStack
+ Coordinate newTowerCoordinates = {x, y};
+ addedTowersCoordinates_.push_back(newTowerCoordinates);
+
+ // Reduce credit
+ this->stats_->buyTower(towerCost);
+
+ // Create tower
+ Tower* newTower = new Tower(this->center_);
+ newTower->addTemplate(this->center_->getTowerTemplate());
+
+ newTower->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75);
+ newTower->setGame(this);
+ }
+
+ bool TowerDefense::hasEnoughCreditForTower(TowerCost towerCost)
+ {
+ return ((this->stats_->getCredit()) >= towerCost);
+ }
+
+ bool TowerDefense::towerExists(int x, int y)
+ {
+ for(std::vector<Coordinate>::iterator it = addedTowersCoordinates_.begin(); it != addedTowersCoordinates_.end(); ++it)
+ {
+ Coordinate currentCoordinates = (Coordinate) (*it);
+ if (currentCoordinates.x == x && currentCoordinates.y == y)
+ return true;
+ }
+
+ return false;
+ }
+
+
+ void TowerDefense::tick(float dt)
+ {
SUPER(TowerDefense, tick, dt);
}
-
- // Function to test if we can add waypoints using code only. Doesn't work yet
-
- // THE PROBLEM: WaypointController's getControllableEntity() returns null, so it won't track. How do we get the controlableEntity to NOT BE NULL???
- /*
- void TowerDefense::addWaypointsAndFirstEnemy()
- {
- SpaceShip *newShip = new SpaceShip(this->center_);
- newShip->addTemplate("spaceshipassff");
-
- WaypointController *newController = new WaypointController(newShip);
- newController->setAccuracy(3);
-
- Model *wayPoint1 = new Model(newController);
- wayPoint1->setMeshSource("crate.mesh");
- wayPoint1->setPosition(7,-7,5);
- wayPoint1->setScale(0.2);
-
- Model *wayPoint2 = new Model(newController);
- wayPoint2->setMeshSource("crate.mesh");
- wayPoint2->setPosition(7,7,5);
- wayPoint2->setScale(0.2);
-
- newController->addWaypoint(wayPoint1);
- newController->addWaypoint(wayPoint2);
-
- // The following line causes the game to crash
- newShip->setController(newController);
-// newController -> getPlayer() -> startControl(newShip);
- newShip->setPosition(-7,-7,5);
- newShip->setScale(0.1);
- //newShip->addSpeed(1);
-
-
-
-// this->center_->attach(newShip);
- }
- */
- /*
- void TowerDefense::playerEntered(PlayerInfo* player)
- {
- Deathmatch::playerEntered(player);
-
- const std::string& message = player->getName() + " entered the game";
- ChatManager::message(message);
- }
-
- bool TowerDefense::playerLeft(PlayerInfo* player)
- {
- bool valid_player = Deathmatch::playerLeft(player);
-
- if (valid_player)
- {
- const std::string& message = player->getName() + " left the game";
- ChatManager::message(message);
- }
-
- return valid_player;
- }
-
-
- void TowerDefense::pawnKilled(Pawn* victim, Pawn* killer)
- {
- if (victim && victim->getPlayer())
- {
- std::string message;
- if (killer)
- {
- if (killer->getPlayer())
- message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();
- else
- message = victim->getPlayer()->getName() + " was killed";
- }
- else
- message = victim->getPlayer()->getName() + " died";
-
- ChatManager::message(message);
- }
-
- Deathmatch::pawnKilled(victim, killer);
- }
-
- void TowerDefense::playerScored(PlayerInfo* player)
- {
- Gametype::playerScored(player);
-
- }*/
+ // Function to test if we can add waypoints using code only. Doesn't work yet
+
+ // THE PROBLEM: WaypointController's getControllableEntity() returns null, so it won't track. How do we get the controlableEntity to NOT BE NULL???
+ /*
+ void TowerDefense::addWaypointsAndFirstEnemy()
+ {
+ SpaceShip *newShip = new SpaceShip(this->center_);
+ newShip->addTemplate("spaceshipassff");
+
+ WaypointController *newController = new WaypointController(newShip);
+ newController->setAccuracy(3);
+
+ Model *wayPoint1 = new Model(newController);
+ wayPoint1->setMeshSource("crate.mesh");
+ wayPoint1->setPosition(7,-7,5);
+ wayPoint1->setScale(0.2);
+
+ Model *wayPoint2 = new Model(newController);
+ wayPoint2->setMeshSource("crate.mesh");
+ wayPoint2->setPosition(7,7,5);
+ wayPoint2->setScale(0.2);
+
+ newController->addWaypoint(wayPoint1);
+ newController->addWaypoint(wayPoint2);
+
+ // The following line causes the game to crash
+
+ newShip->setController(newController);
+// newController -> getPlayer() -> startControl(newShip);
+ newShip->setPosition(-7,-7,5);
+ newShip->setScale(0.1);
+ //newShip->addSpeed(1);
+
+
+
+// this->center_->attach(newShip);
+ }
+ */
+ /*
+ void TowerDefense::playerEntered(PlayerInfo* player)
+ {
+ Deathmatch::playerEntered(player);
+
+ const std::string& message = player->getName() + " entered the game";
+ ChatManager::message(message);
+ }
+
+ bool TowerDefense::playerLeft(PlayerInfo* player)
+ {
+ bool valid_player = Deathmatch::playerLeft(player);
+
+ if (valid_player)
+ {
+ const std::string& message = player->getName() + " left the game";
+ ChatManager::message(message);
+ }
+
+ return valid_player;
+ }
+
+
+ void TowerDefense::pawnKilled(Pawn* victim, Pawn* killer)
+ {
+ if (victim && victim->getPlayer())
+ {
+ std::string message;
+ if (killer)
+ {
+ if (killer->getPlayer())
+ message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();
+ else
+ message = victim->getPlayer()->getName() + " was killed";
+ }
+ else
+ message = victim->getPlayer()->getName() + " died";
+
+ ChatManager::message(message);
+ }
+
+ Deathmatch::pawnKilled(victim, killer);
+ }
+
+ void TowerDefense::playerScored(PlayerInfo* player)
+ {
+ Gametype::playerScored(player);
+ }*/
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -25,73 +25,73 @@
* ...
*
*/
-
+
/**
- @brief
- GameType class for TowerDefense. See TowerDefenseReadme.txt for Information.
-
- @ingroup TowerDefense
+ @brief
+ GameType class for TowerDefense. See TowerDefenseReadme.txt for Information.
+
+ @ingroup TowerDefense
*/
-
+
#ifndef _TowerDefense_H__
#define _TowerDefense_H__
#include "towerdefense/TowerDefensePrereqs.h"
#include "gametypes/Deathmatch.h"
-
+
#include "TowerDefensePlayerStats.h"
-
+
namespace orxonox
{
- class _TowerDefenseExport TowerDefense : public Deathmatch
+ class _TowerDefenseExport TowerDefense : public Deathmatch
{
- public:
- TowerDefense(BaseObject* creator);
- virtual ~TowerDefense();
-
- virtual void start(); //<! The function is called when the gametype starts
- virtual void end();
- virtual void tick(float dt);
- //virtual void playerEntered(PlayerInfo* player);
- //virtual bool playerLeft(PlayerInfo* player);
-
- //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
- //virtual void playerScored(PlayerInfo* player);
-
-
- /* Called by TowerDefenseCenterpoint upon game start
- The centerpoint is used to create towers
- */
- void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
-
- /* Adds a tower at x, y in the playfield */
- void addTower(int x, int y);
-
- /* Part of a temporary hack to allow the player to add towers */
- ConsoleCommand* dedicatedAddTower_;
-
- //TODO: void spawnNewWave()
- //TODO: create a timer which regularly calls the spawnNewWave function (time driven)
- // or spawn a new wave when the old wave has been killed (event driven)
+ public:
+ TowerDefense(BaseObject* creator);
+ virtual ~TowerDefense();
+ virtual void start(); //<! The function is called when the gametype starts
+ virtual void end();
+ virtual void tick(float dt);
+ //virtual void playerEntered(PlayerInfo* player);
+ //virtual bool playerLeft(PlayerInfo* player);
- private:
- TowerDefenseCenterpoint *center_;
-
- /* handles stats */
- TowerDefensePlayerStats *stats_;
- bool hasEnoughCreditForTower(TowerCost towerCost);
-
- bool towerExists(int x, int y);
-
- typedef struct {
- int x;
- int y;
- } Coordinate;
-
- std::vector<Coordinate> addedTowersCoordinates_;
- std::vector<Tower*> towers_;
+ //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
+ //virtual void playerScored(PlayerInfo* player);
+
+
+ /* Called by TowerDefenseCenterpoint upon game start
+ The centerpoint is used to create towers
+ */
+ void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
+
+ /* Adds a tower at x, y in the playfield */
+ void addTower(int x, int y);
+
+ /* Part of a temporary hack to allow the player to add towers */
+ ConsoleCommand* dedicatedAddTower_;
+
+ //TODO: void spawnNewWave()
+ //TODO: create a timer which regularly calls the spawnNewWave function (time driven)
+ // or spawn a new wave when the old wave has been killed (event driven)
+
+
+ private:
+ TowerDefenseCenterpoint *center_;
+
+ /* handles stats */
+ TowerDefensePlayerStats *stats_;
+ bool hasEnoughCreditForTower(TowerCost towerCost);
+
+ bool towerExists(int x, int y);
+
+ typedef struct {
+ int x;
+ int y;
+ } Coordinate;
+
+ std::vector<Coordinate> addedTowersCoordinates_;
+ std::vector<Tower*> towers_;
};
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -49,14 +49,14 @@
TowerDefenseCenterpoint::TowerDefenseCenterpoint(BaseObject* creator) : MobileEntity(creator)
{
RegisterObject(TowerDefenseCenterpoint);
-
- this->width_ = 15;
+
+ this->width_ = 15;
this->height_ = 15;
this->towerTemplate_ = "";
-
+
//this->setCollisionType(Static);
- this->checkGametype();
+ this->checkGametype();
}
@@ -70,9 +70,9 @@
XMLPortParam(TowerDefenseCenterpoint, "width", setWidth, getWidth, xmlelement, mode);
XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, getHeight, xmlelement, mode);
- XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode);
+ XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode);
XMLPortParam(TowerDefenseCenterpoint, "towerTemplate", setTowerTemplate, getTowerTemplate, xmlelement, mode);
-
+
//TODO: add XMLPortObject(TowerDefenseCenterpoint, WorldEntity, "waypoints", addWaypoint, getWaypoint, xmlelement, mode);
// This was copied and shightly modified from WaypointController.cc ; there are no getters and setters and no membervariable yet
// The centerpoint should have all waypoints for "attached" to it. By using this function you can seperately add waypoints
@@ -99,9 +99,9 @@
*/
void TowerDefenseCenterpoint::checkGametype()
{
- if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
+ if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
{
- // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point
+ // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point
TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get());
towerDefenseGametype->setCenterpoint(this);
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -53,48 +53,48 @@
virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
virtual void changedGametype();
-
+
/**
@brief The width and hight in number of tiles. Default is 15 for both.
*/
void setWidth(unsigned int width)
{ this->width_ = width; }
-
- unsigned int getWidth(void) const
+
+ unsigned int getWidth(void) const
{ return this->width_; }
-
+
void setHeight(unsigned int height)
{ this->height_ = height; }
-
- unsigned int getHeight(void) const
+
+ unsigned int getHeight(void) const
{ return this->height_; }
-
- /**
- @brief How to convert to world coordinates, e.g. that 0,15 is not at -8,-8 but at -80,-80 (if scale would be 10)
- */
- void setTileScale(unsigned int tileScale)
- { this->tileScale_ = tileScale; }
-
- unsigned int getTileScale(void) const
- { return this->tileScale_; }
-
+
/**
+ @brief How to convert to world coordinates, e.g. that 0,15 is not at -8,-8 but at -80,-80 (if scale would be 10)
+ */
+ void setTileScale(unsigned int tileScale)
+ { this->tileScale_ = tileScale; }
+
+ unsigned int getTileScale(void) const
+ { return this->tileScale_; }
+
+ /**
@brief Set the template for the towers.
@param template The template name to be applied to each tower.
*/
void setTowerTemplate(const std::string& templateName)
{ this->towerTemplate_ = templateName; }
-
- const std::string& getTowerTemplate(void) const
+
+ const std::string& getTowerTemplate(void) const
{ return this->towerTemplate_; }
private:
void checkGametype();
-
+
unsigned int width_;
unsigned int height_;
- unsigned int tileScale_;
-
+ unsigned int tileScale_;
+
std::string towerTemplate_;
};
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -24,7 +24,7 @@
* Co-authors:
* ...
*/
-
+
#include "TowerDefenseHUDController.h"
#include "core/CoreIncludes.h"
@@ -34,37 +34,37 @@
namespace orxonox
{
- CreateFactory(TowerDefenseHUDController);
-
+ CreateFactory(TowerDefenseHUDController);
+
TowerDefenseHUDController::TowerDefenseHUDController(BaseObject* creator) : OverlayText(creator)
- {
- RegisterObject(TowerDefenseHUDController);
- }
-
- TowerDefenseHUDController::~TowerDefenseHUDController()
- {
-
- }
+ {
+ RegisterObject(TowerDefenseHUDController);
+ }
+ TowerDefenseHUDController::~TowerDefenseHUDController()
+ {
+
+ }
+
void TowerDefenseHUDController::tick(float dt)
- {
- SUPER(TowerDefenseHUDController, tick, dt);
- }
-
+ {
+ SUPER(TowerDefenseHUDController, tick, dt);
+ }
+
void TowerDefenseHUDController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
- {
- SUPER(TowerDefenseHUDController, XMLPort, xmlelement, mode);
- }
-
+ {
+ SUPER(TowerDefenseHUDController, XMLPort, xmlelement, mode);
+ }
+
void TowerDefenseHUDController::changedOwner()
{
SUPER(TowerDefenseHUDController, changedOwner);
- /*
+ /*
if (this->getOwner() != NULL && this->getOwner()->getGametype())
this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype().get());
else
this->owner_ = 0;
- */
+ */
}
-
+
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -25,15 +25,15 @@
* ...
*
*/
-
+
/**
- @brief
- This subclass of OverlayText is used to display the stats of the player in the HUD
-
- @ingroup TowerDefense
+ @brief
+ This subclass of OverlayText is used to display the stats of the player in the HUD
+
+ @ingroup TowerDefense
*/
-
+
#ifndef _TowerDefenseHUDController_H__
#define _TowerDefenseHUDController_H__
@@ -47,13 +47,13 @@
{
class _TowerDefenseExport TowerDefenseHUDController : public OverlayText, public Tickable
{
- public:
- TowerDefenseHUDController(BaseObject* creator);
+ public:
+ TowerDefenseHUDController(BaseObject* creator);
virtual ~TowerDefenseHUDController();
virtual void tick(float dt);
virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
- virtual void changedOwner();
+ virtual void changedOwner();
};
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.cc
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -24,21 +24,21 @@
* Co-authors:
* ...
*/
-
+
#include "TowerDefensePlayerStats.h"
namespace orxonox
{
- const int kDefaultCredit = 200;
-
+ const int kDefaultCredit = 200;
+
TowerDefensePlayerStats::TowerDefensePlayerStats()
- {
- this->credit_ = kDefaultCredit;
- this->waveNumber_ = 0;
- }
- /*
- TowerDefensePlayerStats::~TowerDefensePlayerStats()
- {
- }
- */
+ {
+ this->credit_ = kDefaultCredit;
+ this->waveNumber_ = 0;
+ }
+ /*
+ TowerDefensePlayerStats::~TowerDefensePlayerStats()
+ {
+ }
+ */
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -25,15 +25,15 @@
* ...
*
*/
-
+
/**
- @brief
- This manages the stats of the player. It is used by 'TowerDefense', the gametype
-
- @ingroup TowerDefense
+ @brief
+ This manages the stats of the player. It is used by 'TowerDefense', the gametype
+
+ @ingroup TowerDefense
*/
-
+
#ifndef _TowerDefensePlayerStats_H__
#define _TowerDefensePlayerStats_H__
@@ -41,35 +41,35 @@
namespace orxonox
{
- typedef enum _TowerCosts {
- // Set to 0 for debug...
- TDDefaultTowerCost = 0
- } TowerCost;
-
+ typedef enum _TowerCosts {
+ // Set to 0 for debug...
+ TDDefaultTowerCost = 0
+ } TowerCost;
+
class _TowerDefenseExport TowerDefensePlayerStats
{
- public:
- TowerDefensePlayerStats();
-
- inline int getCredit()
- { return credit_; }
-
- inline void setCredit(int credit)
- { credit_ = credit; }
-
- inline void buyTower(TowerCost cost)
- { credit_ -= cost;}
-
- inline int getWaveNumber()
- { return waveNumber_; }
-
- inline void didLoadNextWave()
- { waveNumber_++; }
-
- private:
- int credit_;
- int waveNumber_;
- //int baseHealth_;
+ public:
+ TowerDefensePlayerStats();
+
+ inline int getCredit()
+ { return credit_; }
+
+ inline void setCredit(int credit)
+ { credit_ = credit; }
+
+ inline void buyTower(TowerCost cost)
+ { credit_ -= cost;}
+
+ inline int getWaveNumber()
+ { return waveNumber_; }
+
+ inline void didLoadNextWave()
+ { waveNumber_++; }
+
+ private:
+ int credit_;
+ int waveNumber_;
+ //int baseHealth_;
};
}
Modified: code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePrereqs.h
===================================================================
--- code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePrereqs.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePrereqs.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -65,10 +65,10 @@
namespace orxonox
{
class TowerDefense;
- class Tower;
+ class Tower;
class TowerDefenseCenterpoint;
- class TowerDefenseHUDController;
- class TowerDefensePlayerStats;
+ class TowerDefenseHUDController;
+ class TowerDefensePlayerStats;
}
#endif /* _TowerDefensePrereqs_H__ */
Modified: code/branches/presentation2012merge/src/orxonox/LevelInfo.h
===================================================================
--- code/branches/presentation2012merge/src/orxonox/LevelInfo.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/orxonox/LevelInfo.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -23,7 +23,7 @@
* Damian 'Mozork' Frick
* Co-authors:
* ...
- *
+ *
*/
/**
@@ -78,7 +78,7 @@
@return Returns the name of the Level.
*/
inline const std::string& getName(void) const { return this->name_; } // tolua_export
-
+
/**
@brief Set the screenshot of the Level.
@param screenshot The screenshot to be set.
@@ -116,7 +116,7 @@
@return Returns true if the Level is tagged with the input tag.
*/
inline bool hasTag(const std::string& tag) const { return this->tags_.find(tag) != this->tags_.end(); } // tolua_export
-
+
void setShips(const std::string& ships); //!< Set the starting ship models of the level
bool addShip(const std::string& ship, bool update = true); //!< Add a model to shipselection
/**
@@ -124,20 +124,20 @@
@return Returns a comma-seperated string of all the allowed ship models for the shipselection.
*/
inline const std::string& getShips(void) const
- { return this->startingShipsString_; }
+ { return this->startingShipsString_; }
/**
@brief Get whether the Level allows a specific starting ship model
@param ship The ship model for which is checked.
@return Returns true if the Level allows the input ship model
*/
- inline bool hasShip(const std::string& ship) const { return this->ships_.find(ship) != this->ships_.end(); } // tolua_export
+ inline bool hasShip(const std::string& ship) const { return this->ships_.find(ship) != this->ships_.end(); } // tolua_export
/**
@brief Get the XML-filename of the Level.
@return Returns the XML-filename (including *.oxw extension) of the Level.
*/
inline const std::string& getXMLFilename(void) const { return this->xmlfilename_; } // tolua_export
- inline void selectShip (const std::string& ship) { this->changeShip(ship); } // tolua_export
+ inline void selectShip (const std::string& ship) { this->changeShip(ship); } // tolua_export
protected:
@@ -152,32 +152,32 @@
private:
- inline void changeShip (const std::string& model) {
- static std::string shipSelectionTag = "shipselection";
- //HACK: Read Level XML File, find "shipselection", replace with ship model
- std::string levelPath = "../levels/";
- levelPath.append(this->getXMLFilename());
- std::string tempPath = "../levels/";
- tempPath.append("_temp.oxw");
- orxout(user_status) << levelPath << endl;
- orxout(user_status) << tempPath << endl;
- std::ifstream myLevel (levelPath.c_str());
- std::ofstream tempLevel (tempPath.c_str());
- while(!myLevel.eof())
- {
- std::string buff;
- std::getline(myLevel, buff);
- std::string pawndesignString = "pawndesign=";
- size_t found = buff.find(pawndesignString.append(shipSelectionTag));
- if (found!= std::string::npos)
- buff = buff.substr(0, found + 11) + model + buff.substr(found+11+shipSelectionTag.length(), std::string::npos);
- tempLevel.write(buff.c_str(), buff.length());
- tempLevel << std::endl;
- }
- myLevel.close();
- tempLevel.close();
- orxout(user_status) << "done" << endl;
- }
+ inline void changeShip (const std::string& model) {
+ static std::string shipSelectionTag = "shipselection";
+ //HACK: Read Level XML File, find "shipselection", replace with ship model
+ std::string levelPath = "../levels/";
+ levelPath.append(this->getXMLFilename());
+ std::string tempPath = "../levels/";
+ tempPath.append("_temp.oxw");
+ orxout(user_status) << levelPath << endl;
+ orxout(user_status) << tempPath << endl;
+ std::ifstream myLevel (levelPath.c_str());
+ std::ofstream tempLevel (tempPath.c_str());
+ while(!myLevel.eof())
+ {
+ std::string buff;
+ std::getline(myLevel, buff);
+ std::string pawndesignString = "pawndesign=";
+ size_t found = buff.find(pawndesignString.append(shipSelectionTag));
+ if (found!= std::string::npos)
+ buff = buff.substr(0, found + 11) + model + buff.substr(found+11+shipSelectionTag.length(), std::string::npos);
+ tempLevel.write(buff.c_str(), buff.length());
+ tempLevel << std::endl;
+ }
+ myLevel.close();
+ tempLevel.close();
+ orxout(user_status) << "done" << endl;
+ }
void tagsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
void shipsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
static void initializeTags(void); //!< Initialize the set of allowed tags.
@@ -198,7 +198,7 @@
std::set<std::string> tags_; //!< The set of tags the Level is tagged with.
std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with.
std::set<std::string> ships_; //!< The set of starting ship models the Level allows.
- std::string startingShipsString_; //!< The comma-seperated string of all the allowed ship models for the shipselection.
+ std::string startingShipsString_; //!< The comma-seperated string of all the allowed ship models for the shipselection.
}; // tolua_export
/**
@@ -209,7 +209,7 @@
- @b description The description of the level.
- @b screenshot The screenshot of the level.
- @b tags A comma-seperated string of tags. Allowed tags are: <em>test</em>, <em>singleplayer</em>, <em>multiplayer</em>, <em>showcase</em>, <em>tutorial</em>, <em>presentation</em>, <em>shipselection</em>.
- - @b (optional) startingships The comma-seperated string of starting ship models
+ - @b (optional) startingships The comma-seperated string of starting ship models
An example would be:
@code
<LevelInfo
@@ -223,8 +223,8 @@
@author
Damian 'Mozork' Frick
- @edit
- Matthias Hutter
+ @edit
+ Matthias Hutter
@ingroup Orxonox
*/
class _OrxonoxExport LevelInfo : public BaseObject, public LevelInfoItem
@@ -234,7 +234,7 @@
virtual ~LevelInfo();
virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a LevelInfo object through XML.
-
+
/**
@brief Set the screenshot of the Level.
@param screenshot The screenshot to be set.
@@ -282,7 +282,7 @@
@return Returns a comma-seperated string of all the allowed ship models for the shipselection.
*/
inline const std::string& getShips(void) const
- { return this->LevelInfoItem::getShips(); }
+ { return this->LevelInfoItem::getShips(); }
LevelInfoItem* copy(void); //!< Copies the contents of this LevelInfo object to a new LevelInfoItem object.
};
@@ -301,7 +301,7 @@
return getLowercase(lhs->getName()).compare(getLowercase(rhs->getName())) < 0;
}
};
-
+
} // tolua_export
#endif /* _LevelInfo_H__ */
Modified: code/branches/presentation2012merge/src/orxonox/ShipManager.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/ShipManager.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/orxonox/ShipManager.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -21,13 +21,13 @@
*
* Author:
* Matthias Hutter
- *
+ *
*/
/**
@file ShipManager.cc
@brief Work-in Progress: Implementation of the ShipManager singleton.
- Should make SpaceShip info available to lua handlers.
+ Should make SpaceShip info available to lua handlers.
*/
#include "LevelManager.h"
@@ -71,7 +71,7 @@
delete *it;
}
-
+
/**
@brief
Get the number of available Ships.
@@ -131,20 +131,20 @@
*/
void ShipManager::compileAvailableShipList()
{
- /*
- // We only want to load as little as possible
- ClassTreeMask mask;
- mask.exclude(Class(BaseObject));
- mask.include(Class(SpaceShip));
- SpaceShip* info = NULL;
- XMLFile file = XMLFile(ship);
- Loader::load(&file, mask, false, true);
- for(ObjectList<SpaceShip>::iterator item = ObjectList<SpaceShip>::begin(); item != ObjectList<SpaceShip>::end(); ++item)
- if(item->getXMLFilename() == *it)
- info = item->copy();
- Loader::unload(&file);
- */
-
+ /*
+ // We only want to load as little as possible
+ ClassTreeMask mask;
+ mask.exclude(Class(BaseObject));
+ mask.include(Class(SpaceShip));
+ SpaceShip* info = NULL;
+ XMLFile file = XMLFile(ship);
+ Loader::load(&file, mask, false, true);
+ for(ObjectList<SpaceShip>::iterator item = ObjectList<SpaceShip>::begin(); item != ObjectList<SpaceShip>::end(); ++item)
+ if(item->getXMLFilename() == *it)
+ info = item->copy();
+ Loader::unload(&file);
+ */
+
// Get all files matching the level criteria
Ogre::StringVectorPtr levels = Resource::findResourceNames("*.oxw");
Modified: code/branches/presentation2012merge/src/orxonox/controllers/FormationController.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/controllers/FormationController.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/orxonox/controllers/FormationController.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -49,27 +49,27 @@
namespace orxonox
{
- SetConsoleCommand("FormationController", "formationflight", &FormationController::formationflight);
- SetConsoleCommand("FormationController", "masteraction", &FormationController::masteraction);
- SetConsoleCommand("FormationController", "followme", &FormationController::followme);
- SetConsoleCommand("FormationController", "passivebehaviour", &FormationController::passivebehaviour);
- SetConsoleCommand("FormationController", "formationsize", &FormationController::formationsize);
+ SetConsoleCommand("FormationController", "formationflight", &FormationController::formationflight);
+ SetConsoleCommand("FormationController", "masteraction", &FormationController::masteraction);
+ SetConsoleCommand("FormationController", "followme", &FormationController::followme);
+ SetConsoleCommand("FormationController", "passivebehaviour", &FormationController::passivebehaviour);
+ SetConsoleCommand("FormationController", "formationsize", &FormationController::formationsize);
- static const unsigned int STANDARD_MAX_FORMATION_SIZE = 9;
- static const int RADIUS_TO_SEARCH_FOR_MASTERS = 5000;
- static const float FORMATION_LENGTH = 110;
- static const float FORMATION_WIDTH = 110;
- static const int FREEDOM_COUNT = 4; //seconds the slaves in a formation will be set free when master attacks an enemy
- static const float SPEED_MASTER = 0.6f;
- static const float ROTATEFACTOR_MASTER = 0.2f;
- static const float SPEED_FREE = 0.8f;
- static const float ROTATEFACTOR_FREE = 0.8f;
+ static const unsigned int STANDARD_MAX_FORMATION_SIZE = 9;
+ static const int RADIUS_TO_SEARCH_FOR_MASTERS = 5000;
+ static const float FORMATION_LENGTH = 110;
+ static const float FORMATION_WIDTH = 110;
+ static const int FREEDOM_COUNT = 4; //seconds the slaves in a formation will be set free when master attacks an enemy
+ static const float SPEED_MASTER = 0.6f;
+ static const float ROTATEFACTOR_MASTER = 0.2f;
+ static const float SPEED_FREE = 0.8f;
+ static const float ROTATEFACTOR_FREE = 0.8f;
- FormationController::FormationController(BaseObject* creator) : Controller(creator)
- {
+ FormationController::FormationController(BaseObject* creator) : Controller(creator)
+ {
RegisterObject(FormationController);
this->target_ = 0;
@@ -90,11 +90,11 @@
this->targetPosition_ = Vector3::ZERO;
this->team_=-1;
this->target_.setCallback(createFunctor(&FormationController::targetDied, this));
- }
+ }
- FormationController::~FormationController()
- {
- if (this->isInitialized())
+ FormationController::~FormationController()
+ {
+ if (this->isInitialized())
{
this->removeFromFormation();
@@ -122,9 +122,9 @@
}
}
}
- }
+ }
- void FormationController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ void FormationController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
{
SUPER(FormationController, XMLPort, xmlelement, mode);
@@ -136,11 +136,11 @@
- /**
+ /**
@brief Activates / deactivates formationflight behaviour
@param form activate formflight if form is true
*/
- void FormationController::formationflight(const bool form)
+ void FormationController::formationflight(const bool form)
{
for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
{
@@ -167,7 +167,7 @@
}
}
- /**
+ /**
@brief Get all masters to do a "specific master action"
@param action which action to perform (integer, so it can be called with a console command (tmp solution))
*/
@@ -197,7 +197,7 @@
}
}
- /**
+ /**
@brief Sets shooting behaviour of pawns.
@param passive if true, bots won't shoot.
*/
@@ -224,7 +224,7 @@
}
}
- /**
+ /**
@brief Sets maximal formation size
@param size maximal formation size.
*/
@@ -281,13 +281,13 @@
Vector2 coord = get2DViewcoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
float distance = (target - this->getControllableEntity()->getPosition()).length();
- if(coord.x < 0.0001 && coord.y < 0.0001)
- {
- // if the ship reaches a direction very close to the direct one, set it to the direct one
- Vector3 v_temp = this->getControllableEntity()->getPosition();
- Quaternion quat = v_temp.getRotationTo(target);
- this->getControllableEntity()->rotate(quat);
- }
+ if(coord.x < 0.0001 && coord.y < 0.0001)
+ {
+ // if the ship reaches a direction very close to the direct one, set it to the direct one
+ Vector3 v_temp = this->getControllableEntity()->getPosition();
+ Quaternion quat = v_temp.getRotationTo(target);
+ this->getControllableEntity()->rotate(quat);
+ }
if(this->state_ == FREE)
{
@@ -323,44 +323,44 @@
if(this->state_ == SLAVE)
- {
+ {
- this->getControllableEntity()->rotateYaw(-2.0f * ROTATEFACTOR_MASTER * coord.x * 2);
- this->getControllableEntity()->rotatePitch(2.0f * ROTATEFACTOR_MASTER * coord.y * 2);
+ this->getControllableEntity()->rotateYaw(-2.0f * ROTATEFACTOR_MASTER * coord.x * 2);
+ this->getControllableEntity()->rotatePitch(2.0f * ROTATEFACTOR_MASTER * coord.y * 2);
- if (distance < 300)
- {
- if (bHasTargetOrientation_)
- {
- copyTargetOrientation();
- }
- if (distance < 100)
- { //linear speed reduction
- this->getControllableEntity()->moveFrontBack(distance/100.0f*0.4f*SPEED_MASTER);
+ if (distance < 300)
+ {
+ if (bHasTargetOrientation_)
+ {
+ copyTargetOrientation();
+ }
+ if (distance < 100)
+ { //linear speed reduction
+ this->getControllableEntity()->moveFrontBack(distance/100.0f*0.4f*SPEED_MASTER);
+ }
+ else
+ this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER);
+ }
+ else
+ this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER + distance/300.0f);
+ }
- } else this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER);
-
- } else {
- this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER + distance/300.0f);
- }
- }
-
if (distance < 10)
{
this->positionReached();
- bHasTargetOrientation_=false;
+ bHasTargetOrientation_=false;
}
}
- void FormationController::moveToTargetPosition()
+ void FormationController::moveToTargetPosition()
{
this->moveToPosition(this->targetPosition_);
}
- //copy the Roll orientation of given Quaternion.
- void FormationController::copyOrientation(const Quaternion& orient)
+ //copy the Roll orientation of given Quaternion.
+ void FormationController::copyOrientation(const Quaternion& orient)
{
//roll angle difference in radian
float diff=orient.getRoll(false).valueRadians()-(this->getControllableEntity()->getOrientation().getRoll(false).valueRadians());
@@ -378,7 +378,7 @@
}
- /**
+ /**
@brief Unregisters a slave from its master. Initiated by a slave.
*/
void FormationController::unregisterSlave()
@@ -468,11 +468,11 @@
this->myMaster_ = 0;
}
}
- /**
+
+ /**
@brief Commands the slaves of a master into a formation. Sufficiently fast not to be called within tick. Initiated by a master.
*/
-
-void FormationController::commandSlaves()
+ void FormationController::commandSlaves()
{
if(this->state_ != MASTER) return;
@@ -486,11 +486,11 @@
this->slaves_.front()->setTargetPosition(dest);
}
else
- // formation:
+ // formation:
{
dest += 1.0f*orient*WorldEntity::BACK;
Vector3 pos = Vector3::ZERO;
- bool left=true;
+ bool left=true;
int i = 1;
for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
@@ -688,11 +688,12 @@
if(this->state_ != MASTER) return;
if (specificMasterActionHoldCount_ == 0)
- {
+ {
this->specificMasterAction_ = NONE;
this->searchNewTarget();
- }
- else specificMasterActionHoldCount_--;
+ }
+ else
+ specificMasterActionHoldCount_--;
}
/**
@@ -716,12 +717,12 @@
*/
void FormationController::turn180()
{
- Vector2 coord = get2DViewdirection(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, this->targetPosition_);
+ Vector2 coord = get2DViewdirection(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, this->targetPosition_);
- this->getControllableEntity()->rotateYaw(-2.0f * sgn(coord.x) * coord.x*coord.x);
- this->getControllableEntity()->rotatePitch(2.0f * sgn(coord.y) * coord.y*coord.y);
+ this->getControllableEntity()->rotateYaw(-2.0f * sgn(coord.x) * coord.x*coord.x);
+ this->getControllableEntity()->rotatePitch(2.0f * sgn(coord.y) * coord.y*coord.y);
- this->getControllableEntity()->moveFrontBack(SPEED_MASTER);
+ this->getControllableEntity()->moveFrontBack(SPEED_MASTER);
}
/**
@@ -739,8 +740,8 @@
*/
void FormationController::spin()
{
- this->moveToTargetPosition();
- this->getControllableEntity()->rotateRoll(0.8f);
+ this->moveToTargetPosition();
+ this->getControllableEntity()->rotateRoll(0.8f);
}
/**
@@ -778,27 +779,22 @@
if((humanPawn != NULL) && (allMasters.size() != 0))
{
- float posHuman = humanPawn->getPosition().length();
- float distance = 0.0f;
- float minDistance = FLT_MAX;
- int index = 0;
- int i = 0;
+ float posHuman = humanPawn->getPosition().length();
+ float distance = 0.0f;
+ float minDistance = FLT_MAX;
+ int index = 0;
+ int i = 0;
- for(std::vector<FormationController*>::iterator it = allMasters.begin(); it != allMasters.end(); it++, i++)
- {
- if (!FormationController::sameTeam((*it)->getControllableEntity(), humanPawn, (*it)->getGametype())) continue;
- distance = posHuman - (*it)->getControllableEntity()->getPosition().length();
- if(distance < minDistance) index = i;
- }
- allMasters[index]->followInit(humanPawn);
+ for(std::vector<FormationController*>::iterator it = allMasters.begin(); it != allMasters.end(); it++, i++)
+ {
+ if (!FormationController::sameTeam((*it)->getControllableEntity(), humanPawn, (*it)->getGametype())) continue;
+ distance = posHuman - (*it)->getControllableEntity()->getPosition().length();
+ if(distance < minDistance) index = i;
}
-
+ allMasters[index]->followInit(humanPawn);
+ }
}
-
-
-
-
/**
@brief Master begins to follow a pawn. Is a "specific master action".
@param pawn pawn to follow.
@@ -819,7 +815,7 @@
}
- /**
+ /**
@brief Master begins to follow a randomly chosen human player of the same team. Is a "specific master action".
*/
void FormationController::followRandomHumanInit()
@@ -847,7 +843,7 @@
}
- /**
+ /**
@brief Master follows target with adjusted speed. Called within tick.
*/
void FormationController::follow()
@@ -859,7 +855,7 @@
}
- void FormationController::setTargetPosition(const Vector3& target)
+ void FormationController::setTargetPosition(const Vector3& target)
{
this->targetPosition_ = target;
this->bHasTargetPosition_ = true;
@@ -923,19 +919,19 @@
}
}
- void FormationController::forgetTarget()
+ void FormationController::forgetTarget()
{
this->target_ = 0;
this->bShooting_ = false;
}
- void FormationController::targetDied()
+ void FormationController::targetDied()
{
this->forgetTarget();
this->searchRandomTargetPosition();
}
- bool FormationController::sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)
+ bool FormationController::sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)
{
if (entity1 == entity2)
return true;
Modified: code/branches/presentation2012merge/src/orxonox/gametypes/Mission.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/gametypes/Mission.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/orxonox/gametypes/Mission.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -62,7 +62,7 @@
if (victim && victim->getPlayer() && this->lives_ == 1)
{
this->missionAccomplished_ = false;
- this->end();
+ this->end();
}
}
@@ -77,11 +77,11 @@
void Mission::end()
{
Gametype::end();
- /*if (this->missionAccomplished_)
+ /*if (this->missionAccomplished_)
this->gtinfo_->sendAnnounceMessage("Mission accomplished!");
- else
+ else
this->gtinfo_->sendAnnounceMessage("Mission failed!");
- * */
+ */
}
void Mission::setTeams()
Modified: code/branches/presentation2012merge/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/infos/PlayerInfo.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/orxonox/infos/PlayerInfo.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -172,7 +172,7 @@
this->changedControllableEntity();
- RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
+ RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
if (radarviewable != NULL)
radarviewable->setRadarName(this->getName());
}
Modified: code/branches/presentation2012merge/src/orxonox/interfaces/RadarViewable.h
===================================================================
--- code/branches/presentation2012merge/src/orxonox/interfaces/RadarViewable.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/orxonox/interfaces/RadarViewable.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -60,16 +60,16 @@
RadarViewable(BaseObject* creator, const WorldEntity* wePtr);
virtual ~RadarViewable();
- virtual void setRadarName(const std::string& name)
- {
- if (this->radarName_ != name)
- {
- this->radarName_ = name;
- this->settingsChanged();
- }
- }
- const std::string& getRadarName() const
- { return this->radarName_; }
+ virtual void setRadarName(const std::string& name)
+ {
+ if (this->radarName_ != name)
+ {
+ this->radarName_ = name;
+ this->settingsChanged();
+ }
+ }
+ const std::string& getRadarName() const
+ { return this->radarName_; }
inline void setRadarObjectCamouflage(float camouflage)
{
@@ -162,7 +162,7 @@
std::string radarObjectDescription_;
ColourValue radarObjectColour_;
float scale_;
- std::string radarName_;
+ std::string radarName_;
};
}
Modified: code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -86,7 +86,7 @@
this->setConfigValues();
this->setPriority( Priority::VeryHigh );
this->registerVariables();
- this->team_ = -1;
+ this->team_ = -1;
}
ControllableEntity::~ControllableEntity()
Modified: code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.h
===================================================================
--- code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.h 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.h 2012-06-03 16:05:24 UTC (rev 9272)
@@ -163,10 +163,10 @@
{ return this->target_.get(); }
void setTargetInternal( uint32_t targetID );
- inline void setTeam(int team)
- { this->team_ = team; }
- inline int getTeam() const
- { return this->team_; }
+ inline void setTeam(int team)
+ { this->team_ = team; }
+ inline int getTeam() const
+ { return this->team_; }
protected:
virtual void preDestroy();
@@ -242,7 +242,7 @@
CameraPosition* reverseCamera_;
WeakPtr<WorldEntity> target_;
- int team_ ; //<! teamnumber
+ int team_ ; //<! teamnumber
};
}
Modified: code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -231,13 +231,13 @@
void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator)
{
//Applies multiplier given by the DamageBoost Pickup.
- Pawn *test = dynamic_cast<Pawn *>(originator);
- if( test != NULL )
- {
- damage *= originator->getDamageMultiplier();
- }
+ Pawn *test = dynamic_cast<Pawn *>(originator);
+ if( test != NULL )
+ {
+ damage *= originator->getDamageMultiplier();
+ }
- if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
+ if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
{
if (shielddamage >= this->getShieldHealth())
{
Modified: code/branches/presentation2012merge/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/worldentities/pawns/SpaceShip.cc 2012-06-03 15:17:18 UTC (rev 9271)
+++ code/branches/presentation2012merge/src/orxonox/worldentities/pawns/SpaceShip.cc 2012-06-03 16:05:24 UTC (rev 9272)
@@ -132,7 +132,7 @@
void SpaceShip::setConfigValues()
{
SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
-
+
SetConfigValueExternal(bEnableMotionBlur_, "GraphicsSettings", "enableMotionBlur", true)
.description("Enable or disable the motion blur effect when moving very fast")
.callback(this, &SpaceShip::changedEnableMotionBlur);
@@ -502,8 +502,8 @@
*/
void SpaceShip::resetCamera()
{
- if(this->hasLocalController() && this->hasHumanController())
- {
+ if(this->hasLocalController() && this->hasHumanController())
+ {
Camera *camera = this->getCamera();
if (camera == 0)
{
@@ -513,7 +513,7 @@
this->shakeDt_ = 0.0f;
camera->setPosition(this->cameraOriginalPosition_);
camera->setOrientation(this->cameraOriginalOrientation_);
- }
+ }
}
}
More information about the Orxonox-commit
mailing list