Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9348


Ignore:
Timestamp:
Aug 30, 2012, 11:08:17 PM (8 years ago)
Author:
landauf
Message:

merged branch presentation2012merge back to trunk

Location:
code/trunk
Files:
9 deleted
171 edited
17 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/cmake/tools/BuildUnits.cmake

    • Property svn:eol-style set to native
  • code/trunk/data/gui/layouts/GUILayout.xsd

    r5781 r9348  
    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/trunk/data/gui/layouts/InGamePickupHUD.layout

    r7163 r9348  
    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/trunk/data/gui/layouts/SingleplayerConfigMenu.layout

    • Property svn:eol-style set to native
  • code/trunk/data/gui/scripts/AudioMenu.lua

    r8351 r9348  
    3434    table.insert(themeList, "8-Bit Style")
    3535    table.insert(themeList, "Corny Jazz")
     36    table.insert(themeList, "Metal")
    3637    for k,v in pairs(themeList) do
    3738        item = CEGUI.createListboxTextItem(v)
     
    4546    elseif orxonox.getConfig("MoodManager", "mood_") == "jazzy" then
    4647        listboxwindow:setItemSelectState(3,true)
     48    elseif orxonox.getConfig("MoodManager", "mood_") == "metal" then
     49        listboxwindow:setItemSelectState(4,true)
    4750    else
    4851        listboxwindow:setItemSelectState(0,true)
     
    178181    elseif listboxwindow:isItemSelected(3) then
    179182        orxonox.config("MoodManager", "mood_", "jazzy")
     183    elseif listboxwindow:isItemSelected(4) then
     184        orxonox.config("MoodManager", "mood_", "metal")
    180185    else
    181186        orxonox.config("MoodManager", "mood_", "default")
  • code/trunk/data/gui/scripts/PickupInventory.lua

    r7504 r9348  
    108108
    109109function P.createPickupEntry(index, pickup)
    110     local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup.pickup)
     110    local representation = orxonox.PickupManager:getInstance():getRepresentation(pickup.representationName)
    111111
    112112    local name = "orxonox/PickupInventory/Box/Pickup" .. index
     
    176176    for k,v in pairs(P.detailsWindows) do
    177177        if v ~= nil then
    178             winMgr:destroyWindow(v)
     178            P.destroyDetailWindow(k)
    179179        end
    180180    end
     
    193193function P.createDetailsWindow(pickupIndex)
    194194    local pickup = P.pickupsList[pickupIndex]
    195     local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup.pickup)
     195    local representation = orxonox.PickupManager:getInstance():getRepresentation(pickup.representationName)
    196196
    197197    local index = P.getNewDetailNumber()
     
    323323    local detailNr = tonumber(match())
    324324   
     325    P.destroyDetailWindow(detailNr)
     326end
     327
     328function P.destroyDetailWindow(detailNr)
    325329    local window = P.detailsWindows[detailNr]
    326330    winMgr:destroyWindow(window)
  • code/trunk/data/gui/scripts/SingleplayerConfigMenu.lua

    • Property svn:eol-style set to native
  • code/trunk/data/gui/scripts/SingleplayerMenu.lua

    r9251 r9348  
    22
    33local P = createMenuSheet("SingleplayerMenu")
    4 
     4P.loadAlong = {"ShipSelectionMenu"}
    55P.levelList = {}
    66P.activeTabIndexes = {}
    77P.scrollbarWidth = 13
     8selectedlevel = {} -- level for ship selection
    89
    910function P.onLoad()
    1011    P.createLevelList()
    11    
     12
    1213    -- create tabs with desired tab as argument (nil for all)
    1314    P.createFilterTab("Gametypes", "gametype")
     
    1819    P.createFilterTab("Tests", "test")
    1920    P.createFilterTab("Show All", nil)
    20    
     21
    2122    -- update description and screenshot boxes
    2223    P.SingleplayerSelectionChanged()
    23    
     24
    2425    --buttons are arranged in a 1x3 matrix
    2526    P:setButton(1, 1, {
     
    4647    while index < size do
    4748        level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
    48         if level ~= nil then
     49        if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw") then
    4950            local levelXMLFilename = level:getXMLFilename()
    5051            -- create an imageset for each screenshot
     
    141142
    142143function P.SingleplayerStartButton_clicked(e)
    143     local level = P.SingleplayerGetSelectedLevel()
    144     if level ~= nil then
    145         orxonox.execute("startGame " .. level:getXMLFilename())
    146         hideAllMenuSheets()
     144    selectedlevel = P.SingleplayerGetSelectedLevel()
     145    if selectedlevel ~= nil then
     146        if selectedlevel:hasTag("shipselection") then
     147            local shipSelectionMenu = showMenuSheet("ShipSelectionMenu", true)
     148            shipSelectionMenu:update()
     149        else
     150            orxonox.execute("startGame " .. selectedlevel:getXMLFilename())
     151            hideAllMenuSheets()
     152        end
    147153    end
    148154end
  • code/trunk/data/levels/FPSTest.oxw

    r9016 r9348  
    2323  <Scene
    2424   ambientlight = "0.1, 0.1, 0.1"
    25    skybox       = "Orxonox/skypanoramagen1"
     25   skybox       = "Orxonox/skyBoxBasic"
    2626   gravity      = "0,-1000,0"
    2727   negativeWorldRange = "-100000, -100000, -100000"
  • code/trunk/data/levels/Spacerace2.oxw

    • Property svn:eol-style set to native
    r9016 r9348  
    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/trunk/data/levels/asteroidField.oxw

    • Property svn:eol-style set to native
    r9016 r9348  
    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/trunk/data/levels/asteroids.oxw

    r9016 r9348  
    149149
    150150
    151     <CheckPoint name=trigger1 position="-300,300,0" scale=1 isdestination=false isfirst=true stayactive=true distance=10 addtime=30 />
    152 
    153 
    154     <CheckPoint name=trigger2 position="2200,600,0" scale=3 isdestination=false stayactive=true distance=100 addtime=17>
     151    <CheckPoint name=trigger1 position="-300,300,0" scale=1 isdestination=false isfirst=true stayactive=true distance=10 addtime=24 />
     152
     153
     154    <CheckPoint name=trigger2 position="2200,600,0" scale=3 isdestination=false stayactive=true distance=100 addtime=20>
    155155      <events>
    156156        <activity>
     
    203203
    204204
    205     <CheckPoint name=trigger3 position="4100,0,400" scale=3 isdestination=false stayactive=true distance=100 addtime=16>
     205    <CheckPoint name=trigger3 position="4100,0,400" scale=3 isdestination=false stayactive=true distance=100 addtime=10>
    206206      <events>
    207207        <activity>
     
    254254
    255255
    256     <CheckPoint name=trigger4 position="5600,400,0" scale=3 isdestination=false stayactive=true distance=100 addtime=17>
     256    <CheckPoint name=trigger4 position="5600,400,0" scale=3 isdestination=false stayactive=true distance=100 addtime=10>
    257257      <events>
    258258        <activity>
     
    305305
    306306
    307     <CheckPoint name=trigger5 position="7200,600,-200" scale=3 isdestination=false stayactive=true distance=100 addtime=16>
     307    <CheckPoint name=trigger5 position="7200,600,-200" scale=3 isdestination=false stayactive=true distance=100 addtime=10>
    308308      <events>
    309309        <activity>
     
    356356
    357357
    358     <CheckPoint name=trigger6 position="9200, 800,-800" scale=3 isdestination=false stayactive=true distance=100 addtime=22>
     358    <CheckPoint name=trigger6 position="9200, 800,-800" scale=3 isdestination=false stayactive=true distance=100 addtime=15>
    359359      <events>
    360360        <activity>
  • code/trunk/data/levels/docking.oxw

    r9016 r9348  
    2121  <Scene
    2222   ambientlight = "0.5, 0.5, 0.5"
    23    skybox       = "Orxonox/skypanoramagen1"
     23   skybox       = "Orxonox/skyBoxBasic"
    2424  >
    2525
  • code/trunk/data/levels/dynamicMatch.oxw

    r9016 r9348  
    1010  include("stats.oxo")
    1111  include("templates/spaceshipAssff.oxt")
     12  include("templates/spaceshipSwallow.oxt")
     13  include("templates/spaceshipPirate.oxt")
    1214  include("templates/spaceshipGhost.oxt")
    1315  include("dynamicMatchHUD.oxo")
     
    3941<!-- -----------12-Spawnpoints around the planet------------- -->
    4042<!-- inner Spawnpoints -->
    41 <TeamSpawnPoint team=0 position="1000,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    42 <TeamSpawnPoint team=0 position="-1000,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    43 <TeamSpawnPoint team=0 position="0,1000,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    44 <TeamSpawnPoint team=0 position="0,-1000,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    45 <TeamSpawnPoint team=0 position="0,0,1000" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    46 <TeamSpawnPoint team=0 position="0,0,-1000" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
     43<TeamSpawnPoint team=0 position="1000,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     44<TeamSpawnPoint team=0 position="-1000,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     45<TeamSpawnPoint team=0 position="0,1000,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     46<TeamSpawnPoint team=0 position="0,-1000,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     47<TeamSpawnPoint team=0 position="0,0,1000" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     48<TeamSpawnPoint team=0 position="0,0,-1000" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
    4749<!--outer Spawnpoints -->
    48 <TeamSpawnPoint team=0 position="2000,0,0" lookat="0,0,1" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    49 <TeamSpawnPoint team=0 position="-2000,0,0" lookat="0,0,-1" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    50 <TeamSpawnPoint team=0 position="0,2000,0" lookat="0,1,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    51 <TeamSpawnPoint team=0 position="0,-2000,0" lookat="0,-1,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    52 <TeamSpawnPoint team=0 position="0,0,2000" lookat="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    53 <TeamSpawnPoint team=0 position="0,0,-2000" lookat="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
     50<TeamSpawnPoint team=0 position="2000,0,0" lookat="0,0,1" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     51<TeamSpawnPoint team=0 position="-2000,0,0" lookat="0,0,-1" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     52<TeamSpawnPoint team=0 position="0,2000,0" lookat="0,1,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     53<TeamSpawnPoint team=0 position="0,-2000,0" lookat="0,-1,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     54<TeamSpawnPoint team=0 position="0,0,2000" lookat="1,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     55<TeamSpawnPoint team=0 position="0,0,-2000" lookat="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
    5456
    5557<?lua
     
    6466                createSpaceStationPar(0,2,1,2,1,4,1,50)
    6567              ?>
    66                 <TeamSpawnPoint team=2 position="20,20,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    67                 <TeamSpawnPoint team=2 position="-20,-20,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
    68                 <TeamSpawnPoint team=2 position="-10,10,20" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
     68                <TeamSpawnPoint team=2 position="20,20,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     69                <TeamSpawnPoint team=2 position="-20,-20,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
     70                <TeamSpawnPoint team=2 position="-10,10,20" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
    6971            </attached>
    7072          </StaticEntity>
     
    9092      <attached>
    9193        <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
    92           <attached><!-- ---------asteroid fog----- -->
     94          <attached><!-- ---------asteroid fog----- -->
    9395            <ParticleEmitter position="0,0,0" source="Orxonox/Steam" />
    9496          </attached>
    95         </Model>
     97        </Model>
    9698      </attached>
    9799      <?lua if i == 5 then ?><collisionShapes>
  • code/trunk/data/levels/events.oxw

    r9016 r9348  
    2222  <Scene
    2323   ambientlight = "0.5, 0.5, 0.5"
    24    skybox       = "Orxonox/skypanoramagen1"
     24   skybox       = "Orxonox/skyBoxBasic"
    2525  >
    2626    <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" />
  • code/trunk/data/levels/fightInOurBack.oxw

    r9016 r9348  
    121121    <Scene
    122122     ambientlight="0.8,0.8,0.8"
    123      skybox="Orxonox/skypanoramagen1"
     123     skybox="Orxonox/skyBoxBasic"
    124124    >
    125125
  • code/trunk/data/levels/includes/CuboidSpaceStation.lua

    r7163 r9348  
    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/trunk/data/levels/includes/asteroidField.lua

    • Property svn:eol-style set to native
    r9016 r9348  
    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/trunk/data/levels/includes/pickups.oxi

    r8713 r9348  
    33
    44<PickupRepresentation
     5    name = "smallshieldpickup"
    56    pickupName = "Small Shield Pickup"
    67    pickupDescription = "Gives you a small-sized shield for 30 seconds."
    78    inventoryRepresentation = "SmallShield"
    89    spawnerTemplate = "smallshieldpickupRepresentation"
    9 >
    10     <pickup>
    11         <ShieldPickup template=smallshieldpickup />
    12     </pickup>
    13 </PickupRepresentation>
    14 
    15 <PickupRepresentation
     10/>
     11
     12<PickupRepresentation
     13    name = "mediumshieldpickup"
    1614    pickupName = "Medium Shield Pickup"
    1715    pickupDescription = "Gives you a medium-sized shield for 30 seconds."
    1816    inventoryRepresentation = "MediumShield"
    1917    spawnerTemplate = "mediumshieldpickupRepresentation"
    20 >
    21     <pickup>
    22         <ShieldPickup template=mediumshieldpickup />
    23     </pickup>
    24 </PickupRepresentation>
    25 
    26 <PickupRepresentation
     18/>
     19
     20<PickupRepresentation
     21    name = "hugeshieldpickup"
    2722    pickupName = "Huge Shield Pickup"
    2823    pickupDescription = "Gives you a big shield for 60 seconds."
    2924    inventoryRepresentation = "HugeShield"
    3025    spawnerTemplate = "hugeshieldpickupRepresentation"
    31 >
    32     <pickup>
    33         <ShieldPickup template=hugeshieldpickup />
    34     </pickup>
    35 </PickupRepresentation>
     26/>
    3627
    3728<!-- Health pickups -->
    3829
    3930<PickupRepresentation
     31    name = "smallhealthpickup"
    4032    pickupName = "Small Health Boost"
    4133    pickupDescription = "Adds a small amout of health to the ship."
    4234    inventoryRepresentation = "SmallHealth"
    4335    spawnerTemplate = "smallhealthpickupRepresentation"
    44 >
    45     <pickup>
    46         <HealthPickup template=smallhealthpickup />
    47     </pickup>
    48 </PickupRepresentation>
    49 
    50 <PickupRepresentation
     36/>
     37
     38<PickupRepresentation
     39    name = "mediumhealthpickup"
    5140    pickupName = "Medium Health Boost"
    5241    pickupDescription = "Adds a medium amout of health to the ship."
    5342    spawnerTemplate = "mediumhealthpickupRepresentation"
    5443    inventoryRepresentation = "MediumHealth"
    55 >
    56     <pickup>
    57         <HealthPickup template=mediumhealthpickup />
    58     </pickup>
    59 </PickupRepresentation>
    60 
    61 <PickupRepresentation
     44/>
     45
     46<PickupRepresentation
     47    name = "hugehealthpickup"
    6248    pickupName = "Huge Health Boost"
    6349    pickupDescription = "Adds a huge amout of health to the ship."
    6450    spawnerTemplate = "hugehealthpickupRepresentation"
    6551    inventoryRepresentation = "HugeHealth"
    66 >
    67     <pickup>
    68         <HealthPickup template=hugehealthpickup />
    69     </pickup>
    70 </PickupRepresentation>
    71 
    72 <PickupRepresentation
     52/>
     53
     54<PickupRepresentation
     55    name = "crazyhealthpickup"
    7356    pickupName = "Crazy Madness Health Boost"
    7457    pickupDescription = "Adds a crazy amout of health to the ship."
    7558    spawnerTemplate = "crazyhealthpickupRepresentation"
    7659    inventoryRepresentation = "CrazyMadnessHealth"
    77 >
    78     <pickup>
    79         <HealthPickup template=crazyhealthpickup />
    80     </pickup>
    81 </PickupRepresentation>
     60/>
    8261
    8362<!-- Meta pickups -->
    8463
    8564<PickupRepresentation
     65    name = "use"
    8666    pickupName = "Use Pickup"
    8767    pickupDescription = "Uses all pickups you have."
    8868    spawnerTemplate = "usepickupRepresentation"
    8969    inventoryRepresentation = "usePickup"
    90 >
    91     <pickup>
    92         <MetaPickup metaType="use" />
    93     </pickup>
    94 </PickupRepresentation>
    95 
    96 <PickupRepresentation
     70/>
     71
     72<PickupRepresentation
     73    name = "drop"
    9774    pickupName = "Drop Pickup"
    9875    pickupDescription = "Drops all pickups you have."
    9976    spawnerTemplate = "droppickupRepresentation"
    10077    inventoryRepresentation = "dropPickup"
    101 >
    102     <pickup>
    103         <MetaPickup metaType="drop" />
    104     </pickup>
    105 </PickupRepresentation>
     78/>
    10679
    10780<!-- Speed pickups -->
    10881
    10982<PickupRepresentation
     83    name = "smallspeedpickup"
    11084    pickupName = "Small Speed Boost"
    11185    pickupDescription = "Multiplies Speed of the Ship by a small amount."
    11286    spawnerTemplate = "smallspeedpickupRepresentation"
    11387    inventoryRepresentation = "SmallSpeed"
    114 >
    115     <pickup>
    116         <SpeedPickup template=smallspeedpickup />
    117     </pickup>
    118 </PickupRepresentation>
    119 
    120 <PickupRepresentation
     88/>
     89
     90<PickupRepresentation
     91    name = "mediumspeedpickup"
    12192    pickupName = "Medium Speed Boost"
    12293    pickupDescription = "Multiplies Speed of the Ship by a bigger amount."
    12394    spawnerTemplate = "mediumspeedpickupRepresentation"
    12495    inventoryRepresentation = "MediumSpeed"
    125 >
    126     <pickup>
    127         <SpeedPickup template=mediumspeedpickup />
    128     </pickup>
    129 </PickupRepresentation>
    130 
    131 <PickupRepresentation
     96/>
     97
     98<PickupRepresentation
     99    name = "hugespeedpickup"
    132100    pickupName = "Huge Speed Boost"
    133101    pickupDescription = "Multiplies Speed of the Ship by a huge amount."
    134102    spawnerTemplate = "hugespeedpickupRepresentation"
    135103    inventoryRepresentation = "HugeSpeed"
    136 >
    137     <pickup>
    138         <SpeedPickup template=hugespeedpickup />
    139     </pickup>
    140 </PickupRepresentation>
    141 
    142 <PickupRepresentation
     104/>
     105
     106<PickupRepresentation
     107    name = "smalljumppickup"
    143108    pickupName = "Small Jump Boost"
    144109    pickupDescription = "Boosts the Ship with a massive amount for a very short time."
    145110    spawnerTemplate = "smalljumppickupRepresentation"
    146111    inventoryRepresentation = "SmallSpeed"
    147 >
    148     <pickup>
    149         <SpeedPickup template=smalljumppickup />
    150     </pickup>
    151 </PickupRepresentation>
     112/>
    152113
    153114<!-- Invisible pickups -->
    154115
    155116<PickupRepresentation
     117    name = "smallinvisiblepickup"
    156118    pickupName = "Small Invisibility"
    157119    pickupDescription = "Makes you invisible for 5 seconds."
    158120    spawnerTemplate = "smallinvisiblepickupRepresentation"
    159121    inventoryRepresentation = "SmallInvisible"
    160 >
    161     <pickup>
    162         <InvisiblePickup template=smallinvisiblepickup />
    163     </pickup>
    164 </PickupRepresentation>
    165 
    166 <PickupRepresentation
     122/>
     123
     124<PickupRepresentation
     125    name = "mediuminvisiblepickup"
    167126    pickupName = "Medium Invisibility"
    168127    pickupDescription = "Makes you invisible for 10 seconds."
    169128    spawnerTemplate = "mediuminvisiblepickupRepresentation"
    170129    inventoryRepresentation = "MediumInvisible"
    171 >
    172     <pickup>
    173         <InvisiblePickup template=mediuminvisiblepickup />
    174     </pickup>
    175 </PickupRepresentation>
    176 
    177 <PickupRepresentation
     130/>
     131
     132<PickupRepresentation
     133    name = "hugeinvisiblepickup"
    178134    pickupName = "Huge Invisibility"
    179135    pickupDescription = "Makes you invisible for 20 seconds."
    180136    spawnerTemplate = "hugeinvisiblepickupRepresentation"
    181137    inventoryRepresentation = "HugeInvisible"
    182 >
    183     <pickup>
    184         <InvisiblePickup template=hugeinvisiblepickup />
    185     </pickup>
    186 </PickupRepresentation>
     138/>
    187139
    188140<!-- Pickup Collection pickups -->
    189141
    190142<PickupRepresentation
     143    name = "triplehealthspeedinvisibilitypickup"
    191144    pickupName = "Tri Pickup"
    192145    pickupDescription = "Adds health, speed and invisibility."
    193146    spawnerTemplate = "triplehealthspeedinvisibilitypickupRepresentation"
    194 >
    195     <pickup>
    196         <PickupCollection template=triplehealthspeedinvisibilitypickup />
    197     </pickup>
    198 </PickupRepresentation>
     147/>
    199148
    200149<!-- Drone Pickup -->
    201150
    202151<PickupRepresentation
     152    name = "dronepickup"
    203153    pickupName = "Drone Pickup"
    204154    pickupDescription = "Adds a Drone to the Player's Spaceship"
    205155    spawnerTemplate = "dronepickupRepresentation"
    206 >
    207     <pickup>
    208         <DronePickup template=dronepickup />
    209     </pickup>
    210 </PickupRepresentation>
     156/>
     157
     158<!-- DamageBoost Pickup -->
     159
     160<PickupRepresentation
     161    name = "smalldamageboostpickup"
     162    pickupName = "Small DamageBoost Pickup"
     163    pickupDescription = "Multiplies the ship damage with 2."
     164    spawnerTemplate = "smalldamageboostpickupRepresentation"
     165    inventoryRepresentation = "SmallDamageBoost"
     166/>
     167
     168<PickupRepresentation
     169    name = "mediumdamageboostpickup"
     170    pickupName = "Medium DamageBoost Pickup"
     171    pickupDescription = "Multiplies the ship damage with 5."
     172    spawnerTemplate = "mediumdamageboostpickupRepresentation"
     173    inventoryRepresentation = "MediumDamageBoost"
     174/>
     175
     176<PickupRepresentation
     177    name = "largedamageboostpickup"
     178    pickupName = "Large DamageBoost Pickup"
     179    pickupDescription = "Multiplies the ship damage with 7."
     180    spawnerTemplate = "largedamageboostpickupRepresentation"
     181    inventoryRepresentation = "LargeDamageBoost"
     182/>
    211183
    212184<!-- Shrink Pickup -->
    213185
    214186<PickupRepresentation
     187    name = "smallshrinkpickup"
    215188    pickupName = "Small Shrink"
    216189    pickupDescription = "Shrinks the Ship by a bit"
    217190    spawnerTemplate = "smallshrinkpickupRepresentation"
    218191    inventoryRepresentation = "SmallShrink"
    219 >
    220     <pickup>
    221         <ShrinkPickup template=smallshrinkpickup />
    222     </pickup>
    223 </PickupRepresentation>
    224 
    225 <PickupRepresentation
     192/>
     193
     194<PickupRepresentation
     195    name = "mediumshrinkpickup"
    226196    pickupName = "Medium Shrink"
    227197    pickupDescription = "Shrinks the Ship"
    228198    spawnerTemplate = "mediumshrinkpickupRepresentation"
    229199    inventoryRepresentation = "MediumShrink"
    230 >
    231     <pickup>
    232         <ShrinkPickup template=mediumshrinkpickup />
    233     </pickup>
    234 </PickupRepresentation>
    235 
    236 <PickupRepresentation
     200/>
     201
     202<PickupRepresentation
     203    name = "hugeshrinkpickup"
    237204    pickupName = "Huge Shrink"
    238205    pickupDescription = "Shrinks the Ship considerably"
    239206    spawnerTemplate = "hugeshrinkpickupRepresentation"
    240207    inventoryRepresentation = "HugeShrink"
    241 >
    242     <pickup>
    243         <ShrinkPickup template=hugeshrinkpickup />
    244     </pickup>
    245 </PickupRepresentation>
    246 
     208/>
  • code/trunk/data/levels/includes/weaponSettingsFPS.oxi

    r8755 r9348  
    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/trunk/data/levels/includes/weaponSettingsSpacecruiser.oxi

    • Property svn:eol-style set to native
  • code/trunk/data/levels/lastManStanding.oxw

    r9016 r9348  
    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" >
     
    5050                    <Model position="0,0,0" scale=140 mesh="asteroid_UV.mesh" shadow=true />
    5151                    <Model position="-160,40,28.4" scale=1 mesh="sphere.mesh" /><!--EasterEgg indicator-->
    52                     <PickupSpawner position="-160,40,17" triggerDistance="20" respawnTime="5" maxSpawnedItems="15"><!--EasterEgg : invisible pickup is hidden inside the asteroid -->
    53                         <pickup>
    54                             <InvisiblePickup template=hugeinvisiblepickup />
    55                         </pickup>
    56                     </PickupSpawner>
     52                    <PickupSpawner pickup=hugeinvisiblepickup position="-160,40,17" triggerDistance="20" respawnTime="5" maxSpawnedItems="15" /><!--EasterEgg : invisible pickup is hidden inside the asteroid -->
    5753                </attached>
    5854            </MovableEntity>
     
    7975      <attached>
    8076        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
    81         </Model>
     77        </Model>
    8278      </attached>
    8379      <collisionShapes>
     
    8985      <attached>
    9086        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i+3,6) + 1) ?>.mesh">
    91         </Model>
     87        </Model>
    9288      </attached>
    9389      <collisionShapes>
     
    9995      <attached>
    10096        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*5,6) + 1) ?>.mesh">
    101         </Model>
     97        </Model>
    10298      </attached>
    10399      <collisionShapes>
     
    109105      <attached>
    110106        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*13+1,6) + 1) ?>.mesh">
    111         </Model>
     107        </Model>
    112108      </attached>
    113109      <collisionShapes>
     
    119115      <attached>
    120116        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*17,6) + 1) ?>.mesh">
    121         </Model>
     117        </Model>
    122118      </attached>
    123119      <collisionShapes>
     
    130126      <attached>
    131127        <Model position="0,0,0" scale=25 mesh="ast6.mesh">
    132         </Model>
     128        </Model>
    133129      </attached>
    134130      <collisionShapes>
  • code/trunk/data/levels/lastTeamStanding.oxw

    r9016 r9348  
    1818 name         = "Last Team Standing"
    1919 description  = "testmap for gametype last team standing"
    20  gametype     =  "TeamGametype"
     20 gametype     =  "LastTeamStanding"
    2121>
    2222  <templates>
     
    2727  <Scene
    2828    ambientlight = "0.8, 0.8, 0.8"
    29     skybox       = "Orxonox/skypanoramagen1"
     29    skybox       = "Orxonox/skyBoxBasic"
    3030  >
    31   <?lua include("includes/notifications.oxi") ?>
    3231
    3332    <?lua
     
    4847    </StaticEntity>
    4948
    50     <PickupSpawner position="-160,60,17" triggerDistance="20" respawnTime="5" maxSpawnedItems="10"><!--EasterEgg-->
    51       <pickup>
    52         <InvisiblePickup template=hugeinvisiblepickup />
    53       </pickup>
    54     </PickupSpawner>
     49    <PickupSpawner pickup=hugeinvisiblepickup position="-160,60,17" triggerDistance="20" respawnTime="5" maxSpawnedItems="10" /><!--EasterEgg-->
    5550    <StaticEntity position="-160,60,28.4"><!--EasterEgg-Indicator-->
    5651      <attached>
     
    7469      <attached>
    7570        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
    76         </Model>
     71        </Model>
    7772      </attached>
    7873      <collisionShapes>
     
    8479      <attached>
    8580        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i+3,6) + 1) ?>.mesh">
    86         </Model>
     81        </Model>
    8782      </attached>
    8883      <collisionShapes>
     
    9489      <attached>
    9590        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*5,6) + 1) ?>.mesh">
    96         </Model>
     91        </Model>
    9792      </attached>
    9893      <collisionShapes>
     
    10499      <attached>
    105100        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*13+1,6) + 1) ?>.mesh">
    106         </Model>
     101        </Model>
    107102      </attached>
    108103      <collisionShapes>
     
    114109      <attached>
    115110        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*17,6) + 1) ?>.mesh">
    116         </Model>
     111        </Model>
    117112      </attached>
    118113      <collisionShapes>
     
    125120      <attached>
    126121        <Model position="0,0,0" scale=25 mesh="ast6.mesh">
    127         </Model>
     122        </Model>
    128123      </attached>
    129124      <collisionShapes>
  • code/trunk/data/levels/lastTeamStandingII.oxw

    r9016 r9348  
    2525  <Scene
    2626    ambientlight = "0.8, 0.8, 0.8"
    27     skybox       = "Orxonox/skypanoramagen1"
     27    skybox       = "Orxonox/skyBoxBasic"
    2828  >
    2929<!-- TODO:
  • code/trunk/data/levels/missionOne.oxw

    • Property svn:eol-style set to native
    r9257 r9348  
    11531153
    11541154<!-- @Objects: Pickup - find better place !! -->
    1155     <PickupSpawner position="-48650,700,100" triggerDistance="70" respawnTime="30" maxSpawnedItems="1">
    1156       <pickup>
    1157         <ShieldPickup template=hugeshieldpickup />
    1158       </pickup>
    1159     </PickupSpawner>
     1155    <PickupSpawner pickup=hugeshieldpickup position="-48650,700,100" triggerDistance="70" respawnTime="30" maxSpawnedItems="1" />
    11601156
    11611157
  • code/trunk/data/levels/notifications.oxw

    r9016 r9348  
    2121    <Scene
    2222        ambientlight = "0.5, 0.5, 0.5"
    23         skybox       = "Orxonox/skypanoramagen1"
     23        skybox       = "Orxonox/skyBoxBasic"
    2424    >
    2525
  • code/trunk/data/levels/old/CuboidSpaceStation.oxw

    r7679 r9348  
    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/trunk/data/levels/old/presentationPhysics.oxw

    r7679 r9348  
    1212  <Scene
    1313   ambientlight = "0.8, 0.8, 0.8"
    14    skybox       = "Orxonox/skypanoramagen1"
     14   skybox       = "Orxonox/skyBoxBasic"
    1515   gravity      = "0, -10, 0"
    1616  >
  • code/trunk/data/levels/old/princessAeryn.oxw

    r7679 r9348  
    1515    <Scene
    1616        ambientlight = "0.3, 0.3, 0.3"
    17         skybox       = "Orxonox/skypanoramagen1"
     17        skybox       = "Orxonox/skyBoxBasic"
    1818    >
    1919
  • code/trunk/data/levels/pickups.oxw

    r9016 r9348  
    3737    <!-- Shield pickups -->
    3838
    39     <PickupSpawner position="-25,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    40       <pickup>
    41         <ShieldPickup template=smallshieldpickup />
    42       </pickup>
    43     </PickupSpawner>
    44 
    45     <PickupSpawner position="0,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    46       <pickup>
    47         <ShieldPickup template=mediumshieldpickup />
    48       </pickup>
    49     </PickupSpawner>
    50 
    51     <PickupSpawner position="25,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    52       <pickup>
    53         <ShieldPickup template=hugeshieldpickup />
    54       </pickup>
    55     </PickupSpawner>
     39    <PickupSpawner pickup=smallshieldpickup position="-25,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     40    <PickupSpawner pickup=mediumshieldpickup position="0,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     41    <PickupSpawner pickup=hugeshieldpickup position="25,-25,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    5642
    5743    <!-- Health pickups -->
    5844
    59     <PickupSpawner position="-25,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    60       <pickup>
    61         <HealthPickup template=smallhealthpickup />
    62       </pickup>
    63     </PickupSpawner>
    64 
    65     <PickupSpawner position="0,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    66       <pickup>
    67         <HealthPickup template=mediumhealthpickup />
    68       </pickup>
    69     </PickupSpawner>
    70 
    71     <PickupSpawner position="25,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    72       <pickup>
    73         <HealthPickup template=hugehealthpickup />
    74       </pickup>
    75     </PickupSpawner>
    76 
    77     <PickupSpawner position="50,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    78       <pickup>
    79         <HealthPickup template=crazyhealthpickup />
    80       </pickup>
    81     </PickupSpawner>
     45    <PickupSpawner pickup=smallhealthpickup position="-25,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     46    <PickupSpawner pickup=mediumhealthpickup position="0,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     47    <PickupSpawner pickup=hugehealthpickup position="25,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     48    <PickupSpawner pickup=crazyhealthpickup position="50,0,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    8249
    8350    <!-- Speed pickups -->
    8451
    85     <PickupSpawner position="-25,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    86       <pickup>
    87         <SpeedPickup template=smallspeedpickup />
    88       </pickup>
    89     </PickupSpawner>
    90 
    91     <PickupSpawner position="0,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    92       <pickup>
    93         <SpeedPickup template=mediumspeedpickup />
    94       </pickup>
    95     </PickupSpawner>
    96 
    97     <PickupSpawner position="25,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    98       <pickup>
    99         <SpeedPickup template=hugespeedpickup />
    100       </pickup>
    101     </PickupSpawner>
    102 
    103     <PickupSpawner position="50,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    104       <pickup>
    105         <SpeedPickup template=smalljumppickup />
    106       </pickup>
    107     </PickupSpawner>
     52    <PickupSpawner pickup=smallspeedpickup position="-25,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
     53    <PickupSpawner pickup=mediumspeedpickup position="0,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
     54    <PickupSpawner pickup=hugespeedpickup position="25,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
     55    <PickupSpawner pickup=smalljumppickup position="50,25,-125" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
    10856
    10957    <!-- Invisible pickups -->
    11058
    111     <PickupSpawner position="-25,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    112       <pickup>
    113         <InvisiblePickup template=smallinvisiblepickup />
    114       </pickup>
    115     </PickupSpawner>
    116 
    117     <PickupSpawner position="0,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    118       <pickup>
    119         <InvisiblePickup template=mediuminvisiblepickup />
    120       </pickup>
    121     </PickupSpawner>
    122 
    123     <PickupSpawner position="25,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    124       <pickup>
    125         <InvisiblePickup template=hugeinvisiblepickup />
    126       </pickup>
    127     </PickupSpawner>
     59    <PickupSpawner pickup=smallinvisiblepickup position="-25,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     60    <PickupSpawner pickup=mediuminvisiblepickup position="0,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     61    <PickupSpawner pickup=hugeinvisiblepickup position="25,50,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    12862
    12963    <!-- Meta pickups -->
    13064
    131     <PickupSpawner position="-25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    132       <pickup>
    133         <MetaPickup metaType="use" />
    134       </pickup>
    135     </PickupSpawner>
    136 
    137     <PickupSpawner position="0,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    138       <pickup>
    139         <MetaPickup metaType="drop" />
    140       </pickup>
    141     </PickupSpawner>
    142 
    143     <PickupSpawner position="25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    144       <pickup>
    145         <MetaPickup metaType="destroy" />
    146       </pickup>
    147     </PickupSpawner>
    148 
    149     <PickupSpawner position="50,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    150       <pickup>
    151         <MetaPickup metaType="destroyCarrier" />
    152       </pickup>
    153     </PickupSpawner>
     65    <Template name=usemetapickup baseclass=MetaPickup>
     66      <MetaPickup representation="use" metaType="use" />
     67    </Template>
     68   
     69    <Template name=dropmetapickup baseclass=MetaPickup>
     70      <MetaPickup representation="drop" metaType="drop" />
     71    </Template>
     72   
     73    <Template name=destroymetapickup baseclass=MetaPickup>
     74      <MetaPickup metaType="destroy" />
     75    </Template>
     76   
     77    <Template name=destroycarriermetapickup baseclass=MetaPickup>
     78      <MetaPickup metaType="destroyCarrier" />
     79    </Template>
     80   
     81    <PickupSpawner pickup=usemetapickup position="-25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     82    <PickupSpawner pickup=dropmetapickup position="0,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     83    <PickupSpawner pickup=destroymetapickup position="25,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
     84    <PickupSpawner pickup=destroycarriermetapickup position="50,75,-125" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    15485
    15586    <!-- Pickup Collection pickups -->
    15687
    157     <PickupSpawner position="-50,25,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    158       <pickup>
    159         <PickupCollection template=triplehealthspeedinvisibilitypickup />
    160       </pickup>
    161     </PickupSpawner>
     88    <PickupSpawner pickup=triplehealthspeedinvisibilitypickup position="-50,25,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    16289   
    16390    <!-- Drone pickup -->
    16491   
    165     <PickupSpawner position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    166       <pickup>
    167         <DronePickup template=dronepickup />
    168       </pickup>
    169     </PickupSpawner>
     92    <PickupSpawner pickup=dronepickup position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     93   
     94    <!-- DamageBoost pickup -->
     95   
     96    <PickupSpawner pickup=smalldamageboostpickup position="-50,75,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     97    <PickupSpawner pickup=mediumdamageboostpickup position="-50,100,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
     98    <PickupSpawner pickup=largedamageboostpickup position="-50,125,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    17099   
    171100    <!-- Other pickups -->
     
    173102    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
    174103    <PickupRepresentation
     104      name = "MediumHealth"
    175105      pickupName = "Medium Health Pack"
    176106      pickupDescription = "Once used adds a medium amout of health to the ship."
    177107      spawnerTemplate = "mediumhealthpickupRepresentation"
    178108      inventoryRepresentation = "MediumHealth"
    179     >
    180       <pickup>
    181         <HealthPickup health=500 activationType=immediate healthRate=10 durationType=continuous />
    182       </pickup>
    183     </PickupRepresentation>
     109    />
    184110
    185     <PickupSpawner position="-50,0,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    186       <pickup>
    187         <HealthPickup health=500 activationType=immediate healthRate=10 durationType=continuous />
    188       </pickup>
    189     </PickupSpawner>
     111    <Template name=continuoushealthpickup baseclass=HealthPickup>
     112      <HealthPickup representation="MediumHealth" health=500 activationType=immediate healthRate=10 durationType=continuous />
     113    </Template>
     114   
     115    <PickupSpawner pickup=continuoushealthpickup position="-50,0,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    190116
    191     <PickupSpawner position="-25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    192       <pickup>
    193         <ShrinkPickup template ="smallshrinkpickup"/>
    194       </pickup>
    195     </PickupSpawner>
     117    <PickupSpawner pickup="smallshrinkpickup" position="-25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
     118    <PickupSpawner pickup="mediumshrinkpickup" position="0,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
     119    <PickupSpawner pickup="hugeshrinkpickup" position="25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
     120   
     121    <!-- @Objects: 4 boxes (uncontrolled pawns) -->
     122    <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 4" >
     123        <events>
     124          <visibility>
     125            <EventListener event="flying4" />
     126          </visibility>
     127        </events>
     128        <attached>
     129            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     130        </attached>
     131        <collisionShapes>
     132            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     133        </collisionShapes>
     134    </Pawn>
    196135
    197     <PickupSpawner position="0,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    198       <pickup>
    199         <ShrinkPickup template ="mediumshrinkpickup"/>
    200       </pickup>
    201     </PickupSpawner>
     136    <Pawn team=1 health=30 position="0,200,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 3">
     137        <events>
     138          <visibility>
     139            <EventListener event="flying4" />
     140          </visibility>
     141        </events>
     142        <attached>
     143           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     144        </attached>
     145        <collisionShapes>
     146            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     147        </collisionShapes>
     148    </Pawn>
    202149
    203     <PickupSpawner position="25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    204       <pickup>
    205         <ShrinkPickup template ="hugeshrinkpickup"/>
    206       </pickup>
    207     </PickupSpawner>
     150    <Pawn health=30 position="0,300,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1 RVName = "Box 2">
     151        <events>
     152          <visibility>
     153            <EventListener event="flying4" />
     154          </visibility>
     155        </events>
     156        <attached>
     157           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     158        </attached>
     159        <collisionShapes>
     160            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     161        </collisionShapes>
     162    </Pawn>
     163
     164    <Pawn health=30 position="0,400,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1 RVName = "Box 1">
     165        <events>
     166          <visibility>
     167            <EventListener event="flying4" />
     168          </visibility>
     169        </events>
     170        <attached>
     171            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     172        </attached>
     173        <collisionShapes>
     174           <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     175        </collisionShapes>
     176    </Pawn>
    208177
    209178    <!--StaticEntity position="0,-200,0" direction="0,-1,0" collisionType=static mass=500 friction=0.01 >
  • code/trunk/data/levels/pirateAttack.oxw

    r9016 r9348  
    3939    <Scene
    4040        ambientlight = "0.3, 0.3, 0.3"
    41         skybox       = "Orxonox/skypanoramagen1"
     41        skybox       = "Orxonox/skyBoxBasic"
    4242    >
    4343
  • code/trunk/data/levels/planets.oxw

    r9016 r9348  
    2121  <Scene
    2222    ambientlight = "0.8, 0.8, 0.8"
    23     skybox       = "Orxonox/skypanoramagen1"
     23    skybox       = "Orxonox/skyBoxBasic"
    2424  >
    2525
  • code/trunk/data/levels/pong.oxw

    r9016 r9348  
    5757  <?lua include("includes/notifications.oxi") ?>
    5858
    59   <WorldAmbientSound source="Ganymede.ogg" playOnLoad=true looping=true />
    60 
     59  <WorldAmbientSound source="Ganymede.ogg" looping="true" playOnLoad="true"/>
    6160  <PongBot />
    6261
    6362  <Scene
    6463   ambientlight = "0.5, 0.5, 0.5"
    65    skybox       = "Orxonox/skypanoramagen1"
     64   skybox       = "Orxonox/skyBoxBasic"
    6665  >
    6766    <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" />
     
    9291            <ParticleSpawner name=scoreeffect_left position="-120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
    9392
    94             <WorldSound name="scoreSound" position="0,0,0" source="sounds/pong_score.wav" >
     93<!-- TODO: Create a Pong Score Sound and include it here.
     94This WorldSound works, but doesn't make sense, since it is played together with ambient/moodDependedDirectory/Ganymede.ogg -->
     95            <!--WorldSound name="scoreSound" position="0,0,0" source="ambient/default/Earth.ogg" >
    9596              <events>
    9697                <play>
     
    9899                </play>
    99100              </events>
    100             </WorldSound>
     101            </WorldSound-->
    101102
    102103            <?lua
  • code/trunk/data/levels/portals.oxw

    r9016 r9348  
    2323  <Scene
    2424   ambientlight = "0.5, 0.5, 0.5"
    25    skybox       = "Orxonox/skypanoramagen1"
     25   skybox       = "Orxonox/skyBoxBasic"
    2626  >
    2727
     
    2929        <PortalEndPoint>
    3030            <attached>
    31                 <Billboard material="Portals/Default" />
     31                <Model mesh="Spacegate.mesh" yaw="90"/>
    3232            </attached>
    3333        </PortalEndPoint>
     
    3939    <PortalLink fromID="2" toID="1" />
    4040
    41     <!--PickupSpawner position="-200,0,0" triggerDistance="10" respawnTime="10" maxSpawnedItems="10">
    42       <pickup>
    43         <DronePickup template=dronepickup />
    44       </pickup>
    45     </PickupSpawner-->
     41    <!--PickupSpawner pickup=dronepickup position="-200,0,0" triggerDistance="10" respawnTime="10" maxSpawnedItems="10" /-->
    4642
    4743    <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" />
  • code/trunk/data/levels/presentation09.oxw

    r9016 r9348  
    2222  <Scene
    2323   ambientlight = "0.5, 0.5, 0.5"
    24    skybox       = "Orxonox/skypanoramagen1"
     24   skybox       = "Orxonox/skyBoxBasic"
    2525  >
    2626 
  • code/trunk/data/levels/presentation09b.oxw

    r9016 r9348  
    2626  <Scene
    2727   ambientlight = "0.5, 0.5, 0.5"
    28    skybox       = "Orxonox/skypanoramagen2"
     28   skybox       = "Orxonox/skyBoxSomeNebula"
    2929  >
    3030
     
    9494    </SpaceShip>
    9595
    96     <PickupSpawner position="-3800, 2500, 1500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    97       <pickup>
    98         <SpeedPickup template=smalljumppickup />
    99       </pickup>
    100     </PickupSpawner>
     96    <PickupSpawner pickup=smalljumppickup position="-3800, 2500, 1500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    10197
    10298    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
    10399    <PickupRepresentation
     100      name = "MediumHealth"
    104101      pickupName = "Medium Health Pack"
    105102      pickupDescription = "Once used adds a medium amout of health to the ship."
    106103      spawnerTemplate = "mediumhealthpickupRepresentation"
    107104      inventoryRepresentation = "MediumHealth"
    108     >
    109       <pickup>
    110         <HealthPickup health=100 activationType="onUse" durationType="once" />
    111       </pickup>
    112     </PickupRepresentation>
    113 
    114     <PickupSpawner position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    115       <pickup>
    116         <HealthPickup health=100 activationType=onUse durationType=once />
    117       </pickup>
    118     </PickupSpawner>
    119 
    120     <PickupSpawner position="2300, 4300, 2400" respawnTime="5" triggerDistance="20">
    121       <pickup>
    122         <HealthPickup template=mediumhealthpickup />
    123       </pickup>
    124     </PickupSpawner>
     105    />
     106
     107    <Template name=onusehealthpickup baseclass=HealthPickup>
     108      <HealthPickup representation="MediumHealth" health=100 activationType=onUse durationType=once />
     109    </Template>
     110
     111    <PickupSpawner pickup=onusehealthpickup position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
     112
     113    <PickupSpawner pickup=mediumhealthpickup position="2300, 4300, 2400" respawnTime="5" triggerDistance="20" />
    125114
    126115    <Billboard position="-2500, 2400, 1500" material="Examples/Flare" />
  • code/trunk/data/levels/presentationDM.oxw

    r9016 r9348  
    2424  <Scene
    2525   ambientlight = "0.5, 0.5, 0.5"
    26    skybox       = "Orxonox/skypanoramagen1"
     26   skybox       = "Orxonox/skyBoxBasic"
    2727  >
    2828    <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" />
  • code/trunk/data/levels/presentationFS10.oxw

    r9016 r9348  
    102102    <?lua end ?>
    103103
    104     <PickupSpawner position="500,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    105       <pickup>
    106         <DronePickup template=dronepickup />
    107       </pickup>
    108     </PickupSpawner>
     104    <PickupSpawner pickup=dronepickup position="500,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    109105
    110106    <!-- Shield pickups -->
    111107
    112     <PickupSpawner position="-25,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    113       <pickup>
    114         <ShieldPickup template=hugeshieldpickup />
    115       </pickup>
    116     </PickupSpawner>
     108    <PickupSpawner pickup=hugeshieldpickup position="-25,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    117109
    118110    <!-- Health pickups -->
    119111
    120     <PickupSpawner position="0,-75,-500" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
    121       <pickup>
    122         <HealthPickup template=hugehealthpickup />
    123       </pickup>
    124     </PickupSpawner>
     112    <PickupSpawner pickup=hugehealthpickup position="0,-75,-500" triggerDistance="10" respawnTime="30" maxSpawnedItems="10" />
    125113
    126114    <!-- Speed pickups -->
    127115
    128     <PickupSpawner position="25,-50,-500" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    129       <pickup>
    130         <SpeedPickup template=hugespeedpickup />
    131       </pickup>
    132     </PickupSpawner>
    133 
    134     <PickupSpawner position="50,-50,-500" triggerDistance="10" respawnTime="10" maxSpawnedItems="99">
    135       <pickup>
    136         <SpeedPickup template=smalljumppickup />
    137       </pickup>
    138     </PickupSpawner>
     116    <PickupSpawner pickup=hugespeedpickup position="25,-50,-500" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
     117    <PickupSpawner pickup=smalljumppickup position="50,-50,-500" triggerDistance="10" respawnTime="10" maxSpawnedItems="99" />
    139118
    140119    <!-- Invisible pickups -->
    141120
    142     <PickupSpawner position="0,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10">
    143       <pickup>
    144         <InvisiblePickup template=hugeinvisiblepickup />
    145       </pickup>
    146     </PickupSpawner>
     121    <PickupSpawner pickup=hugeinvisiblepickup position="0,-50,-500" triggerDistance="10" respawnTime="5" maxSpawnedItems="10" />
    147122
    148123    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
    149124    <PickupRepresentation
     125      name = "MediumHealth"
    150126      pickupName = "Medium Health Pack"
    151127      pickupDescription = "Once used adds a medium amout of health to the ship."
    152128      spawnerTemplate = "mediumhealthpickupRepresentation"
    153129      inventoryRepresentation = "MediumHealth"
    154     >
    155       <pickup>
    156         <HealthPickup health=50 activationType="onUse" durationType="once" />
    157       </pickup>
    158     </PickupRepresentation>
     130    />
    159131
    160     <PickupSpawner position="25,-75,-500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    161       <pickup>
    162         <HealthPickup health=50 activationType=onUse durationType=once />
    163       </pickup>
    164     </PickupSpawner>
     132    <Template name=onusehealthpickup baseclass=HealthPickup>
     133      <HealthPickup representation="MediumHealth" health=50 activationType=onUse durationType=once />
     134    </Template>
     135
     136    <PickupSpawner pickup=onusehealthpickup position="25,-75,-500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    165137
    166138  </Scene>
  • code/trunk/data/levels/presentationFS102.oxw

    r9016 r9348  
    2323  <Scene
    2424   ambientlight = "0.1, 0.1, 0.1"
    25    skybox       = "Orxonox/skypanoramagen1"
     25   skybox       = "Orxonox/skyBoxBasic"
    2626   gravity      = "0,-1000,0"
    2727   negativeWorldRange = "-100000, -100000, -100000"
  • code/trunk/data/levels/presentationFS10Ed.oxw

    r9016 r9348  
    2323  <Scene
    2424   ambientlight = "0.1, 0.1, 0.1"
    25    skybox       = "Orxonox/skypanoramagen1"
     25   skybox       = "Orxonox/skyBoxBasic"
    2626   gravity      = "0,-1000,0"
    2727   negativeWorldRange = "-100000, -100000, -100000"
     
    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/trunk/data/levels/presentationFS11.oxw

    r9016 r9348  
    422422    </SimpleNotification>
    423423
    424     <PickupSpawner position="-72487,420,-63" respawnTime="10" triggerDistance="20" maxSpawnedItems="5" active="false">
    425       <pickup>
    426         <ShrinkPickup template ="smallshrinkpickup"/>
    427       </pickup>
     424    <PickupSpawner pickup="smallshrinkpickup" position="-72487,420,-63" respawnTime="10" triggerDistance="20" maxSpawnedItems="5" active="false">
    428425      <events>
    429426        <activity>
  • code/trunk/data/levels/presentationHS09.oxw

    r9016 r9348  
    2727  <Scene
    2828   ambientlight = "0.6, 0.4, 0.4"
    29    skybox       = "Orxonox/skypanoramagen2"
     29   skybox       = "Orxonox/skyBoxSomeNebula"
    3030  >
    3131
     
    9797    <Billboard material="Test/Fog" position="-3800, 2500, 1500" alpha="0.1" color="1, 1, 1, 0.1" scale="0.5" />
    9898
    99     <PickupSpawner position="-3800, 2500, 1500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    100       <pickup>
    101         <SpeedPickup template=smalljumppickup />
    102       </pickup>
    103     </PickupSpawner>
     99    <PickupSpawner pickup=smalljumppickup position="-3800, 2500, 1500" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
    104100
    105101    <!-- PickupRepresentation for the pickup below, since it is not a standard pickup provided by pickups.oxi -->
    106102    <PickupRepresentation
     103      name = "MediumHealth"
    107104      pickupName = "Medium Health Pack"
    108105      pickupDescription = "Once used adds a medium amout of health to the ship."
    109106      spawnerTemplate = "mediumhealthpickupRepresentation"
    110107      inventoryRepresentation = "MediumHealth"
    111     >
    112       <pickup>
    113         <HealthPickup health=100 activationType="onUse" durationType="once" />
    114       </pickup>
    115     </PickupRepresentation>
    116 
    117     <PickupSpawner position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
    118       <pickup>
    119         <HealthPickup health=100 activationType=onUse durationType=once />
    120       </pickup>
    121     </PickupSpawner>
    122 
    123     <PickupSpawner position="2300, 4300, 2400" respawnTime="5" triggerDistance="20">
    124       <pickup>
    125         <HealthPickup template=mediumhealthpickup />
    126       </pickup>
    127     </PickupSpawner>
     108    />
     109
     110    <Template name=onusehealthpickup baseclass=HealthPickup>
     111      <HealthPickup representation="MediumHealth" health=100 activationType=onUse durationType=once />
     112    </Template>
     113
     114    <PickupSpawner pickup=onusehealthpickup position="-4150,2750,1550" respawnTime="60" triggerDistance="20" maxSpawnedItems="5" />
     115
     116    <PickupSpawner pickup=mediumhealthpickup position="2300, 4300, 2400" respawnTime="5" triggerDistance="20" />
    128117
    129118    <Billboard position="-2500, 2400, 1500" material="Examples/Flare" />
  • code/trunk/data/levels/presentationHS11.oxw

    • Property svn:eol-style set to native
    r9016 r9348  
     1<!--  -->
     2
     3
    14<LevelInfo
    25 name = "Presentation HS 2011"
    3  description = "Oxonox Proudly Presents New Features From HS 2011"
     6 description = "New Features: Asteroid field/belt generator; Formationflight; HUD (Enemyhealthbar, displaying Names)"
    47 tags = "presentation"
    58/>
     
    7982        </events>
    8083    </SimpleNotification>
     84
     85
    8186
    8287
     
    131136<?lua end ?>
    132137
    133 
    134 
    135 
    136 
    137 
     138<!-- @Triggers: "hintX" <->  delayed LetsGo -->
     139    <EventTrigger name="hint1" activations="1" stayactive="true" delay=4.2>
     140      <events>
     141        <trigger>
     142          <EventListener event="LetsGo" />
     143        </trigger>
     144      </events>
     145    </EventTrigger>
     146    <EventTrigger name="hint2" activations="1" stayactive="true" delay=8.4>
     147      <events>
     148        <trigger>
     149          <EventListener event="LetsGo" />
     150        </trigger>
     151      </events>
     152    </EventTrigger>
     153    <EventTrigger name="hint3" activations="1" stayactive="true" delay=12.6>
     154      <events>
     155        <trigger>
     156          <EventListener event="LetsGo" />
     157        </trigger>
     158      </events>
     159    </EventTrigger>
     160    <EventTrigger name="hint4" activations="1" stayactive="true" delay=16.8>
     161      <events>
     162        <trigger>
     163          <EventListener event="LetsGo" />
     164        </trigger>
     165      </events>
     166    </EventTrigger>
     167    <EventTrigger name="hint5" activations="1" stayactive="true" delay=21>
     168      <events>
     169        <trigger>
     170          <EventListener event="LetsGo" />
     171        </trigger>
     172      </events>
     173    </EventTrigger>
     174    <EventTrigger name="hint6" activations="1" stayactive="true" delay=25.2>
     175      <events>
     176        <trigger>
     177          <EventListener event="LetsGo" />
     178        </trigger>
     179      </events>
     180    </EventTrigger>
     181
     182
     183
     184    <SimpleNotification message="Make bots follow you: Press (1)"  broadcast="true">
     185        <events>
     186            <trigger>
     187                <EventListener event=hint1 />
     188            </trigger>
     189        </events>
     190    </SimpleNotification>
     191
     192    <SimpleNotification message="Toggle group behaviour: Press (1)"  broadcast="true">
     193        <events>
     194            <trigger>
     195                <EventListener event=hint2 />
     196            </trigger>
     197        </events>
     198    </SimpleNotification>
     199
     200    <SimpleNotification message="Tell the bots to defend you: Press (2)"  broadcast="true">
     201        <events>
     202            <trigger>
     203                <EventListener event=hint3 />
     204            </trigger>
     205        </events>
     206    </SimpleNotification>
     207
     208    <SimpleNotification message="Make them attack opponents: Press (2) again"  broadcast="true">
     209        <events>
     210            <trigger>
     211                <EventListener event=hint4 />
     212            </trigger>
     213        </events>
     214    </SimpleNotification>
     215
     216    <SimpleNotification message="Let the bots behave 'normal': Press (2) again"  broadcast="true">
     217        <events>
     218            <trigger>
     219                <EventListener event=hint5 />
     220            </trigger>
     221        </events>
     222    </SimpleNotification>
     223
     224    <SimpleNotification message="Have a look at the console to verify this."  broadcast="true">
     225        <events>
     226            <trigger>
     227                <EventListener event=hint6 />
     228            </trigger>
     229        </events>
     230    </SimpleNotification>
    138231
    139232<!-- Generate asteroid field and asteroid belt -->
    140 <!-- asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog) --> 
     233<!-- asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog) -->
    141234    <?lua
    142         dofile("includes/asteroidField.lua")
    143         asteroidBelt(20000, 0, 13000, -48, -34, 70, 100, 200, 22000, 20000, 500, 1)
     235        dofile("includes/asteroidField.lua")
     236        asteroidBelt(20000, 0, 13000, -48, -34, 70, 100, 200, 22000, 20000, 500, 1)
    144237
    145238    ?>
  • code/trunk/data/levels/princessAeryn.oxw

    r9016 r9348  
    2626  <Scene
    2727    ambientlight = "0.3, 0.3, 0.3"
    28     skybox     = "Orxonox/skypanoramagen1"
     28    skybox     = "Orxonox/skyBoxBasic"
    2929  >
    3030
  • code/trunk/data/levels/screenshot.oxw

    r9016 r9348  
    2525  <Scene
    2626   ambientlight = "0.7, 0.6, 0.6"
    27    skybox       = "Orxonox/skypanoramagen1"
     27   skybox       = "Orxonox/skyBoxBasic"
    2828  >
    2929    <!--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" /-->
  • code/trunk/data/levels/teamBaseMatch.oxw

    r9016 r9348  
    2626  <Scene
    2727   ambientlight = "0.5, 0.5, 0.5"
    28    skybox       = "Orxonox/skypanoramagen1"
     28   skybox       = "Orxonox/skyBoxBasic"
    2929  >
    3030    <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" />
  • code/trunk/data/levels/teamDeathMatch.oxw

    r9016 r9348  
    2525  <Scene
    2626   ambientlight = "0.7, 0.6, 0.6"
    27    skybox       = "Orxonox/skypanoramagen1"
     27   skybox       = "Orxonox/skyBoxBasic"
    2828  >
    2929    <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" />
  • code/trunk/data/levels/templates/FPS.oxt

    r8858 r9348  
    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/trunk/data/levels/templates/pickupRepresentationTemplates.oxt

    r8706 r9348  
    1717</Template>
    1818
    19 <Template name=smallshieldpickup>
     19<Template name=smallshieldpickup baseclass=ShieldPickup>
    2020  <ShieldPickup
     21    representation = "smallshieldpickup"
    2122    duration = 10
    2223    shieldabsorption = 0.7
     
    4344</Template>
    4445
    45 <Template name=mediumshieldpickup>
     46<Template name=mediumshieldpickup baseclass=ShieldPickup>
    4647  <ShieldPickup
     48    representation = "mediumshieldpickup"
    4749    duration = 30
    4850    shieldabsorption = 0.8
     
    7072</Template>
    7173
    72 <Template name=hugeshieldpickup>
     74<Template name=hugeshieldpickup baseclass=ShieldPickup>
    7375  <ShieldPickup
     76    representation = "hugeshieldpickup"
    7477    duration = 60
    7578    shieldabsorption = 0.95
     
    98101</Template>
    99102
    100 <Template name=smallhealthpickup>
     103<Template name=smallhealthpickup baseclass=HealthPickup>
    101104  <HealthPickup
     105    representation = "smallhealthpickup"
    102106    health = 10
    103107    healthType = "limited"
     
    123127</Template>
    124128
    125 <Template name=mediumhealthpickup>
     129<Template name=mediumhealthpickup baseclass=HealthPickup>
    126130  <HealthPickup
     131    representation = "mediumhealthpickup"
    127132    health = 50
    128133    healthType = "limited"
     
    148153</Template>
    149154
    150 <Template name=hugehealthpickup>
     155<Template name=hugehealthpickup baseclass=HealthPickup>
    151156  <HealthPickup
     157    representation = "hugehealthpickup"
    152158    health = 100
    153159    healthType = "limited"
     
    173179</Template>
    174180
    175 <Template name=crazyhealthpickup>
     181<Template name=crazyhealthpickup baseclass=HealthPickup>
    176182  <HealthPickup
     183    representation = "crazyhealthpickup"
    177184    health = 1000
    178185    healthType = "permanent"
     
    216223</Template>
    217224
     225<!-- DamageBoost pickups -->
     226
     227<Template name=smalldamageboostpickupRepresentation>
     228    <PickupRepresentation>
     229        <spawner-representation>
     230            <StaticEntity>
     231                <attached>
     232                    <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
     233                        <attached>
     234                            <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageSmall" scale=0.7 />
     235                        </attached>
     236                    </Billboard>
     237                </attached>
     238            </StaticEntity>
     239        </spawner-representation>
     240    </PickupRepresentation>
     241</Template>
     242
     243<Template name=smalldamageboostpickup baseclass=DamageBoostPickup>
     244  <DamageBoostPickup
     245    representation = "smalldamageboostpickup"
     246    duration = 10.0
     247    damageMultiplier = 2.0
     248    activationType = "immediate"
     249    durationType = "continuous"
     250  />
     251</Template>
     252
     253<Template name=mediumdamageboostpickupRepresentation>
     254    <PickupRepresentation>
     255        <spawner-representation>
     256            <StaticEntity>
     257                <attached>
     258                    <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
     259                        <attached>
     260                            <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageMedium" scale=0.7 />
     261                        </attached>
     262                    </Billboard>
     263                </attached>
     264            </StaticEntity>
     265        </spawner-representation>
     266    </PickupRepresentation>
     267</Template>
     268
     269<Template name=mediumdamageboostpickup baseclass=DamageBoostPickup>
     270  <DamageBoostPickup
     271    representation = "mediumdamageboostpickup"
     272    duration = 10.0
     273    damageMultiplier = 5.0
     274    activationType = "immediate"
     275    durationType = "continuous"
     276  />
     277</Template>
     278
     279<Template name=largedamageboostpickupRepresentation>
     280    <PickupRepresentation>
     281        <spawner-representation>
     282            <StaticEntity>
     283                <attached>
     284                    <Billboard position="0,0,0" colour="0.95,0.10,0.05" material="Sphere2" scale=0.1 >
     285                        <attached>
     286                            <Billboard position="0,0,0" colour="0.30,0.30,0.30" material="damageLarge" scale=0.7 />
     287                        </attached>
     288                    </Billboard>
     289                </attached>
     290            </StaticEntity>
     291        </spawner-representation>
     292    </PickupRepresentation>
     293</Template>
     294
     295<Template name=largedamageboostpickup baseclass=DamageBoostPickup>
     296  <DamageBoostPickup
     297    representation = "largedamageboostpickup"
     298    duration = 10.0
     299    damageMultiplier = 7.0
     300    activationType = "immediate"
     301    durationType = "continuous"
     302  />
     303</Template>
     304
     305
    218306<!-- Speed pickups -->
    219307
     
    234322</Template>
    235323
    236 <Template name=smallspeedpickup>
     324<Template name=smallspeedpickup baseclass=SpeedPickup>
    237325  <SpeedPickup
     326    representation = "smallspeedpickup"
    238327    duration = 10.0
    239328    speedAdd = 0.0
     
    260349</Template>
    261350
    262 <Template name=mediumspeedpickup>
     351<Template name=mediumspeedpickup baseclass=SpeedPickup>
    263352  <SpeedPickup
     353    representation = "mediumspeedpickup"
    264354    duration = 10.0
    265355    speedAdd = 0.0
     
    286376</Template>
    287377
    288 <Template name=hugespeedpickup>
     378<Template name=hugespeedpickup baseclass=SpeedPickup>
    289379  <SpeedPickup
     380    representation = "hugespeedpickup"
    290381    duration = 10.0
    291382    speedAdd = 0.0
     
    312403</Template>
    313404
    314 <Template name=smalljumppickup>
     405<Template name=smalljumppickup baseclass=SpeedPickup>
    315406  <SpeedPickup
     407    representation = "smalljumppickup"
    316408    duration = 0.7
    317409    speedAdd = 5000.0
     
    340432</Template>
    341433
    342 <Template name=smallinvisiblepickup>
     434<Template name=smallinvisiblepickup baseclass=InvisiblePickup>
    343435  <InvisiblePickup
     436    representation = "smallinvisiblepickup"
    344437    duration = 5.0
    345438    activaionType = "immediate"
     
    364457</Template>
    365458
    366 <Template name=mediuminvisiblepickup>
     459<Template name=mediuminvisiblepickup baseclass=InvisiblePickup>
    367460  <InvisiblePickup
     461    representation = "mediuminvisiblepickup"
    368462    duration = 10.0
    369463    activaionType = "immediate"
     
    388482</Template>
    389483
    390 <Template name=hugeinvisiblepickup>
     484<Template name=hugeinvisiblepickup baseclass=InvisiblePickup>
    391485  <InvisiblePickup
     486    representation = "hugeinvisiblepickup"
    392487    duration = 20.0
    393488    activaionType = "immediate"
     
    412507</Template>
    413508
    414 <Template name=smallshrinkpickup>
    415   <InvisiblePickup
     509<Template name=smallshrinkpickup baseclass=ShrinkPickup>
     510  <ShrinkPickup
     511    representation = "smallshrinkpickup"
    416512    duration = 10.0
    417513    shrinkFactor = 2.5
     
    437533</Template>
    438534
    439 <Template name=mediumshrinkpickup>
    440   <InvisiblePickup
     535<Template name=mediumshrinkpickup baseclass=ShrinkPickup>
     536  <ShrinkPickup
     537    representation = "mediumshrinkpickup"
    441538    duration = 30.0
    442539    shrinkFactor = 5.0
     
    462559</Template>
    463560
    464 <Template name=hugeshrinkpickup>
    465   <InvisiblePickup
     561<Template name=hugeshrinkpickup baseclass=ShrinkPickup>
     562  <ShrinkPickup
     563    representation = "hugeshrinkpickup"
    466564    duration = 60.0
    467565    shrinkFactor = 10.0
     
    491589</Template>
    492590
    493 <Template name=triplehealthspeedinvisibilitypickup>
    494     <PickupCollection>
     591<Template name=triplehealthspeedinvisibilitypickup baseclass=PickupCollection>
     592    <PickupCollection
     593        representation = "triplehealthspeedinvisibilitypickup"
     594    >
    495595        <pickupables>
    496596            <HealthPickup template=mediumhealthpickup />
     
    551651</Template>
    552652
    553 <Template name=dronepickup>
    554     <DronePickup droneTemplate=droneTemplate />
    555 </Template>
    556 
     653<Template name=dronepickup baseclass=DronePickup>
     654    <DronePickup representation=dronepickup droneTemplate=droneTemplate />
     655</Template>
     656
  • code/trunk/data/levels/templates/spaceshipSpacecruiser.oxt

    • Property svn:eol-style set to native
  • code/trunk/data/levels/testStars.oxw

    r9016 r9348  
    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/trunk/data/levels/testSwallow.oxw

    r9016 r9348  
    2323  <Scene
    2424   ambientlight = "0.5, 0.5, 0.5"
    25    skybox       = "Orxonox/skypanoramagen1"
     25   skybox       = "Orxonox/skyBoxBasic"
    2626  >
    2727    <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" />
  • code/trunk/data/levels/tetris.oxw

    r9016 r9348  
    99  include("HUDTemplates3.oxo")
    1010  include("stats.oxo")
     11  include("tetrisHUD.oxo")
    1112  include("templates/lodInformation.oxt")
     13  include("templates/spaceshipAssff.oxt")
     14  include("templates/spaceshipGhost.oxt")
     15  include("templates/spaceshipPirate.oxt")
     16  include("templates/spaceshipSwallow.oxt")
     17  include("templates/spaceshipTransporter.oxt")
     18  include("templates/spaceshipH2.oxt")
    1219?>
    1320
     
    1623    <camerapositions>
    1724      <CameraPosition position="55,75,200" absolute=true />
    18       <CameraPosition position="0,50,160" drag=true mouselook=true />
    19       <CameraPosition position="0,50,0" pitch=-90 drag=true mouselook=true />
    2025    </camerapositions>
    2126  </TetrisStone>
     
    2530  <TetrisStone camerapositiontemplate=tetrisstonecameras>
    2631    <attached>
    27       <Model position="0,0,0" mesh="crate.mesh" scale=1 />
     32      <Model position="0,0,0" mesh="crate.mesh" scale=0.9 />
    2833    </attached>
    2934  </TetrisStone>
    3035</Template>
     36
     37
     38
     39<Template name=tetrisbrickcameras defaults=0>
     40  <TetrisBrick>
     41    <camerapositions>
     42      <CameraPosition position="55,75,200" absolute=true />
     43      <!--CameraPosition position="0,50,160" drag=true mouselook=true />
     44      <CameraPosition position="0,50,0" pitch=-90 drag=true mouselook=true /-->
     45    </camerapositions>
     46  </TetrisBrick>
     47</Template>
     48
     49<Template name=tetrisbrick>
     50  <TetrisBrick camerapositiontemplate=tetrisbrickcameras>
     51  </TetrisBrick>
     52</Template>
     53
    3154
    3255<Level
     
    4063  <Scene
    4164   ambientlight = "0.5, 0.5, 0.5"
    42    skybox       = "Orxonox/skypanoramagen1"
     65   skybox       = "Orxonox/skyBoxBasic"
    4366  >
     67<!--luke_grey_-_hypermode.ogg allgorythm-lift_up.ogg Fight1.ogg -->
     68    <WorldAmbientSound
     69      source="Ganymede.ogg"
     70      looping="true"
     71      playOnLoad="true"
     72    />
     73
    4474    <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" />
     75
    4576
    4677    <?lua
     
    5081    <?lua end ?>
    5182
    52     <TetrisCenterpoint name=tetriscenter width=11 height=15 stoneSize=10 stoneTemplate=tetrisstone stoneSpeed=10 position="-55,-75,0">
     83    <TetrisCenterpoint name=tetriscenter width=11 height=15 stoneSize=10 stoneTemplate=tetrisstone brickTemplate=tetrisbrick stoneSpeed=10 position="-55,-75,0">
    5384        <attached>
    5485            <Model position="55,-1,0" mesh="cube.mesh" scale3D="57,1,11" />
     
    5687            <Model position="111,76,0" mesh="cube.mesh" scale3D="1,76,1" />
    5788        </attached>
     89        <!--collisionShapes>
     90            <BoxCollisionShape position="55,-1,0"  halfExtents="57,1,11" />
     91            <BoxCollisionShape position="-1,76,0"  halfExtents="1,76,1" />
     92            <BoxCollisionShape position="111,76,0" halfExtents="1,76,1" />
     93        </collisionShapes-->
    5894    </TetrisCenterpoint>
    5995
     96<!-- ------------ insert eye candy here  ---------------- -->
     97
     98<!-- asteroidBelt(centerX, centerY, centerZ, yaw, pitch, segments, minSize, maxSize, radius0, radius1, count, fog) -->
     99<!-- DONT DARE TO TURN THE FOG ON, whithout finding a better belt position -->
     100    <?lua
     101        dofile("includes/asteroidField.lua")
     102        asteroidBelt(10000, 0, 0, -40, -90, 70, 100, 200, 24000, 20000, 500, 0)
     103
     104    ?>
     105<!-- -------- 4 spaceships rotating around the tetris field --------- -->
     106    <SpaceShip position="1000,-75,1" lookat="0,0,0">
     107      <templates>
     108        <Template link=spaceshipswallow />
     109      </templates>
     110      <controller>
     111        <WaypointController team=10 accuracy=200>
     112          <waypoints>
     113            <Model mesh="cube.mesh" scale=0 position="1000,-75,0" />
     114            <Model mesh="cube.mesh" scale=0 position="650,-75,650" />
     115            <Model mesh="cube.mesh" scale=0 position="-55,-75,1000" />
     116            <Model mesh="cube.mesh" scale=0 position="-700,-75,650" />
     117            <Model mesh="cube.mesh" scale=0 position="-1000,-75,0" />
     118            <Model mesh="cube.mesh" scale=0 position="-700,-75,-650" />
     119            <Model mesh="cube.mesh" scale=0 position="-55,-75,-1000" />
     120            <Model mesh="cube.mesh" scale=0 position="650,-75,-650" />
     121          </waypoints>
     122        </WaypointController>
     123      </controller>
     124    </SpaceShip>
     125   
     126   <SpaceShip position="-500,-500,-400" lookat="0,0,0">
     127      <templates>
     128        <Template link=spaceshippirate />
     129      </templates>
     130      <controller>
     131        <WaypointController team=10>
     132          <waypoints>
     133            <Model mesh="cube.mesh" scale=0 position="-1000,-200,0" />
     134            <Model mesh="cube.mesh" scale=0 position="-700,-150,650" />
     135            <Model mesh="cube.mesh" scale=0 position="-55,-75,1000" />
     136            <Model mesh="cube.mesh" scale=0 position="650,100,650" />         
     137            <Model mesh="cube.mesh" scale=0 position="1000,150,0" />
     138            <Model mesh="cube.mesh" scale=0 position="650,100,-650" />
     139            <Model mesh="cube.mesh" scale=0 position="-55,0,-1000" />
     140            <Model mesh="cube.mesh" scale=0 position="-700,-100,-650" />
     141          </waypoints>
     142        </WaypointController>
     143      </controller>
     144    </SpaceShip>
     145   
     146       <SpaceShip position="-700,200,651" lookat="1,0,0">
     147      <templates>
     148        <Template link=spaceshipghost />
     149      </templates>
     150      <controller>
     151        <WaypointController team=10 accuracy=300>
     152          <waypoints>
     153            <Model mesh="cube.mesh" scale=0 position="-700,200,650" />
     154            <Model mesh="cube.mesh" scale=0 position="-55,100,1000" />
     155            <Model mesh="cube.mesh" scale=0 position="650,0,650" />         
     156            <Model mesh="cube.mesh" scale=0 position="1000,-100,0" />
     157            <Model mesh="cube.mesh" scale=0 position="650,0,-650" />
     158            <Model mesh="cube.mesh" scale=0 position="-55,100,-1000" />
     159            <Model mesh="cube.mesh" scale=0 position="-700,200,-650" />
     160            <Model mesh="cube.mesh" scale=0 position="-1000,300,0" />
     161          </waypoints>
     162        </WaypointController>
     163      </controller>
     164    </SpaceShip>
     165   
     166    <SpaceShip position="1000,-75,0" lookat="0,0,0">
     167      <templates>
     168        <Template link=spaceshipHtwo />
     169      </templates>
     170      <controller>
     171        <WaypointController team=10>
     172          <waypoints>
     173            <Model mesh="cube.mesh" scale=0 position="400,240,400" />
     174            <Model mesh="cube.mesh" scale=0 position="-55,240,700" />
     175            <Model mesh="cube.mesh" scale=0 position="-500,240,400" />
     176            <Model mesh="cube.mesh" scale=0 position="-700,240,0" />
     177            <Model mesh="cube.mesh" scale=0 position="-500,240,-400" />
     178            <Model mesh="cube.mesh" scale=0 position="-55,240,-700" />
     179            <Model mesh="cube.mesh" scale=0 position="400,240,-400" />
     180            <Model mesh="cube.mesh" scale=0 position="700,240,0" />
     181          </waypoints>
     182        </WaypointController>
     183      </controller>
     184    </SpaceShip>
     185   
     186   
     187   
    60188  </Scene>
    61189</Level>
  • code/trunk/data/levels/theTimeMachine.oxw

    r9016 r9348  
    3939   angularDamping    = 0.9999999
    4040  >
     41    <engines>
     42      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipassffengine />
     43      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipassffengine />
     44    </engines>
    4145    <attached>
    4246      <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />
     
    7175    <Scene
    7276        ambientlight="0.8,0.8,0.8"
    73         skybox="Orxonox/skypanoramagen2"
     77        skybox="Orxonox/skyBoxSomeNebula"
    7478    >
    7579
  • code/trunk/data/levels/tutorial.oxw

    r9016 r9348  
    22 name = "Coding Tutorial"
    33 description = "Level for the coding tutorial."
    4  tags = "tutorial"
     4 tags = "tutorial, shipselection"
    55 screenshot = "codingtutorial.png"
     6 startingships = "spaceshipassff, spaceshipghost, spaceshipspacecruiser"
    67/>
    78
     
    1011  include("stats.oxo")
    1112  include("templates/spaceshipAssff.oxt")
     13  include("templates/spaceshipGhost.oxt")
     14  include("templates/spaceshipSpacecruiser.oxt")
    1215  include("templates/lodInformation.oxt")
    1316?>
     
    2124  <Scene
    2225   ambientlight = "0.5, 0.5, 0.5"
    23    skybox       = "Orxonox/skypanoramagen1"
     26   skybox       = "Orxonox/skyBoxBasic"
    2427  >
    25 
    26 
    27 
    28 
    2928<Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">
    3029  <attached>
     
    5352      for i = 1, 10, 1 do
    5453    ?>
    55       <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
     54      <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=shipselection />
    5655    <?lua end ?>
    5756
  • code/trunk/data/levels/underAttack.oxw

    r9257 r9348  
    1212  include("templates/lodInformation.oxt")
    1313?>
    14 <!--OUTDATED: include("underAttackHUD.oxo") -->
    1514
    1615<Level
     
    2423  <Scene
    2524   ambientlight = "0.5, 0.5, 0.5"
    26    skybox       = "Orxonox/skypanoramagen1"
     25   skybox       = "Orxonox/skyBoxBasic"
    2726  >
    2827    <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" />
  • code/trunk/data/levels/waypoints.oxw

    r9016 r9348  
    2323  <Scene
    2424   ambientlight = "0.5, 0.5, 0.5"
    25    skybox       = "Orxonox/skypanoramagen1"
     25   skybox       = "Orxonox/skyBoxBasic"
    2626  >
    2727    <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" />
  • code/trunk/data/overlays/dynamicMatchHUD.oxo

    r7679 r9348  
    22  <OverlayGroup name="DynamicmatcHUD" scale = "1, 1">
    33   
     4    <!--OverlayText
     5     position  = "0.02, 0.02"
     6     pickpoint = "0.0, 0.0"
     7     font      = "ShareTechMono"
     8     textsize  = 0.04
     9     colour    = "1.0, 1.0, 1.0, 1.0"
     10     align     = "left"
     11     caption   = "Target:"
     12    />
     13
     14    <OverlayText
     15     position  = "0.02, 0.055"
     16     pickpoint = "0.0, 0.0"
     17     font      = "ShareTechMono"
     18     textsize  = 0.04
     19     colour    = "1.0, 1.0, 1.0, 1.0"
     20     align     = "left"
     21     caption   = "Score:"
     22    /-->
     23
     24
    425 <GametypeStaticMessage
    526   name     = "staticmessage"
  • code/trunk/data/overlays/lastManStandingHUD.oxo

    r8178 r9348  
    11<Template name="LastmanstandingHUD">
    2   <OverlayGroup name="DynamicmatcHUD" scale = "1, 1">
    3    
    4  <!--GametypeStaticMessage
    5    name     = "staticmessage"
    6    position = "0.5, 0.01"
    7    font     = "VeraMono"
    8    caption  = ""
    9    textsize = 0.033
    10    colour   = "1.0, 1.0, 0.5, 1.0"
    11    align    = "center"
    12   /-->
    13 
    14 <GametypeFadingMessage
    15      name     = "fadingmessage"
    16      position = "0.5, 0.01"
    17      font     = "VeraMono"
    18      textsize = 0.04
    19      colour   = "1.0, 1.0, 0.5, 1.0"
    20      align    = "center"
    21     />
    22 
    23     <OverlayText
    24      position  = "0.02, 0.02"
    25      pickpoint = "0.0, 0.0"
    26      font      = "ShareTechMono"
    27      textsize  = 0.04
    28      colour    = "1.0, 1.0, 1.0, 1.0"
    29      align     = "left"
    30      caption   = "Lives:   "
    31     />
    32 
     2  <OverlayGroup name="LastmanstandingHUD" scale = "1, 1">
    333    <LastManStandingInfos
    344     position  = "0.14, 0.02"
     
    4111     showlives     = true
    4212     showplayers     = false
     13    />
     14    <OverlayText
     15     position  = "0.02, 0.02"
     16     pickpoint = "0.0, 0.0"
     17     font      = "ShareTechMono"
     18     textsize  = 0.04
     19     colour    = "1.0, 1.0, 1.0, 1.0"
     20     align     = "left"
     21     caption   = "Lives:   "
    4322    />
    4423
  • code/trunk/data/overlays/lastTeamStandingHUD.oxo

    r8351 r9348  
    11<Template name="lastTeamStandingHUD">
    22  <OverlayGroup name="lastTeamStandingHUD" scale = "1, 1">
     3    <LastTeamStandingInfos
     4     position  = "0.14, 0.02"
     5     pickpoint = "0.0, 0.0"
     6     font      = "ShareTechMono"
     7     textsize  = 0.04
     8     colour    = "1.0, 1.0, 1.0, 1.0"
     9     align     = "left"
    310
    4 <GametypeFadingMessage
    5      name     = "fadingmessage"
    6      position = "0.5, 0.01"
    7      font     = "VeraMono"
    8      textsize = 0.04
    9      colour   = "1.0, 1.0, 0.5, 1.0"
    10      align    = "center"
     11     showlives     = true
     12     showteams     = false
    1113    />
    1214
     
    1921     align     = "left"
    2022     caption   = "Lives:   "
    21     />
    22 
    23     <LastTeamStandingInfos
    24      position  = "0.14, 0.02"
    25      pickpoint = "0.0, 0.0"
    26      font      = "ShareTechMono"
    27      textsize  = 0.04
    28      colour    = "1.0, 1.0, 1.0, 1.0"
    29      align     = "left"
    30 
    31      showlives     = true
    32      showteams     = false
    3323    />
    3424
  • code/trunk/doc/api/groups/Portals.dox

    • Property svn:eol-style set to native
  • code/trunk/doc/api/groups/Weapons.dox

    • Property svn:eol-style set to native
  • code/trunk/src/BuildUnitsConfigGCC.cmake

    • Property svn:eol-style set to native
  • code/trunk/src/BuildUnitsConfigMSVC.cmake

    • Property svn:eol-style set to native
  • code/trunk/src/external/enet/VERSION

    • Property svn:eol-style set to native
  • code/trunk/src/external/tolua/README_ORXONOX

    • Property svn:eol-style set to native
  • code/trunk/src/libraries/core/Super.h

    r8866 r9348  
    280280        SUPER_NOARGS(classname, functionname)
    281281
    282     #define SUPER_clone(classname, functionname, ...) \
    283         SUPER_ARGS(classname, functionname, __VA_ARGS__)
    284 
    285282    #define SUPER_changedCarrier(classname, functionname, ...) \
    286283        SUPER_NOARGS(classname, functionname)
     
    398395                    inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) \
    399396                    { \
    400                         (dynamic_cast<T*>(object))->T:: functionname
     397                        (orxonox_cast<T*>(object))->T:: functionname
    401398
    402399        /*
     
    508505                inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) )
    509506                {
    510                     (dynamic_cast<T*>(object))->T:: functionname ( Call the function with it's arguments );
     507                    (orxonox_cast<T*>(object))->T:: functionname ( Call the function with it's arguments );
    511508                }
    512509
     
    566563        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
    567564
    568         SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, clone, true, OrxonoxClass*& item)
    569             (item)
    570         SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
    571 
    572         SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(12, changedCarrier, false)
    573             ()
    574         SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
    575 
    576         SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(13, changedPickedUp, false)
     565        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, changedCarrier, false)
     566            ()
     567        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
     568
     569        SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(12, changedPickedUp, false)
    577570            ()
    578571        SUPER_FUNCTION_GLOBAL_DECLARATION_PART2;
     
    632625    SUPER_INTRUSIVE_DECLARATION(changedGametype);
    633626    SUPER_INTRUSIVE_DECLARATION(changedUsed);
    634     SUPER_INTRUSIVE_DECLARATION(clone);
    635627    SUPER_INTRUSIVE_DECLARATION(changedCarrier);
    636628    SUPER_INTRUSIVE_DECLARATION(changedPickedUp);
  • code/trunk/src/libraries/core/Template.cc

    r8858 r9348  
    149149        orxout(verbose, context::templates) << object->getLoaderIndentation() << " aplying Template \"" << this->getName() << "\"..." << endl;
    150150
     151        // check if the template is applied on an object of the right type
     152        Identifier* identifier = Identifier::getIdentifierByString(this->getXMLElement().Value());
     153        if (!object->getIdentifier()->isA(identifier))
     154            orxout(internal_warning, context::templates) << "Template was defined for " << identifier->getName() << " but the object is of type " << object->getIdentifier()->getName() << endl;
     155
    151156        Element temp = &const_cast<TiXmlElement&>(this->getXMLElement());
    152157
  • code/trunk/src/libraries/core/XMLPort.h

    r8858 r9348  
    197197        ClassIdentifier<classname>::getIdentifier()->addXMLPortParamContainer(paramname, containername); \
    198198    } \
    199     containername->port(dynamic_cast<BaseObject*>(this), object, xmlelement, mode)
     199    containername->port(orxonox_cast<BaseObject*>(this), object, xmlelement, mode)
    200200
    201201// --------------------
  • code/trunk/src/libraries/core/command/ConsoleCommand.cc

    r8858 r9348  
    594594        @param bPrintError If true, an error is printed if the command doesn't exist
    595595    */
    596     /* static */ const ConsoleCommand* ConsoleCommand::getCommand(const std::string& group, const std::string& name, bool bPrintError)
     596    /* static */ ConsoleCommand* ConsoleCommand::getCommand(const std::string& group, const std::string& name, bool bPrintError)
    597597    {
    598598        // find the group
     
    624624        @param bPrintError If true, an error is printed if the command doesn't exist
    625625    */
    626     /* static */ const ConsoleCommand* ConsoleCommand::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
     626    /* static */ ConsoleCommand* ConsoleCommand::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
    627627    {
    628628        std::string groupLC = getLowercase(group);
  • code/trunk/src/libraries/core/command/ConsoleCommand.h

    r8858 r9348  
    382382                public:
    383383                    /// Constructor: Creates a manipulator for a given ConsoleCommand.
    384                     ConsoleCommandManipulator(const ConsoleCommand* command) : command_(const_cast<ConsoleCommand*>(command)) {}
     384                    ConsoleCommandManipulator(ConsoleCommand* command) : command_(command) {}
    385385
    386386                    /// Changes the current function of the command. @param function The new function-pointer @param bForce If true, the new function-pointer is always assigned, even if the headers don't match
     
    619619
    620620            /// Returns a manipulator for this command.
    621             inline ConsoleCommandManipulator getManipulator() const
     621            inline ConsoleCommandManipulator getManipulator()
    622622                { return this; }
    623623
     
    667667
    668668            /// Returns a command (shortcut) with given name. @param name The name of the command shortcut @param bPrintError If true, an error is printed if the command doesn't exist
    669             static inline const ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)
     669            static inline ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)
    670670                { return ConsoleCommand::getCommand("", name, bPrintError); }
    671671            /// Returns a command (shortcut) with given name in lowercase. @param name The lowercase name of the command shortcut @param bPrintError If true, an error is printed if the command doesn't exist
    672             static inline const ConsoleCommand* getCommandLC(const std::string& name, bool bPrintError = false)
     672            static inline ConsoleCommand* getCommandLC(const std::string& name, bool bPrintError = false)
    673673                { return ConsoleCommand::getCommandLC("", name, bPrintError); }
    674674
    675             static const ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);
    676             static const ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false);
     675            static ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);
     676            static ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false);
    677677
    678678            static void destroyAll();
  • code/trunk/src/libraries/util/output/ConsoleWriter.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/CMakeLists.txt

    r8706 r9348  
    3838ADD_SUBDIRECTORY(weapons)
    3939ADD_SUBDIRECTORY(docking)
     40ADD_SUBDIRECTORY(towerdefense)
  • code/trunk/src/modules/docking/DockingController.cc

    r8858 r9348  
    6060
    6161        float distance = (this->dock_->getWorldPosition() - entity->getPosition()).length();
    62         Vector2 coord = get2DViewdirection(     // I don't understand this too
     62        Vector2 coord = get2DViewcoordinates(     // I don't understand this too
    6363            entity->getPosition(),
    6464            entity->getOrientation() * WorldEntity::FRONT,
     
    7070        if (distance > 10)
    7171        {
    72             entity->rotateYaw(-1.0f * 0.8f * sgn(coord.x) * coord.x*coord.x);
    73             entity->rotatePitch(0.8f * sgn(coord.y) * coord.y*coord.y);
     72            entity->rotateYaw(-1.0f * 0.8f * clamp(coord.x * 10, -1.0f, 1.0f));
     73            entity->rotatePitch(0.8f * clamp(coord.y * 10, -1.0f, 1.0f));
    7474        }
    7575
  • code/trunk/src/modules/gametypes/OldRaceCheckPoint.cc

    • Property svn:eol-style set to native
    r9016 r9348  
    112112                const std::string& message =  "You have " + multi_cast<std::string>(this->bTimeLimit_)
    113113                            + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1);
    114                 const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage(message);
     114                gametype->getGametypeInfo()->sendAnnounceMessage(message);
    115115                ChatManager::message(message);
    116116            }
  • code/trunk/src/modules/gametypes/OldRaceCheckPoint.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/gametypes/OldSpaceRace.cc

    • Property svn:eol-style set to native
    r9016 r9348  
    5858                        + "You didn't reach the check point " + multi_cast<std::string>(this->checkpointsReached_+1)
    5959                        + " before the time limit. You lose!";
    60             const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     60            this->getGametypeInfo()->sendAnnounceMessage(message);
    6161            ChatManager::message(message);
    6262        }
     
    6868            const std::string& message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s)
    6969                        + "." + multi_cast<std::string>(ms) + " seconds.";
    70             const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     70            this->getGametypeInfo()->sendAnnounceMessage(message);
    7171            ChatManager::message(message);
    7272/*
     
    8585
    8686        std::string message("The match has started! Reach the check points as quickly as possible!");
    87         const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     87        this->getGametypeInfo()->sendAnnounceMessage(message);
    8888        ChatManager::message(message);
    8989    }
     
    9898                        + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
    9999                        + " seconds.";
    100         const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     100        this->getGametypeInfo()->sendAnnounceMessage(message);
    101101        ChatManager::message(message);
    102102    }
  • code/trunk/src/modules/gametypes/OldSpaceRace.h

    • Property svn:eol-style set to native
    r9016 r9348  
    5959
    6060            virtual void newCheckpointReached();
     61            virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command.
     62                                                        //<! This is only a temporary solution. Better: create racingBots.
    6163
    6264            inline void setCheckpointsReached(int n)
  • code/trunk/src/modules/gametypes/RaceCheckPoint.cc

    r9263 r9348  
    9797            std::string message =  "You have " + multi_cast<std::string>(this->timeLimit_)
    9898                        + " seconds to reach the check point " + multi_cast<std::string>(this->checkpointIndex_ + 1);
    99             const_cast<GametypeInfo*>(this->getGametype()->getGametypeInfo())->sendAnnounceMessage(message);
     99            this->getGametype()->getGametypeInfo()->sendAnnounceMessage(message);
    100100            ChatManager::message(message);
    101101        }
  • code/trunk/src/modules/gametypes/SpaceRace.cc

    r9263 r9348  
    2323 *     Mauro Salomon
    2424 *   Co-authors:
    25  *      ...
     25 *      Celine Egger
    2626 *
    2727 */
     
    4848        this->cantMove_ = false;
    4949        this->bTimeIsUp_ = false;
     50        this->numberOfBots_ = 0; // quick fix: don't allow default-bots to enter the race
     51                                 // remove this line, if a raceBot has been created.
    5052    }
    5153
     
    7072        }
    7173
    72         const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     74        this->getGametypeInfo()->sendAnnounceMessage(message);
    7375        ChatManager::message(message);
    7476    }
     
    9799
    98100            std::string message = "The match has started! Reach the check points as quickly as possible!";
    99             const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     101            this->getGametypeInfo()->sendAnnounceMessage(message);
    100102            ChatManager::message(message);
    101103        }
     
    112114        const std::string& message = "Checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1)
    113115            + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.";
    114         const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     116        this->getGametypeInfo()->sendAnnounceMessage(message);
    115117        ChatManager::message(message);
    116118    }
  • code/trunk/src/modules/gametypes/SpaceRaceManager.cc

    • Property svn:eol-style set to native
    r9263 r9348  
    149149            }
    150150            else
    151                         {
     151            {
    152152                // adjust the radarvisibility
    153153                gametype->newCheckpointReached(newCheckpoint, player);
  • code/trunk/src/modules/gametypes/SpaceRaceManager.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/objects/triggers/CheckPoint.cc

    r7601 r9348  
    109109                if (bIsDestination_)
    110110                {
    111                     const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage("Congratulations - you have won the match!");
     111                    gametype->getGametypeInfo()->sendAnnounceMessage("Congratulations - you have won the match!");
    112112                    gametype->end();
    113113                }
     
    115115                if (!bIsFirst_ && !bIsDestination_)
    116116                {
    117                     const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage("Checkpoint reached");
     117                    gametype->getGametypeInfo()->sendAnnounceMessage("Checkpoint reached");
    118118                }
    119119            }
  • code/trunk/src/modules/overlays/OverlaysPrereqs.h

    r8706 r9348  
    9595    class PauseNotice;
    9696    class TeamBaseMatchScore;
    97     class UnderAttackHealthBar;
    9897
    9998    // stats
  • code/trunk/src/modules/overlays/hud/CMakeLists.txt

    r9016 r9348  
    1212  KillMessage.cc
    1313  DeathMessage.cc
    14   UnderAttackHealthBar.cc
    1514  TeamBaseMatchScore.cc
    1615  GametypeStaticMessage.cc
  • code/trunk/src/modules/overlays/hud/HUDBoostBar.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/overlays/hud/HUDBoostBar.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/overlays/hud/HUDEnemyHealthBar.cc

    • Property svn:eol-style set to native
  • code/trunk/src/modules/overlays/hud/HUDEnemyHealthBar.h

    • Property svn:eol-style set to native
  • code/trunk/src/modules/overlays/hud/HUDNavigation.cc

    r9257 r9348  
    5555namespace orxonox
    5656{
    57 bool compareDistance ( std::pair<RadarViewable*, unsigned int > a, std::pair<RadarViewable*, unsigned int > b )
    58 {
    59     return a.second<b.second;
    60 
    61 }
    62 
    63 void HUDNavigation::setConfigValues()
    64 {
    65   SetConfigValue(markerLimit_, 3);
    66   SetConfigValue(showDistance, false);
    67 }
    68 
    69 CreateFactory ( HUDNavigation );
    70 
    71 HUDNavigation::HUDNavigation ( BaseObject* creator )
    72         : OrxonoxOverlay ( creator )
    73 {
    74     RegisterObject ( HUDNavigation );
    75     this->setConfigValues();
    76 
    77     // Set default values
    78     this->setFont ( "Monofur" );
    79     this->setTextSize ( 0.05f );
    80     this->setNavMarkerSize ( 0.05f );
    81     this->setDetectionLimit( 10000.0f );
    82 }
    83 
    84 HUDNavigation::~HUDNavigation()
    85 {
    86     if ( this->isInitialized() )
    87     {
    88         for ( ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); )
    89             removeObject ( ( it++ )->first );
    90 
    91     }
    92 
    93     sortedObjectList_.clear();
    94 }
    95 
    96 void HUDNavigation::XMLPort ( Element& xmlelement, XMLPort::Mode mode )
    97 {
    98     SUPER ( HUDNavigation, XMLPort, xmlelement, mode );
    99 
    100     XMLPortParam ( HUDNavigation, "font",          setFont,          getFont,          xmlelement, mode );
    101     XMLPortParam ( HUDNavigation, "textSize",      setTextSize,      getTextSize,      xmlelement, mode );
    102     XMLPortParam ( HUDNavigation, "navMarkerSize", setNavMarkerSize, getNavMarkerSize, xmlelement, mode );
    103     XMLPortParam ( HUDNavigation, "detectionLimit", setDetectionLimit, getDetectionLimit, xmlelement, mode );
    104 }
    105 
    106 void HUDNavigation::setFont ( const std::string& font )
    107 {
    108     const Ogre::ResourcePtr& fontPtr = Ogre::FontManager::getSingleton().getByName ( font );
    109     if ( fontPtr.isNull() )
    110     {
    111         orxout(internal_warning) << "HUDNavigation: Font '" << font << "' not found" << endl;
    112         return;
    113     }
    114     fontName_ = font;
    115     for ( ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); ++it )
    116     {
    117         if ( it->second.text_ != NULL )
    118             it->second.text_->setFontName ( fontName_ );
    119     }
    120 }
    121 
    122 const std::string& HUDNavigation::getFont() const
    123 {
    124     return fontName_;
    125 }
    126 
    127 void HUDNavigation::setTextSize ( float size )
    128 {
    129     if ( size <= 0.0f )
    130     {
    131         orxout(internal_warning) << "HUDNavigation: Negative font size not allowed" << endl;
    132         return;
    133     }
    134     textSize_ = size;
    135     for ( ObjectMap::iterator it = activeObjectList_.begin(); it!=activeObjectList_.end(); ++it )
    136     {
    137         if ( it->second.text_ )
    138             it->second.text_->setCharHeight ( size );
    139     }
    140 }
    141 
    142 float HUDNavigation::getTextSize() const
    143 {
    144     return textSize_;
    145 }
    146 
    147 float HUDNavigation::getArrowSizeX(int dist)
    148 {
    149     if (dist < 600)
    150         dist = 600;
    151     return this->getActualSize().x * 900 * navMarkerSize_ / dist;
    152 }
    153 
    154 float HUDNavigation::getArrowSizeY(int dist)
    155 {
    156     if (dist < 600)
    157         dist = 600;
    158     return this->getActualSize().y * 900 * navMarkerSize_ / dist;
    159 }
    160 
    161 void HUDNavigation::tick ( float dt )
    162 {
    163     SUPER ( HUDNavigation, tick, dt );
    164 
    165     Camera* cam = CameraManager::getInstance().getActiveCamera();
    166     if ( cam == NULL )
    167         return;
    168     const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
    169 
    170 
    171     for ( sortedList::iterator listIt = sortedObjectList_.begin(); listIt != sortedObjectList_.end(); ++listIt )
    172     {
    173         listIt->second = ( int ) ( ( listIt->first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition() ).length() + 0.5f );
    174     }
    175 
    176     sortedObjectList_.sort ( compareDistance );
    177 
    178     unsigned int markerCount_ = 0;
    179     bool closeEnough_ = false; //only display objects that are close enough to be relevant for the player
    180 
    181 //         for (ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); ++it)
    182     for ( sortedList::iterator listIt = sortedObjectList_.begin(); listIt != sortedObjectList_.end(); ++markerCount_, ++listIt )
    183     {
    184         ObjectMap::iterator it = activeObjectList_.find ( listIt->first );
    185         closeEnough_ = listIt->second < detectionLimit_ ;
    186         // display radarviewables on HUD if the marker limit and max-distance is not exceeded
    187         if ( markerCount_ < markerLimit_ && (closeEnough_ ||  detectionLimit_ < 0) )
    188         {
    189 
    190 
    191             // Get Distance to HumanController and save it in the TextAreaOverlayElement.
    192             int dist = listIt->second;
    193             float textLength = 0.0f;
    194 
    195             //display distance next to cursor
    196             if (showDistance){
    197             it->second.text_->setCaption ( multi_cast<std::string> ( dist ) );
    198             textLength = multi_cast<std::string> ( dist ).size() * it->second.text_->getCharHeight() * 0.3f;
    199             }
    200 
    201             //display name next to cursor
    202             else{
    203             it->second.text_->setCaption(it->first->getRadarName());
    204             textLength = it->first->getRadarName().size() * it->second.text_->getCharHeight() * 0.3f;
    205             }
    206 
    207             // Transform to screen coordinates
    208             Vector3 pos = camTransform * it->first->getRVWorldPosition();
    209 
    210             bool outOfView = true;
    211             if ( pos.z > 1.0 )
     57    bool compareDistance(std::pair<RadarViewable*, unsigned int> a, std::pair<RadarViewable*, unsigned int> b)
     58    {
     59        return a.second < b.second;
     60    }
     61
     62    CreateFactory ( HUDNavigation );
     63
     64    HUDNavigation::HUDNavigation(BaseObject* creator) : OrxonoxOverlay(creator)
     65    {
     66        RegisterObject(HUDNavigation);
     67        this->setConfigValues();
     68
     69        // Set default values
     70        this->setFont("Monofur");
     71        this->setTextSize(0.05f);
     72        this->setNavMarkerSize(0.05f);
     73        this->setDetectionLimit(10000.0f);
     74    }
     75
     76    HUDNavigation::~HUDNavigation()
     77    {
     78        if (this->isInitialized())
     79        {
     80            for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end();)
     81                removeObject((it++)->first);
     82        }
     83        this->sortedObjectList_.clear();
     84    }
     85
     86    void HUDNavigation::setConfigValues()
     87    {
     88        SetConfigValue(markerLimit_, 3);
     89        SetConfigValue(showDistance_, false);
     90    }
     91
     92    void HUDNavigation::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     93    {
     94        SUPER(HUDNavigation, XMLPort, xmlelement, mode);
     95
     96        XMLPortParam(HUDNavigation, "font",           setFont,           getFont,           xmlelement, mode);
     97        XMLPortParam(HUDNavigation, "textSize",       setTextSize,       getTextSize,       xmlelement, mode);
     98        XMLPortParam(HUDNavigation, "navMarkerSize",  setNavMarkerSize,  getNavMarkerSize,  xmlelement, mode);
     99        XMLPortParam(HUDNavigation, "detectionLimit", setDetectionLimit, getDetectionLimit, xmlelement, mode);
     100    }
     101
     102    void HUDNavigation::setFont(const std::string& font)
     103    {
     104        const Ogre::ResourcePtr& fontPtr = Ogre::FontManager::getSingleton().getByName(font);
     105        if (fontPtr.isNull())
     106        {
     107            orxout(internal_warning) << "HUDNavigation: Font '" << font << "' not found" << endl;
     108            return;
     109        }
     110        this->fontName_ = font;
     111        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
     112        {
     113            if (it->second.text_ != NULL)
     114                it->second.text_->setFontName(this->fontName_);
     115        }
     116    }
     117
     118    const std::string& HUDNavigation::getFont() const
     119    {
     120        return this->fontName_;
     121    }
     122
     123    void HUDNavigation::setTextSize(float size)
     124    {
     125        if (size <= 0.0f)
     126        {
     127            orxout(internal_warning) << "HUDNavigation: Negative font size not allowed" << endl;
     128            return;
     129        }
     130        this->textSize_ = size;
     131        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it!=this->activeObjectList_.end(); ++it)
     132        {
     133            if (it->second.text_)
     134                it->second.text_->setCharHeight(size);
     135        }
     136    }
     137
     138    float HUDNavigation::getTextSize() const
     139    {
     140        return this->textSize_;
     141    }
     142
     143    float HUDNavigation::getArrowSizeX(int dist) const
     144    {
     145        if (dist < 600)
     146            dist = 600;
     147        return this->getActualSize().x * 900 * this->navMarkerSize_ / dist;
     148    }
     149
     150    float HUDNavigation::getArrowSizeY(int dist) const
     151    {
     152        if (dist < 600)
     153            dist = 600;
     154        return this->getActualSize().y * 900 * this->navMarkerSize_ / dist;
     155    }
     156
     157    void HUDNavigation::tick(float dt)
     158    {
     159        SUPER(HUDNavigation, tick, dt);
     160
     161        Camera* cam = CameraManager::getInstance().getActiveCamera();
     162        if (cam == NULL)
     163            return;
     164        const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
     165
     166
     167        for (std::list<std::pair<RadarViewable*, unsigned int> >::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt)
     168            listIt->second = (int)((listIt->first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f);
     169
     170        this->sortedObjectList_.sort(compareDistance);
     171
     172        unsigned int markerCount = 0;
     173        bool closeEnough = false; // only display objects that are close enough to be relevant for the player
     174
     175        for (std::list<std::pair<RadarViewable*, unsigned int> >::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++markerCount, ++listIt)
     176        {
     177            std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.find(listIt->first);
     178            closeEnough = listIt->second < this->detectionLimit_;
     179            // display radarviewables on HUD if the marker limit and max-distance is not exceeded
     180            if (markerCount < this->markerLimit_ && (closeEnough ||  this->detectionLimit_ < 0))
    212181            {
    213                 // z > 1.0 means that the object is behind the camera
    214                 outOfView = true;
    215                 // we have to switch all coordinates (if you don't know why,
    216                 // try linear algebra lectures, because I can't explain..)
    217                 pos.x = -pos.x;
    218                 pos.y = -pos.y;
    219             }
    220             else
    221                 outOfView = pos.x < -1.0 || pos.x > 1.0 || pos.y < -1.0 || pos.y > 1.0;
    222 
    223             if ( outOfView )
    224             {
    225                 // Object is not in view
    226 
    227                 // Change material only if outOfView changed
    228                 if ( !it->second.wasOutOfView_ )
     182                // Get Distance to HumanController and save it in the TextAreaOverlayElement.
     183                int dist = listIt->second;
     184                float textLength = 0.0f;
     185
     186                if (this->showDistance_)
    229187                {
    230                     it->second.panel_->setMaterialName( TextureGenerator::getMaterialName( "arrows.png", it->first->getRadarObjectColour()) );
    231                     it->second.wasOutOfView_ = true;
     188                    //display distance next to cursor
     189                    it->second.text_->setCaption(multi_cast<std::string>(dist));
     190                    textLength = multi_cast<std::string>(dist).size() * it->second.text_->getCharHeight() * 0.3f;
    232191                }
    233 
    234                 //float xDistScale = this->getActualSize().x * 1000.0f * navMarkerSize_ / dist;
    235                 //float yDistScale = this->getActualSize().y * 1000.0f * navMarkerSize_ / dist;
    236 
    237                 // Adjust Arrowsize according to distance
    238                 it->second.panel_->setDimensions(getArrowSizeX(dist),getArrowSizeY(dist));
    239 
    240                 // Switch between top, bottom, left and right position of the arrow at the screen border
    241                 if ( pos.x < pos.y )
     192                else
    242193                {
    243                     if ( pos.y > -pos.x )
     194                    //display name next to cursor
     195                    it->second.text_->setCaption(it->first->getRadarName());
     196                    textLength = it->first->getRadarName().size() * it->second.text_->getCharHeight() * 0.3f;
     197                }
     198
     199                // Transform to screen coordinates
     200                Vector3 pos = camTransform * it->first->getRVWorldPosition();
     201
     202                bool outOfView = true;
     203                if (pos.z > 1.0)
     204                {
     205                    // z > 1.0 means that the object is behind the camera
     206                    outOfView = true;
     207                    // we have to switch all coordinates (if you don't know why,
     208                    // try linear algebra lectures, because I can't explain..)
     209                    pos.x = -pos.x;
     210                    pos.y = -pos.y;
     211                }
     212                else
     213                    outOfView = pos.x < -1.0 || pos.x > 1.0 || pos.y < -1.0 || pos.y > 1.0;
     214
     215                if (outOfView)
     216                {
     217                    // Object is not in view
     218
     219                    // Change material only if outOfView changed
     220                    if (!it->second.wasOutOfView_)
    244221                    {
    245                         // Top
    246                         float position = pos.x / pos.y + 1.0f;
    247                         it->second.panel_->setPosition ( ( position - it->second.panel_->getWidth() ) * 0.5f, 0.0f );
    248                         it->second.panel_->setUV ( 0.5f, 0.0f, 1.0f, 0.5f );
    249                         it->second.text_->setLeft ( ( position - textLength ) * 0.5f );
    250                         it->second.text_->setTop ( it->second.panel_->getHeight() );
     222                        it->second.panel_->setMaterialName(TextureGenerator::getMaterialName("arrows.png", it->first->getRadarObjectColour()));
     223                        it->second.wasOutOfView_ = true;
     224                    }
     225
     226                    //float xDistScale = this->getActualSize().x * 1000.0f * this->navMarkerSize_ / dist;
     227                    //float yDistScale = this->getActualSize().y * 1000.0f * this->navMarkerSize_ / dist;
     228
     229                    // Adjust Arrowsize according to distance
     230                    it->second.panel_->setDimensions(getArrowSizeX(dist), getArrowSizeY(dist));
     231
     232                    // Switch between top, bottom, left and right position of the arrow at the screen border
     233                    if (pos.x < pos.y)
     234                    {
     235                        if (pos.y > -pos.x)
     236                        {
     237                            // Top
     238                            float position = pos.x / pos.y + 1.0f;
     239                            it->second.panel_->setPosition((position - it->second.panel_->getWidth()) * 0.5f, 0.0f);
     240                            it->second.panel_->setUV(0.5f, 0.0f, 1.0f, 0.5f);
     241                            it->second.text_->setLeft((position - textLength) * 0.5f);
     242                            it->second.text_->setTop(it->second.panel_->getHeight());
     243                        }
     244                        else
     245                        {
     246                            // Left
     247                            float position = pos.y / pos.x + 1.0f;
     248                            it->second.panel_->setPosition(0.0f, (position - it->second.panel_->getWidth()) * 0.5f);
     249                            it->second.panel_->setUV(0.0f, 0.0f, 0.5f, 0.5f);
     250                            it->second.text_->setLeft(it->second.panel_->getWidth() + 0.01f);
     251                            it->second.text_->setTop((position - it->second.text_->getCharHeight()) * 0.5f);
     252                        }
    251253                    }
    252254                    else
    253255                    {
    254                         // Left
    255                         float position = pos.y / pos.x + 1.0f;
    256                         it->second.panel_->setPosition ( 0.0f, ( position - it->second.panel_->getWidth() ) * 0.5f );
    257                         it->second.panel_->setUV ( 0.0f, 0.0f, 0.5f, 0.5f );
    258                         it->second.text_->setLeft ( it->second.panel_->getWidth() + 0.01f );
    259                         it->second.text_->setTop ( ( position - it->second.text_->getCharHeight() ) * 0.5f );
     256                        if (pos.y < -pos.x)
     257                        {
     258                            // Bottom
     259                            float position = -pos.x / pos.y + 1.0f;
     260                            it->second.panel_->setPosition((position - it->second.panel_->getWidth()) * 0.5f, 1.0f - it->second.panel_->getHeight());
     261                            it->second.panel_->setUV(0.0f, 0.5f, 0.5f, 1.0f );
     262                            it->second.text_->setLeft((position - textLength) * 0.5f);
     263                            it->second.text_->setTop(1.0f - it->second.panel_->getHeight() - it->second.text_->getCharHeight());
     264                        }
     265                        else
     266                        {
     267                            // Right
     268                            float position = -pos.y / pos.x + 1.0f;
     269                            it->second.panel_->setPosition(1.0f - it->second.panel_->getWidth(), (position - it->second.panel_->getHeight()) * 0.5f);
     270                            it->second.panel_->setUV(0.5f, 0.5f, 1.0f, 1.0f);
     271                            it->second.text_->setLeft(1.0f - it->second.panel_->getWidth() - textLength - 0.01f);
     272                            it->second.text_->setTop((position - it->second.text_->getCharHeight()) * 0.5f);
     273                        }
    260274                    }
    261275                }
    262 
    263276                else
    264277                {
    265 
    266                     if ( pos.y < -pos.x )
     278                    // Object is in view
     279
     280                    // Change material only if outOfView changed
     281                    if (it->second.wasOutOfView_)
    267282                    {
    268                         // Bottom
    269                         float position = -pos.x / pos.y + 1.0f;
    270                         it->second.panel_->setPosition ( ( position - it->second.panel_->getWidth() ) * 0.5f, 1.0f - it->second.panel_->getHeight() );
    271                         it->second.panel_->setUV ( 0.0f, 0.5f, 0.5f, 1.0f );
    272                         it->second.text_->setLeft ( ( position - textLength ) * 0.5f );
    273                         it->second.text_->setTop ( 1.0f - it->second.panel_->getHeight() - it->second.text_->getCharHeight() );
     283                        //it->second.panel_->setMaterialName("Orxonox/NavTDC");
     284                        it->second.panel_->setMaterialName(TextureGenerator::getMaterialName("tdc.png", it->first->getRadarObjectColour()));
     285                        it->second.panel_->setDimensions(this->navMarkerSize_ * this->getActualSize().x, this->navMarkerSize_ * this->getActualSize().y);
     286                        it->second.wasOutOfView_ = false;
    274287                    }
    275                     else
    276                     {
    277                         // Right
    278                         float position = -pos.y / pos.x + 1.0f;
    279                         it->second.panel_->setPosition ( 1.0f - it->second.panel_->getWidth(), ( position - it->second.panel_->getHeight() ) * 0.5f );
    280                         it->second.panel_->setUV ( 0.5f, 0.5f, 1.0f, 1.0f );
    281                         it->second.text_->setLeft ( 1.0f - it->second.panel_->getWidth() - textLength - 0.01f );
    282                         it->second.text_->setTop ( ( position - it->second.text_->getCharHeight() ) * 0.5f );
    283                     }
     288
     289                    // Position marker
     290                    it->second.panel_->setUV(0.0f, 0.0f, 1.0f, 1.0f);
     291                    it->second.panel_->setLeft((pos.x + 1.0f - it->second.panel_->getWidth()) * 0.5f);
     292                    it->second.panel_->setTop((-pos.y + 1.0f - it->second.panel_->getHeight()) * 0.5f);
     293
     294                    // Position text
     295                    it->second.text_->setLeft((pos.x + 1.0f + it->second.panel_->getWidth()) * 0.5f);
     296                    it->second.text_->setTop((-pos.y + 1.0f + it->second.panel_->getHeight()) * 0.5f);
    284297                }
     298
     299                // Make sure the overlays are shown
     300                it->second.panel_->show();
     301                it->second.text_->show();
    285302            }
    286             else
     303            else // do not display on HUD
    287304            {
    288                 // Object is in view
    289 
    290                 // Change material only if outOfView changed
    291                 if ( it->second.wasOutOfView_ )
    292                 {
    293                   //it->second.panel_->setMaterialName ( "Orxonox/NavTDC" );
    294                     it->second.panel_->setMaterialName( TextureGenerator::getMaterialName( "tdc.png", it->first->getRadarObjectColour()) );
    295                     it->second.panel_->setDimensions ( navMarkerSize_ * this->getActualSize().x, navMarkerSize_ * this->getActualSize().y );
    296                     it->second.wasOutOfView_ = false;
    297                 }
    298 
    299                 // Position marker
    300                 it->second.panel_->setUV ( 0.0f, 0.0f, 1.0f, 1.0f );
    301                 it->second.panel_->setLeft ( ( pos.x + 1.0f - it->second.panel_->getWidth() ) * 0.5f );
    302                 it->second.panel_->setTop ( ( -pos.y + 1.0f - it->second.panel_->getHeight() ) * 0.5f );
    303 
    304                 // Position text
    305                 it->second.text_->setLeft ( ( pos.x + 1.0f + it->second.panel_->getWidth() ) * 0.5f );
    306                 it->second.text_->setTop ( ( -pos.y + 1.0f + it->second.panel_->getHeight() ) * 0.5f );
     305                it->second.panel_->hide();
     306                it->second.text_->hide();
    307307            }
    308 
    309             // Make sure the overlays are shown
    310             it->second.panel_->show();
    311             it->second.text_->show();
    312         }
    313         else // do not display on HUD
    314         {
    315             it->second.panel_->hide();
    316             it->second.text_->hide();
    317         }
    318 
     308        }
     309    }
     310
     311    /** Overridden method of OrxonoxOverlay.
     312    @details
     313        Usually the entire overlay scales with scale().
     314        Here we obviously have to adjust this.
     315    */
     316    void HUDNavigation::sizeChanged()
     317    {
     318        // Use size to compensate for aspect ratio if enabled.
     319        float xScale = this->getActualSize().x;
     320        float yScale = this->getActualSize().y;
     321
     322        for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
     323        {
     324            if (it->second.panel_ != NULL)
     325                it->second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
     326            if (it->second.text_ != NULL)
     327                it->second.text_->setCharHeight(it->second.text_->getCharHeight() * yScale);
     328        }
     329    }
     330
     331    void HUDNavigation::addObject(RadarViewable* object)
     332    {
     333        if (showObject(object) == false)
     334            return;
     335