Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9272


Ignore:
Timestamp:
Jun 3, 2012, 6:05:24 PM (12 years ago)
Author:
landauf
Message:

replaced tabs with spaces (no code changed)

Location:
code/branches/presentation2012merge
Files:
49 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/data/gui/layouts/GUILayout.xsd

    r5781 r9272  
    22<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    33
    4         <xsd:element name="GUILayout" type="GUILayoutType"/>
    5        
    6         <xsd:complexType name="GUILayoutType">
    7                 <xsd:sequence>
    8                         <xsd:element name="Window" type="WindowType" />
    9                 </xsd:sequence>
    10                 <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
    11         </xsd:complexType>
    12        
    13         <xsd:complexType name="WindowType">
    14                 <xsd:sequence>
    15                         <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
    16                         <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
    17                         <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
    18                         <xsd:choice minOccurs="0" maxOccurs="unbounded">
    19                                 <xsd:element name="Window" type="WindowType" />
    20                                 <xsd:element name="AutoWindow" type="AutoWindowType" />
    21                         </xsd:choice>
    22                         <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
    23                 </xsd:sequence>
    24                 <xsd:attribute name="Type" type="xsd:string" use="required"/>
    25                 <xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
    26         </xsd:complexType>
     4    <xsd:element name="GUILayout" type="GUILayoutType"/>
    275
    28         <xsd:complexType name="AutoWindowType">
    29                 <xsd:sequence>
    30                         <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
    31                         <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
    32                         <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
    33                         <xsd:choice minOccurs="0" maxOccurs="unbounded">
    34                                 <xsd:element name="Window" type="WindowType" />
    35                                 <xsd:element name="AutoWindow" type="AutoWindowType" />
    36                         </xsd:choice>
    37                         <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
    38                 </xsd:sequence>
    39                 <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
    40         </xsd:complexType>
     6    <xsd:complexType name="GUILayoutType">
     7        <xsd:sequence>
     8            <xsd:element name="Window" type="WindowType" />
     9        </xsd:sequence>
     10        <xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
     11    </xsd:complexType>
    4112
    42         <xsd:complexType name="PropertyType">
    43                 <xsd:simpleContent>
    44                         <xsd:extension base="xsd:string">
    45                                 <xsd:attribute name="Name" type="xsd:string" use="required"/>
    46                                 <xsd:attribute name="Value" type="xsd:string" use="optional"/>
    47                         </xsd:extension>
    48                 </xsd:simpleContent>
    49         </xsd:complexType>
     13    <xsd:complexType name="WindowType">
     14        <xsd:sequence>
     15            <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
     16            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
     17            <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
     18            <xsd:choice minOccurs="0" maxOccurs="unbounded">
     19                <xsd:element name="Window" type="WindowType" />
     20                <xsd:element name="AutoWindow" type="AutoWindowType" />
     21            </xsd:choice>
     22            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
     23        </xsd:sequence>
     24        <xsd:attribute name="Type" type="xsd:string" use="required"/>
     25        <xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
     26    </xsd:complexType>
    5027
    51         <xsd:complexType name="LayoutImportType">
    52                 <xsd:attribute name="Filename" type="xsd:string" use="required"/>
    53                 <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
    54                 <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
    55         </xsd:complexType>
     28    <xsd:complexType name="AutoWindowType">
     29        <xsd:sequence>
     30            <xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
     31            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
     32            <xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
     33            <xsd:choice minOccurs="0" maxOccurs="unbounded">
     34                <xsd:element name="Window" type="WindowType" />
     35                <xsd:element name="AutoWindow" type="AutoWindowType" />
     36            </xsd:choice>
     37            <xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
     38        </xsd:sequence>
     39        <xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
     40    </xsd:complexType>
    5641
    57         <xsd:complexType name="EventType">
    58                 <xsd:attribute name="Name" type="xsd:string" use="required"/>
    59                 <xsd:attribute name="Function" type="xsd:string" use="required"/>
    60         </xsd:complexType>
     42    <xsd:complexType name="PropertyType">
     43        <xsd:simpleContent>
     44            <xsd:extension base="xsd:string">
     45                <xsd:attribute name="Name" type="xsd:string" use="required"/>
     46                <xsd:attribute name="Value" type="xsd:string" use="optional"/>
     47            </xsd:extension>
     48        </xsd:simpleContent>
     49    </xsd:complexType>
     50
     51    <xsd:complexType name="LayoutImportType">
     52        <xsd:attribute name="Filename" type="xsd:string" use="required"/>
     53        <xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
     54        <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
     55    </xsd:complexType>
     56
     57    <xsd:complexType name="EventType">
     58        <xsd:attribute name="Name" type="xsd:string" use="required"/>
     59        <xsd:attribute name="Function" type="xsd:string" use="required"/>
     60    </xsd:complexType>
    6161
    6262</xsd:schema>
  • code/branches/presentation2012merge/data/gui/layouts/InGamePickupHUD.layout

    r7163 r9272  
    22
    33<GUILayout>
    4         <Window Type="DefaultWindow" Name="orxonox/InGamePickupHUD_RootWindow" >
    5                 <Property Name="InheritsAlpha" Value="False" />
    6                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    7                 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    8                 <Window Type="TaharezLook/StaticImage" Name="orxonox/InGamePickupHUD_Overview" >
    9                         <Property Name="Font" Value="BlueHighway-12" />
    10                         <Property Name="Text" Value="Pickup List" />
    11                         <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    12                         <Property Name="UnifiedAreaRect" Value="{{0,5},{0.15,0},{0.2,0},{0.45,0}}" />
    13                         <Property Name="Alpha" Value="0.3" />
    14                         <!--Event Name="Clicked" Function="InGameMenu.button_return_clicked"/-->
    15                         <Window Type="TaharezLook/StaticText" Name="orxonox/InGamePickupHUD_PickupTitle" >
    16                                 <Property Name="Alpha" Value="0.8"/>
    17                                 <Property Name="Text" Value="Pickup List" />
    18                                 <Property Name="Font" Value="BlueHighway-10" />
    19                                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    20                                 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,-20},{0,20}}" />
    21                         </Window>
    22                         <Window Type="TaharezLook/Button" Name="orxonox/InGamePickupHUD_closeButton" >
    23                                 <Property Name="Alpha" Value="0.8" />
    24                                 <Property Name="Font" Value="BlueHighway-12" />
    25                                 <Property Name="Text" Value="X" />
    26                                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    27                                 <Property Name="UnifiedAreaRect" Value="{{1,-20},{0,0},{1,0},{0,20}}" />
    28                                 <!-- alle Grössen / anordnungen angepasst - da überschneidungen von absoluten
    29                                 und relativen Positionsangaben (problematisch bei kleinen auflösungen) -->
    30                                 <Event Name="Clicked" Function="InGamePickupHUD.close_button_clicked"/>
    31                         </Window>
    32                         <Window Type="TaharezLook/Listbox" Name="orxonox/InGamePickupHUD_PickupListBox">
    33                                 <Property Name="Alpha" Value="0.8" />
    34                                 <Property Name="Font" Value="BlueHighway-12" />
    35                                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    36                                 <Property Name="UnifiedAreaRect" Value="{{0,5},{0,25},{1,-5},{1,-5}}" />       
    37                                 <!--
    38                                 <Window Type="TaharezLook/ListboxItem" Name="orxonox/InGamePickupHUD_TestPickupOne">
    39                                         <Property Name="Alpha" Value="0.8" />
    40                                         <Property Name="Font" Value="BlueHighway-12" />
    41                                         <Property Name="Text" Value="First Pickup" />
    42                                         <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    43                                         <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,30},{1,0}}" /> 
    44                                 </Window>
    45                                 -->
    46                         </Window>
    47                        
    48                 </Window>
    49                
    50        
    51         </Window>
    52        
     4    <Window Type="DefaultWindow" Name="orxonox/InGamePickupHUD_RootWindow" >
     5        <Property Name="InheritsAlpha" Value="False" />
     6        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     7        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     8        <Window Type="TaharezLook/StaticImage" Name="orxonox/InGamePickupHUD_Overview" >
     9            <Property Name="Font" Value="BlueHighway-12" />
     10            <Property Name="Text" Value="Pickup List" />
     11            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     12            <Property Name="UnifiedAreaRect" Value="{{0,5},{0.15,0},{0.2,0},{0.45,0}}" />
     13            <Property Name="Alpha" Value="0.3" />
     14            <!--Event Name="Clicked" Function="InGameMenu.button_return_clicked"/-->
     15            <Window Type="TaharezLook/StaticText" Name="orxonox/InGamePickupHUD_PickupTitle" >
     16                <Property Name="Alpha" Value="0.8"/>
     17                <Property Name="Text" Value="Pickup List" />
     18                <Property Name="Font" Value="BlueHighway-10" />
     19                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     20                <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,-20},{0,20}}" />
     21            </Window>
     22            <Window Type="TaharezLook/Button" Name="orxonox/InGamePickupHUD_closeButton" >
     23                <Property Name="Alpha" Value="0.8" />
     24                <Property Name="Font" Value="BlueHighway-12" />
     25                <Property Name="Text" Value="X" />
     26                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     27                <Property Name="UnifiedAreaRect" Value="{{1,-20},{0,0},{1,0},{0,20}}" />
     28                <!-- alle Grössen / anordnungen angepasst - da überschneidungen von absoluten
     29                und relativen Positionsangaben (problematisch bei kleinen auflösungen) -->
     30                <Event Name="Clicked" Function="InGamePickupHUD.close_button_clicked"/>
     31            </Window>
     32            <Window Type="TaharezLook/Listbox" Name="orxonox/InGamePickupHUD_PickupListBox">
     33                <Property Name="Alpha" Value="0.8" />
     34                <Property Name="Font" Value="BlueHighway-12" />
     35                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     36                <Property Name="UnifiedAreaRect" Value="{{0,5},{0,25},{1,-5},{1,-5}}" />
     37                <!--
     38                <Window Type="TaharezLook/ListboxItem" Name="orxonox/InGamePickupHUD_TestPickupOne">
     39                    <Property Name="Alpha" Value="0.8" />
     40                    <Property Name="Font" Value="BlueHighway-12" />
     41                    <Property Name="Text" Value="First Pickup" />
     42                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     43                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,30},{1,0}}" />
     44                </Window>
     45                -->
     46            </Window>
     47        </Window>
     48    </Window>
    5349</GUILayout>
  • code/branches/presentation2012merge/data/gui/layouts/ShipSelectionMenu.layout

    r9271 r9272  
    99        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    1010        <Property Name="BackgroundEnabled" Value="False" />
    11         <!-- -->
     11        <!-- -->
    1212        <Window Type="MenuWidgets/StaticText" Name="orxonox/ShipSelectionWindow" >
    1313            <Property Name="Text" Value="ShipSelection" />
     
    1717            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1818            <Property Name="VertFormatting" Value="TopAligned" />
    19             <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.15,0},{0.8,0},{0.7,0}}" /> 
     19            <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.15,0},{0.8,0},{0.7,0}}" />
    2020            <Window Type="MenuWidgets/TabControl" Name="orxonox/ShipSelectionTabControl" >
    2121                <Property Name="TabHeight" Value="{0,26.4388}" />
    2222                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    2323                <Property Name="TabPanePosition" Value="Top" />
    24                 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1,0},{0.95,0},{0.925,0}}" />
    25                
    26             </Window>   
    27            
    28             <!-- TODO: Ship Description and Image
    29             <Window Type="MenuWidgets/StaticImage" Name="orxonox/ShipSelectionShipImage" >
     24                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1,0},{0.95,0},{0.925,0}}" />
     25
     26            </Window>
     27
     28            <!-- TODO: Ship Description and Image
     29            <Window Type="MenuWidgets/StaticImage" Name="orxonox/ShipSelectionShipImage" >
    3030                <Property Name="AlwaysOnTop" Value="True" />
    3131                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    3838                <Property Name="HorzScrollbar" Value="True" />
    3939                <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.725,0},{0.9,0},{0.875,0}}" />
    40             </Window>--> 
    41                  
     40            </Window>-->
     41
    4242        </Window>
    4343        <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionStartButton" >
     
    4848        </Window>
    4949        <!-- TODO: set ship properties
    50         <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionConfigButton" >
     50        <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionConfigButton" >
    5151            <Property Name="Text" Value="Configure" />
    5252            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    5454            <Property Name="Disabled" Value="True" />
    5555            <Event Name="Clicked" Function="ShipSelectionMenu.ShipSelectionConfigButton_clicked"/>
    56         </Window> --> 
     56        </Window> -->
    5757        <Window Type="MenuWidgets/Button" Name="orxonox/ShipSelectionBackButton" >
    5858            <Property Name="Text" Value="Back" />
  • code/branches/presentation2012merge/data/gui/scripts/ShipSelectionMenu.lua

    r9271 r9272  
    1212           -- Windows
    1313           dircmd = "dir /b/s"
    14    end]]       
    15    P.createFilterTab("All Ships")   
     14   end]]
     15   P.createFilterTab("All Ships")
    1616end
    1717
     
    1919   P.shipList = {}
    2020   for line in io.lines("../levels/templates/.shipmodels") do  --checks if shipmodel is included in level file
    21         if selectedlevel:hasShip(string.lower(line)) then
    22                 P.shipList[#P.shipList+1] = string.lower(line)
    23         end
    24    end 
     21    if selectedlevel:hasShip(string.lower(line)) then
     22        P.shipList[#P.shipList+1] = string.lower(line)
     23    end
     24   end
    2525end
    2626
     
    4646    tabName = "orxonox/ShipSelectionLevelTab"
    4747    -- create new tab window with desired name
    48     listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName)) 
     48    listbox = CEGUI.toListbox(winMgr:createWindow("MenuWidgets/Listbox", tabName))
    4949    listbox:setText(name)
    5050    listbox:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}")
    51     --[[TODO: smaller list if image and description is implemented. 
    52         listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]]     
     51    --[[TODO: smaller list if image and description is implemented.
     52    listbox:setProperty("UnifiedAreaRect", "{{0.05,0},{0.1,0},{0.5,0},{0.675,0}}") --]]
    5353    listbox:setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}")
    5454    -- fill listbox with items
     
    107107
    108108    if (selectedlevel ~= nil and P.ShipSelectionGetSelectedModel() ~= nil)  then
    109         selectedlevel:selectShip(P.ShipSelectionGetSelectedModel())
     109    selectedlevel:selectShip(P.ShipSelectionGetSelectedModel())
    110110        orxonox.execute("startGame " .. "_temp.oxw")
    111111        hideAllMenuSheets()
    112112    else
    113         orxonox.execute("orxout user_warning no ship model selected or no tagged shipmodel installed")
     113    orxonox.execute("orxout user_warning no ship model selected or no tagged shipmodel installed")
    114114    end
    115115end
     
    128128function P.ShipSelectionBackButton_clicked(e)
    129129    orxonox.execute("keyESC")
    130 end 
     130end
    131131
    132132return P
  • code/branches/presentation2012merge/data/gui/scripts/SingleplayerMenu.lua

    r9269 r9272  
    1010function P.onLoad()
    1111    P.createLevelList()
    12    
     12
    1313    -- create tabs with desired tab as argument (nil for all)
    1414    P.createFilterTab("Gametypes", "gametype")
     
    1919    P.createFilterTab("Tests", "test")
    2020    P.createFilterTab("Show All", nil)
    21    
     21
    2222    -- update description and screenshot boxes
    2323    P.SingleplayerSelectionChanged()
    24    
     24
    2525    --buttons are arranged in a 1x3 matrix
    2626    P:setButton(1, 1, {
     
    4848        level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
    4949        if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw") then
    50             --os.execute("echo " .. level:getXMLFilename() .." >> ~/outputorx")
     50            --os.execute("echo " .. level:getXMLFilename() .." >> ~/outputorx")
    5151            local levelXMLFilename = level:getXMLFilename()
    5252            -- create an imageset for each screenshot
     
    151151            orxonox.execute("startGame " .. selectedlevel:getXMLFilename())
    152152            hideAllMenuSheets()
    153         end
     153        end
    154154    end
    155155end
  • code/branches/presentation2012merge/data/levels/Spacerace2.oxw

    r9271 r9272  
    1212
    1313  include("templates/spaceshipAssff.oxt")
    14  
     14
    1515?>
    1616
     
    3737    <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"/>
    3838
    39        
    40         <SpaceRaceManager>
    41 <checkpoints>   
    42         <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">
    43         <attached>
    44             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    45         </attached>
    46         <collisionShapes>
    47             <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
    48             <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
    49             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
    50             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
    51         </collisionShapes>
    52     </RaceCheckPoint>
    53 
    54 <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">
    55         <attached>
    56             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    57         </attached>
    58         <collisionShapes>
    59             <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
    60             <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
    61             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
    62             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
    63         </collisionShapes>
    64     </RaceCheckPoint>
    65 
    66 <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">
    67         <attached>
    68             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    69         </attached>
    70         <collisionShapes>
    71             <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
    72             <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
    73             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
    74             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
    75         </collisionShapes>
    76     </RaceCheckPoint>
    77 
    78 <RaceCheckPoint name="checkpoint4" position="0,-400,300" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="true">
    79         <attached>
    80             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    81         </attached>
    82         <collisionShapes>
    83             <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
    84             <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
    85             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
    86             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
    87         </collisionShapes>
    88     </RaceCheckPoint>
    89 </checkpoints>
    90 </SpaceRaceManager>
    91 
    92  
    93 <SpaceShip position="0,0,200" lookat="0,0,0">
     39
     40    <SpaceRaceManager>
     41        <checkpoints>
     42            <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">
     43                <attached>
     44                    <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     45                </attached>
     46                <collisionShapes>
     47                    <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
     48                    <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
     49                    <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
     50                    <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
     51                </collisionShapes>
     52            </RaceCheckPoint>
     53
     54            <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">
     55                <attached>
     56                    <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     57                </attached>
     58                <collisionShapes>
     59                    <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
     60                    <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
     61                    <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
     62                    <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
     63                </collisionShapes>
     64            </RaceCheckPoint>
     65
     66            <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">
     67                <attached>
     68                    <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     69                </attached>
     70                <collisionShapes>
     71                    <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
     72                    <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
     73                    <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
     74                    <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
     75                </collisionShapes>
     76            </RaceCheckPoint>
     77
     78            <RaceCheckPoint name="checkpoint4" position="0,-400,300" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="true">
     79                <attached>
     80                    <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     81                </attached>
     82                <collisionShapes>
     83                    <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
     84                    <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
     85                    <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
     86                    <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
     87                </collisionShapes>
     88            </RaceCheckPoint>
     89        </checkpoints>
     90    </SpaceRaceManager>
     91
     92
     93    <SpaceShip position="0,0,200" lookat="0,0,0">
    9494      <templates>
    9595        <Template link=spaceshipassff />
     
    202202
    203203
    204    
     204
    205205  </Scene>
    206206</Level>
  • code/branches/presentation2012merge/data/levels/SurfaceRacePresentation.oxw

    r9271 r9272  
    1616  include("templates/spaceshipSpacecruiser.oxt")
    1717  include("templates/pickupRepresentationTemplates.oxt")
    18  
     18
    1919?>
    2020
     
    5656    <Model position="4200,8050,-1000" scale=10 mesh="debris-pile02.mesh" shadow=true />
    5757    <Model position="4200,8050,-1000" scale=10 mesh="debris-pile03.mesh" shadow=true />
    58    
    59         <MovableEntity position="-700,8090,-300" velocity="80,0,0" rotationaxis="1,0,1" rotationrate=200>
     58
     59    <MovableEntity position="-700,8090,-300" velocity="80,0,0" rotationaxis="1,0,1" rotationrate=200>
    6060      <attached>
    6161        <Model position="0,0,-20" scale=10 mesh="cokebottle.mesh" />
     
    6565
    6666<SpaceRaceManager>
    67  <checkpoints> 
    68         <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">
    69         <attached>
    70             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    71         </attached>
    72         <collisionShapes>
    73             <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
    74             <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
    75             <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    76             <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    77         </collisionShapes>
    78     </RaceCheckPoint>
    79    
    80         <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">
     67 <checkpoints>
     68    <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">
     69        <attached>
     70            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     71        </attached>
     72    <collisionShapes>
     73            <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
     74            <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
     75            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
     76            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
     77        </collisionShapes>
     78    </RaceCheckPoint>
     79
     80    <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">
    8181        <attached>
    8282            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     
    9090    </RaceCheckPoint>
    9191
    92         <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">
    93         <attached>
    94             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    95         </attached>
    96        <collisionShapes>
    97             <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
    98             <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
    99             <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    100             <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    101         </collisionShapes>
    102     </RaceCheckPoint>
    103 
    104         <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">
     92    <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">
     93        <attached>
     94            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     95        </attached>
     96       <collisionShapes>
     97            <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
     98            <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
     99            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
     100            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
     101        </collisionShapes>
     102    </RaceCheckPoint>
     103
     104    <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">
    105105        <attached>
    106106            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     
    114114    </RaceCheckPoint>
    115115
    116         <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">
     116    <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">
    117117        <attached>
    118118            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     
    126126    </RaceCheckPoint>
    127127
    128         <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">
    129         <attached>
    130             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    131         </attached>
    132        <collisionShapes>
    133             <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
    134             <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
    135             <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    136             <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    137         </collisionShapes>
    138     </RaceCheckPoint>
    139 
    140         <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">
     128    <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">
     129        <attached>
     130            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     131        </attached>
     132       <collisionShapes>
     133            <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
     134            <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
     135            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
     136            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
     137        </collisionShapes>
     138    </RaceCheckPoint>
     139
     140    <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">
    141141        <attached>
    142142            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     
    150150    </RaceCheckPoint>
    151151
    152         <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">
    153         <attached>
    154             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    155         </attached>
    156        <collisionShapes>
    157             <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
    158             <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
    159             <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    160             <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    161         </collisionShapes>
    162     </RaceCheckPoint>
    163 
    164         <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">
     152    <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">
     153        <attached>
     154            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     155        </attached>
     156       <collisionShapes>
     157            <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
     158            <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
     159            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
     160            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
     161        </collisionShapes>
     162    </RaceCheckPoint>
     163
     164    <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">
    165165        <attached>
    166166            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     
    174174    </RaceCheckPoint>
    175175
    176         <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">
    177         <attached>
    178             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    179         </attached>
    180        <collisionShapes>
    181             <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
    182             <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
    183             <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    184             <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    185         </collisionShapes>
    186     </RaceCheckPoint>
    187 
    188         <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">
    189         <attached>
    190             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    191         </attached>
    192        <collisionShapes>
    193             <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
    194             <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
    195             <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    196             <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    197         </collisionShapes>
    198     </RaceCheckPoint>
    199 
    200         <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">
     176    <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">
     177        <attached>
     178            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     179        </attached>
     180       <collisionShapes>
     181            <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
     182            <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
     183            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
     184            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
     185        </collisionShapes>
     186    </RaceCheckPoint>
     187
     188    <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">
     189        <attached>
     190            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     191        </attached>
     192       <collisionShapes>
     193            <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
     194            <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
     195            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
     196            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
     197        </collisionShapes>
     198    </RaceCheckPoint>
     199
     200    <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">
    201201        <attached>
    202202            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     
    210210    </RaceCheckPoint>
    211211
    212         <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">
    213         <attached>
    214             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    215         </attached>
    216        <collisionShapes>
    217             <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
    218             <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
    219             <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    220             <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    221         </collisionShapes>
    222     </RaceCheckPoint>
    223 
    224         <RaceCheckPoint name="checkpoint14" position="6000,8050,-5000" direction="0,1,0" roll="0" collisionType="static" scale="4" distance="150" checkpointindex="13" islast="true" >
     212    <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">
     213        <attached>
     214            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     215        </attached>
     216       <collisionShapes>
     217            <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
     218            <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
     219            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
     220            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
     221        </collisionShapes>
     222    </RaceCheckPoint>
     223
     224    <RaceCheckPoint name="checkpoint14" position="6000,8050,-5000" direction="0,1,0" roll="0" collisionType="static" scale="4" distance="150" checkpointindex="13" islast="true" >
    225225        <attached>
    226226            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     
    238238 <SpawnPoint team=0 position="0,8050,0" lookat="0,8000,-8000" spawnclass=SpaceShip pawndesign=shipselection />
    239239
    240  
    241         <!-- -----------------------Zylinder---------------------------- -->
     240
     241    <!-- -----------------------Zylinder---------------------------- -->
    242242<StaticEntity position="2750,8050,6000" direction="1,0,0" roll="90"  scale="4" collisionType=static mass=100000 friction=0.01 >
    243243      <attached>
    244         <Model position="0,0,0" mesh="cylinder.mesh" scale3D="100,100,400" />
    245         <!--
    246                 <Model position="0,80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
    247                 <Model position="0,-80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
    248                 <Model position="80,0,600" mesh="testcube.mesh" scale3D="18,90,-600" />
    249                 <Model position="-80,0,600" mesh="testcube.mesh" scale3D="18,09,-600" />
    250         -->
    251 
    252       </attached>
    253 
    254 
    255         <collisionShapes>
    256          
    257                
    258                 <BoxCollisionShape position="0,320,2400"            halfExtents="360,72,2400" />
    259                 <BoxCollisionShape position="0,-320,2400"      halfExtents="360,72,2400" />
    260                 <BoxCollisionShape position="320,0,2400"            halfExtents="72,360,2400" />
    261                 <BoxCollisionShape position="-320,0,2400"     halfExtents="72,360,2400" />
    262                
    263 
    264        
     244    <Model position="0,0,0" mesh="cylinder.mesh" scale3D="100,100,400" />
     245    <!--
     246                <Model position="0,80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
     247        <Model position="0,-80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
     248        <Model position="80,0,600" mesh="testcube.mesh" scale3D="18,90,-600" />
     249        <Model position="-80,0,600" mesh="testcube.mesh" scale3D="18,09,-600" />
     250    -->
     251
     252      </attached>
     253
     254
     255    <collisionShapes>
     256
     257
     258        <BoxCollisionShape position="0,320,2400"            halfExtents="360,72,2400" />
     259        <BoxCollisionShape position="0,-320,2400"      halfExtents="360,72,2400" />
     260        <BoxCollisionShape position="320,0,2400"            halfExtents="72,360,2400" />
     261        <BoxCollisionShape position="-320,0,2400"     halfExtents="72,360,2400" />
     262
     263
     264
    265265        </collisionShapes>
    266266
     
    270270<StaticEntity position="4465,8050,-500" direction="0,0,0"   scale="1" collisionType=static mass=100000 friction=0.01 >
    271271      <attached>
    272         <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
     272    <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
    273273<!--
    274                 <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
    275                 -->
    276 
    277       </attached>
    278 
    279 
    280         <collisionShapes>
    281          
    282                
    283                 <BoxCollisionShape position="0,0,0"            halfExtents="450,600,50" />
     274                <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
     275        -->
     276
     277      </attached>
     278
     279
     280    <collisionShapes>
     281
     282
     283        <BoxCollisionShape position="0,0,0"            halfExtents="450,600,50" />
    284284
    285285        </collisionShapes>
     
    289289<StaticEntity position="3535,8050,-500" direction="0,0,0"   scale="1" collisionType=static mass=100000 friction=0.01 >
    290290      <attached>
    291         <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
     291    <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
    292292<!--
    293                 <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
    294                 -->
    295 
    296       </attached>
    297 
    298 
    299         <collisionShapes>
    300          
    301                
    302                 <BoxCollisionShape position="0,0,0"            halfExtents="450,600,50" />
     293                <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
     294        -->
     295
     296      </attached>
     297
     298
     299    <collisionShapes>
     300
     301
     302        <BoxCollisionShape position="0,0,0"            halfExtents="450,600,50" />
    303303
    304304        </collisionShapes>
     
    309309
    310310
    311         <!-- ------------------Boden----------------- -->
     311    <!-- ------------------Boden----------------- -->
    312312  <StaticEntity position="0,0,0" direction="0,0,0" collisionType=static mass=100000 friction=0.01>
    313313     <attached>
     
    317317        <BoxCollisionShape position="0,50,0" halfExtents="8000,8000,8000" />um j?:P"{
    318318
    319       </collisionShapes> 
     319      </collisionShapes>
    320320</StaticEntity>
    321321
     
    351351    for i = 0, max, 1
    352352    do
    353         x=-12000
    354         y=10000
    355         z=-12000
    356  
     353    x=-12000
     354    y=10000
     355    z=-12000
     356
    357357    ?>
    358358    <?lua
  • code/branches/presentation2012merge/data/levels/asteroidField.oxw

    r9271 r9272  
    3939
    4040    <!-- Belt that's far away  *** TURNED OFF FOR PERFORMANCE REASONS *** -->
    41     <!-- Generate asteroid field and asteroid belt -->   
     41    <!-- Generate asteroid field and asteroid belt -->
    4242    <!--
    4343    <?lua
    44         dofile("includes/asteroidField.lua")
    45         asteroidBelt(0, 0, 0, -48, -34, 70, 100, 200, 219900, 210000, 900, 1)
     44        dofile("includes/asteroidField.lua")
     45        asteroidBelt(0, 0, 0, -48, -34, 70, 100, 200, 219900, 210000, 900, 1)
    4646    ?>
    4747    -->
     
    5050    <!-- triple large belt around the planet  -->
    5151    <?lua
    52         dofile("includes/asteroidField.lua")
    53         asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
     52        dofile("includes/asteroidField.lua")
     53        asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
    5454    ?>
    5555    <?lua
    56         dofile("includes/asteroidField.lua")
    57         asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
     56        dofile("includes/asteroidField.lua")
     57        asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
    5858    ?>
    5959    <?lua
    60         dofile("includes/asteroidField.lua")
    61         asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
     60        dofile("includes/asteroidField.lua")
     61        asteroidBelt(15000, 0, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
    6262    ?>
    6363
     
    9595
    9696
    97    
     97
    9898  </Scene>
    9999</Level>
  • code/branches/presentation2012merge/data/levels/dynamicMatch.oxw

    r9016 r9272  
    9090      <attached>
    9191        <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
    92           <attached><!-- ---------asteroid fog----- -->
     92          <attached><!-- ---------asteroid fog----- -->
    9393            <ParticleEmitter position="0,0,0" source="Orxonox/Steam" />
    9494          </attached>
    95         </Model>
     95        </Model>
    9696      </attached>
    9797      <?lua if i == 5 then ?><collisionShapes>
  • code/branches/presentation2012merge/data/levels/includes/CuboidSpaceStation.lua

    r7163 r9272  
    11----------------------------------------------------------------------------------------------------
    22-- This lua script creates a totally random generated space station for the orxonox computer game!--
    3 -- (c) Wallah 2008, published under GPL licence!                                                                                                  --
     3-- (c) Wallah 2008, published under GPL licence!                                                  --
    44----------------------------------------------------------------------------------------------------
    55
    66--------------------------------------------------------------------------------------------------------------------------------------------------------------------
    7 -- 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,                   --
     7-- 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,           --
    88-- 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--
    99-- 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--
    10 -- 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     --
    11 -- default values. REMEMBER: Function overloading is not possible, be sure to call your function differently from others already existing ones.                                   --
     10-- 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     --
     11-- default values. REMEMBER: Function overloading is not possible, be sure to call your function differently from others already existing ones.                   --
    1212--------------------------------------------------------------------------------------------------------------------------------------------------------------------
    1313
    1414-- This function creates a randomly generated space station.
    1515-- 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,
    16 --      your space station will be generated randomly, but once you have the space station it will always be the same.
     16--  your space station will be generated randomly, but once you have the space station it will always be the same.
    1717-- The argument xLength defines how large the space station will be into the x-direction.
    1818-- 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.
     
    3737-- Create a randomseed, so that the math.random() function is actually random.
    3838if ranSeed == 0 then
    39         math.randomseed(os.time())
     39    math.randomseed(os.time())
    4040else
    41         math.randomseed(ranSeed)
     41    math.randomseed(ranSeed)
    4242end
    4343-- End create randomseed.
     
    5252sSSize=30
    5353if xLength>=yLength and xLength>=zLength then
    54         sSSize=xLength+20
     54    sSSize=xLength+20
    5555elseif yLength>=xLength and yLength>=zLength then
    56         sSSize=yLength+20
     56    sSSize=yLength+20
    5757elseif zLength>=xLength and zLength>=yLength then
    58         sSSize=zLength+20
     58    sSSize=zLength+20
    5959end
    6060-- 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.
     
    7878pDim=6
    7979-- 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:
    80 --      integer*(gridDim-connectionSize), then integer tells you how many griddimensions your part is.
     80--  integer*(gridDim-connectionSize), then integer tells you how many griddimensions your part is.
    8181gridDim=2.25
    8282-- End define global parameters.
     
    8989-- The parameters x,y,z are the axis of the space station, which iterate to sSSize, the maximal size of the space station.
    9090-- 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,
    91 --      and so on for the other dimensions y and z.
     91--  and so on for the other dimensions y and z.
    9292-- grid[x][y][z][0] contains 0 if there is no part at the position (x,y,z), otherwise 1.
    9393-- 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,
    94 --      "-" if there is one in the negative x-direction, "+-" if there are in both x-directions.
     94--  "-" if there is one in the negative x-direction, "+-" if there are in both x-directions.
    9595-- 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,
    96 --      "-" if there is one in the negative y-direction, "+-" if there are in both y-directions.
     96--  "-" if there is one in the negative y-direction, "+-" if there are in both y-directions.
    9797-- 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,
    98 --      "-" if there is one in the negative z-direction, "+-" if there are in both z-directions.
     98--  "-" if there is one in the negative z-direction, "+-" if there are in both z-directions.
    9999grid = {}
    100100for x=-math.floor(sSSize/2),math.floor(sSSize/2) do
    101         grid[x] = {}
    102         for y=-math.floor(sSSize/2),math.floor(sSSize/2) do
    103                 grid[x][y]= {}
    104                 for z=-math.floor(sSSize/2),math.floor(sSSize/2) do
    105                         grid[x][y][z]={}
    106                         for i=0,3 do
    107                                 grid[x][y][z][i]=0
    108                         end
    109                 end
    110         end
     101    grid[x] = {}
     102    for y=-math.floor(sSSize/2),math.floor(sSSize/2) do
     103        grid[x][y]= {}
     104        for z=-math.floor(sSSize/2),math.floor(sSSize/2) do
     105            grid[x][y][z]={}
     106            for i=0,3 do
     107                grid[x][y][z][i]=0
     108            end
     109        end
     110    end
    111111end
    112112-- End create 4-dim grid.
     
    119119-- 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.
    120120-- 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.
    121 --      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
    122 --      z-axis, then you have to use the coordinate point (0,0,1).
     121--  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
     122--  z-axis, then you have to use the coordinate point (0,0,1).
    123123-- 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.
    124 --      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, "+-", "+", "-").
     124--  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, "+-", "+", "-").
    125125bodyParts={}
    126126for i=1,sSParts do
    127         bodyParts[i]={}
    128         for x=-math.floor(pDim/2),math.floor(pDim/2) do
    129                 bodyParts[i][x]={}
    130                 for y=-math.floor(pDim/2),math.floor(pDim/2) do
    131                         bodyParts[i][x][y]={}
    132                         for z=-math.floor(pDim/2),math.floor(pDim/2) do
    133                                 bodyParts[i][x][y][z]={}
    134                                 for k=0,3 do
    135                                         bodyParts[i][x][y][z][k]=0
    136                                 end
    137                         end
    138                 end
    139         end
    140         -- This contains the name of the mesh file.
    141         bodyParts[i][0][0][0][4]=""
    142         -- This contains the first possible rotation of your part, pitch=... yaw=... roll=... .
    143         bodyParts[i][0][0][0][5]=""
    144         -- This contains the second possible rotation of your part, pitch=... yaw=... roll=... .
    145         bodyParts[i][0][0][0][6]=""
    146         -- This contains the third possible rotation of your part, pitch=... yaw=... roll=... .
    147         bodyParts[i][0][0][0][7]=""
    148         -- Contains the movement rotation, rotationaxis=... rotationrate=... .
    149         bodyParts[i][0][0][0][8]=""
    150         -- Contains the attachment, if your part has an attachment, e.g. <ParticleEmitter .../>.
    151         bodyParts[i][0][0][0][9]=""
    152         -- Contains how many of this part you want to attach to your space station.
    153         bodyParts[i][0][0][0][10]=1
     127    bodyParts[i]={}
     128    for x=-math.floor(pDim/2),math.floor(pDim/2) do
     129        bodyParts[i][x]={}
     130        for y=-math.floor(pDim/2),math.floor(pDim/2) do
     131            bodyParts[i][x][y]={}
     132            for z=-math.floor(pDim/2),math.floor(pDim/2) do
     133                bodyParts[i][x][y][z]={}
     134                for k=0,3 do
     135                    bodyParts[i][x][y][z][k]=0
     136                end
     137            end
     138        end
     139    end
     140    -- This contains the name of the mesh file.
     141    bodyParts[i][0][0][0][4]=""
     142    -- This contains the first possible rotation of your part, pitch=... yaw=... roll=... .
     143    bodyParts[i][0][0][0][5]=""
     144    -- This contains the second possible rotation of your part, pitch=... yaw=... roll=... .
     145    bodyParts[i][0][0][0][6]=""
     146    -- This contains the third possible rotation of your part, pitch=... yaw=... roll=... .
     147    bodyParts[i][0][0][0][7]=""
     148    -- Contains the movement rotation, rotationaxis=... rotationrate=... .
     149    bodyParts[i][0][0][0][8]=""
     150    -- Contains the attachment, if your part has an attachment, e.g. <ParticleEmitter .../>.
     151    bodyParts[i][0][0][0][9]=""
     152    -- Contains how many of this part you want to attach to your space station.
     153    bodyParts[i][0][0][0][10]=1
    154154end
    155155----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    193193
    194194-- Insert the CuboidConnectionBody, it is three griddimensions long and one wide and high and can have only connections at griddimension 1
    195 --      (except the side in direction of griddimension 2) and griddimension 3 (except the side in direction of griddimension 2).
     195--  (except the side in direction of griddimension 2) and griddimension 3 (except the side in direction of griddimension 2).
    196196bodyParts[3][0][0][0][4]="CuboidConnBody.mesh"
    197197bodyParts[3][0][0][0][5]="pitch=-90"
     
    373373--This function actualizes the grid, which I have to call always after I have added a new part to the space station.
    374374function actualizeGrid(Index,x,y,z)
    375         for i=math.floor(-pDim/2)+1,math.floor(pDim/2) do
    376                 for j=math.floor(-pDim/2)+1,math.floor(pDim/2) do
    377                         for k=math.floor(-pDim/2)+1,math.floor(pDim/2) do
    378                                 if bodyParts[Index][i][j][k][0] == 1 then
    379                                         for l=0,3 do
    380                                                 grid[x+i][y+j][z+k][l] = bodyParts[Index][i][j][k][l]
    381                                         end
    382                                 end
    383                         end
    384                 end
    385         end
     375    for i=math.floor(-pDim/2)+1,math.floor(pDim/2) do
     376        for j=math.floor(-pDim/2)+1,math.floor(pDim/2) do
     377            for k=math.floor(-pDim/2)+1,math.floor(pDim/2) do
     378                if bodyParts[Index][i][j][k][0] == 1 then
     379                    for l=0,3 do
     380                        grid[x+i][y+j][z+k][l] = bodyParts[Index][i][j][k][l]
     381                    end
     382                end
     383            end
     384        end
     385    end
    386386end
    387387-- End actualizeGrid.
     
    390390-- If the part fits there it returns 1, otherwise 0.
    391391function checkPart(Index,x,y,z)
    392         check=1
    393         for i=math.floor(-pDim/2)+1,math.floor(pDim/2) do
    394                 for j=math.floor(-pDim/2)+1,math.floor(pDim/2) do
    395                         for k=math.floor(-pDim/2)+1,math.floor(pDim/2) do
    396                                 -- 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,
    397                                 --      which means that the part doesn't fit there.
    398                                 if bodyParts[Index][i][j][k][0] == 1 and grid[x+i][y+j][z+k][0] == 1 then
    399                                         check=0
    400                                 end
    401                         end
    402                 end
    403         end
    404         return check
     392    check=1
     393    for i=math.floor(-pDim/2)+1,math.floor(pDim/2) do
     394        for j=math.floor(-pDim/2)+1,math.floor(pDim/2) do
     395            for k=math.floor(-pDim/2)+1,math.floor(pDim/2) do
     396                -- 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,
     397                --  which means that the part doesn't fit there.
     398                if bodyParts[Index][i][j][k][0] == 1 and grid[x+i][y+j][z+k][0] == 1 then
     399                    check=0
     400                end
     401            end
     402        end
     403    end
     404    return check
    405405end
    406406-- End checkPart function.
     
    408408-- This function prints the model with tempPartIndex in the bodyParts array at position lx,ly,lz.
    409409-- 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
    410 --      bodyParts[tempPartIndex][0][0][0][8].
     410--  bodyParts[tempPartIndex][0][0][0][8].
    411411-- 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,
    412 --      for bodyParts[tempPartIndex][0][0][0][7] side must be 3.
     412--  for bodyParts[tempPartIndex][0][0][0][7] side must be 3.
    413413function printModel(lx,ly,lz,tempPartIndex,movEntity,side)
    414         if movEntity == true then
    415                 print("<MovableEntity scale=1 position=\"") print(lx*gridDim*sSScale) print(",") print(ly*gridDim*sSScale) print(",") print(lz*gridDim*sSScale) print("\" ")
    416                 print(bodyParts[tempPartIndex][0][0][0][8]) print(">")
    417                 print("<attached>")
    418                 lx=0 ly=0 lz=0
    419         end
    420 
    421         print("<Model position=\"") print(lx*gridDim*sSScale) print(",") print(ly*gridDim*sSScale) print(",") print(lz*gridDim*sSScale)
    422         print("\" scale=") print(sSScale) print(" mesh= \"") print(bodyParts[tempPartIndex][0][0][0][4]) print("\"")
    423 
    424                 if side == 1 then
    425                         print(bodyParts[tempPartIndex][0][0][0][5]) print(">")
    426                 elseif side == 2 then
    427                         print(bodyParts[tempPartIndex][0][0][0][6]) print(">")
    428                 elseif side == 3 then
    429                         print(bodyParts[tempPartIndex][0][0][0][7]) print(">")
    430                 end
    431 
    432                 print("<attached>")
    433                         print(bodyParts[tempPartIndex][0][0][0][9])
    434                 print("</attached>")
    435 
    436         print("</Model>")
    437 
    438         if movEntity == true then
    439                 print("</attached>")
    440                 print("</MovableEntity>")
    441         end
     414    if movEntity == true then
     415        print("<MovableEntity scale=1 position=\"") print(lx*gridDim*sSScale) print(",") print(ly*gridDim*sSScale) print(",") print(lz*gridDim*sSScale) print("\" ")
     416        print(bodyParts[tempPartIndex][0][0][0][8]) print(">")
     417        print("<attached>")
     418        lx=0 ly=0 lz=0
     419    end
     420
     421    print("<Model position=\"") print(lx*gridDim*sSScale) print(",") print(ly*gridDim*sSScale) print(",") print(lz*gridDim*sSScale)
     422    print("\" scale=") print(sSScale) print(" mesh= \"") print(bodyParts[tempPartIndex][0][0][0][4]) print("\"")
     423
     424        if side == 1 then
     425            print(bodyParts[tempPartIndex][0][0][0][5]) print(">")
     426        elseif side == 2 then
     427            print(bodyParts[tempPartIndex][0][0][0][6]) print(">")
     428        elseif side == 3 then
     429            print(bodyParts[tempPartIndex][0][0][0][7]) print(">")
     430        end
     431
     432        print("<attached>")
     433            print(bodyParts[tempPartIndex][0][0][0][9])
     434        print("</attached>")
     435
     436    print("</Model>")
     437
     438    if movEntity == true then
     439        print("</attached>")
     440        print("</MovableEntity>")
     441    end
    442442end
    443443-- End function printModel().
     
    446446-- The arguments lx,ly,lz are the coordinates of the grid, where you want to set the part.
    447447-- 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,
    448 --      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
    449 --      of the side to which you want to attach the part. The same for yAxis and zAxis.
     448--  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
     449--  of the side to which you want to attach the part. The same for yAxis and zAxis.
    450450-- 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
    451 --      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
    452 --      corresponding axis.
     451--  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
     452--  corresponding axis.
    453453-- The argument index is the index of the part for the bodyParts array.
    454454-- 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
    455 --      this argument must be true. The extra MovableEntity is used to rotate the part around his own axis, or something like that.
     455--  this argument must be true. The extra MovableEntity is used to rotate the part around his own axis, or something like that.
    456456-- The argument printSide is like the argument side of the printModel() function. It defines how your part will be rotated. Read the commentary there.
    457457-- 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.
    458458function setPart(lx,ly,lz,xAxis,yAxis,zAxis,Dir,index,printMovEnt,printSide)
    459459
    460         partSet=0
    461         -- 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.
    462         coord=1*xAxis+2*yAxis+3*zAxis
    463         -- 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
    464         --      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.
    465         if Dir==1 then
    466                 conn="+"
    467         elseif Dir==-1 then
    468                 conn="-"
    469         end
    470         -- 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
    471         --      at the next position is a part which can have a connection into the direction from where I look.
    472         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
    473                 -- This checks whether the part fits at that position or not.
    474                 check=checkPart(index,lx,ly,lz)
    475                 if check == 1 then
    476                         -- This prints the part.
    477                         printModel(lx,ly,lz,index,printMovEnt,printSide)
    478                         partSet=1
    479                         -- This actualizes the grid array with the values of the array bodyParts at the position index.
    480                         actualizeGrid(index,lx,ly,lz)
    481                 end
    482         end
    483         return partSet
     460    partSet=0
     461    -- 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.
     462    coord=1*xAxis+2*yAxis+3*zAxis
     463    -- 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
     464    --  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.
     465    if Dir==1 then
     466        conn="+"
     467    elseif Dir==-1 then
     468        conn="-"
     469    end
     470    -- 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
     471    --  at the next position is a part which can have a connection into the direction from where I look.
     472    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
     473        -- This checks whether the part fits at that position or not.
     474        check=checkPart(index,lx,ly,lz)
     475        if check == 1 then
     476            -- This prints the part.
     477            printModel(lx,ly,lz,index,printMovEnt,printSide)
     478            partSet=1
     479            -- This actualizes the grid array with the values of the array bodyParts at the position index.
     480            actualizeGrid(index,lx,ly,lz)
     481        end
     482    end
     483    return partSet
    484484end
    485485-- End function setPart().
     
    490490-- The argument parts is the number of different parts which you want to attach to a side.
    491491function spiralSet(xAxis,yAxis,zAxis,Dir,index,parts,printMovEnt,printSide)
    492         if index[0] ~= false then
    493                 -- 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.
    494                 vector={}
    495                 -- This must be done, because there are different sides from where I try to attach a part.
    496                 coord1=1*yAxis+2*zAxis
    497                 coord2=math.mod(coord1+1,3)
    498                 coord3=math.mod(coord2+1,3)
    499 
    500                 for pc=1,parts do
    501                         tempIndex = index[pc]
    502                         for eachPart=1,bodyParts[tempIndex][0][0][0][10] do
    503                                 partSet=0
    504                                 vector[coord1]=math.floor(Dir*sSSize/2)-2*Dir
    505                                 while vector[coord1]~=math.floor(-1*Dir*sSSize/2)+2*Dir and partSet==0 do
    506                                         round=0
    507                                         while round<=math.floor(sSSize/2)-2 and partSet==0 do
    508                                                 vector[coord2]=round
    509                                                 vector[coord3]=-round
    510                                                 while vector[coord3]<=round and partSet==0 do
    511                                                         partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
    512                                                         vector[coord3]=vector[coord3]+1
    513                                                 end
    514                                                 while vector[coord2]>=-round and partSet==0 do
    515                                                         partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
    516                                                         vector[coord2]=vector[coord2]-1
    517                                                 end
    518                                                 while vector[coord3]>-round and partSet==0 do
    519                                                         partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
    520                                                         vector[coord3]=vector[coord3]-1
    521                                                 end
    522                                                 while vector[coord2]<=round and partSet==0 do
    523                                                         partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
    524                                                         vector[coord2]=vector[coord2]+1
    525                                                 end
    526                                                 round=round+1
    527                                         end
    528                                         vector[coord1]=vector[coord1]-Dir
    529                                 end
    530                         end
    531                 end
    532         end
     492    if index[0] ~= false then
     493        -- 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.
     494        vector={}
     495        -- This must be done, because there are different sides from where I try to attach a part.
     496        coord1=1*yAxis+2*zAxis
     497        coord2=math.mod(coord1+1,3)
     498        coord3=math.mod(coord2+1,3)
     499
     500        for pc=1,parts do
     501            tempIndex = index[pc]
     502            for eachPart=1,bodyParts[tempIndex][0][0][0][10] do
     503                partSet=0
     504                vector[coord1]=math.floor(Dir*sSSize/2)-2*Dir
     505                while vector[coord1]~=math.floor(-1*Dir*sSSize/2)+2*Dir and partSet==0 do
     506                    round=0
     507                    while round<=math.floor(sSSize/2)-2 and partSet==0 do
     508                        vector[coord2]=round
     509                        vector[coord3]=-round
     510                        while vector[coord3]<=round and partSet==0 do
     511                            partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
     512                            vector[coord3]=vector[coord3]+1
     513                        end
     514                        while vector[coord2]>=-round and partSet==0 do
     515                            partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
     516                            vector[coord2]=vector[coord2]-1
     517                        end
     518                        while vector[coord3]>-round and partSet==0 do
     519                            partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
     520                            vector[coord3]=vector[coord3]-1
     521                        end
     522                        while vector[coord2]<=round and partSet==0 do
     523                            partSet=setPart(vector[0],vector[1],vector[2],xAxis,yAxis,zAxis,Dir,tempIndex,printMovEnt,printSide)
     524                            vector[coord2]=vector[coord2]+1
     525                        end
     526                        round=round+1
     527                    end
     528                    vector[coord1]=vector[coord1]-Dir
     529                end
     530            end
     531        end
     532    end
    533533end
    534534-- End function spiralSet().
     
    554554xMax=math.random(math.floor(xLength/2),math.floor(xLength/2)+xVar)
    555555while x<xMax do
    556         -- The same for the y- and z-direction.
    557         y=math.random(-math.floor(yLength/2),-math.floor(yLength/2)+yVar)
    558         yMax=math.random(math.floor(yLength/2),math.floor(yLength/2)+yVar)
    559         while y<yMax do
    560                 yMax=math.random(math.floor(yLength/2),math.floor(yLength/2)+yVar)
    561                 z=math.random(-math.floor(zLength/2),-math.floor(zLength/2)+zVar)
    562                 zMax=math.random(math.floor(zLength/2),math.floor(zLength/2)+zVar)
    563                 while z<zMax do
    564                         -- This loop choses a bodypart, which fits at position (x,y,z).
    565                         -- If after the fifth time the part does still not fit we terminate the loop and set no part at postition (x,y,z).
    566                         partSet=0
    567                         counter=0
    568                         while counter<5 and partSet==0 do
    569                                 -- This choses randomly a bodyPartIndex, which is the index used for the parts in the array bodyParts.
    570                                 tempBodyPartIndex=math.random(1,sSBodyParts)
    571                                 check=checkPart(tempBodyPartIndex,x,y,z)
    572                                 -- If check == 1, this means that the part fits there, so we put it there and break the while true loop, to go on.
    573                                 if check == 1 then
    574                                         -- This prints the chosen part at position (x*gridDim*sSScale,y*gridDim*sSScale,z*gridDim*sSScale).
    575                                         printModel(x,y,z,tempBodyPartIndex,false,1)
    576                                         -- This actualizes the grid array with the values of the array bodyParts at the position tempBodyPartIndex, which is our randomly chosen part.
    577                                         actualizeGrid(tempBodyPartIndex,x,y,z)
    578                                         partSet=1
    579                                 end
    580                                 counter=counter+1
    581                         end
    582                         z=z+1
    583                 end
    584                 y=y+1
    585         end
    586         x=x+1
     556    -- The same for the y- and z-direction.
     557    y=math.random(-math.floor(yLength/2),-math.floor(yLength/2)+yVar)
     558    yMax=math.random(math.floor(yLength/2),math.floor(yLength/2)+yVar)
     559    while y<yMax do
     560        yMax=math.random(math.floor(yLength/2),math.floor(yLength/2)+yVar)
     561        z=math.random(-math.floor(zLength/2),-math.floor(zLength/2)+zVar)
     562        zMax=math.random(math.floor(zLength/2),math.floor(zLength/2)+zVar)
     563        while z<zMax do
     564            -- This loop choses a bodypart, which fits at position (x,y,z).
     565            -- If after the fifth time the part does still not fit we terminate the loop and set no part at postition (x,y,z).
     566            partSet=0
     567            counter=0
     568            while counter<5 and partSet==0 do
     569                -- This choses randomly a bodyPartIndex, which is the index used for the parts in the array bodyParts.
     570                tempBodyPartIndex=math.random(1,sSBodyParts)
     571                check=checkPart(tempBodyPartIndex,x,y,z)
     572                -- If check == 1, this means that the part fits there, so we put it there and break the while true loop, to go on.
     573                if check == 1 then
     574                    -- This prints the chosen part at position (x*gridDim*sSScale,y*gridDim*sSScale,z*gridDim*sSScale).
     575                    printModel(x,y,z,tempBodyPartIndex,false,1)
     576                    -- This actualizes the grid array with the values of the array bodyParts at the position tempBodyPartIndex, which is our randomly chosen part.
     577                    actualizeGrid(tempBodyPartIndex,x,y,z)
     578                    partSet=1
     579                end
     580                counter=counter+1
     581            end
     582            z=z+1
     583        end
     584        y=y+1
     585    end
     586    x=x+1
    587587end
    588588-- End attach all bodyparts.
     
    593593----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    594594-- Attach backParts, if there are some.
    595         spiralSet(0,0,1,1,backPartsIndex,backParts,false,1)
     595    spiralSet(0,0,1,1,backPartsIndex,backParts,false,1)
    596596-- End attach backParts.
    597597----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    599599----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    600600-- Attach frontParts, if there are.
    601         spiralSet(0,0,1,-1,frontPartsIndex,frontParts,false,1)
     601    spiralSet(0,0,1,-1,frontPartsIndex,frontParts,false,1)
    602602-- End attach frontParts.
    603603----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    605605----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    606606-- Attach parts on the left side of the space station.
    607         spiralSet(1,0,0,-1,leftSidePartsIndex,leftSideParts,true,1)
     607    spiralSet(1,0,0,-1,leftSidePartsIndex,leftSideParts,true,1)
    608608-- End attach left side parts.
    609609----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    611611----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    612612-- Attach parts on the right side of the space station.
    613         spiralSet(1,0,0,1,rightSidePartsIndex,rightSideParts,true,2)
     613    spiralSet(1,0,0,1,rightSidePartsIndex,rightSideParts,true,2)
    614614-- End attach right side parts.
    615615----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    617617----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    618618-- Attach parts on top of the space station.
    619         spiralSet(0,1,0,1,topPartsIndex,topParts,true,1)
     619    spiralSet(0,1,0,1,topPartsIndex,topParts,true,1)
    620620-- End attach top parts.
    621621----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     
    627627-- This iterates through the whole grid array.
    628628if connPartsIndex[0] ~= false then
    629         for x=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
    630                 for y=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
    631                         for z=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
    632                                 tempConnPartIndex=connPartsIndex[math.random(1,connParts)]
    633                                 -- 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
    634                                 --      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
    635                                 --      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.
    636                                 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
    637                                         -- This prints the connection part, the +1/2 is because the connection is set exactly in the middle of two gridpoints.
    638                                         printModel(x+1/2,y,z,tempConnPartIndex,false,1)
    639                                 end
    640                                 -- The same as in the x-direction, but for the y-direction.
    641                                 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
    642                                         printModel(x,y+1/2,z,tempConnPartIndex,false,2)
    643                                 end
    644                                 -- The same as in the x-direction, but for the z-direction.
    645                                 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
    646                                         printModel(x,y,z+1/2,tempConnPartIndex,false,3)
    647                                 end
    648                         end
    649                 end
    650         end
     629    for x=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
     630        for y=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
     631            for z=math.floor(-sSSize/2)+2,math.floor(sSSize/2)-2 do
     632                tempConnPartIndex=connPartsIndex[math.random(1,connParts)]
     633                -- 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
     634                --  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
     635                --  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.
     636                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
     637                    -- This prints the connection part, the +1/2 is because the connection is set exactly in the middle of two gridpoints.
     638                    printModel(x+1/2,y,z,tempConnPartIndex,false,1)
     639                end
     640                -- The same as in the x-direction, but for the y-direction.
     641                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
     642                    printModel(x,y+1/2,z,tempConnPartIndex,false,2)
     643                end
     644                -- The same as in the x-direction, but for the z-direction.
     645                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
     646                    printModel(x,y,z+1/2,tempConnPartIndex,false,3)
     647                end
     648            end
     649        end
     650    end
    651651end
    652652-- End attach all connectionparts.
     
    671671-- This function is for the lazy guys, which do not care how the space station looks like, so I use some good standard values.
    672672function createSpaceStation()
    673         createSpaceStationPar(0,4,1,2,1,6,1,100)
     673    createSpaceStationPar(0,4,1,2,1,6,1,100)
    674674end
    675675-- End createSpaceStaion() function.
  • code/branches/presentation2012merge/data/levels/includes/asteroidField.lua

    r9271 r9272  
    11--[[ fog generator
    22generates fog
    3         posX, posY, posZ - position in space
    4         size - size of billboard
    5         brightness - [0,1] fog brightness
     3    posX, posY, posZ - position in space
     4    size - size of billboard
     5    brightness - [0,1] fog brightness
    66--]]
    77function generateFog(posX, posY, posZ, size, brightness)
    8                 print("<Billboard ")
    9                         print("position = \"")
    10                                 print(posX) print(",")
    11                                 print(posY) print(",")
    12                                 print(posZ) print("\" ")
    13                         print("colour=\"")
    14                                 print(brightness) print(",")
    15                                 print(brightness) print(",")
    16                                 print(brightness) print("\" ")
    17                         print("material=\"Smoke/Smoke\" scale=")
    18                         print(size)
    19                         print(" />")
     8    print("<Billboard ")
     9        print("position = \"")
     10            print(posX) print(",")
     11            print(posY) print(",")
     12            print(posZ) print("\" ")
     13        print("colour=\"")
     14            print(brightness) print(",")
     15            print(brightness) print(",")
     16            print(brightness) print("\" ")
     17        print("material=\"Smoke/Smoke\" scale=")
     18        print(size)
     19    print(" />")
    2020end
    2121
    2222--[[ asteroid field generator
    2323generates asteroid field
    24         posX, posY, posZ - position in space
    25         minSize, maxSize - size boundaries of each asteroid
    26         radius - size of the cube around position in space
    27         count - number of asteroids
    28         fog - enable fog 0/1
     24    posX, posY, posZ - position in space
     25    minSize, maxSize - size boundaries of each asteroid
     26    radius - size of the cube around position in space
     27    count - number of asteroids
     28    fog - enable fog 0/1
    2929--]]
    3030function asteroidField(posX, posY, posZ, minSize, maxSize, radius, count, fog)
    31         for i = 1, count, 1
    32         do
    33                 size = (math.random() * (maxSize - minSize)) + minSize
    34                 pX = (2 * math.random() * radius) - radius + posX
    35                 pY = (2 * math.random() * radius) - radius + posY
    36                 pZ = (2 * math.random() * radius) - radius + posZ
    37                 print("<StaticEntity ")
    38                
    39                 print("position = \"")
    40                 print(pX) print(",")
    41                 print(pY) print(",")
    42                 print(pZ) print("\" ")
    43                
    44                 print("scale = \"") print(size) print("\" ")
    45                
    46                 print("collisionType = static linearDamping = 0.8 angularDamping = 1 ")
    47                 print("collisiondamage = 1000 enablecollisiondamage = true>")
    48                
    49                 print("<attached>")
    50                         print("<Model mass=\"") print(size * 10) print("\" ")
    51                         print("mesh=\"ast") print(math.mod(i,6) + 1) print(".mesh\" />")
    52                 print("</attached>")
    53                
    54                 print("<collisionShapes> ")
    55                         print("<SphereCollisionShape radius=\"")
    56                         print(size * 2.5) print("\" />")
    57                 print("</collisionShapes>")
    58                
    59                 print("</StaticEntity>")
    60                
    61                 if fog == 1 and i % 5 == 0 then
    62                         generateFog(pX, pY, pZ, radius*0.04, 0.2)
    63                 end
    64         end
     31    for i = 1, count, 1 do
     32        size = (math.random() * (maxSize - minSize)) + minSize
     33        pX = (2 * math.random() * radius) - radius + posX
     34        pY = (2 * math.random() * radius) - radius + posY
     35        pZ = (2 * math.random() * radius) - radius + posZ
     36        print("<StaticEntity ")
     37
     38        print("position = \"")
     39        print(pX) print(",")
     40        print(pY) print(",")
     41        print(pZ) print("\" ")
     42
     43        print("scale = \"") print(size) print("\" ")
     44
     45        print("collisionType = static linearDamping = 0.8 angularDamping = 1 ")
     46        print("collisiondamage = 1000 enablecollisiondamage = true>")
     47
     48        print("<attached>")
     49            print("<Model mass=\"") print(size * 10) print("\" ")
     50            print("mesh=\"ast") print(math.mod(i,6) + 1) print(".mesh\" />")
     51        print("</attached>")
     52
     53        print("<collisionShapes> ")
     54            print("<SphereCollisionShape radius=\"")
     55            print(size * 2.5) print("\" />")
     56        print("</collisionShapes>")
     57
     58        print("</StaticEntity>")
     59
     60        if fog == 1 and i % 5 == 0 then
     61            generateFog(pX, pY, pZ, radius*0.04, 0.2)
     62        end
     63    end
    6564end
    6665
     
    6867--[[ asteroid belt generator
    6968generates asteroid belt
    70         posX, posY, posZ - position in space
    71         yaw, pitch - rotation
    72         minSize, maxSize - size boundaries of each asteroid
    73         radius0, radius1 - inner/outer radius
    74         count - number of asteroids
    75         fog - enable fog 0/1
     69    posX, posY, posZ - position in space
     70    yaw, pitch - rotation
     71    minSize, maxSize - size boundaries of each asteroid
     72    radius0, radius1 - inner/outer radius
     73    count - number of asteroids
     74    fog - enable fog 0/1
    7675--]]
    7776function asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog)
    78         dPhi = (2 * math.pi) / segments
    79         width = math.abs(radius1 - radius0)
    80         radius = (radius1 + radius0) / 2
    81         segmentCount = count / segments
    82        
    83         print("<StaticEntity collisionType=static yaw=") print(yaw)
    84         print(" pitch=") print(pitch)
    85        
    86         print(" position = \"")
    87                 print(centerX) print(",")
    88                 print(centerY) print(",")
    89                 print(centerZ) print("\"")
    90         print(">")
    91        
    92         print("<attached>")
    93        
    94         for i = 0, segments - 1, 1
    95         do
    96                 asteroidField((radius * math.cos(i * dPhi)),
    97                                         (radius * math.sin(i * dPhi)),
    98                                         0, minSize, maxSize, width, segmentCount, fog)
    99         end
    100        
    101         print("</attached>")
    102         print("</StaticEntity>")
     77    dPhi = (2 * math.pi) / segments
     78    width = math.abs(radius1 - radius0)
     79    radius = (radius1 + radius0) / 2
     80    segmentCount = count / segments
     81
     82    print("<StaticEntity collisionType=static yaw=") print(yaw)
     83    print(" pitch=") print(pitch)
     84
     85    print(" position = \"")
     86        print(centerX) print(",")
     87        print(centerY) print(",")
     88        print(centerZ) print("\"")
     89    print(">")
     90
     91    print("<attached>")
     92
     93    for i = 0, segments - 1, 1 do
     94        asteroidField((radius * math.cos(i * dPhi)),
     95                    (radius * math.sin(i * dPhi)),
     96                    0, minSize, maxSize, width, segmentCount, fog)
     97    end
     98
     99    print("</attached>")
     100    print("</StaticEntity>")
    103101end
  • code/branches/presentation2012merge/data/levels/includes/weaponSettingsFPS.oxi

    r8755 r9272  
    11    <weaponslots>
    22      <WeaponSlot position="0,0,0" yaw=0 pitch=0 roll=0 />
    3  <!--      <WeaponSlot position="-0.5,0.8,2.5" yaw=0 pitch=0 roll=0 />
     3<!--
     4      <WeaponSlot position="-0.5,0.8,2.5" yaw=0 pitch=0 roll=0 />
    45      <WeaponSlot position="15,-1.5,-25" yaw=0 pitch=0 roll=0 />
    5       <WeaponSlot position="0,0,-45" yaw=0 pitch=0 roll=0 /> -->
     6      <WeaponSlot position="0,0,-45" yaw=0 pitch=0 roll=0 />
     7-->
    68    </weaponslots>
    79    <weaponsets>
     
    1113    <weapons>
    1214      <WeaponPack firemode=0>
    13         <links>
     15        <links>
    1416          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
    1517          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
    1618          <DefaultWeaponmodeLink firemode=2 weaponmode=2 />
    1719        </links>
    18         <Weapon>
    19            <HsW01 mode=0 munitionpershot=0 delay=0.0 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.7, -0.3, -3" />
    20            <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20/>
     20        <Weapon>
     21          <HsW01 mode=0 munitionpershot=0 delay=0.0 damage=2.5 material="Flares/point_lensflare" muzzleoffset=" 0.7, -0.3, -3" />
     22          <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20/>
    2123        </Weapon>
    2224        <LaserGun
     
    2830            unlimitedMunition=true
    2931        />
    30   <!--       <LaserGun
     32        <!--LaserGun
    3133            position="0,0,0"
    3234            munitionType="LaserGunMunition"
     
    4547            speed="600"
    4648            unlimitedMunition=true
    47         /> -->
     49        /-->
    4850      </WeaponPack>
    4951    </weapons>
  • code/branches/presentation2012merge/data/levels/lastManStanding.oxw

    r9016 r9272  
    3333    ?>
    3434
    35 <!----- Spawnpoints 
     35<!----- Spawnpoints
    3636    <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"/>
    3737    <SpawnPoint team=0 position="-1150,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
     
    4444
    4545<!-- ------------ middle asteroid -------------- -->
    46     <StaticEntity position="0,0,0" collisionType=static>   
     46    <StaticEntity position="0,0,0" collisionType=static>
    4747        <attached>
    4848            <MovableEntity position="0,20,0" rotationrate="-4.5" rotationaxis="0,1,0" >
     
    7979      <attached>
    8080        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
    81         </Model>
     81        </Model>
    8282      </attached>
    8383      <collisionShapes>
     
    8989      <attached>
    9090        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i+3,6) + 1) ?>.mesh">
    91         </Model>
     91        </Model>
    9292      </attached>
    9393      <collisionShapes>
     
    9999      <attached>
    100100        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*5,6) + 1) ?>.mesh">
    101         </Model>
     101        </Model>
    102102      </attached>
    103103      <collisionShapes>
     
    109109      <attached>
    110110        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*13+1,6) + 1) ?>.mesh">
    111         </Model>
     111        </Model>
    112112      </attached>
    113113      <collisionShapes>
     
    119119      <attached>
    120120        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*17,6) + 1) ?>.mesh">
    121         </Model>
     121        </Model>
    122122      </attached>
    123123      <collisionShapes>
     
    130130      <attached>
    131131        <Model position="0,0,0" scale=25 mesh="ast6.mesh">
    132         </Model>
     132        </Model>
    133133      </attached>
    134134      <collisionShapes>
  • code/branches/presentation2012merge/data/levels/lastTeamStanding.oxw

    r9016 r9272  
    7474      <attached>
    7575        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
    76         </Model>
     76        </Model>
    7777      </attached>
    7878      <collisionShapes>
     
    8484      <attached>
    8585        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i+3,6) + 1) ?>.mesh">
    86         </Model>
     86        </Model>
    8787      </attached>
    8888      <collisionShapes>
     
    9494      <attached>
    9595        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*5,6) + 1) ?>.mesh">
    96         </Model>
     96        </Model>
    9797      </attached>
    9898      <collisionShapes>
     
    104104      <attached>
    105105        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*13+1,6) + 1) ?>.mesh">
    106         </Model>
     106        </Model>
    107107      </attached>
    108108      <collisionShapes>
     
    114114      <attached>
    115115        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*17,6) + 1) ?>.mesh">
    116         </Model>
     116        </Model>
    117117      </attached>
    118118      <collisionShapes>
     
    125125      <attached>
    126126        <Model position="0,0,0" scale=25 mesh="ast6.mesh">
    127         </Model>
     127        </Model>
    128128      </attached>
    129129      <collisionShapes>
  • code/branches/presentation2012merge/data/levels/old/CuboidSpaceStation.oxw

    r7679 r9272  
    11<?lua
    2         include("HUDTemplates3.oxo")
     2    include("HUDTemplates3.oxo")
    33?>
    44
    55<?lua
    6         include("templates/spaceshipAssff.oxt")
     6    include("templates/spaceshipAssff.oxt")
    77?>
    88
    99<Level
    10         name = "SpaceStation test Space!"
    11         description = "All the new SpaceStations are created here!"
     10    name = "SpaceStation test Space!"
     11    description = "All the new SpaceStations are created here!"
    1212>
    13         <Scene
    14                 ambientlight = "0.5, 0.5, 0.5"
    15                 skybox = "Orxonox/Starbox"
    16         >
     13    <Scene
     14        ambientlight = "0.5, 0.5, 0.5"
     15        skybox = "Orxonox/Starbox"
     16    >
    1717
    1818
     
    2020<!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
    2121<?lua
    22         dofile("includes/CuboidSpaceStation.lua")
     22    dofile("includes/CuboidSpaceStation.lua")
    2323?>
    2424
     
    2929--->
    3030<?lua
    31         createSpaceStation()
     31    createSpaceStation()
    3232?>
    3333
     
    3737--->
    3838<PositionableEntity scale=1 position="0,0,-5000">
    39         <attached>
    40                 <?lua
    41                         createSpaceStation()
    42                 ?>
    43         </attached>
     39    <attached>
     40        <?lua
     41            createSpaceStation()
     42        ?>
     43    </attached>
    4444</PositionableEntity>
    4545
     
    4949--->
    5050<MovableEntity scale=1 position="5000,0,0" velocity="50,0,0" yaw=-90>
    51         <attached>
    52                 <?lua
    53                         createSpaceStation()
    54                 ?>
    55         </attached>
     51    <attached>
     52        <?lua
     53            createSpaceStation()
     54        ?>
     55    </attached>
    5656</MovableEntity>
    5757
     
    6161--->
    6262<MovableEntity scale=1 position="-5000,0,0" rotationaxis="0,1,0" rotationrate=5>
    63         <attached>
    64                 <?lua
    65                         createSpaceStation()
    66                 ?>
    67         </attached>
     63    <attached>
     64        <?lua
     65            createSpaceStation()
     66        ?>
     67    </attached>
    6868</MovableEntity>
    6969
     
    7777--->
    7878<MovableEntity scale=1 position="0,0,0" rotationaxis="0,1,0" rotationrate=3>
    79         <attached>
    80                 <MovableEntity scale=1 position="10000,0,0" rotationaxis="0,0,1" rotationrate=2>
    81                         <attached>
    82                                 <?lua
    83                                         -- Here I use the createSpaceStationPar(...) function, which has 8 arguments, see the .lua file at the top to understand them.
    84                                         createSpaceStationPar(0,2,1,2,1,2,1,50)
    85                                 ?>
    86                         </attached>
    87                 </MovableEntity>
    88         </attached>
     79    <attached>
     80        <MovableEntity scale=1 position="10000,0,0" rotationaxis="0,0,1" rotationrate=2>
     81            <attached>
     82                <?lua
     83                    -- Here I use the createSpaceStationPar(...) function, which has 8 arguments, see the .lua file at the top to understand them.
     84                    createSpaceStationPar(0,2,1,2,1,2,1,50)
     85                ?>
     86            </attached>
     87        </MovableEntity>
     88    </attached>
    8989</MovableEntity>
    9090
     
    9595
    9696
    97         <ParticleSpawner position="0,0,0" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
     97    <ParticleSpawner position="0,0,0" source="Orxonox/BigExplosion1part3" lifetime=2.0 loop=0 autostart=0>
    9898      <events>
    9999        <spawn>
  • code/branches/presentation2012merge/data/levels/presentationFS10Ed.oxw

    r9016 r9272  
    3939      </collisionShapes>
    4040  </Pawn>
    41  
     41
    4242  <Pawn health=100 position="0,-35,0" direction="0,-1,0" collisionType=dynamic mass=100000>
    4343      <attached>
     
    4848      </collisionShapes>
    4949  </Pawn>
    50  
     50
    5151  <StaticEntity position="0,-50,0" direction="0,-1,0" collisionType=static mass=100000 >
    5252      <attached>
     
    6666      </collisionShapes>
    6767  </StaticEntity>
    68  
     68
    6969   <StaticEntity position="600,-20,0" direction="0,-1,0" collisionType=static mass=100000 >
    7070      <attached>
     
    8484      </collisionShapes>
    8585  </StaticEntity>
    86  
     86
    8787  <StaticEntity position="600,40,250" direction="0,-1,0" collisionType=static mass=100000 >
    8888      <attached>
     
    9393      </collisionShapes>
    9494  </StaticEntity>
    95  
    96  
     95
     96
    9797   <StaticEntity position="6000,0,10250" direction="0,0,0" collisionType=static mass=100000 >
    9898      <attached>
     
    103103      </collisionShapes>
    104104  </StaticEntity>
    105  
     105
    106106  <Pawn health=100 position="530,70,1450" direction="-1,0,0" collisionType=dynamic mass=1 >
    107107      <attached>
     
    112112      </collisionShapes>
    113113  </Pawn>
    114  
     114
    115115  <Pawn health=100 position="670,70,1450" direction="-1,0,0" collisionType=dynamic mass=1 >
    116116      <attached>
     
    121121      </collisionShapes>
    122122  </Pawn>
    123  
     123
    124124   <Pawn health=100 position="600,70,1500" direction="0,0,-1" collisionType=dynamic mass=1 >
    125125      <attached>
     
    130130      </collisionShapes>
    131131  </Pawn>
    132  
     132
    133133   <Pawn health=100 position="600,150,1450" direction="0,-1,0" collisionType=dynamic mass=1 >
    134134      <attached>
     
    139139      </collisionShapes>
    140140  </Pawn>
    141  
     141
    142142  <Pawn health=100 position="600,35,1450" direction="0,-1,0" collisionType=dynamic mass=1 >
    143143      <attached>
     
    148148      </collisionShapes>
    149149  </Pawn>
    150  
     150
    151151
    152152  <SpawnPoint position="0,300,0" direction="0, 0, 0" lookat="0,0,100000000" spawnclass=FpsPlayer pawndesign=fps />
     
    163163      <attached>
    164164        <Model position="0,0,0" scale3D="<?lua print(j*100) ?>,<?lua print(g*100) ?>,<?lua print(h*100) ?>" mesh="cube<?lua
    165         if math.mod(i,4)==0 then print('_green') end
    166         if math.mod(i,4)==1 then print('_red') end
    167         if math.mod(i,4)==2 then print('_orange') end
    168         ?>.mesh" /> <!--if it's 3, cube.mesh is taken -> yellow -->
     165        if math.mod(i,4)==0 then print('_green') end
     166        if math.mod(i,4)==1 then print('_red') end
     167        if math.mod(i,4)==2 then print('_orange') end
     168        ?>.mesh" /> <!--if it's 3, cube.mesh is taken -> yellow -->
    169169      </attached>
    170170      <collisionShapes>
  • code/branches/presentation2012merge/data/levels/presentationHS11.oxw

    r9271 r9272  
    138138
    139139<!-- Generate asteroid field and asteroid belt -->
    140 <!-- asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog) --> 
     140<!-- asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog) -->
    141141    <?lua
    142         dofile("includes/asteroidField.lua")
    143         asteroidBelt(20000, 0, 13000, -48, -34, 70, 100, 200, 22000, 20000, 500, 1)
     142        dofile("includes/asteroidField.lua")
     143        asteroidBelt(20000, 0, 13000, -48, -34, 70, 100, 200, 22000, 20000, 500, 1)
    144144
    145145    ?>
  • code/branches/presentation2012merge/data/levels/surfaceRace.oxw

    r9271 r9272  
    1212  include("templates/spaceshipRace.oxt")
    1313  include("templates/pickupRepresentationTemplates.oxt")
    14  
     14
    1515?>
    1616
     
    3939
    4040<SpaceRaceManager>
    41  <checkpoints> 
    42         <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">
    43         <attached>
    44             <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    45        
    46 <!-- 
    47                 <Model position="0,0,55" mesh="testcube.mesh" scale3D="110,20,20" />
    48                 <Model position="0,0,-55" mesh="testcube.mesh" scale3D="110,20,20" />
    49                 <Model position="55,0,0" mesh="testcube.mesh" scale3D="20,20,110" />
    50                 <Model position="-55,0,0" mesh="testcube.mesh" scale3D="20,20,110" />
     41 <checkpoints>
     42    <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">
     43        <attached>
     44            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
     45
     46<!--
     47        <Model position="0,0,55" mesh="testcube.mesh" scale3D="110,20,20" />
     48        <Model position="0,0,-55" mesh="testcube.mesh" scale3D="110,20,20" />
     49        <Model position="55,0,0" mesh="testcube.mesh" scale3D="20,20,110" />
     50        <Model position="-55,0,0" mesh="testcube.mesh" scale3D="20,20,110" />
    5151
    5252-->
     
    5757
    5858
    59         <collisionShapes>
    60 
    61 
    62             <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
    63             <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
    64             <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    65             <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    66 
    67          
    68         </collisionShapes>
    69 
    70 
    71 
    72        
     59    <collisionShapes>
     60
     61
     62            <BoxCollisionShape position="0,0,220"     halfExtents="220, 40, 40" />
     63            <BoxCollisionShape position="0,0,-220"      halfExtents="220, 40, 40" />
     64            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
     65            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
     66
     67
     68        </collisionShapes>
     69
     70
     71
     72
    7373    </RaceCheckPoint>
    7474
     
    7777            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
    7878        </attached>
    79        
     79
    8080
    8181           <collisionShapes>
     
    8585            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    8686            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    87          
     87
    8888        </collisionShapes>
    8989    </RaceCheckPoint>
     
    103103            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    104104
    105          
     105
    106106        </collisionShapes>
    107107
     
    121121            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    122122
    123          
     123
    124124        </collisionShapes>
    125125
     
    139139            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    140140
    141          
     141
    142142        </collisionShapes>
    143143
     
    157157            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    158158
    159          
     159
    160160        </collisionShapes>
    161161    </RaceCheckPoint>
     
    175175            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    176176
    177          
     177
    178178        </collisionShapes>
    179179
     
    192192            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    193193            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    194          
     194
    195195        </collisionShapes>
    196196    </RaceCheckPoint>
     
    209209            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    210210
    211          
     211
    212212        </collisionShapes>
    213213
     
    227227            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    228228
    229          
     229
    230230        </collisionShapes>
    231231
     
    244244            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    245245
    246          
     246
    247247        </collisionShapes>
    248248
     
    261261            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    262262
    263          
     263
    264264        </collisionShapes>
    265265
     
    278278            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    279279            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    280          
     280
    281281        </collisionShapes>
    282282    </RaceCheckPoint>
     
    293293            <BoxCollisionShape position="220,0,0"      halfExtents="40, 40, 220" />
    294294            <BoxCollisionShape position="-220,0,0"       halfExtents="40, 40, 220" />
    295          
     295
    296296        </collisionShapes>
    297297    </RaceCheckPoint>
     
    303303 <SpawnPoint team=0 position="0,8050,0" lookat="0,8000,-8000" spawnclass=SpaceShip pawndesign=spaceshipRace />
    304304
    305  
    306         <!-- -----------------------Zylinder---------------------------- -->
     305
     306    <!-- -----------------------Zylinder---------------------------- -->
    307307<StaticEntity position="2750,8050,6000" direction="1,0,0" roll="90"  scale="4" collisionType=static mass=100000 friction=0.01 >
    308308      <attached>
    309         <Model position="0,0,0" mesh="cylinder.mesh" scale3D="100,100,400" />
    310         <!--
    311                 <Model position="0,80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
    312                 <Model position="0,-80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
    313                 <Model position="80,0,600" mesh="testcube.mesh" scale3D="18,90,-600" />
    314                 <Model position="-80,0,600" mesh="testcube.mesh" scale3D="18,09,-600" />
    315         -->
     309    <Model position="0,0,0" mesh="cylinder.mesh" scale3D="100,100,400" />
     310    <!--
     311                <Model position="0,80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
     312        <Model position="0,-80,600" mesh="testcube.mesh" scale3D="90,18,-600" />
     313        <Model position="80,0,600" mesh="testcube.mesh" scale3D="18,90,-600" />
     314        <Model position="-80,0,600" mesh="testcube.mesh" scale3D="18,09,-600" />
     315    -->
    316316
    317317      </attached>
    318318
    319319
    320         <collisionShapes>
    321          
    322                
    323                 <BoxCollisionShape position="0,320,2400"            halfExtents="360,72,2400" />
    324                 <BoxCollisionShape position="0,-320,2400"      halfExtents="360,72,2400" />
    325                 <BoxCollisionShape position="320,0,2400"            halfExtents="72,360,2400" />
    326                 <BoxCollisionShape position="-320,0,2400"     halfExtents="72,360,2400" />
    327                
    328 
    329        
     320    <collisionShapes>
     321
     322
     323        <BoxCollisionShape position="0,320,2400"            halfExtents="360,72,2400" />
     324        <BoxCollisionShape position="0,-320,2400"      halfExtents="360,72,2400" />
     325        <BoxCollisionShape position="320,0,2400"            halfExtents="72,360,2400" />
     326        <BoxCollisionShape position="-320,0,2400"     halfExtents="72,360,2400" />
     327
     328
     329
    330330        </collisionShapes>
    331331
     
    335335<StaticEntity position="4465,8050,-500" direction="0,0,0"   scale="1" collisionType=static mass=100000 friction=0.01 >
    336336      <attached>
    337         <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
     337    <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
    338338<!--
    339                 <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
    340                 -->
     339                <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
     340        -->
    341341
    342342      </attached>
    343343
    344344
    345         <collisionShapes>
    346          
    347                
    348                 <BoxCollisionShape position="0,0,0"            halfExtents="450,600,50" />
     345    <collisionShapes>
     346
     347
     348        <BoxCollisionShape position="0,0,0"            halfExtents="450,600,50" />
    349349
    350350        </collisionShapes>
     
    354354<StaticEntity position="3535,8050,-500" direction="0,0,0"   scale="1" collisionType=static mass=100000 friction=0.01 >
    355355      <attached>
    356         <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
     356    <Model position="0,0,0" mesh="blackcube.mesh" scale3D="450,600,50" />
    357357<!--
    358                 <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
    359                 -->
     358                <Model position="0,0,0" mesh="testcube.mesh" scale3D="450,600,50" />
     359        -->
    360360
    361361      </attached>
    362362
    363363
    364         <collisionShapes>
    365          
    366                
    367                 <BoxCollisionShape position="0,0,0"            halfExtents="450,600,50" />
     364    <collisionShapes>
     365
     366
     367        <BoxCollisionShape position="0,0,0"            halfExtents="450,600,50" />
    368368
    369369        </collisionShapes>
     
    374374
    375375
    376         <!-- ------------------Boden----------------- -->
     376    <!-- ------------------Boden----------------- -->
    377377  <StaticEntity position="0,0,0" direction="0,0,0" collisionType=static mass=100000 friction=0.01>
    378378     <attached>
     
    382382        <BoxCollisionShape position="0,50,0" halfExtents="8000,8000,8000" />um j?:P"{
    383383
    384       </collisionShapes> 
     384      </collisionShapes>
    385385</StaticEntity>
    386386
     
    416416    for i = 0, max, 1
    417417    do
    418         x=-12000
    419         y=10000
    420         z=-12000
    421  
     418    x=-12000
     419    y=10000
     420    z=-12000
     421
    422422    ?>
    423423    <?lua
  • code/branches/presentation2012merge/data/levels/templates/FPS.oxt

    r8858 r9272  
    1717   linearDamping     = 0.7
    1818   angularDamping    = 0.9999999
    19    friction          = 0.01
    20    
     19   friction          = 0.01
     20
    2121   weapon            = "hs-w01.mesh"
    2222  >
     
    2424      <BoxCollisionShape position="0,-20,0" halfExtents="15,25,15" />
    2525    </collisionShapes>
    26    
     26
    2727    <camerapositions>
    2828      <CameraPosition position="-1,1,2.2" drag=false mouselook=true />
    2929    </camerapositions>
    30    
     30
    3131    <?lua
    32         include("../includes/weaponSettingsFPS.oxi")
     32        include("../includes/weaponSettingsFPS.oxi")
    3333    ?>
    3434
     
    4040    <camerapositions>
    4141      <CameraPosition position="0,0,20" drag=false mouselook=true />
    42      
     42
    4343      <!--
    4444      CameraPosition position="0,150,-25" pitch=-90 drag=true />
     
    4747      <CameraPosition position="-50,5,-8" yaw=-90 drag=true />
    4848      <CameraPosition position="50,5,-8" yaw=90 drag=true /
    49      
     49
    5050    </camerapositions>
    5151  </FpsPlayer>
  • code/branches/presentation2012merge/data/levels/templates/tower.oxt

    r9271 r9272  
    22  <Tower
    33
    4  
     4
    55   explosionchunks        = 6
    66
     
    1313
    1414  >
    15         <controller>
    16                 <WaypointPatrolController alertnessradius=1000 team=5>
    17                         <waypoints>
    18                                 <Model mesh="cube.mesh" scale=0 position=" 700, 200, 100" />
    19                         </waypoints>
    20                 </WaypointPatrolController>
    21         </controller>
     15    <controller>
     16        <WaypointPatrolController alertnessradius=1000 team=5>
     17            <waypoints>
     18                <Model mesh="cube.mesh" scale=0 position=" 700, 200, 100" />
     19            </waypoints>
     20        </WaypointPatrolController>
     21    </controller>
    2222
    2323
    2424    <attached>
    25                 <Model position="0,0,0" scale=45 mesh="Tower.mesh" />
     25        <Model position="0,0,0" scale=45 mesh="Tower.mesh" />
    2626    </attached>
    2727
    2828    <!--collisionShapes>
    29    
     29
    3030    </collisionShapes-->
    3131
  • code/branches/presentation2012merge/data/levels/testStars.oxw

    r9016 r9272  
    3030      <attached>
    3131        <Model pitch=180 position="0,0,0" scale=1.5 mesh="rocket_test.mesh" >
    32           <attached>
    33            <ParticleEmitter pitch=0 roll=0 position="0,5,0" source="Orxonox/laser" lifetime=2.0 loop=1 startdelay=3.0/>
    34            <ParticleEmitter pitch=-90 roll=0 position="0,-5,0" source="Orxonox/particlecanon" lifetime=2.0 loop=1 startdelay=3.0/>
    35            <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/rocketfire" lifetime=2.0 loop=1 startdelay=3.0 />
    36            <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/smoke" lifetime=2.0 loop=1 startdelay=3.0 />
     32          <attached>
     33            <ParticleEmitter pitch=0 roll=0 position="0,5,0" source="Orxonox/laser" lifetime=2.0 loop=1 startdelay=3.0/>
     34            <ParticleEmitter pitch=-90 roll=0 position="0,-5,0" source="Orxonox/particlecanon" lifetime=2.0 loop=1 startdelay=3.0/>
     35            <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/rocketfire" lifetime=2.0 loop=1 startdelay=3.0 />
     36            <ParticleEmitter pitch=-90 roll=0 position="0,0,-2" source="Orxonox/smoke" lifetime=2.0 loop=1 startdelay=3.0 />
    3737          </attached>
    38           </Model>
    39         </attached>
     38        </Model>
     39      </attached>
    4040    </Rocket-->
    41    
     41
    4242    <CreateStars numStars="6000" material="Examples/Flare" colour="1,1,1" radius=10000 colourDiff=0.1/>
    4343
  • code/branches/presentation2012merge/data/levels/towerDefense.oxw

    r9271 r9272  
    4242
    4343
    44 <!-- Template for a tower       EDIT: new towertemplate is included with "templates/tower" -->
     44<!-- Template for a tower   EDIT: new towertemplate is included with "templates/tower" -->
    4545<!--Template name=towertemplate>
    4646  <Tower>
     
    5959    <Template link=lodtemplate_default />
    6060  </templates>
    61  
     61
    6262  <?lua include("includes/notifications.oxi") ?>
    6363
     
    6666    skybox       = "Orxonox/Starbox"
    6767  >
    68  
    69         <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"/>
    70    
    71         <!-- Spawns the camera, attached to a crate -->
    72         <SpawnPoint team=0 position="0,0,0" spawnclass=Pawn pawndesign=centerpointmark />
    73         <!--TeamSpawnPoint team=1 position="-7,7,4" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff /-->
    74        
    75         <!--SpawnPoint team=1 position="0,0,10" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff  /-->
    76         <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
    77        
    78         <SpaceShip position="-700,-500, 100" lookat="0,0,0" scale=3 team=1 >
     68
     69    <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"/>
     70
     71    <!-- Spawns the camera, attached to a crate -->
     72    <SpawnPoint team=0 position="0,0,0" spawnclass=Pawn pawndesign=centerpointmark />
     73    <!--TeamSpawnPoint team=1 position="-7,7,4" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff /-->
     74
     75    <!--SpawnPoint team=1 position="0,0,10" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff  /-->
     76    <!--SpawnPoint team=0 position="0,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
     77
     78    <SpaceShip position="-700,-500, 100" lookat="0,0,0" scale=3 team=1 >
    7979      <templates>
    8080        <Template link=spaceshipassff />
     
    8383        <WaypointController accuracy=60>
    8484          <waypoints>
    85                           <!-- 1,3 10,3 10,11, 13,11 -->
     85            <!-- 1,3 10,3 10,11, 13,11 -->
    8686            <Model mesh="cube.mesh" scale=0 position="-700,-500, 150" />
    8787            <Model mesh="cube.mesh" scale=0 position=" 200,-500, 150" />
    8888            <Model mesh="cube.mesh" scale=0 position=" 200, 300, 150" />
    8989            <Model mesh="cube.mesh" scale=0 position=" 500, 300, 150" />
    90                         <Model mesh="cube.mesh" scale=0 position=" 500, 700, 150" />
     90            <Model mesh="cube.mesh" scale=0 position=" 500, 700, 150" />
    9191          </waypoints>
    9292        </WaypointController>
    9393      </controller>
    9494    </SpaceShip>
    95    
    96    
     95
     96
    9797    <!--invisible entity to attach towers to, since playfield is static and towers are dynamic-->
    9898    <StaticEntity position=0,0,0>
    99  
    100                 <attached>
    101                         <Model position="-50,-50,0" mesh="Playfield_ME.mesh" scale=80 />
    102                         <!-- Base -->
    103                         <Model position="500,700,100" mesh="sphere.mesh" scale=80 />
     99
     100        <attached>
     101            <Model position="-50,-50,0" mesh="Playfield_ME.mesh" scale=80 />
     102            <!-- Base -->
     103            <Model position="500,700,100" mesh="sphere.mesh" scale=80 />
    104104            <!--Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" /--> <!-- Only temporary needed to help align the collisionshape -->
    105                         <!-- This was used to mark the playfield, let's let it be here for now -->
    106                         <!--Model position="-8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    107                         <!--Model position="-8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    108                         <!--Model position="8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    109                         <!--Model position="8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
     105            <!-- This was used to mark the playfield, let's let it be here for now -->
     106            <!--Model position="-8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
     107            <!--Model position="-8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
     108            <!--Model position="8,-8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
     109            <!--Model position="8,8,0" mesh="crate.mesh" scale3D="0.3,0.3,0.3" /-->
    110110        </attached>
    111111        <collisionShapes> <!-- The collisionshape forbids other worldentities that have a collisionShape to fly through it.
    112        
     112
    113113                               TODO: Find correct size for the collisionshape; since a collisionShape is invisible
    114114                               I added the crate wich currently has the same dimensions as the collisionshape.
     
    117117           <BoxCollisionShape position="0,0,0" halfExtents="400,400,100" />
    118118        </collisionShapes>
    119         </StaticEntity>
    120    
    121    
    122    
    123    
    124         <!-- PlayField -->
    125         <TowerDefenseCenterpoint
    126         name=towerdefensecenter
    127         width=16
    128         height=16
    129         tileScale=100
    130         towerTemplate=tower
    131         position="0,0,0"
    132         direction="0,0,0"
    133         collisionType=dynamic
    134         mass=100000>
    135                
     119    </StaticEntity>
     120
     121
     122
     123
     124    <!-- PlayField -->
     125    <TowerDefenseCenterpoint
     126    name=towerdefensecenter
     127    width=16
     128    height=16
     129    tileScale=100
     130    towerTemplate=tower
     131    position="0,0,0"
     132    direction="0,0,0"
     133    collisionType=dynamic
     134    mass=100000>
     135
    136136    </TowerDefenseCenterpoint>
    137137
  • code/branches/presentation2012merge/data/overlays/towerdefenseHUD.oxo

    r9271 r9272  
    88     colour    = "1.0, 1.0, 1.0, 1.0"
    99     align     = "left"
    10          
    11         caption = "Hello World"
     10
     11    caption = "Hello World"
    1212    />
    13        
    14        
    1513  </OverlayGroup>
    1614</Template>
  • code/branches/presentation2012merge/src/modules/gametypes/SpaceRaceManager.cc

    r9271 r9272  
    149149            }
    150150            else
    151                         {
     151            {
    152152                // adjust the radarvisibility
    153153                gametype->newCheckpointReached(newCheckpoint, player);
  • code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc

    r9271 r9272  
    7070    void DamageBoostPickup::initialize(void)
    7171    {
    72         this->duration_ = 0.0f;
    73         this->damageMultiplier_ = 1.0f; //The default damage multiplier.
     72        this->duration_ = 0.0f;
     73        this->damageMultiplier_ = 1.0f; //The default damage multiplier.
    7474        //Defines who is allowed to pick up the pickup.
    7575        this->addTarget(ClassIdentifier<SpaceShip>::getIdentifier());
     
    130130        SpaceShip* ship = this->carrierToSpaceShipHelper();
    131131        if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
    132                 this->Pickupable::destroy();
     132            this->Pickupable::destroy();
    133133
    134134
  • code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h

    r9271 r9272  
    5757            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    5858
    59             /**
     59            /**
    6060            @brief Get the time the DamagePickup lasts.
    6161            @return Returns the time in seconds the DamagePickup lasts.
     
    9595
    9696            Timer durationTimer_; //!< Timer.
    97             float duration_; //! Duration of damage boost.
     97            float duration_; //! Duration of damage boost.
    9898
    9999    };
  • code/branches/presentation2012merge/src/modules/towerdefense/CMakeLists.txt

    r9271 r9272  
    55  TowerDefenseHUDController.cc
    66  TowerDefensePlayerStats.cc
    7  
     7
    88)
    99
     
    1313  LINK_LIBRARIES
    1414    orxonox
    15         overlays
     15    overlays
    1616  SOURCE_FILES ${TOWERDEFENSE_SRC_FILES}
    1717)
  • code/branches/presentation2012merge/src/modules/towerdefense/TDEnemy.h

    r9271 r9272  
    1313
    1414private:
    15         float health;
    16         float speed;
    17         float armour;
     15    float health;
     16    float speed;
     17    float armour;
    1818
    1919
  • code/branches/presentation2012merge/src/modules/towerdefense/Tower.cc

    r9271 r9272  
    1717{
    1818    CreateFactory(Tower);
    19        
     19
    2020    /**
    21         @brief
    22         Constructor. Registers and initializes the object.
    23         */
     21    @brief
     22        Constructor. Registers and initializes the object.
     23    */
    2424    Tower::Tower(BaseObject* creator) : Pawn(creator)
    2525    {
     
    3434        this->delay_ = false;
    3535        this->delayTimer_.setTimer(0.2f, false, createExecutor(createFunctor(&TetrisStone::enableMovement, this)));
    36                 */
     36        */
    3737    }
    38        
    39         void Tower::setOrientation(const Quaternion& orientation)
    40         {
    41                 static int ori;
    42                 orxout() << "orientation " << ++ori << endl;
    43         }
    44        
    45         void Tower::rotateYaw(const Vector2& value)
    46         {
    47                 static int yaw;
    48                 orxout() << "rotateYaw " << ++yaw << endl;
    49         }
    50        
    51         void Tower::rotatePitch(const Vector2& value)
    52         {
    53                 static int pitch;
    54                 orxout() << "rotatePitch " << ++pitch << endl;
    55         }
    56        
    57         void Tower::rotateRoll(const Vector2& value)
    58         {
    59                 static int roll;
    60                 orxout() << "rotateRoll" << ++roll << endl;
    61         }
    62                
    63         // This function is called whenever a player presses the up or the down key.
     38
     39    void Tower::setOrientation(const Quaternion& orientation)
     40    {
     41        static int ori;
     42        orxout() << "orientation " << ++ori << endl;
     43    }
     44
     45    void Tower::rotateYaw(const Vector2& value)
     46    {
     47        static int yaw;
     48        orxout() << "rotateYaw " << ++yaw << endl;
     49    }
     50
     51    void Tower::rotatePitch(const Vector2& value)
     52    {
     53        static int pitch;
     54        orxout() << "rotatePitch " << ++pitch << endl;
     55    }
     56
     57    void Tower::rotateRoll(const Vector2& value)
     58    {
     59        static int roll;
     60        orxout() << "rotateRoll" << ++roll << endl;
     61    }
     62
     63    // This function is called whenever a player presses the up or the down key.
    6464    // You have to implement what happens when the up or the down key is pressed.
    6565    // value.x < 0 means: down key is pressed.
     
    7575
    7676    /**
    77         @brief
    78         Overloaded the function to rotate the stone.
    79         @param value
    80         A vector whose first component is the angle by which to rotate.
    81         */
    82                 /*
     77    @brief
     78        Overloaded the function to rotate the stone.
     79    @param value
     80        A vector whose first component is the angle by which to rotate.
     81    */
     82    /*
    8383    void Tower::moveFrontBack(const Vector2& value)
    8484    {
    8585        //orxout() << "frontBack.x: " << value.x << endl;
    8686    }
    87         */
    88        
     87    */
     88
    8989    /**
    90         @brief
    91         Overloaded the function to steer the stone right and left
    92         @param value
    93         A vector whose first component is the direction in which we want to steer the stone.
    94         */
    95                 /*
     90    @brief
     91        Overloaded the function to steer the stone right and left
     92    @param value
     93        A vector whose first component is the direction in which we want to steer the stone.
     94    */
     95    /*
    9696    void Tower::moveRightLeft(const Vector2& value)
    9797    {
    98                 //orxout() << "rightLeft.x: " << value.x << endl;
    99                
     98        //orxout() << "rightLeft.x: " << value.x << endl;
     99
    100100        if(!this->delay_)
    101101        {
     
    104104            if(!this->tetris_->isValidMove(this, newPos))
    105105                return;
    106                        
     106
    107107            this->setPosition(newPos);
    108108            this->delay_ = true;
    109109            this->delayTimer_.startTimer();
    110                 }
     110        }
    111111    }
    112         */
     112    */
    113113}
  • code/branches/presentation2012merge/src/modules/towerdefense/Tower.h

    r9271 r9272  
    1010@brief
    1111See TowerDefenseReadme.txt for Information.
    12    
     12
    1313@ingroup TowerDefense
    1414*/
     
    2020#include "towerdefense/TowerDefensePrereqs.h"
    2121#include "worldentities/pawns/SpaceShip.h"
    22        
     22
    2323
    2424namespace orxonox
     
    2626    class _TowerDefenseExport Tower : public Pawn
    2727    {
    28         public:
    29                 Tower(BaseObject* creator);
    30                 virtual ~Tower() {};
    31                
    32                 // Maybe later override these to move towers with cursor keys
    33                 /*
    34                 virtual void moveFrontBack(const Vector2& value);
    35                 virtual void moveRightLeft(const Vector2& value);
    36                 */
    37                
    38                 // Overriding these to stop towers from spasing out
    39                 void setOrientation(const Quaternion& orientation);
     28    public:
     29        Tower(BaseObject* creator);
     30        virtual ~Tower() {};
     31
     32        // Maybe later override these to move towers with cursor keys
     33        /*
     34        virtual void moveFrontBack(const Vector2& value);
     35        virtual void moveRightLeft(const Vector2& value);
     36        */
     37
     38        // Overriding these to stop towers from spasing out
     39        void setOrientation(const Quaternion& orientation);
    4040        virtual void rotateYaw(const Vector2& value);
    4141        virtual void rotatePitch(const Vector2& value);
    4242        virtual void rotateRoll(const Vector2& value);
    43                
    44                 void setGame(TowerDefense* towerdefense)
    45                 { assert(towerdefense); game_ = towerdefense; }
    46         private:
    47                 TowerDefense* game_;
     43
     44        void setGame(TowerDefense* towerdefense)
     45        { assert(towerdefense); game_ = towerdefense; }
     46    private:
     47        TowerDefense* game_;
    4848    };
    4949}
  • code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.cc

    r9271 r9272  
    8282#include "worldentities/pawns/SpaceShip.h"
    8383#include "controllers/WaypointController.h"
    84          
     84
    8585#include "graphics/Model.h"
    8686#include "infos/PlayerInfo.h"
    87          
     87
    8888#include "chat/ChatManager.h"
    8989
     
    9494{
    9595    CreateUnloadableFactory(TowerDefense);
    96        
    97         TowerDefense::TowerDefense(BaseObject* creator) : Deathmatch(creator)
     96
     97    TowerDefense::TowerDefense(BaseObject* creator) : Deathmatch(creator)
    9898    {
    9999        RegisterObject(TowerDefense);
    100                
     100
    101101        this->setHUDTemplate("TowerDefenseHUD");
    102102
    103                 this->stats_ = new TowerDefensePlayerStats();
    104 
    105                 /* Temporary hack to allow the player to add towers */
    106                 this->dedicatedAddTower_ = createConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) );
    107     }
    108        
     103        this->stats_ = new TowerDefensePlayerStats();
     104
     105        /* Temporary hack to allow the player to add towers */
     106        this->dedicatedAddTower_ = createConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) );
     107    }
     108
    109109    TowerDefense::~TowerDefense()
    110110    {
    111                 /* Part of a temporary hack to allow the player to add towers */
     111        /* Part of a temporary hack to allow the player to add towers */
    112112        if (this->isInitialized())
    113113        {
     
    116116        }
    117117    }
    118        
    119         void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint)
    120         {
    121                 orxout() << "Centerpoint now setting..." << endl;
    122                 this->center_ = centerpoint;
    123                 orxout() << "Centerpoint now set..." << endl;
    124         }
    125        
     118
     119    void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint)
     120    {
     121        orxout() << "Centerpoint now setting..." << endl;
     122        this->center_ = centerpoint;
     123        orxout() << "Centerpoint now set..." << endl;
     124    }
     125
    126126    void TowerDefense::start()
    127127    {
    128128        Deathmatch::start();
    129                
    130                 const int kInitialTowerCount = 3;
    131                 Coordinate initialTowerCoordinates[kInitialTowerCount] = {{3,2}, {8,5}, {12,10}};
    132                
    133                 for (int i = 0; i < kInitialTowerCount; i++)
    134                 {
    135                         Coordinate coordinate = initialTowerCoordinates[i];
    136                         addTower(coordinate.x, coordinate.y);
    137                 }
    138                
    139                 ChatManager::message("Use the console command addTower x y to add towers");
    140 
    141                 //TODO: let the player control his controllable entity && TODO: create a new ControllableEntity for the player
    142         }
    143        
    144         void TowerDefense::end()
    145         {
    146                 Deathmatch::end();
    147          
    148                 ChatManager::message("Match is over");
    149         }
    150        
    151         void TowerDefense::addTower(int x, int y)
    152         {
    153                 const TowerCost towerCost = TDDefaultTowerCost;
    154                
    155                 if (!this->hasEnoughCreditForTower(towerCost))
    156                 {
    157                         orxout() << "not enough credit: " << (this->stats_->getCredit()) << " available, " << TDDefaultTowerCost << " needed.";
    158                         return;
    159                 }
    160                
    161                 if (this->towerExists(x,y))
    162                 {
    163                         orxout() << "tower exists!!" << endl;
    164                         return;
    165                 }               
    166                
    167                 /*
    168                 unsigned int width = this->center_->getWidth();
    169                 unsigned int height = this->center_->getHeight();
    170                 */
    171                
    172                 int tileScale = (int) this->center_->getTileScale();
    173                        
    174                 if (x > 15 || y > 15 || x < 0 || y < 0)
    175                 {
    176                         //Hard coded: TODO: let this depend on the centerpoint's height, width and fieldsize (fieldsize doesn't exist yet)
    177                         orxout() << "Can not add Tower: x and y should be between 0 and 15" << endl;
    178                         return;
    179                 }
    180                
    181                 orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl;
    182                
    183                 // Add tower to coordinatesStack
    184                 Coordinate newTowerCoordinates = {x, y};
    185                 addedTowersCoordinates_.push_back(newTowerCoordinates);
    186                
    187                 // Reduce credit
    188                 this->stats_->buyTower(towerCost);
    189                
    190                 // Create tower
    191                 Tower* newTower = new Tower(this->center_);
    192                 newTower->addTemplate(this->center_->getTowerTemplate());
    193 
    194                 newTower->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75);
    195                 newTower->setGame(this);
    196         }
    197        
    198         bool TowerDefense::hasEnoughCreditForTower(TowerCost towerCost)
    199         {
    200                 return ((this->stats_->getCredit()) >= towerCost);
    201         }
    202        
    203         bool TowerDefense::towerExists(int x, int y)
    204         {
    205                 for(std::vector<Coordinate>::iterator it = addedTowersCoordinates_.begin(); it != addedTowersCoordinates_.end(); ++it)
    206                 {
    207                         Coordinate currentCoordinates = (Coordinate) (*it);
    208                         if (currentCoordinates.x == x && currentCoordinates.y == y)
    209                                 return true;
    210                 }
    211                
    212                 return false;
    213         }
    214        
    215        
    216         void TowerDefense::tick(float dt)
     129
     130        const int kInitialTowerCount = 3;
     131        Coordinate initialTowerCoordinates[kInitialTowerCount] = {{3,2}, {8,5}, {12,10}};
     132
     133        for (int i = 0; i < kInitialTowerCount; i++)
     134        {
     135            Coordinate coordinate = initialTowerCoordinates[i];
     136            addTower(coordinate.x, coordinate.y);
     137        }
     138
     139        ChatManager::message("Use the console command addTower x y to add towers");
     140
     141        //TODO: let the player control his controllable entity && TODO: create a new ControllableEntity for the player
     142    }
     143
     144    void TowerDefense::end()
     145    {
     146        Deathmatch::end();
     147
     148        ChatManager::message("Match is over");
     149    }
     150
     151    void TowerDefense::addTower(int x, int y)
     152    {
     153        const TowerCost towerCost = TDDefaultTowerCost;
     154
     155        if (!this->hasEnoughCreditForTower(towerCost))
     156        {
     157            orxout() << "not enough credit: " << (this->stats_->getCredit()) << " available, " << TDDefaultTowerCost << " needed.";
     158            return;
     159        }
     160
     161        if (this->towerExists(x,y))
     162        {
     163            orxout() << "tower exists!!" << endl;
     164            return;
     165        }
     166
     167        /*
     168        unsigned int width = this->center_->getWidth();
     169        unsigned int height = this->center_->getHeight();
     170        */
     171
     172        int tileScale = (int) this->center_->getTileScale();
     173
     174        if (x > 15 || y > 15 || x < 0 || y < 0)
     175        {
     176            //Hard coded: TODO: let this depend on the centerpoint's height, width and fieldsize (fieldsize doesn't exist yet)
     177            orxout() << "Can not add Tower: x and y should be between 0 and 15" << endl;
     178            return;
     179        }
     180
     181        orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl;
     182
     183        // Add tower to coordinatesStack
     184        Coordinate newTowerCoordinates = {x, y};
     185        addedTowersCoordinates_.push_back(newTowerCoordinates);
     186
     187        // Reduce credit
     188        this->stats_->buyTower(towerCost);
     189
     190        // Create tower
     191        Tower* newTower = new Tower(this->center_);
     192        newTower->addTemplate(this->center_->getTowerTemplate());
     193
     194        newTower->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75);
     195        newTower->setGame(this);
     196    }
     197
     198    bool TowerDefense::hasEnoughCreditForTower(TowerCost towerCost)
     199    {
     200        return ((this->stats_->getCredit()) >= towerCost);
     201    }
     202
     203    bool TowerDefense::towerExists(int x, int y)
     204    {
     205        for(std::vector<Coordinate>::iterator it = addedTowersCoordinates_.begin(); it != addedTowersCoordinates_.end(); ++it)
     206        {
     207            Coordinate currentCoordinates = (Coordinate) (*it);
     208            if (currentCoordinates.x == x && currentCoordinates.y == y)
     209                return true;
     210        }
     211
     212        return false;
     213    }
     214
     215
     216    void TowerDefense::tick(float dt)
    217217    {
    218218        SUPER(TowerDefense, tick, dt);
    219219    }
    220        
    221         // Function to test if we can add waypoints using code only. Doesn't work yet
    222        
    223         // THE PROBLEM: WaypointController's getControllableEntity() returns null, so it won't track. How do we get the controlableEntity to NOT BE NULL???
    224         /*
    225         void TowerDefense::addWaypointsAndFirstEnemy()
    226         {
    227                 SpaceShip *newShip = new SpaceShip(this->center_);
    228                 newShip->addTemplate("spaceshipassff");
    229                
    230                 WaypointController *newController = new WaypointController(newShip);
    231                 newController->setAccuracy(3);
    232                
    233                 Model *wayPoint1 = new Model(newController);
    234                 wayPoint1->setMeshSource("crate.mesh");
    235                 wayPoint1->setPosition(7,-7,5);
    236                 wayPoint1->setScale(0.2);
    237                        
    238                 Model *wayPoint2 = new Model(newController);
    239                 wayPoint2->setMeshSource("crate.mesh");
    240                 wayPoint2->setPosition(7,7,5);
    241                 wayPoint2->setScale(0.2);
    242                        
    243                 newController->addWaypoint(wayPoint1);
    244                 newController->addWaypoint(wayPoint2);
    245                        
    246                 // The following line causes the game to crash
    247 
    248                 newShip->setController(newController);
    249 //              newController -> getPlayer() -> startControl(newShip);
    250                 newShip->setPosition(-7,-7,5);
    251                 newShip->setScale(0.1);
    252                 //newShip->addSpeed(1);
    253                
    254                
    255                
    256 //              this->center_->attach(newShip);
    257         }
    258         */
    259         /*
    260          void TowerDefense::playerEntered(PlayerInfo* player)
    261          {
    262          Deathmatch::playerEntered(player);
    263          
    264          const std::string& message = player->getName() + " entered the game";
    265          ChatManager::message(message);
    266          }
    267          
    268          bool TowerDefense::playerLeft(PlayerInfo* player)
    269          {
    270          bool valid_player = Deathmatch::playerLeft(player);
    271          
    272          if (valid_player)
    273          {
    274          const std::string& message = player->getName() + " left the game";
    275          ChatManager::message(message);
    276          }
    277          
    278          return valid_player;
    279          }
    280          
    281          
    282          void TowerDefense::pawnKilled(Pawn* victim, Pawn* killer)
    283          {
    284          if (victim && victim->getPlayer())
    285          {
    286          std::string message;
    287          if (killer)
    288          {
    289          if (killer->getPlayer())
    290          message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();
    291          else
    292          message = victim->getPlayer()->getName() + " was killed";
    293          }
    294          else
    295          message = victim->getPlayer()->getName() + " died";
    296          
    297          ChatManager::message(message);
    298          }
    299          
    300          Deathmatch::pawnKilled(victim, killer);
    301          }
    302          
    303          void TowerDefense::playerScored(PlayerInfo* player)
    304          {
    305          Gametype::playerScored(player);
    306          
    307          }*/
     220
     221    // Function to test if we can add waypoints using code only. Doesn't work yet
     222
     223    // THE PROBLEM: WaypointController's getControllableEntity() returns null, so it won't track. How do we get the controlableEntity to NOT BE NULL???
     224    /*
     225    void TowerDefense::addWaypointsAndFirstEnemy()
     226    {
     227        SpaceShip *newShip = new SpaceShip(this->center_);
     228        newShip->addTemplate("spaceshipassff");
     229
     230        WaypointController *newController = new WaypointController(newShip);
     231        newController->setAccuracy(3);
     232
     233        Model *wayPoint1 = new Model(newController);
     234        wayPoint1->setMeshSource("crate.mesh");
     235        wayPoint1->setPosition(7,-7,5);
     236        wayPoint1->setScale(0.2);
     237
     238        Model *wayPoint2 = new Model(newController);
     239        wayPoint2->setMeshSource("crate.mesh");
     240        wayPoint2->setPosition(7,7,5);
     241        wayPoint2->setScale(0.2);
     242
     243        newController->addWaypoint(wayPoint1);
     244        newController->addWaypoint(wayPoint2);
     245
     246        // The following line causes the game to crash
     247
     248        newShip->setController(newController);
     249//        newController -> getPlayer() -> startControl(newShip);
     250        newShip->setPosition(-7,-7,5);
     251        newShip->setScale(0.1);
     252        //newShip->addSpeed(1);
     253
     254
     255
     256//      this->center_->attach(newShip);
     257    }
     258    */
     259    /*
     260    void TowerDefense::playerEntered(PlayerInfo* player)
     261    {
     262        Deathmatch::playerEntered(player);
     263
     264        const std::string& message = player->getName() + " entered the game";
     265        ChatManager::message(message);
     266    }
     267
     268    bool TowerDefense::playerLeft(PlayerInfo* player)
     269    {
     270        bool valid_player = Deathmatch::playerLeft(player);
     271
     272        if (valid_player)
     273        {
     274            const std::string& message = player->getName() + " left the game";
     275            ChatManager::message(message);
     276        }
     277
     278        return valid_player;
     279    }
     280
     281
     282    void TowerDefense::pawnKilled(Pawn* victim, Pawn* killer)
     283    {
     284        if (victim && victim->getPlayer())
     285        {
     286            std::string message;
     287            if (killer)
     288            {
     289                if (killer->getPlayer())
     290                    message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();
     291                else
     292                    message = victim->getPlayer()->getName() + " was killed";
     293            }
     294            else
     295                message = victim->getPlayer()->getName() + " died";
     296
     297            ChatManager::message(message);
     298        }
     299
     300        Deathmatch::pawnKilled(victim, killer);
     301    }
     302
     303    void TowerDefense::playerScored(PlayerInfo* player)
     304    {
     305        Gametype::playerScored(player);
     306    }*/
    308307}
  • code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.h

    r9271 r9272  
    2626 *
    2727 */
    28          
     28
    2929 /**
    30         @brief
    31         GameType class for TowerDefense. See TowerDefenseReadme.txt for Information.
    32          
    33         @ingroup TowerDefense
     30    @brief
     31        GameType class for TowerDefense. See TowerDefenseReadme.txt for Information.
     32
     33    @ingroup TowerDefense
    3434 */
    35          
     35
    3636
    3737#ifndef _TowerDefense_H__
     
    4040#include "towerdefense/TowerDefensePrereqs.h"
    4141#include "gametypes/Deathmatch.h"
    42                  
     42
    4343 #include "TowerDefensePlayerStats.h"
    44                  
     44
    4545namespace orxonox
    4646{
    47         class _TowerDefenseExport TowerDefense : public Deathmatch
     47    class _TowerDefenseExport TowerDefense : public Deathmatch
    4848    {
    49         public:
    50                 TowerDefense(BaseObject* creator);
    51                 virtual ~TowerDefense();
    52                
    53                 virtual void start(); //<! The function is called when the gametype starts
    54                 virtual void end();
    55                 virtual void tick(float dt);
    56                 //virtual void playerEntered(PlayerInfo* player);
    57                 //virtual bool playerLeft(PlayerInfo* player);
    58                
    59                 //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
    60                 //virtual void playerScored(PlayerInfo* player);
    61                
    62                
    63                 /*      Called by TowerDefenseCenterpoint upon game start
    64                         The centerpoint is used to create towers
    65                 */
    66                 void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
    67                
    68                 /* Adds a tower at x, y in the playfield */
    69                 void addTower(int x, int y);
    70                
    71                 /* Part of a temporary hack to allow the player to add towers */
    72                 ConsoleCommand* dedicatedAddTower_;
    73                
    74                 //TODO: void spawnNewWave()
    75             //TODO: create a timer which regularly calls the spawnNewWave function  (time driven)
    76                 //      or spawn a new wave when the old wave has been killed           (event driven)
     49    public:
     50        TowerDefense(BaseObject* creator);
     51        virtual ~TowerDefense();
     52
     53        virtual void start(); //<! The function is called when the gametype starts
     54        virtual void end();
     55        virtual void tick(float dt);
     56        //virtual void playerEntered(PlayerInfo* player);
     57        //virtual bool playerLeft(PlayerInfo* player);
     58
     59        //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
     60        //virtual void playerScored(PlayerInfo* player);
    7761
    7862
    79         private:
    80                 TowerDefenseCenterpoint *center_;
    81                
    82                 /* handles stats */
    83                 TowerDefensePlayerStats *stats_;
    84                 bool hasEnoughCreditForTower(TowerCost towerCost);
    85        
    86                 bool towerExists(int x, int y);
    87                
    88                 typedef struct {
    89                         int x;
    90                         int y;
    91                 } Coordinate;
    92                
    93                 std::vector<Coordinate> addedTowersCoordinates_;
    94                 std::vector<Tower*> towers_;
     63        /*  Called by TowerDefenseCenterpoint upon game start
     64            The centerpoint is used to create towers
     65        */
     66        void setCenterpoint(TowerDefenseCenterpoint *centerpoint);
     67
     68        /* Adds a tower at x, y in the playfield */
     69        void addTower(int x, int y);
     70
     71        /* Part of a temporary hack to allow the player to add towers */
     72        ConsoleCommand* dedicatedAddTower_;
     73
     74        //TODO: void spawnNewWave()
     75        //TODO: create a timer which regularly calls the spawnNewWave function  (time driven)
     76        //      or spawn a new wave when the old wave has been killed           (event driven)
     77
     78
     79    private:
     80        TowerDefenseCenterpoint *center_;
     81
     82        /* handles stats */
     83        TowerDefensePlayerStats *stats_;
     84        bool hasEnoughCreditForTower(TowerCost towerCost);
     85
     86        bool towerExists(int x, int y);
     87
     88        typedef struct {
     89            int x;
     90            int y;
     91        } Coordinate;
     92
     93        std::vector<Coordinate> addedTowersCoordinates_;
     94        std::vector<Tower*> towers_;
    9595    };
    9696}
  • code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc

    r9271 r9272  
    5050    {
    5151        RegisterObject(TowerDefenseCenterpoint);
    52  
    53                 this->width_ = 15;
     52
     53        this->width_ = 15;
    5454        this->height_ = 15;
    5555        this->towerTemplate_ = "";
    56        
     56
    5757        //this->setCollisionType(Static);
    5858
    59                 this->checkGametype();
     59        this->checkGametype();
    6060
    6161    }
     
    7171        XMLPortParam(TowerDefenseCenterpoint, "width", setWidth, getWidth, xmlelement, mode);
    7272        XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, getHeight, xmlelement, mode);
    73                 XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode);
     73        XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode);
    7474        XMLPortParam(TowerDefenseCenterpoint, "towerTemplate", setTowerTemplate, getTowerTemplate, xmlelement, mode);
    75                
     75
    7676        //TODO: add XMLPortObject(TowerDefenseCenterpoint, WorldEntity, "waypoints", addWaypoint, getWaypoint,  xmlelement, mode);
    7777        // This was copied and shightly modified from WaypointController.cc ; there are no getters and setters and no membervariable yet
     
    100100    void TowerDefenseCenterpoint::checkGametype()
    101101    {
    102                 if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
     102        if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
    103103        {
    104                         // 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
     104            // 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
    105105            TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get());
    106106            towerDefenseGametype->setCenterpoint(this);
  • code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.h

    r9271 r9272  
    5454            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5555            virtual void changedGametype();
    56            
     56
    5757            /**
    5858            @brief The width and hight in number of tiles. Default is 15 for both.
     
    6060            void setWidth(unsigned int width)
    6161                { this->width_ = width; }
    62            
    63                         unsigned int getWidth(void) const
     62
     63            unsigned int getWidth(void) const
    6464                { return this->width_; }
    65                
     65
    6666            void setHeight(unsigned int height)
    6767                { this->height_ = height; }
    68            
    69                         unsigned int getHeight(void) const
     68
     69            unsigned int getHeight(void) const
    7070                { return this->height_; }
    71                        
    72                         /**
    73                         @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)
    74                         */
    75                         void setTileScale(unsigned int tileScale)
    76                                 { this->tileScale_ = tileScale; }
    77                        
    78                         unsigned int getTileScale(void) const
    79                                 { return this->tileScale_; }
    80                
     71
     72            /**
     73                @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)
     74            */
     75            void setTileScale(unsigned int tileScale)
     76                { this->tileScale_ = tileScale; }
     77
     78            unsigned int getTileScale(void) const
     79                { return this->tileScale_; }
     80
    8181            /**
    8282            @brief Set the template for the towers.
     
    8585            void setTowerTemplate(const std::string& templateName)
    8686                { this->towerTemplate_ = templateName; }
    87            
    88                         const std::string& getTowerTemplate(void) const
     87
     88            const std::string& getTowerTemplate(void) const
    8989                { return this->towerTemplate_; }
    9090
    9191        private:
    9292            void checkGametype();
    93            
     93
    9494            unsigned int width_;
    9595            unsigned int height_;
    96                         unsigned int tileScale_;
    97                        
     96            unsigned int tileScale_;
     97
    9898            std::string towerTemplate_;
    9999    };
  • code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.cc

    r9271 r9272  
    2525 *      ...
    2626 */
    27  
     27
    2828#include "TowerDefenseHUDController.h"
    2929
     
    3535namespace orxonox
    3636{
    37         CreateFactory(TowerDefenseHUDController);
    38        
     37    CreateFactory(TowerDefenseHUDController);
     38
    3939    TowerDefenseHUDController::TowerDefenseHUDController(BaseObject* creator) : OverlayText(creator)
    40         {
    41                 RegisterObject(TowerDefenseHUDController);
    42         }
    43        
    44         TowerDefenseHUDController::~TowerDefenseHUDController()
    45         {
    46                
    47         }
     40    {
     41        RegisterObject(TowerDefenseHUDController);
     42    }
     43
     44    TowerDefenseHUDController::~TowerDefenseHUDController()
     45    {
     46
     47    }
    4848
    4949    void TowerDefenseHUDController::tick(float dt)
    50         {
    51                 SUPER(TowerDefenseHUDController, tick, dt);
    52         }
    53        
     50    {
     51        SUPER(TowerDefenseHUDController, tick, dt);
     52    }
     53
    5454    void TowerDefenseHUDController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    55         {
    56                 SUPER(TowerDefenseHUDController, XMLPort, xmlelement, mode);
    57         }
    58        
     55    {
     56        SUPER(TowerDefenseHUDController, XMLPort, xmlelement, mode);
     57    }
     58
    5959    void TowerDefenseHUDController::changedOwner()
    6060    {
    6161        SUPER(TowerDefenseHUDController, changedOwner);
    62                 /*
     62        /*
    6363        if (this->getOwner() != NULL && this->getOwner()->getGametype())
    6464            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype().get());
    6565        else
    6666            this->owner_ = 0;
    67                         */
     67        */
    6868    }
    69        
     69
    7070}
  • code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.h

    r9271 r9272  
    2626 *
    2727 */
    28          
     28
    2929 /**
    30         @brief
    31         This subclass of OverlayText is used to display the stats of the player in the HUD
    32          
    33         @ingroup TowerDefense
     30    @brief
     31        This subclass of OverlayText is used to display the stats of the player in the HUD
     32
     33    @ingroup TowerDefense
    3434 */
    35          
     35
    3636
    3737#ifndef _TowerDefenseHUDController_H__
     
    4848    class _TowerDefenseExport TowerDefenseHUDController : public OverlayText, public Tickable
    4949    {
    50         public:
    51                 TowerDefenseHUDController(BaseObject* creator);
     50    public:
     51        TowerDefenseHUDController(BaseObject* creator);
    5252        virtual ~TowerDefenseHUDController();
    5353
    5454        virtual void tick(float dt);
    5555        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    56                 virtual void changedOwner();
     56        virtual void changedOwner();
    5757    };
    5858}
  • code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.cc

    r9271 r9272  
    2525 *      ...
    2626 */
    27  
     27
    2828#include "TowerDefensePlayerStats.h"
    2929
    3030namespace orxonox
    3131{
    32         const int kDefaultCredit = 200;
    33        
     32    const int kDefaultCredit = 200;
     33
    3434    TowerDefensePlayerStats::TowerDefensePlayerStats()
    35         {
    36                 this->credit_ = kDefaultCredit;
    37                 this->waveNumber_ = 0;
    38         }
    39         /*
    40         TowerDefensePlayerStats::~TowerDefensePlayerStats()
    41         {
    42         }
    43         */             
     35    {
     36        this->credit_ = kDefaultCredit;
     37        this->waveNumber_ = 0;
     38    }
     39    /*
     40    TowerDefensePlayerStats::~TowerDefensePlayerStats()
     41    {
     42    }
     43    */
    4444}
  • code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.h

    r9271 r9272  
    2626 *
    2727 */
    28          
     28
    2929 /**
    30         @brief
    31         This manages the stats of the player. It is used by 'TowerDefense', the gametype
    32        
    33         @ingroup TowerDefense
     30    @brief
     31        This manages the stats of the player. It is used by 'TowerDefense', the gametype
     32
     33    @ingroup TowerDefense
    3434 */
    35          
     35
    3636
    3737#ifndef _TowerDefensePlayerStats_H__
     
    4242namespace orxonox
    4343{
    44         typedef enum _TowerCosts {
    45                 // Set to 0 for debug...
    46                 TDDefaultTowerCost = 0
    47         } TowerCost;
    48        
     44    typedef enum _TowerCosts {
     45        // Set to 0 for debug...
     46        TDDefaultTowerCost = 0
     47    } TowerCost;
     48
    4949    class _TowerDefenseExport TowerDefensePlayerStats
    5050    {
    51         public:
    52                 TowerDefensePlayerStats();
    53                
    54                 inline int getCredit()
    55                         { return credit_; }
    56                
    57                 inline void setCredit(int credit)
    58                         { credit_ = credit; }
    59                
    60                 inline void buyTower(TowerCost cost)
    61                         { credit_ -= cost;}
    62                
    63                 inline int getWaveNumber()
    64                         { return waveNumber_; }
    65                
    66                 inline void didLoadNextWave()
    67                         { waveNumber_++; }
    68                
    69         private:
    70                 int credit_;
    71                 int waveNumber_;
    72                 //int baseHealth_;
     51    public:
     52        TowerDefensePlayerStats();
     53
     54        inline int getCredit()
     55            { return credit_; }
     56
     57        inline void setCredit(int credit)
     58            { credit_ = credit; }
     59
     60        inline void buyTower(TowerCost cost)
     61            { credit_ -= cost;}
     62
     63        inline int getWaveNumber()
     64            { return waveNumber_; }
     65
     66        inline void didLoadNextWave()
     67            { waveNumber_++; }
     68
     69    private:
     70        int credit_;
     71        int waveNumber_;
     72        //int baseHealth_;
    7373    };
    7474}
  • code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePrereqs.h

    r9271 r9272  
    6666{
    6767    class TowerDefense;
    68         class Tower;
     68    class Tower;
    6969    class TowerDefenseCenterpoint;
    70         class TowerDefenseHUDController;
    71         class TowerDefensePlayerStats;
     70    class TowerDefenseHUDController;
     71    class TowerDefensePlayerStats;
    7272}
    7373
  • code/branches/presentation2012merge/src/orxonox/LevelInfo.h

    r9269 r9272  
    2424 *   Co-authors:
    2525 *      ...
    26  *   
     26 *
    2727 */
    2828
     
    7979            */
    8080            inline const std::string& getName(void) const { return this->name_; } // tolua_export
    81        
     81
    8282            /**
    8383            @brief Set the screenshot of the Level.
     
    117117            */
    118118            inline bool hasTag(const std::string& tag) const { return this->tags_.find(tag) != this->tags_.end(); } // tolua_export
    119  
     119
    120120            void setShips(const std::string& ships); //!< Set the starting ship models of the level
    121121            bool addShip(const std::string& ship, bool update = true); //!< Add a model to shipselection
     
    125125            */
    126126            inline const std::string& getShips(void) const
    127                 { return this->startingShipsString_; }   
     127                { return this->startingShipsString_; }
    128128            /**
    129129            @brief Get whether the Level allows a specific starting ship model
     
    131131            @return Returns true if the Level allows the input ship model
    132132            */
    133             inline bool hasShip(const std::string& ship) const { return this->ships_.find(ship) != this->ships_.end(); } // tolua_export       
     133            inline bool hasShip(const std::string& ship) const { return this->ships_.find(ship) != this->ships_.end(); } // tolua_export
    134134            /**
    135135            @brief Get the XML-filename of the Level.
     
    138138
    139139            inline const std::string& getXMLFilename(void) const { return this->xmlfilename_; } // tolua_export
    140             inline void selectShip (const std::string& ship) { this->changeShip(ship); } // tolua_export
     140            inline void selectShip (const std::string& ship) { this->changeShip(ship); } // tolua_export
    141141
    142142
     
    153153        private:
    154154
    155             inline void changeShip (const std::string& model) {
    156                 static std::string shipSelectionTag = "shipselection";
    157                 //HACK: Read Level XML File, find "shipselection", replace with ship model
    158                 std::string levelPath = "../levels/";
    159                 levelPath.append(this->getXMLFilename());
    160                 std::string tempPath = "../levels/";
    161                 tempPath.append("_temp.oxw");
    162                 orxout(user_status) << levelPath << endl;
    163                 orxout(user_status) << tempPath << endl;
    164                 std::ifstream myLevel (levelPath.c_str());
    165                         std::ofstream tempLevel (tempPath.c_str());
    166                         while(!myLevel.eof())
    167                         {
    168                                 std::string buff;
    169                                 std::getline(myLevel, buff);
    170                                 std::string pawndesignString = "pawndesign=";
    171                                 size_t found = buff.find(pawndesignString.append(shipSelectionTag));
    172                                 if (found!= std::string::npos)
    173                                         buff = buff.substr(0, found + 11) + model + buff.substr(found+11+shipSelectionTag.length(), std::string::npos);
    174                                 tempLevel.write(buff.c_str(), buff.length());
    175                                 tempLevel << std::endl;
    176                         }
    177                         myLevel.close();
    178                         tempLevel.close();
    179                         orxout(user_status) << "done" << endl;
    180             }
     155            inline void changeShip (const std::string& model) {
     156                static std::string shipSelectionTag = "shipselection";
     157                //HACK: Read Level XML File, find "shipselection", replace with ship model
     158                std::string levelPath = "../levels/";
     159                levelPath.append(this->getXMLFilename());
     160                std::string tempPath = "../levels/";
     161                tempPath.append("_temp.oxw");
     162                orxout(user_status) << levelPath << endl;
     163                orxout(user_status) << tempPath << endl;
     164                std::ifstream myLevel (levelPath.c_str());
     165                std::ofstream tempLevel (tempPath.c_str());
     166                while(!myLevel.eof())
     167                {
     168                    std::string buff;
     169                    std::getline(myLevel, buff);
     170                    std::string pawndesignString = "pawndesign=";
     171                    size_t found = buff.find(pawndesignString.append(shipSelectionTag));
     172                    if (found!= std::string::npos)
     173                        buff = buff.substr(0, found + 11) + model + buff.substr(found+11+shipSelectionTag.length(), std::string::npos);
     174                    tempLevel.write(buff.c_str(), buff.length());
     175                    tempLevel << std::endl;
     176                }
     177                myLevel.close();
     178                tempLevel.close();
     179                orxout(user_status) << "done" << endl;
     180            }
    181181            void tagsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
    182182            void shipsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
     
    199199            std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with.
    200200            std::set<std::string> ships_; //!< The set of starting ship models the Level allows.
    201             std::string startingShipsString_; //!< The comma-seperated string of all the allowed ship models for the shipselection.           
     201            std::string startingShipsString_; //!< The comma-seperated string of all the allowed ship models for the shipselection.
    202202    }; // tolua_export
    203203
     
    210210        - @b screenshot The screenshot of the level.
    211211        - @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>.
    212         - @b (optional) startingships The comma-seperated string of starting ship models 
     212        - @b (optional) startingships The comma-seperated string of starting ship models
    213213        An example would be:
    214214        @code
     
    224224    @author
    225225        Damian 'Mozork' Frick
    226         @edit
    227                 Matthias Hutter
     226    @edit
     227        Matthias Hutter
    228228    @ingroup Orxonox
    229229    */
     
    235235
    236236            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a LevelInfo object through XML.
    237        
     237
    238238            /**
    239239            @brief Set the screenshot of the Level.
     
    283283            */
    284284            inline const std::string& getShips(void) const
    285                 { return this->LevelInfoItem::getShips(); }             
     285                { return this->LevelInfoItem::getShips(); }
    286286            LevelInfoItem* copy(void); //!< Copies the contents of this LevelInfo object to a new LevelInfoItem object.
    287287    };
     
    302302            }
    303303    };
    304    
     304
    305305} // tolua_export
    306306
  • code/branches/presentation2012merge/src/orxonox/ShipManager.cc

    r9271 r9272  
    2222 *   Author:
    2323 *      Matthias Hutter
    24  *   
     24 *
    2525 */
    2626
     
    2828    @file ShipManager.cc
    2929    @brief Work-in Progress: Implementation of the ShipManager singleton.
    30            Should make SpaceShip info available to lua handlers.
     30           Should make SpaceShip info available to lua handlers.
    3131*/
    3232
     
    7272    }
    7373
    74    
     74
    7575    /**
    7676    @brief
     
    132132    void ShipManager::compileAvailableShipList()
    133133    {
    134                 /*
    135                 // We only want to load as little as possible
    136                 ClassTreeMask mask;
    137                     mask.exclude(Class(BaseObject));
    138                     mask.include(Class(SpaceShip));
    139                 SpaceShip* info = NULL;
    140                 XMLFile file = XMLFile(ship);
    141                 Loader::load(&file, mask, false, true);
    142                 for(ObjectList<SpaceShip>::iterator item = ObjectList<SpaceShip>::begin(); item != ObjectList<SpaceShip>::end(); ++item)
    143                         if(item->getXMLFilename() == *it)
    144                             info = item->copy();
    145                 Loader::unload(&file);
    146                 */
    147    
     134        /*
     135        // We only want to load as little as possible
     136        ClassTreeMask mask;
     137            mask.exclude(Class(BaseObject));
     138            mask.include(Class(SpaceShip));
     139        SpaceShip* info = NULL;
     140        XMLFile file = XMLFile(ship);
     141        Loader::load(&file, mask, false, true);
     142        for(ObjectList<SpaceShip>::iterator item = ObjectList<SpaceShip>::begin(); item != ObjectList<SpaceShip>::end(); ++item)
     143                if(item->getXMLFilename() == *it)
     144                    info = item->copy();
     145        Loader::unload(&file);
     146        */
     147
    148148        // Get all files matching the level criteria
    149149        Ogre::StringVectorPtr levels = Resource::findResourceNames("*.oxw");
  • code/branches/presentation2012merge/src/orxonox/controllers/FormationController.cc

    r9271 r9272  
    5050{
    5151
    52   SetConsoleCommand("FormationController", "formationflight",  &FormationController::formationflight);
    53   SetConsoleCommand("FormationController", "masteraction",     &FormationController::masteraction);
    54   SetConsoleCommand("FormationController", "followme",         &FormationController::followme);
    55   SetConsoleCommand("FormationController", "passivebehaviour", &FormationController::passivebehaviour);
    56   SetConsoleCommand("FormationController", "formationsize",    &FormationController::formationsize);
    57 
    58 
    59 
    60 
    61   static const unsigned int STANDARD_MAX_FORMATION_SIZE = 9;
    62   static const int RADIUS_TO_SEARCH_FOR_MASTERS = 5000;
    63   static const float FORMATION_LENGTH =  110;
    64   static const float FORMATION_WIDTH =  110;
    65   static const int FREEDOM_COUNT = 4; //seconds the slaves in a formation will be set free when master attacks an enemy
    66   static const float SPEED_MASTER = 0.6f;
    67   static const float ROTATEFACTOR_MASTER = 0.2f;
    68   static const float SPEED_FREE = 0.8f;
    69   static const float ROTATEFACTOR_FREE = 0.8f;
    70 
    71   FormationController::FormationController(BaseObject* creator) : Controller(creator)
    72   {
     52    SetConsoleCommand("FormationController", "formationflight",  &FormationController::formationflight);
     53    SetConsoleCommand("FormationController", "masteraction",     &FormationController::masteraction);
     54    SetConsoleCommand("FormationController", "followme",         &FormationController::followme);
     55    SetConsoleCommand("FormationController", "passivebehaviour", &FormationController::passivebehaviour);
     56    SetConsoleCommand("FormationController", "formationsize",    &FormationController::formationsize);
     57
     58
     59
     60
     61    static const unsigned int STANDARD_MAX_FORMATION_SIZE = 9;
     62    static const int RADIUS_TO_SEARCH_FOR_MASTERS = 5000;
     63    static const float FORMATION_LENGTH =  110;
     64    static const float FORMATION_WIDTH =  110;
     65    static const int FREEDOM_COUNT = 4; //seconds the slaves in a formation will be set free when master attacks an enemy
     66    static const float SPEED_MASTER = 0.6f;
     67    static const float ROTATEFACTOR_MASTER = 0.2f;
     68    static const float SPEED_FREE = 0.8f;
     69    static const float ROTATEFACTOR_FREE = 0.8f;
     70
     71    FormationController::FormationController(BaseObject* creator) : Controller(creator)
     72    {
    7373        RegisterObject(FormationController);
    7474
     
    9191        this->team_=-1;
    9292        this->target_.setCallback(createFunctor(&FormationController::targetDied, this));
    93   }
    94 
    95   FormationController::~FormationController()
    96   {
    97     if (this->isInitialized())
     93    }
     94
     95    FormationController::~FormationController()
     96    {
     97        if (this->isInitialized())
    9898        {
    9999            this->removeFromFormation();
     
    123123            }
    124124        }
    125   }
    126 
    127   void FormationController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     125    }
     126
     127    void FormationController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    128128    {
    129129        SUPER(FormationController, XMLPort, xmlelement, mode);
     
    137137
    138138
    139   /**
     139    /**
    140140        @brief Activates / deactivates formationflight behaviour
    141141        @param form activate formflight if form is true
    142142    */
    143   void FormationController::formationflight(const bool form)
     143    void FormationController::formationflight(const bool form)
    144144    {
    145145        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
     
    168168    }
    169169
    170   /**
     170    /**
    171171        @brief Get all masters to do a "specific master action"
    172172        @param action which action to perform (integer, so it can be called with a console command (tmp solution))
     
    198198    }
    199199
    200   /**
     200    /**
    201201        @brief Sets shooting behaviour of pawns.
    202202        @param passive if true, bots won't shoot.
     
    225225    }
    226226
    227   /**
     227    /**
    228228        @brief Sets maximal formation size
    229229        @param size maximal formation size.
     
    282282        Vector2 coord = get2DViewcoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target);
    283283        float distance = (target - this->getControllableEntity()->getPosition()).length();
    284                 if(coord.x < 0.0001 && coord.y < 0.0001)
    285                 {
    286                         // if the ship reaches a direction very close to the direct one, set it to the direct one
    287                         Vector3 v_temp = this->getControllableEntity()->getPosition();
    288                         Quaternion quat = v_temp.getRotationTo(target);
    289                         this->getControllableEntity()->rotate(quat);
    290                 }
     284        if(coord.x < 0.0001 && coord.y < 0.0001)
     285        {
     286            // if the ship reaches a direction very close to the direct one, set it to the direct one
     287            Vector3 v_temp = this->getControllableEntity()->getPosition();
     288            Quaternion quat = v_temp.getRotationTo(target);
     289            this->getControllableEntity()->rotate(quat);
     290        }
    291291
    292292        if(this->state_ == FREE)
     
    324324
    325325        if(this->state_ == SLAVE)
    326                 {
    327 
    328                         this->getControllableEntity()->rotateYaw(-2.0f * ROTATEFACTOR_MASTER * coord.x * 2);
    329                         this->getControllableEntity()->rotatePitch(2.0f * ROTATEFACTOR_MASTER * coord.y * 2);
    330 
    331                         if (distance < 300)
    332                         {
    333                                 if (bHasTargetOrientation_)
    334                                 {
    335                                         copyTargetOrientation();
    336                                 }
    337                                 if (distance < 100)
    338                                 { //linear speed reduction
    339                                         this->getControllableEntity()->moveFrontBack(distance/100.0f*0.4f*SPEED_MASTER);
    340 
    341                                 } else this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER);
    342 
    343                         } else {
    344                                 this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER + distance/300.0f);
    345                         }
    346                 }
     326        {
     327
     328            this->getControllableEntity()->rotateYaw(-2.0f * ROTATEFACTOR_MASTER * coord.x * 2);
     329            this->getControllableEntity()->rotatePitch(2.0f * ROTATEFACTOR_MASTER * coord.y * 2);
     330
     331            if (distance < 300)
     332            {
     333                if (bHasTargetOrientation_)
     334                {
     335                    copyTargetOrientation();
     336                }
     337                if (distance < 100)
     338                { //linear speed reduction
     339                    this->getControllableEntity()->moveFrontBack(distance/100.0f*0.4f*SPEED_MASTER);
     340                }
     341                else
     342                    this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER);
     343            }
     344            else
     345                this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER + distance/300.0f);
     346        }
    347347
    348348        if (distance < 10)
    349349        {
    350350            this->positionReached();
    351             bHasTargetOrientation_=false;
    352         }
    353     }
    354 
    355 
    356 
    357   void FormationController::moveToTargetPosition()
     351            bHasTargetOrientation_=false;
     352        }
     353    }
     354
     355
     356
     357    void FormationController::moveToTargetPosition()
    358358    {
    359359        this->moveToPosition(this->targetPosition_);
    360360    }
    361361
    362   //copy the Roll orientation of given Quaternion.
    363   void FormationController::copyOrientation(const Quaternion& orient)
     362    //copy the Roll orientation of given Quaternion.
     363    void FormationController::copyOrientation(const Quaternion& orient)
    364364    {
    365365        //roll angle difference in radian
     
    379379
    380380
    381    /**
     381    /**
    382382        @brief Unregisters a slave from its master. Initiated by a slave.
    383383    */
     
    469469        }
    470470    }
    471  /**
     471
     472    /**
    472473        @brief Commands the slaves of a master into a formation. Sufficiently fast not to be called within tick. Initiated by a master.
    473474    */
    474 
    475 void FormationController::commandSlaves()
     475    void FormationController::commandSlaves()
    476476    {
    477477        if(this->state_ != MASTER) return;
     
    487487        }
    488488        else
    489         // formation:
     489        // formation:
    490490        {
    491491            dest += 1.0f*orient*WorldEntity::BACK;
    492492            Vector3 pos = Vector3::ZERO;
    493                  bool left=true;
     493            bool left=true;
    494494            int i = 1;
    495495
     
    689689
    690690        if (specificMasterActionHoldCount_ == 0)
    691          {
     691        {
    692692            this->specificMasterAction_ = NONE;
    693693            this->searchNewTarget();
    694          }
    695         else specificMasterActionHoldCount_--;
     694        }
     695        else
     696            specificMasterActionHoldCount_--;
    696697    }
    697698
     
    717718    void FormationController::turn180()
    718719    {
    719             Vector2 coord = get2DViewdirection(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, this->targetPosition_);
    720 
    721             this->getControllableEntity()->rotateYaw(-2.0f * sgn(coord.x) * coord.x*coord.x);
    722             this->getControllableEntity()->rotatePitch(2.0f * sgn(coord.y) * coord.y*coord.y);
    723 
    724             this->getControllableEntity()->moveFrontBack(SPEED_MASTER);
     720        Vector2 coord = get2DViewdirection(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, this->targetPosition_);
     721
     722        this->getControllableEntity()->rotateYaw(-2.0f * sgn(coord.x) * coord.x*coord.x);
     723        this->getControllableEntity()->rotatePitch(2.0f * sgn(coord.y) * coord.y*coord.y);
     724
     725        this->getControllableEntity()->moveFrontBack(SPEED_MASTER);
    725726    }
    726727
     
    740741    void FormationController::spin()
    741742    {
    742             this->moveToTargetPosition();
    743             this->getControllableEntity()->rotateRoll(0.8f);
     743        this->moveToTargetPosition();
     744        this->getControllableEntity()->rotateRoll(0.8f);
    744745    }
    745746
     
    779780        if((humanPawn != NULL) && (allMasters.size() != 0))
    780781        {
    781                 float posHuman = humanPawn->getPosition().length();
    782                 float distance = 0.0f;
    783                 float minDistance = FLT_MAX;
    784                 int index = 0;
    785                 int i = 0;
    786 
    787                 for(std::vector<FormationController*>::iterator it = allMasters.begin(); it != allMasters.end(); it++, i++)
    788                     {
    789                         if (!FormationController::sameTeam((*it)->getControllableEntity(), humanPawn, (*it)->getGametype())) continue;
    790                         distance = posHuman - (*it)->getControllableEntity()->getPosition().length();
    791                         if(distance < minDistance) index = i;
    792                     }
    793                 allMasters[index]->followInit(humanPawn);
    794             }
    795 
    796     }
    797 
    798 
    799 
    800 
     782            float posHuman = humanPawn->getPosition().length();
     783            float distance = 0.0f;
     784            float minDistance = FLT_MAX;
     785            int index = 0;
     786            int i = 0;
     787
     788            for(std::vector<FormationController*>::iterator it = allMasters.begin(); it != allMasters.end(); it++, i++)
     789            {
     790                if (!FormationController::sameTeam((*it)->getControllableEntity(), humanPawn, (*it)->getGametype())) continue;
     791                distance = posHuman - (*it)->getControllableEntity()->getPosition().length();
     792                if(distance < minDistance) index = i;
     793            }
     794            allMasters[index]->followInit(humanPawn);
     795        }
     796    }
    801797
    802798    /**
     
    820816    }
    821817
    822    /**
     818    /**
    823819        @brief Master begins to follow a randomly chosen human player of the same team. Is a "specific master action".
    824820    */
     
    848844
    849845
    850   /**
     846    /**
    851847        @brief Master follows target with adjusted speed. Called within tick.
    852848    */
     
    860856
    861857
    862   void FormationController::setTargetPosition(const Vector3& target)
     858    void FormationController::setTargetPosition(const Vector3& target)
    863859    {
    864860        this->targetPosition_ = target;
     
    924920    }
    925921
    926   void FormationController::forgetTarget()
     922    void FormationController::forgetTarget()
    927923    {
    928924        this->target_ = 0;
     
    930926    }
    931927
    932    void FormationController::targetDied()
     928    void FormationController::targetDied()
    933929    {
    934930        this->forgetTarget();
     
    936932    }
    937933
    938   bool FormationController::sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)
     934    bool FormationController::sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)
    939935    {
    940936        if (entity1 == entity2)
  • code/branches/presentation2012merge/src/orxonox/gametypes/Mission.cc

    r9271 r9272  
    6363        {
    6464            this->missionAccomplished_ = false;
    65             this->end();
     65            this->end();
    6666        }
    6767    }
     
    7878    {
    7979        Gametype::end();
    80         /*if (this->missionAccomplished_)
     80        /*if (this->missionAccomplished_)
    8181            this->gtinfo_->sendAnnounceMessage("Mission accomplished!");
    82         else
     82        else
    8383            this->gtinfo_->sendAnnounceMessage("Mission failed!");
    84          * */
     84        */
    8585    }
    8686
  • code/branches/presentation2012merge/src/orxonox/infos/PlayerInfo.cc

    r9257 r9272  
    173173        this->changedControllableEntity();
    174174
    175                 RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
     175        RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
    176176        if (radarviewable != NULL)
    177177            radarviewable->setRadarName(this->getName());
  • code/branches/presentation2012merge/src/orxonox/interfaces/RadarViewable.h

    r9257 r9272  
    6161        virtual ~RadarViewable();
    6262
    63                 virtual void setRadarName(const std::string& name)
    64                         {
    65                                 if (this->radarName_ != name)
    66                                 {
    67                                         this->radarName_ = name;
    68                                         this->settingsChanged();
    69                                 }
    70                         }
    71                 const std::string& getRadarName() const
    72                         { return this->radarName_; }
     63        virtual void setRadarName(const std::string& name)
     64            {
     65                if (this->radarName_ != name)
     66                {
     67                    this->radarName_ = name;
     68                    this->settingsChanged();
     69                }
     70            }
     71        const std::string& getRadarName() const
     72            { return this->radarName_; }
    7373
    7474        inline void setRadarObjectCamouflage(float camouflage)
     
    163163        ColourValue radarObjectColour_;
    164164        float scale_;
    165                 std::string radarName_;
     165        std::string radarName_;
    166166    };
    167167}
  • code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.cc

    r9016 r9272  
    8787        this->setPriority( Priority::VeryHigh );
    8888        this->registerVariables();
    89         this->team_ = -1;
     89        this->team_ = -1;
    9090    }
    9191
  • code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.h

    r9255 r9272  
    164164            void setTargetInternal( uint32_t targetID );
    165165
    166             inline void setTeam(int team)
    167                 { this->team_ = team; }
    168             inline int getTeam() const
    169                 { return this->team_; }
     166            inline void setTeam(int team)
     167                { this->team_ = team; }
     168            inline int getTeam() const
     169                { return this->team_; }
    170170
    171171        protected:
     
    243243            WeakPtr<WorldEntity> target_;
    244244
    245             int team_ ; //<! teamnumber
     245            int team_ ; //<! teamnumber
    246246    };
    247247}
  • code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.cc

    r9269 r9272  
    232232    {
    233233        //Applies multiplier given by the DamageBoost Pickup.
    234         Pawn *test = dynamic_cast<Pawn *>(originator);
    235         if( test != NULL )
    236         {
    237           damage *= originator->getDamageMultiplier();
    238         }
    239 
    240         if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
     234        Pawn *test = dynamic_cast<Pawn *>(originator);
     235        if( test != NULL )
     236        {
     237            damage *= originator->getDamageMultiplier();
     238        }
     239
     240        if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
    241241        {
    242242            if (shielddamage >= this->getShieldHealth())
  • code/branches/presentation2012merge/src/orxonox/worldentities/pawns/SpaceShip.cc

    r8892 r9272  
    133133    {
    134134        SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
    135        
     135
    136136        SetConfigValueExternal(bEnableMotionBlur_, "GraphicsSettings", "enableMotionBlur", true)
    137137            .description("Enable or disable the motion blur effect when moving very fast")
     
    503503    void SpaceShip::resetCamera()
    504504    {
    505         if(this->hasLocalController() && this->hasHumanController())
    506         {
     505        if(this->hasLocalController() && this->hasHumanController())
     506        {
    507507            Camera *camera = this->getCamera();
    508508            if (camera == 0)
     
    514514            camera->setPosition(this->cameraOriginalPosition_);
    515515            camera->setOrientation(this->cameraOriginalOrientation_);
    516         }
     516        }
    517517    }
    518518
Note: See TracChangeset for help on using the changeset viewer.