[Orxonox-commit 4328] r8999 - in code/branches/presentation2011: data/levels src/modules/gametypes src/orxonox/controllers

jo at orxonox.net jo at orxonox.net
Sun Dec 18 15:22:44 CET 2011


Author: jo
Date: 2011-12-18 15:22:43 +0100 (Sun, 18 Dec 2011)
New Revision: 8999

Modified:
   code/branches/presentation2011/data/levels/spaceRace.oxw
   code/branches/presentation2011/src/modules/gametypes/CMakeLists.txt
   code/branches/presentation2011/src/modules/gametypes/GametypesPrereqs.h
   code/branches/presentation2011/src/orxonox/controllers/FormationController.h
Log:
Old version of the SpaceRace added.

Modified: code/branches/presentation2011/data/levels/spaceRace.oxw
===================================================================
--- code/branches/presentation2011/data/levels/spaceRace.oxw	2011-12-18 13:35:02 UTC (rev 8998)
+++ code/branches/presentation2011/data/levels/spaceRace.oxw	2011-12-18 14:22:43 UTC (rev 8999)
@@ -1,5 +1,5 @@
 <LevelInfo
- name = "Space Race"
+ name = "Old Space Race"
  description = "Have a furious Race in Space: Reach the checkpoints as fast as possible."
  tags = "gametype"
  screenshot = "spacerace.png"
@@ -17,7 +17,7 @@
 ?>
 
 <Level
- gametype = "SpaceRace"
+ gametype = "OldSpaceRace"
 >
   <templates>
     <Template link=lodtemplate_default />
@@ -51,7 +51,7 @@
     </SpawnPoint>
     
     <!-- ------------------CheckPoints----------------- -->
-    <RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false">
+    <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>
@@ -61,9 +61,9 @@
             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
         </collisionShapes>
-    </RaceCheckPoint>
+    </OldRaceCheckPoint>
 
-    <RaceCheckPoint name="checkpoint2" position="0,-900,2300" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false">
+    <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" >
@@ -95,9 +95,9 @@
             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
         </collisionShapes>
-    </RaceCheckPoint>
+    </OldRaceCheckPoint>
 
-    <RaceCheckPoint name="checkpoint3" position="0,700,2700" stayActive="true" direction="0,0,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false">
+    <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" >
@@ -129,9 +129,9 @@
             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
         </collisionShapes>
-    </RaceCheckPoint>
+    </OldRaceCheckPoint>
 
-    <RaceCheckPoint name="checkpoint4" position="0,2100,2300" stayActive="true" direction="0,1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="false">
+    <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" />
@@ -164,9 +164,9 @@
             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
         </collisionShapes>
-    </RaceCheckPoint>
+    </OldRaceCheckPoint>
 
-    <RaceCheckPoint name="checkpoint5" position="0,2200,500" stayActive="true" direction="0,1,0" collisionType="static" scale="1" distance="40" checkpointindex="4" islast="false">
+    <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" />
@@ -199,9 +199,9 @@
             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
         </collisionShapes>
-    </RaceCheckPoint>
+    </OldRaceCheckPoint>
 
-    <RaceCheckPoint name="checkpoint6" position="0,1500,-800" stayActive="true" direction="0,1,-1" collisionType="static" scale="1" distance="40" checkpointindex="5" islast="false">
+    <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" />
@@ -234,9 +234,9 @@
             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
         </collisionShapes>
-    </RaceCheckPoint>
+    </OldRaceCheckPoint>
 
-    <RaceCheckPoint name="checkpoint7" position="0,200,-1900" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="6" islast="false">
+    <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" />
@@ -269,9 +269,9 @@
             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
         </collisionShapes>
-    </RaceCheckPoint>
+    </OldRaceCheckPoint>
 
-    <RaceCheckPoint name="checkpoint8" position="0,-700,-1400" stayActive="true" direction="0,-1,-1" collisionType="static" scale="1" distance="40" checkpointindex="7" islast="false">
+    <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" />
@@ -304,9 +304,9 @@
             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
         </collisionShapes>
-    </RaceCheckPoint>
+    </OldRaceCheckPoint>
 
-    <RaceCheckPoint name="checkpoint9" position="0,-1300,-800" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="8" islast="false">
+    <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" />
@@ -330,9 +330,9 @@
             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
         </collisionShapes>
-    </RaceCheckPoint>
+    </OldRaceCheckPoint>
 
-    <RaceCheckPoint name="checkpoint10" position="0,-2100,0" collisionType="static" scale="1" distance="40" checkpointindex="9" islast="true" timelimit="150">
+    <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>
@@ -342,7 +342,7 @@
             <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
             <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
         </collisionShapes>
-    </RaceCheckPoint>
+    </OldRaceCheckPoint>
 
     <!-- ------------------Planet----------------- -->
     <Planet position="0,0,0" scale=300 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="8,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />

Modified: code/branches/presentation2011/src/modules/gametypes/CMakeLists.txt
===================================================================
--- code/branches/presentation2011/src/modules/gametypes/CMakeLists.txt	2011-12-18 13:35:02 UTC (rev 8998)
+++ code/branches/presentation2011/src/modules/gametypes/CMakeLists.txt	2011-12-18 14:22:43 UTC (rev 8999)
@@ -2,6 +2,8 @@
   SpaceRace.cc
   RaceCheckPoint.cc
   SpaceRaceManager.cc
+  OldSpaceRace.cc
+  OldRaceCheckPoint.cc
 )
 
 ORXONOX_ADD_LIBRARY(gametypes

Modified: code/branches/presentation2011/src/modules/gametypes/GametypesPrereqs.h
===================================================================
--- code/branches/presentation2011/src/modules/gametypes/GametypesPrereqs.h	2011-12-18 13:35:02 UTC (rev 8998)
+++ code/branches/presentation2011/src/modules/gametypes/GametypesPrereqs.h	2011-12-18 14:22:43 UTC (rev 8999)
@@ -65,6 +65,7 @@
 namespace orxonox
 {
     class SpaceRace;
+    class OldSpaceRace;
 }
 
 #endif /* _GametypesPrereqs_H__ */

Modified: code/branches/presentation2011/src/orxonox/controllers/FormationController.h
===================================================================
--- code/branches/presentation2011/src/orxonox/controllers/FormationController.h	2011-12-18 13:35:02 UTC (rev 8998)
+++ code/branches/presentation2011/src/orxonox/controllers/FormationController.h	2011-12-18 14:22:43 UTC (rev 8999)
@@ -76,8 +76,7 @@
            { return this->passive_; }
 
       inline void setTeam(int team)
-           { this->team_ = team; 
-             orxout(debug_output) << "Set team to: "<<team<<" in "<<this<< endl;} 
+           { this->team_ = team; }
       inline int getTeam() const
            { return this->team_; }
 
@@ -86,9 +85,9 @@
                Normal-normal behaviour
                Defend-just defend the master
                Attack-leave formation, attack every target
-      */ 
+      */
       enum FormationMode {NORMAL,DEFEND,ATTACK};
-      
+
       /**
         @brief Sets the new mode. If master, set it for all slaves.
       */
@@ -103,7 +102,7 @@
       unsigned int maxFormationSize_;
       int freedomCount_;
       enum State {SLAVE, MASTER, FREE};
-      
+
       State state_;
       std::vector<FormationController*> slaves_;
       FormationController* myMaster_;
@@ -134,7 +133,7 @@
       bool forcedFree();
 
       void takeLeadOfFormation();
-      void masterAttacked(Pawn* originator);      
+      void masterAttacked(Pawn* originator);
 
       void specificMasterActionHold();
       void turn180Init();
@@ -154,14 +153,14 @@
       virtual void positionReached() {}
 
       static bool sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype); // hack
-      
 
+
       void setTarget(Pawn* target);
       void searchNewTarget();
       void forgetTarget();
 
       void targetDied();
-      
+
       bool bHasTargetPosition_;
       Vector3 targetPosition_;
       bool bHasTargetOrientation_;




More information about the Orxonox-commit mailing list