[Orxonox-commit 4299] r8970 - code/branches/spaceraceTwo/src/modules/gametypes
jo at orxonox.net
jo at orxonox.net
Tue Dec 13 22:50:15 CET 2011
Author: jo
Date: 2011-12-13 22:50:14 +0100 (Tue, 13 Dec 2011)
New Revision: 8970
Modified:
code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc
code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.h
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h
Log:
Cleanup code. Functionallity remains unchanged.
Modified: code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc 2011-12-12 20:07:24 UTC (rev 8969)
+++ code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc 2011-12-13 21:50:14 UTC (rev 8970)
@@ -51,32 +51,21 @@
this->setBeaconMode("off");
this->setBroadcast(false);
this->setSimultaneousTriggerers(100);
-
-
-
-
this->bTimeLimit_ = 0;
-
this->setRadarObjectColour(ColourValue::Blue);
this->setRadarObjectShape(RadarViewable::Triangle);
-
- this->setRadarVisibility(false);
- this->settingsChanged();
- this->reached_=NULL;
- //this->addTarget("WorldEntity");
-
-
+ this->setRadarVisibility(false);
+ this->settingsChanged();
+ this->reached_=NULL;
+ //this->addTarget("WorldEntity");
}
RaceCheckPoint::~RaceCheckPoint()
- {
+ {
-
-
-
- }
+ }
void RaceCheckPoint::tick(float dt)
{
@@ -84,30 +73,30 @@
SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
assert(gametype);
-
}
void RaceCheckPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
{
SUPER(RaceCheckPoint, XMLPort, xmlelement, mode);
- Vector3 v= Vector3(0,0,0);
+ Vector3 v= Vector3(0,0,0);
XMLPortParam(RaceCheckPoint, "checkpointindex", setCheckpointIndex, getCheckpointIndex, xmlelement, mode).defaultValues(0);
XMLPortParam(RaceCheckPoint, "islast", setLast, getLast, xmlelement, mode).defaultValues(false);
XMLPortParam(RaceCheckPoint, "timelimit", setTimelimit, getTimeLimit, xmlelement, mode).defaultValues(0);
XMLPortParamTemplate(RaceCheckPoint, "nextcheckpoints", setNextcheckpoint, getNextcheckpoint, xmlelement, mode,const Vector3&).defaultValues(v);
}
- void RaceCheckPoint::fire(bool bIsTriggered,BaseObject* player)
+ void RaceCheckPoint::fire(bool bIsTriggered,BaseObject* player)
{
- DistanceMultiTrigger::fire((bool)bIsTriggered,player);
+ DistanceMultiTrigger::fire((bool)bIsTriggered,player);
- SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
+ SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
assert(gametype);
- ControllableEntity* entity=(ControllableEntity*) player;
+ ControllableEntity* entity = (ControllableEntity*) player;
- PlayerInfo* player2=entity->getPlayer();
+ PlayerInfo* player2 = entity->getPlayer();
- if(bIsTriggered)this->reached_=player2;
+ if(bIsTriggered)
+ this->reached_=player2;
}
void RaceCheckPoint::setTimelimit(float timeLimit)
Modified: code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h 2011-12-12 20:07:24 UTC (rev 8969)
+++ code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h 2011-12-13 21:50:14 UTC (rev 8970)
@@ -51,34 +51,31 @@
virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
virtual void tick(float dt);
- inline void setCheckpointIndex(int checkpointIndex)
+ inline void setCheckpointIndex(int checkpointIndex)
{ this->bCheckpointIndex_ = checkpointIndex; }
inline int getCheckpointIndex()
{ return this->bCheckpointIndex_; }
- inline void setNextcheckpoint(const Vector3& checkpoints)
- {this->nextcheckpoints_=checkpoints;}
+ inline void setNextcheckpoint(const Vector3& checkpoints)
+ { this->nextcheckpoints_=checkpoints; }
inline void setNextcheckpoint(float x, float y, float z)
{ this->setNextcheckpoint(Vector3(x, y, z)); }
- inline const Vector3& getNextcheckpoint() const
- {return this->nextcheckpoints_;}
-
-
- inline void setLast(bool isLast)
+ inline const Vector3& getNextcheckpoint() const
+ { return this->nextcheckpoints_; }
+ inline void setLast(bool isLast)
{ this->bIsLast_ = isLast; }
inline bool getLast()
{ return this->bIsLast_; }
+
bool bIsLast_; //True if this check point is the last of the level. There can be only one last check point for each level and there must be a last check point in the level.
float bTimeLimit_; //The time limit (from the start of the level) to reach this check point. If the check point is reached after this time, the game ends and the player looses.
- PlayerInfo* reached_;
-
- inline float getTimeLimit()
- { return this->bTimeLimit_;}
+ PlayerInfo* reached_;
+
+ inline float getTimeLimit()
+ { return this->bTimeLimit_; }
+
protected:
virtual void fire(bool bIsTriggered,BaseObject* player);
-
-
-
virtual void setTimelimit(float timeLimit);
inline const WorldEntity* getWorldEntity() const
@@ -87,12 +84,8 @@
private:
int bCheckpointIndex_; //The index of this check point. This value will be compared with the number of check points reached in the level. The check points must be indexed in ascending order beginning from zero and without any jumps between the indexes.
-
- Vector3 nextcheckpoints_; //the indexes of the next check points
-
-
-
- std::vector<RaceCheckPoint*> next_;
+ Vector3 nextcheckpoints_; //the indexes of the next check points
+ std::vector<RaceCheckPoint*> next_;
};
}
Modified: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc 2011-12-12 20:07:24 UTC (rev 8969)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc 2011-12-13 21:50:14 UTC (rev 8970)
@@ -46,17 +46,13 @@
{
RegisterObject(SpaceRace);
-
-
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]=-1;}
+ {this->checkpointReached_[it->first]=-1;} //TODO: should be removed; no functionallity
-
}
// void SpaceRace::SetConfigValues(){
@@ -98,107 +94,101 @@
void SpaceRace::start()
{
-
- this->spawnPlayersIfRequested();
-
- Gametype::checkStart();
- this->cantMove_=true;
-
- for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
- {if(it->getMaxSpeedFront()>0){this->maxSpeedBack_=it->getMaxSpeedBack();
- this->maxSpeedFront_=it->getMaxSpeedFront();
- this->maxSpeedLeftRight_=it->getMaxSpeedLeftRight();
- this->maxSpeedUpDown_=(it->getMaxSpeedUpDown());
- }
- it->setMaxSpeedBack(0);
- it->setMaxSpeedFront(0);
- it->setMaxSpeedLeftRight(0);
- it->setMaxSpeedUpDown(0);
-
-
- }
-
- this->addBots(this->numberOfBots_);
-
-
+
+ this->spawnPlayersIfRequested();
+ Gametype::checkStart();
+ this->cantMove_=true;
+ //TODO: switch the engine off/on via a short function
+ for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
+ {
+ if(it->getMaxSpeedFront()>0)
+ {
+ this->maxSpeedBack_=it->getMaxSpeedBack();
+ this->maxSpeedFront_=it->getMaxSpeedFront();
+ this->maxSpeedLeftRight_=it->getMaxSpeedLeftRight();
+ this->maxSpeedUpDown_=(it->getMaxSpeedUpDown());
+ }
+ it->setMaxSpeedBack(0);
+ it->setMaxSpeedFront(0);
+ it->setMaxSpeedLeftRight(0);
+ it->setMaxSpeedUpDown(0);
+ }
+ this->addBots(this->numberOfBots_);
}
- void SpaceRace::tick(float dt){
- SUPER(SpaceRace,tick,dt);
+ void SpaceRace::tick(float dt)
+ {
+ SUPER(SpaceRace,tick,dt);
- if(!this->isStartCountdownRunning() && this->cantMove_){
-
- for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
- {
- it->setMaxSpeedBack(this->maxSpeedBack_);
- it->setMaxSpeedFront(this->maxSpeedFront_);
- it->setMaxSpeedLeftRight(this->maxSpeedLeftRight_);
- it->setMaxSpeedUpDown(this->maxSpeedUpDown_);
- }
- this->cantMove_= false;
-
- std::string message("The match has started! Reach the check points as quickly as possible!");
- const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
- ChatManager::message(message);
-
- }
-
+ if(!this->isStartCountdownRunning() && this->cantMove_)
+ {
+ for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
+ {
+ it->setMaxSpeedBack(this->maxSpeedBack_);
+ it->setMaxSpeedFront(this->maxSpeedFront_);
+ it->setMaxSpeedLeftRight(this->maxSpeedLeftRight_);
+ it->setMaxSpeedUpDown(this->maxSpeedUpDown_);
+ }
+ this->cantMove_= false;
+
+ std::string message("The match has started! Reach the check points as quickly as possible!");
+ const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+ ChatManager::message(message);
+ }
}
-
+
void SpaceRace::newCheckpointReached(SpaceRaceManager* p, int index,PlayerInfo* pl)
- {
- this->checkpointReached_[pl]=index;
+ {
+ this->checkpointReached_[pl]=index;
this->clock_.capture();
- int s = this->clock_.getSeconds();
+ int s = this->clock_.getSeconds();
int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
- const std::string& message = "Checkpoint " + multi_cast<std::string>(index)
- + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
- + " seconds.";
+ const std::string& message = "Checkpoint " + multi_cast<std::string>(index)
+ + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
+ + " seconds.";// Message is too long for a normal screen.
const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
ChatManager::message(message);
-
- }
+ }
- void SpaceRace::newCheckpointReached(RaceCheckPoint* p, PlayerInfo* pl)
- { int index = p->getCheckpointIndex();
- this->checkpointReached_[pl]=index;
- this->clock_.capture();
- int s = this->clock_.getSeconds();
- int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
+ void SpaceRace::newCheckpointReached(RaceCheckPoint* p, PlayerInfo* pl)
+ {
+ int index = p->getCheckpointIndex();
+ this->checkpointReached_[pl]=index;
+ this->clock_.capture();
+ int s = this->clock_.getSeconds();
+ int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
const std::string& message = "Checkpoint " + multi_cast<std::string>(index)
- + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
- + " seconds.";
- const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
- ChatManager::message(message);
-
-
- }
-
+ + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
+ + " seconds.";
+ const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
+ ChatManager::message(message);
+ }
+
+ void SpaceRace::playerEntered(PlayerInfo* player)
+ {
+ Gametype::playerEntered(player);
-
-void SpaceRace::playerEntered(PlayerInfo* player){
- Gametype::playerEntered(player);
-
- this->checkpointReached_[player]=-1;
- //this->playersAlive_++;
+ this->checkpointReached_[player]=-1;
+ //this->playersAlive_++;
}
- bool SpaceRace::playerLeft(PlayerInfo* player){
- return Gametype::playerLeft(player);
- // bool valid_player = true;
+ bool SpaceRace::playerLeft(PlayerInfo* player)
+ {
+ return Gametype::playerLeft(player);
+ // bool valid_player = true;
//if (valid_player)
// {
// this->playersAlive_--;
//}
// return valid_player;
- }
-
- bool SpaceRace::allowPawnHit(Pawn* victim, Pawn* originator)
+ }
+
+ bool SpaceRace::allowPawnHit(Pawn* victim, Pawn* originator)
{
return false;
}
Modified: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.h
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.h 2011-12-12 20:07:24 UTC (rev 8969)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.h 2011-12-13 21:50:14 UTC (rev 8970)
@@ -52,7 +52,7 @@
class _GametypesExport SpaceRace : public Gametype
{
friend class RaceCheckPoint;
- //friend class SpaceRaceManager;
+ //friend class SpaceRaceManager;
public:
SpaceRace(BaseObject* creator);
@@ -60,40 +60,37 @@
virtual void start();
virtual void end();
-
+
virtual void newCheckpointReached(SpaceRaceManager* p, int index,PlayerInfo* pl);
- virtual void newCheckpointReached(RaceCheckPoint* p, PlayerInfo* pl);
+ virtual void newCheckpointReached(RaceCheckPoint* p, PlayerInfo* pl);
inline void setCheckpointReached(int n, PlayerInfo* p)
{ this->checkpointReached_[p] = n;}
inline int getCheckpointReached(PlayerInfo* p)
{ return this->checkpointReached_[p]; }
-
+
inline void timeIsUp()
{ this->bTimeIsUp_ = true;}
- void tick(float dt);
-Clock clock_; //The clock starts running at the beginning of the game. It is used to give the time at each check point, the give the time at the end of the game, and to stop the game if a check point is reached too late.
+ void tick(float dt);
+ Clock clock_; //The clock starts running at the beginning of the game. It is used to give the time at each check point, the give the time at the end of the game, and to stop the game if a check point is reached too late.
- bool allowPawnHit(Pawn* victim, Pawn* originator);
+ bool allowPawnHit(Pawn* victim, Pawn* originator);
- bool allowPawnDamage(Pawn* victim, Pawn* originator);
+ bool allowPawnDamage(Pawn* victim, Pawn* originator);
- bool allowPawnDeath(Pawn* victim, Pawn* originator);
+ bool allowPawnDeath(Pawn* victim, Pawn* originator);
protected:
- virtual void playerEntered(PlayerInfo* player); //!< Initializes values.
- virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables.
+ virtual void playerEntered(PlayerInfo* player); //!< Initializes values.
+ virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables.
private:
- float maxSpeedBack_; float maxSpeedFront_; float maxSpeedLeftRight_; float maxSpeedUpDown_;
- bool cantMove_;
+ float maxSpeedBack_; float maxSpeedFront_; float maxSpeedLeftRight_; float maxSpeedUpDown_;
+ bool cantMove_;
std::map<PlayerInfo*, int>checkpointReached_; //The number of the last check point reached by each player.
std::set<float> scores_; //The times of the players are saved in a set.
bool bTimeIsUp_; //True if one of the check points is reached too late.
-
- int playersAlive_;
-
-
+ int playersAlive_;
};
}
Modified: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc 2011-12-12 20:07:24 UTC (rev 8969)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc 2011-12-13 21:50:14 UTC (rev 8970)
@@ -51,7 +51,7 @@
}
- SpaceRaceManager::~SpaceRaceManager()
+ SpaceRaceManager::~SpaceRaceManager()
{
if (this->isInitialized())
{
@@ -59,8 +59,8 @@
this->checkpoints_[i]->destroy();
}
}
-
- void SpaceRaceManager::addCheckpoint(RaceCheckPoint* checkpoint)
+
+ void SpaceRaceManager::addCheckpoint(RaceCheckPoint* checkpoint)
{
this->checkpoints_.push_back(checkpoint);
}
@@ -75,16 +75,13 @@
int SpaceRaceManager::getIndex(RaceCheckPoint* r)
{
-
- for (size_t i = 0; i < this->checkpoints_.size(); ++i)
- if (this->checkpoints_[i]==r){return i;}
+ for (size_t i = 0; i < this->checkpoints_.size(); ++i)
+ if (this->checkpoints_[i]==r) {return i;}
-
-
- return -1;
+ return -1;
}
- void SpaceRaceManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ void SpaceRaceManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
{
SUPER(SpaceRaceManager, XMLPort, xmlelement, mode);
@@ -94,46 +91,55 @@
void SpaceRaceManager::tick(float dt)
{
- SUPER(SpaceRaceManager,tick,dt);
+ SUPER(SpaceRaceManager,tick,dt);
- if(this->checkpoints_[0] != NULL && !this->firstcheckpointvisible_)
- {this->checkpoints_[0]->setRadarVisibility(true);this->firstcheckpointvisible_=false;}
+ if(this->checkpoints_[0] != NULL && !this->firstcheckpointvisible_)
+ {
+ this->checkpoints_[0]->setRadarVisibility(true);
+ this->firstcheckpointvisible_=false;
+ }
- for (size_t i = 0; i < this->checkpoints_.size(); ++i){
- if(this->checkpoints_[i]->reached_!=NULL)
+ for (size_t i = 0; i < this->checkpoints_.size(); ++i)
+ {
+ if(this->checkpoints_[i]->reached_!=NULL)
this->checkpointReached(this->checkpoints_[i],this->checkpoints_[i]->reached_);
-
- }
+ }
}
- void SpaceRaceManager::checkpointReached(RaceCheckPoint* check, PlayerInfo* player){
- SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
+ void SpaceRaceManager::checkpointReached(RaceCheckPoint* check, PlayerInfo* player)
+ {
+ SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
assert(gametype);
+ bool b =false;
+
+ int index=gametype->getCheckpointReached(player);
+ Vector3 v=Vector3 (-1,-1,-1);
+ if (index>-1)
+ {
+ RaceCheckPoint* tmp= this->getCheckpoint(index);
+ v= tmp->getNextcheckpoint();
-
- bool b =false;
-
- int index=gametype->getCheckpointReached(player);
- Vector3 v=Vector3 (-1,-1,-1);
- if (index>-1){
- RaceCheckPoint* tmp= this->getCheckpoint(index);
- v= tmp->getNextcheckpoint();
+ if (this->getCheckpoint(v.x) == check)
+ {
+ b = true;
+ }
-
- if (this->getCheckpoint(v.x)==check){
- b=true;
- }
-
- if (this->getCheckpoint(v.y)==check){
- b=true;
- }
- if (this->getCheckpoint(v.z)==check){
- b=true;
- } }
- else{b=(this->getIndex(check)==0);}
-
+ if (this->getCheckpoint(v.y) == check)
+ {
+ b = true;
+ }
+ if (this->getCheckpoint(v.z) == check)
+ {
+ b = true;
+ }
+ }
+ else
+ {
+ b = (this->getIndex(check) == 0);
+ }
+
if (gametype && b)
{
gametype->clock_.capture();
@@ -147,41 +153,40 @@
gametype->end();
else
{
- if (index > -1)this->setRadVis(player,false);
+ if (index > -1)this->setRadVis(player,false);
gametype->newCheckpointReached(check,player);
check->setRadarObjectColour(ColourValue::Green); //sets the radar colour of the checkpoint to green if it is reached, else it is red.
-
-
this->setRadVis(player, true);
-
}
}
- check->reached_=NULL;
+ check->reached_=NULL;
}
- void SpaceRaceManager::setRadVis(PlayerInfo* player, bool b){
- SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
+ void SpaceRaceManager::setRadVis(PlayerInfo* player, bool b)
+ {
+ SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
assert(gametype);
- int index=gametype->getCheckpointReached(player);
- Vector3 v=Vector3(-1,-1,-1);
- RaceCheckPoint* tmp= this->getCheckpoint(index);
- v= tmp->getNextcheckpoint();
+ int index = gametype->getCheckpointReached(player);
+ Vector3 v = Vector3(-1,-1,-1);
+ RaceCheckPoint* tmp = this->getCheckpoint(index);
+ v = tmp->getNextcheckpoint();
-
- if(v.x > -1){this->getCheckpoint(v.x)->setRadarVisibility(b);
- this->getCheckpoint(v.x)->settingsChanged();}
- if(v.y > -1){this->getCheckpoint(v.y)->setRadarVisibility(b);
- this->getCheckpoint(v.y)->settingsChanged();}
- if(v.z > -1){this->getCheckpoint(v.z)->setRadarVisibility(b);
- this->getCheckpoint(v.z)->settingsChanged();}
-
+ if(v.x > -1)
+ {
+ this->getCheckpoint(v.x)->setRadarVisibility(b);
+ this->getCheckpoint(v.x)->settingsChanged();
+ }
+ if(v.y > -1)
+ {
+ this->getCheckpoint(v.y)->setRadarVisibility(b);
+ this->getCheckpoint(v.y)->settingsChanged();
+ }
+ if(v.z > -1)
+ {
+ this->getCheckpoint(v.z)->setRadarVisibility(b);
+ this->getCheckpoint(v.z)->settingsChanged();
+ }
}
-
-
-
- }
-
-
-
+}
Modified: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h 2011-12-12 20:07:24 UTC (rev 8969)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h 2011-12-13 21:50:14 UTC (rev 8970)
@@ -52,30 +52,28 @@
class _GametypesExport SpaceRaceManager : public BaseObject, public Tickable
{
friend class RaceCheckPoint;
-
-
+
public:
SpaceRaceManager(BaseObject* creator);
virtual ~SpaceRaceManager() ;
- void XMLPort(Element& xmlelement, XMLPort::Mode mode);
- int getIndex(RaceCheckPoint* r);
+ void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+ int getIndex(RaceCheckPoint* r);
void addCheckpoint(RaceCheckPoint* checkpoint);
RaceCheckPoint* getCheckpoint(unsigned int index) const;
-
- void checkpointReached(RaceCheckPoint* check, PlayerInfo* player);
-
-
-
- void tick(float dt);
+
+ void checkpointReached(RaceCheckPoint* check, PlayerInfo* player);
+
+ void tick(float dt);
+
protected:
- void setRadVis(PlayerInfo* player, bool b);
+ void setRadVis(PlayerInfo* player, bool b);
+
private:
- std::vector<RaceCheckPoint*> checkpoints_;
- bool firstcheckpointvisible_;
-
-
- };
+ std::vector<RaceCheckPoint*> checkpoints_;
+ bool firstcheckpointvisible_;
+
+ };
}
#endif /* _SpaceRaceManager_H__ */
More information about the Orxonox-commit
mailing list