[Orxonox-commit 6592] r11232 - in code/branches/SpaceRace_HS16: data/levels src/modules/gametypes

meilel at orxonox.net meilel at orxonox.net
Mon Oct 17 14:47:02 CEST 2016


Author: meilel
Date: 2016-10-17 14:47:02 +0200 (Mon, 17 Oct 2016)
New Revision: 11232

Added:
   code/branches/SpaceRace_HS16/data/levels/newnewnewspacerace.oxw
Modified:
   code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc
Log:
neues level file mit namen newnewnewspacerace.oxw

Added: code/branches/SpaceRace_HS16/data/levels/newnewnewspacerace.oxw
===================================================================
--- code/branches/SpaceRace_HS16/data/levels/newnewnewspacerace.oxw	                        (rev 0)
+++ code/branches/SpaceRace_HS16/data/levels/newnewnewspacerace.oxw	2016-10-17 12:47:02 UTC (rev 11232)
@@ -0,0 +1,361 @@
+<LevelInfo
+ name = "New Old Space Race 2"
+ description = "Under maintenance..."
+ tags = "gametype"
+ screenshot = "spacerace.png"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipPirate.oxt")
+?>
+
+<Level
+ plugins = "gametypes"
+ gametype = "OldSpaceRace"
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/skyBoxMoreNebula"
+  >
+  
+  <!-- SOUNDS & MUSIC -->
+    <WorldSound name="scoreSound" position="0,-2100,0" source="sounds/ReadyGo.ogg" >
+      <events>
+        <play>
+          <EventListener event="start" />
+        </play>
+      </events>
+    </WorldSound>
+    <DistanceTrigger name="start" position="0,-2100,0"  target="Pawn" distance=100 stayActive="true" delay=0.5 />
+  
+    <WorldAmbientSound source="Ganymede.ogg" looping="true" playOnLoad="true" />
+  
+
+    <?lua math.randomseed(98) ?>
+
+    <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"/>
+
+    <SimpleNotification message="Reach the last check point within 150 seconds!!" />
+
+    <!-- ------------------SpawnPoint----------------- -->
+    <SpawnPoint position="0,-2100,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="true" >
+      <events>
+        <activity>
+          <EventTrigger invert="true">
+            <events>
+                <trigger>
+                    <EventListener event="checkpoint2" />
+                </trigger>
+            </events>
+          </EventTrigger>
+        </activity>
+      </events>
+    </SpawnPoint>
+    
+    <!-- ------------------CheckPoints----------------- -->
+    <OldRaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </OldRaceCheckPoint>
+
+    <OldRaceCheckPoint name="checkpoint2" position="0,-900,2300" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <SpawnPoint position="0,0,0" lookat="0,1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <Trigger mode="xor" invert="true" >
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint2" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert="true">
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint3" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </OldRaceCheckPoint>
+
+    <OldRaceCheckPoint name="checkpoint3" position="0,700,2700" stayActive="true" direction="0,0,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <SpawnPoint position="0,0,0" lookat="0,1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <Trigger mode="xor" invert="true" >
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint3" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert="true">
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint4" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </OldRaceCheckPoint>
+
+    <OldRaceCheckPoint name="checkpoint4" position="0,2100,2300" stayActive="true" direction="0,1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <DistanceTrigger name="trigger3" position="0,0,0" distance=40 stayActive="true" />
+            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <Trigger mode="xor" invert="true" >
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint4" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert="true">
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint5" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </OldRaceCheckPoint>
+
+    <OldRaceCheckPoint name="checkpoint5" position="0,2200,500" stayActive="true" direction="0,1,0" collisionType="static" scale="1" distance="40" checkpointindex="4" islast="false">
+        <attached>
+        <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+        <DistanceTrigger name="trigger4" position="0,0,0" distance=40 stayActive="true" />
+        <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+            <events>
+            <activity>
+                <Trigger mode="xor" invert="true" >
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="checkpoint5" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                    <EventTrigger invert="true">
+                        <events>
+                            <trigger>
+                                <EventListener event="checkpoint6" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                </Trigger>
+            </activity>
+            </events>
+        </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </OldRaceCheckPoint>
+
+    <OldRaceCheckPoint name="checkpoint6" position="0,1500,-800" stayActive="true" direction="0,1,-1" collisionType="static" scale="1" distance="40" checkpointindex="5" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <DistanceTrigger name="trigger5" position="0,0,0" distance=40 stayActive="true" />
+            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <Trigger mode="xor" invert="true" >
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint6" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert="true">
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint7" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </OldRaceCheckPoint>
+
+    <OldRaceCheckPoint name="checkpoint7" position="0,200,-1900" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="6" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <DistanceTrigger name="trigger6" position="0,0,0" distance=40 stayActive="true" />
+            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <Trigger mode="xor" invert="true" >
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint7" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert="true">
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint8" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </OldRaceCheckPoint>
+
+    <OldRaceCheckPoint name="checkpoint8" position="0,-700,-1400" stayActive="true" direction="0,-1,-1" collisionType="static" scale="1" distance="40" checkpointindex="7" islast="false">
+        <attached>
+        <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+        <DistanceTrigger name="trigger7" position="0,0,0" distance=40 stayActive="true" />
+        <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+            <events>
+            <activity>
+                <Trigger mode="xor" invert="true" >
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="checkpoint8" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                    <EventTrigger invert="true">
+                        <events>
+                            <trigger>
+                                <EventListener event="checkpoint9" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                </Trigger>
+            </activity>
+            </events>
+        </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </OldRaceCheckPoint>
+
+    <OldRaceCheckPoint name="checkpoint9" position="0,-1300,-800" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="8" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <DistanceTrigger name="trigger8" position="0,0,0" distance=40 stayActive="true" />
+            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="checkpoint9" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </OldRaceCheckPoint>
+
+    <OldRaceCheckPoint name="checkpoint10" position="0,-2100,0" collisionType="static" scale="1" distance="40" checkpointindex="9" islast="true" timelimit="150">
+        <attached>
+        <   Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </OldRaceCheckPoint>
+  </Scene>
+</Level>

Modified: code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc	2016-10-10 16:58:24 UTC (rev 11231)
+++ code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc	2016-10-17 12:47:02 UTC (rev 11232)
@@ -66,7 +66,7 @@
         }
         else
         {
-            message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s)
+            message = "You win!! Final check point reached after "+ multi_cast<std::string>(s)
                         + "." + multi_cast<std::string>(ms) + " seconds.";
         }
         if (!this->hasEnded())
@@ -81,7 +81,7 @@
     {
         SUPER(SpaceRace,tick,dt);
 
-        // spawn the players already when the countdown starts, but deactivate their engines
+        // spawns the players when the countdown starts, but deactivates their engines
         if (this->isStartCountdownRunning() && !this->cantMove_)
         {
             this->spawnPlayersIfRequested();
@@ -91,7 +91,7 @@
                 engine->setActive(false);
         }
 
-        // activate the engines again if the countdown ends
+        // activate the engines when the countdown ends
         if (!this->isStartCountdownRunning() && this->cantMove_)
         {
             for (Engine* engine : ObjectList<Engine>())
@@ -99,7 +99,7 @@
 
             this->cantMove_= false;
 
-            std::string message = "The match has started! Reach the check points as quickly as possible!";
+            std::string message = "The race begins! Reach the check points as quickly as possible!";
             this->getGametypeInfo()->sendAnnounceMessage(message);
             ChatManager::message(message);
         }
@@ -121,16 +121,16 @@
 
     bool SpaceRace::allowPawnHit(Pawn* victim, Pawn* originator)
     {
-        return false;
+        return true;
     }
 
     bool SpaceRace::allowPawnDamage(Pawn* victim, Pawn* originator)
     {
-        return false;
+        return true;
     }
 
     bool SpaceRace::allowPawnDeath(Pawn* victim, Pawn* originator)
     {
-        return false;
+        return true;
     }
 }




More information about the Orxonox-commit mailing list