[Orxonox-commit 3564] r8250 - code/branches/spacerace/src/modules/gametypes

msalomon at orxonox.net msalomon at orxonox.net
Mon Apr 18 14:14:17 CEST 2011


Author: msalomon
Date: 2011-04-18 14:14:17 +0200 (Mon, 18 Apr 2011)
New Revision: 8250

Modified:
   code/branches/spacerace/src/modules/gametypes/SpaceRace.cc
   code/branches/spacerace/src/modules/gametypes/SpaceRace.h
Log:
Last changes to the SpaceRace game type.


Modified: code/branches/spacerace/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/spacerace/src/modules/gametypes/SpaceRace.cc	2011-04-18 10:50:01 UTC (rev 8249)
+++ code/branches/spacerace/src/modules/gametypes/SpaceRace.cc	2011-04-18 12:14:17 UTC (rev 8250)
@@ -20,7 +20,7 @@
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  *   Author:
- *      Aurelian Jaggi
+ *     Mauro Salomon
  *   Co-authors:
  *      ...
  *
@@ -31,13 +31,13 @@
 #include "core/CoreIncludes.h"
 #include "network/Host.h"
 
-namespace orxonox{
+namespace orxonox
+{
     CreateUnloadableFactory(SpaceRace);
     
     SpaceRace::SpaceRace(BaseObject* creator) : Gametype(creator)
     {
 	RegisterObject(SpaceRace);
-	this->numberOfCheckpoints_ = 0;
 	this->checkpointsReached_ = 0;
 	this->numberOfBots_ = 0;	
     }

Modified: code/branches/spacerace/src/modules/gametypes/SpaceRace.h
===================================================================
--- code/branches/spacerace/src/modules/gametypes/SpaceRace.h	2011-04-18 10:50:01 UTC (rev 8249)
+++ code/branches/spacerace/src/modules/gametypes/SpaceRace.h	2011-04-18 12:14:17 UTC (rev 8250)
@@ -20,7 +20,7 @@
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  *   Author:
- *      Aurelian Jaggi
+ *      Mauro Salomon
  *   Co-authors:
  *      ...
  *
@@ -31,7 +31,7 @@
 
 #include "gametypes/Gametype.h"
 #include "gametypes/GametypesPrereqs.h"
-#include "objects/triggers/DistanceTriggerBeacon.h"
+#include "RaceCheckPoint.h"
 #include <boost/concept_check.hpp>
 
 namespace orxonox
@@ -44,18 +44,17 @@
 	    
 	    virtual void tick(float dt);
 	    
-	    virtual void start();
-	    virtual void end();
+	    inline void newCheckpointReached()
+		{ this->checkpointsReached_++; }
+	    inline void setCheckpointsReached(int n)
+		{ this->checkpointsReached_ = n;}
+	    inline int getCheckpointsReached()
+		{ return this->checkpointsReached_; }
 	    
 	protected:
-	    inline void newCheckpointReached()
-	      { this->checkpointsReached++; }
-	    inline bool lastCheckpointReached()
-	      { return (this->checkpointsReached == this->numberOfCheckpoints); }
+	    
 	private:
-	    int numberOfCheckpoints_;
 	    int checkpointsReached_;
-    
     };
 }
 




More information about the Orxonox-commit mailing list