[Orxonox-commit 4273] r8944 - in code/branches/spaceraceTwo: data/levels src/modules/gametypes src/orxonox/gametypes src/orxonox/infos

eceline at orxonox.net eceline at orxonox.net
Wed Nov 23 14:14:29 CET 2011


Author: eceline
Date: 2011-11-23 14:14:29 +0100 (Wed, 23 Nov 2011)
New Revision: 8944

Added:
   code/branches/spaceraceTwo/data/levels/Spacerace2.oxw
Modified:
   code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc
   code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc
   code/branches/spaceraceTwo/src/orxonox/gametypes/Gametype.cc
   code/branches/spaceraceTwo/src/orxonox/infos/GametypeInfo.cc
Log:
level file added

Added: code/branches/spaceraceTwo/data/levels/Spacerace2.oxw
===================================================================
--- code/branches/spaceraceTwo/data/levels/Spacerace2.oxw	                        (rev 0)
+++ code/branches/spaceraceTwo/data/levels/Spacerace2.oxw	2011-11-23 13:14:29 UTC (rev 8944)
@@ -0,0 +1,66 @@
+<LevelInfo
+ name = "Spacerace2"
+ description = "Just a few tests"
+ tags = "test"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+
+  include("templates/spaceshipAssff.oxt")
+ 
+?>
+
+<?lua
+  include("templates/spaceshipAssff2.oxt")
+  include("templates/spaceshipPirate.oxt")
+?>
+
+<Level
+ name         = "Spacerace2"
+ description  = "Just a few tests"
+gametype = SpaceRace
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/Starbox"
+  >
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+
+	
+	<SpaceRaceManager>
+<checkpoints>	
+	<RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="true">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+</checkpoints>
+</SpaceRaceManager>
+
+
+
+
+    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff2 />
+
+
+   
+
+    
+  </Scene>
+</Level>
+

Modified: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc	2011-11-23 13:13:52 UTC (rev 8943)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc	2011-11-23 13:14:29 UTC (rev 8944)
@@ -45,12 +45,17 @@
     {
         RegisterObject(SpaceRace);
         
+         const std::string& message = "SpaceRace constructed";
+         orxout()<< message << endl;
+    
         this->bTimeIsUp_ = false;
         this->numberOfBots_ = 0;
         this->cantMove_=false;
         
        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
         {this->checkpointReached_[it->first]=0;}
+        
+        
     }
     
   // void SpaceRace::SetConfigValues(){
@@ -91,8 +96,9 @@
     }
 
     void SpaceRace::start()
-    {
-  	  		   this->spawnPlayersIfRequested(); Gametype::checkStart(); 
+    { 
+    		Gametype::start();
+  	  		   this->spawnPlayersIfRequested(); //Gametype::checkStart(); 
   	  		   this->cantMove_=true; 
     	 
     	         for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it) 

Modified: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc	2011-11-23 13:13:52 UTC (rev 8943)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc	2011-11-23 13:14:29 UTC (rev 8944)
@@ -44,7 +44,9 @@
     SpaceRaceManager::SpaceRaceManager(BaseObject* creator) : BaseObject(creator)
     {
         RegisterObject(SpaceRaceManager);
-                
+         
+          const std::string& message = "SpaceRaceManager constructed";
+         orxout()<< message << endl;      
     }
 
    SpaceRaceManager::~SpaceRaceManager()

Modified: code/branches/spaceraceTwo/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/branches/spaceraceTwo/src/orxonox/gametypes/Gametype.cc	2011-11-23 13:13:52 UTC (rev 8943)
+++ code/branches/spaceraceTwo/src/orxonox/gametypes/Gametype.cc	2011-11-23 13:14:29 UTC (rev 8944)
@@ -133,8 +133,13 @@
                    
                 
             }
-                 
-           	this->checkStart();
+            
+             const std::string& message = "Gametype should start";
+         orxout()<< message << endl;    
+           	this->start();
+           	const std::string& message2 = "Gametype should have started";
+         orxout()<< message2 << endl;
+         
         }
         else if (!this->gtinfo_->hasEnded())
             this->spawnDeadPlayersIfRequested();
@@ -143,12 +148,16 @@
     }
 
     void Gametype::start()
-    {
+    { const std::string& message = "Gametype starts";
+         orxout()<< message << endl;
+         
         this->addBots(this->numberOfBots_);
 
         this->gtinfo_->start();
 
         this->spawnPlayersIfRequested();
+        
+         
     }
 
     void Gametype::end()

Modified: code/branches/spaceraceTwo/src/orxonox/infos/GametypeInfo.cc
===================================================================
--- code/branches/spaceraceTwo/src/orxonox/infos/GametypeInfo.cc	2011-11-23 13:13:52 UTC (rev 8943)
+++ code/branches/spaceraceTwo/src/orxonox/infos/GametypeInfo.cc	2011-11-23 13:14:29 UTC (rev 8944)
@@ -163,10 +163,14 @@
     void GametypeInfo::start(void)
     {
         if(this->bStarted_)
-            return;
+           {const std::string& message = "bStarted true";
+         orxout()<< message << endl; return;}
         
         this->bStarted_ = true;
         this->changedStarted();
+        
+        const std::string& message = "bStarted true";
+         orxout()<< message << endl;
     }
 
     /**




More information about the Orxonox-commit mailing list