Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8970


Ignore:
Timestamp:
Dec 13, 2011, 10:50:14 PM (12 years ago)
Author:
jo
Message:

Cleanup code. Functionallity remains unchanged.

Location:
code/branches/spaceraceTwo/src/modules/gametypes
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc

    r8968 r8970  
    5252        this->setBroadcast(false);
    5353        this->setSimultaneousTriggerers(100);
    54        
    55            
    56        
    57        
    5854        this->bTimeLimit_ = 0;
    59        
    6055
    6156        this->setRadarObjectColour(ColourValue::Blue);
    6257        this->setRadarObjectShape(RadarViewable::Triangle);
    63        
    64         this->setRadarVisibility(false);
    65         this->settingsChanged();
    66         this->reached_=NULL;
    67     //this->addTarget("WorldEntity");
    68    
    69    
     58        this->setRadarVisibility(false);
     59        this->settingsChanged();
     60        this->reached_=NULL;
     61        //this->addTarget("WorldEntity");
    7062    }
    7163   
    7264
    7365   RaceCheckPoint::~RaceCheckPoint()
    74     {
     66   {
    7567   
    76        
    77        
    78      
    79     }
     68   }
    8069
    8170    void RaceCheckPoint::tick(float dt)
     
    8574        SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
    8675        assert(gametype);
    87        
    8876    }
    8977
     
    9179    {
    9280        SUPER(RaceCheckPoint, XMLPort, xmlelement, mode);
    93         Vector3 v= Vector3(0,0,0);
     81        Vector3 v= Vector3(0,0,0);
    9482        XMLPortParam(RaceCheckPoint, "checkpointindex", setCheckpointIndex, getCheckpointIndex, xmlelement, mode).defaultValues(0);
    9583        XMLPortParam(RaceCheckPoint, "islast", setLast, getLast, xmlelement, mode).defaultValues(false);
     
    9886    }
    9987
    100         void RaceCheckPoint::fire(bool bIsTriggered,BaseObject* player)
     88    void RaceCheckPoint::fire(bool bIsTriggered,BaseObject* player)
    10189    {
    102         DistanceMultiTrigger::fire((bool)bIsTriggered,player);
     90        DistanceMultiTrigger::fire((bool)bIsTriggered,player);
    10391       
    104        SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
     92        SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
    10593        assert(gametype);
    106      ControllableEntity* entity=(ControllableEntity*) player;
     94        ControllableEntity* entity = (ControllableEntity*) player;
    10795     
    108       PlayerInfo* player2=entity->getPlayer();
     96        PlayerInfo* player2 = entity->getPlayer();
    10997     
    110         if(bIsTriggered)this->reached_=player2;
     98        if(bIsTriggered)
     99            this->reached_=player2;
    111100    }
    112101
  • code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h

    r8968 r8970  
    5252            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5353            virtual void tick(float dt);
    54         inline void setCheckpointIndex(int checkpointIndex)
     54            inline void setCheckpointIndex(int checkpointIndex)
    5555                { this->bCheckpointIndex_ = checkpointIndex; }
    5656            inline int getCheckpointIndex()
    5757                { return this->bCheckpointIndex_; }
    5858
    59         inline void setNextcheckpoint(const Vector3& checkpoints)
    60                 {this->nextcheckpoints_=checkpoints;}
     59            inline void setNextcheckpoint(const Vector3& checkpoints)
     60                { this->nextcheckpoints_=checkpoints; }
    6161            inline void setNextcheckpoint(float x, float y, float z)
    6262                { this->setNextcheckpoint(Vector3(x, y, z)); }
    63            inline const Vector3& getNextcheckpoint() const
    64                 {return this->nextcheckpoints_;}
    65 
    66        
    67  inline void setLast(bool isLast)
     63            inline const Vector3& getNextcheckpoint() const
     64                { return this->nextcheckpoints_; }
     65            inline void setLast(bool isLast)
    6866                { this->bIsLast_ = isLast; }
    6967            inline bool getLast()
    7068                { return this->bIsLast_; }
     69
    7170            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.
    7271            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.
    73         PlayerInfo* reached_;
    74                
    75         inline float getTimeLimit()
    76                 { return this->bTimeLimit_;}
     72            PlayerInfo* reached_;
     73               
     74            inline float getTimeLimit()
     75                { return this->bTimeLimit_; }
     76   
    7777        protected:
    7878            virtual void fire(bool bIsTriggered,BaseObject* player);
    79            
    80        
    81 
    8279            virtual void setTimelimit(float timeLimit);
    8380           
     
    8885            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.
    8986           
    90        
    91         Vector3 nextcheckpoints_; //the indexes of the next check points
    92 
    93        
    94        
    95       std::vector<RaceCheckPoint*> next_;
     87            Vector3 nextcheckpoints_; //the indexes of the next check points
     88            std::vector<RaceCheckPoint*> next_;
    9689    };
    9790}
  • code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc

    r8968 r8970  
    4747        RegisterObject(SpaceRace);
    4848       
    49        
    50    
    5149        this->bTimeIsUp_ = false;
    5250        this->numberOfBots_ = 0;
    5351        this->cantMove_=false;
    5452       
    55        
    5653       for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
    57         {this->checkpointReached_[it->first]=-1;}
    58        
     54        {this->checkpointReached_[it->first]=-1;} //TODO: should be removed; no functionallity
    5955       
    6056    }
     
    9995    void SpaceRace::start()
    10096    {
    101                
    102                            this->spawnPlayersIfRequested();
    103                            
    104                             Gametype::checkStart();
    105                            this->cantMove_=true;
    106          
    107                  for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
    108                                 {if(it->getMaxSpeedFront()>0){this->maxSpeedBack_=it->getMaxSpeedBack();
    109                                 this->maxSpeedFront_=it->getMaxSpeedFront();
    110                                 this->maxSpeedLeftRight_=it->getMaxSpeedLeftRight();
    111                                 this->maxSpeedUpDown_=(it->getMaxSpeedUpDown());
    112                                  }
    113                                 it->setMaxSpeedBack(0);
    114                                 it->setMaxSpeedFront(0);
    115                         it->setMaxSpeedLeftRight(0);
    116                                 it->setMaxSpeedUpDown(0);
    117                                  
    118                                
    119                                 }
    120                                
    121                                this->addBots(this->numberOfBots_);
    122                                
    123      
    124     }
    125    
    126     void SpaceRace::tick(float dt){
    127     SUPER(SpaceRace,tick,dt);
    128    
    129     if(!this->isStartCountdownRunning() && this->cantMove_){
    130    
    131         for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
    132                                 {
    133                                 it->setMaxSpeedBack(this->maxSpeedBack_);
    134                                  it->setMaxSpeedFront(this->maxSpeedFront_);
    135                                  it->setMaxSpeedLeftRight(this->maxSpeedLeftRight_);
    136                                  it->setMaxSpeedUpDown(this->maxSpeedUpDown_);
    137                 }
    138                 this->cantMove_= false;
    139                
    140                 std::string message("The match has started! Reach the check points as quickly as possible!");
    141         const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    142         ChatManager::message(message);         
    143      
    144     }
    145    
     97
     98        this->spawnPlayersIfRequested();
     99        Gametype::checkStart();
     100        this->cantMove_=true;
     101        //TODO: switch the engine off/on via a short function 
     102        for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
     103        {
     104            if(it->getMaxSpeedFront()>0)
     105            {
     106                this->maxSpeedBack_=it->getMaxSpeedBack();
     107                this->maxSpeedFront_=it->getMaxSpeedFront();
     108                this->maxSpeedLeftRight_=it->getMaxSpeedLeftRight();
     109                this->maxSpeedUpDown_=(it->getMaxSpeedUpDown());
     110            }
     111            it->setMaxSpeedBack(0);
     112            it->setMaxSpeedFront(0);
     113            it->setMaxSpeedLeftRight(0);
     114            it->setMaxSpeedUpDown(0);
     115        }
     116        this->addBots(this->numberOfBots_);
     117    }
     118   
     119    void SpaceRace::tick(float dt)
     120    {
     121        SUPER(SpaceRace,tick,dt);
     122   
     123        if(!this->isStartCountdownRunning() && this->cantMove_)
     124        {
     125            for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
     126            {
     127                it->setMaxSpeedBack(this->maxSpeedBack_);
     128                it->setMaxSpeedFront(this->maxSpeedFront_);
     129                it->setMaxSpeedLeftRight(this->maxSpeedLeftRight_);
     130                it->setMaxSpeedUpDown(this->maxSpeedUpDown_);
     131            }
     132            this->cantMove_= false;
     133           
     134            std::string message("The match has started! Reach the check points as quickly as possible!");
     135            const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     136            ChatManager::message(message);           
     137        }
    146138   
    147139    }
    148140
    149        
     141   
    150142   
    151143    void SpaceRace::newCheckpointReached(SpaceRaceManager* p, int index,PlayerInfo* pl)
    152             {
    153                 this->checkpointReached_[pl]=index;
     144    {
     145        this->checkpointReached_[pl]=index;
    154146        this->clock_.capture();
    155                 int s = this->clock_.getSeconds();
     147        int s = this->clock_.getSeconds();
    156148        int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
    157                 const std::string& message = "Checkpoint " + multi_cast<std::string>(index)
    158                         + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
    159                                 + " seconds.";
     149        const std::string& message = "Checkpoint " + multi_cast<std::string>(index)
     150            + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
     151            + " seconds.";// Message is too long for a normal screen.
    160152        const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    161153        ChatManager::message(message);
    162                        
    163             }
     154    }
    164155   
    165      void SpaceRace::newCheckpointReached(RaceCheckPoint* p, PlayerInfo* pl)
    166             {   int index = p->getCheckpointIndex();
    167                 this->checkpointReached_[pl]=index;
    168                 this->clock_.capture();
    169                 int s = this->clock_.getSeconds();
    170                 int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
     156    void SpaceRace::newCheckpointReached(RaceCheckPoint* p, PlayerInfo* pl)
     157    {   
     158        int index = p->getCheckpointIndex();
     159        this->checkpointReached_[pl]=index;
     160        this->clock_.capture();
     161        int s = this->clock_.getSeconds();
     162        int ms = static_cast<int>(this->clock_.getMilliseconds()-1000*s);
    171163        const std::string& message = "Checkpoint " + multi_cast<std::string>(index)
    172                                 + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
    173                         + " seconds.";
    174                 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    175                 ChatManager::message(message);
    176                
    177                
    178             }
    179            
    180    
    181    
    182 
    183 void SpaceRace::playerEntered(PlayerInfo* player){
    184         Gametype::playerEntered(player);
    185        
    186         this->checkpointReached_[player]=-1;
    187         //this->playersAlive_++;
    188     }
    189    
    190         bool SpaceRace::playerLeft(PlayerInfo* player){
    191         return Gametype::playerLeft(player);
    192                 // bool valid_player = true;
     164            + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
     165            + " seconds.";
     166        const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     167        ChatManager::message(message);
     168    }
     169       
     170   
     171    void SpaceRace::playerEntered(PlayerInfo* player)
     172    {
     173        Gametype::playerEntered(player);
     174   
     175        this->checkpointReached_[player]=-1;
     176        //this->playersAlive_++;
     177    }
     178   
     179    bool SpaceRace::playerLeft(PlayerInfo* player)
     180    {
     181        return Gametype::playerLeft(player);
     182        // bool valid_player = true;
    193183        //if (valid_player)
    194184       // {
     
    197187
    198188       // return valid_player;
    199         }
    200        
    201         bool SpaceRace::allowPawnHit(Pawn* victim, Pawn* originator)
     189    }
     190   
     191    bool SpaceRace::allowPawnHit(Pawn* victim, Pawn* originator)
    202192    {
    203193        return false;
  • code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.h

    r8968 r8970  
    5353    {
    5454        friend class RaceCheckPoint;
    55         //friend class SpaceRaceManager;
     55        //friend class SpaceRaceManager;
    5656
    5757        public:
     
    6161            virtual void start();
    6262            virtual void end();
    63                
     63
    6464            virtual void newCheckpointReached(SpaceRaceManager* p, int index,PlayerInfo* pl);
    65                 virtual void newCheckpointReached(RaceCheckPoint* p, PlayerInfo* pl);
     65            virtual void newCheckpointReached(RaceCheckPoint* p, PlayerInfo* pl);
    6666
    6767            inline void setCheckpointReached(int n, PlayerInfo* p)
     
    6969            inline int getCheckpointReached(PlayerInfo* p)
    7070                { return this->checkpointReached_[p]; }
    71                
     71
    7272            inline void timeIsUp()
    7373                { this->bTimeIsUp_ = true;}
    74         void tick(float dt);
    75 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.
     74            void tick(float dt);
     75            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.
    7676
    7777
    78           bool allowPawnHit(Pawn* victim, Pawn* originator);
     78            bool allowPawnHit(Pawn* victim, Pawn* originator);
    7979
    80     bool allowPawnDamage(Pawn* victim, Pawn* originator);
     80            bool allowPawnDamage(Pawn* victim, Pawn* originator);
    8181
    82     bool allowPawnDeath(Pawn* victim, Pawn* originator);
     82            bool allowPawnDeath(Pawn* victim, Pawn* originator);
    8383        protected:
    84                 virtual void playerEntered(PlayerInfo* player); //!< Initializes values.
    85                 virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables.
     84            virtual void playerEntered(PlayerInfo* player); //!< Initializes values.
     85            virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables.
    8686        private:
    87         float maxSpeedBack_; float maxSpeedFront_; float maxSpeedLeftRight_; float maxSpeedUpDown_;
    88         bool cantMove_;
     87            float maxSpeedBack_; float maxSpeedFront_; float maxSpeedLeftRight_; float maxSpeedUpDown_;
     88            bool cantMove_;
    8989            std::map<PlayerInfo*, int>checkpointReached_; //The number of the last check point reached by each player.
    9090            std::set<float> scores_; //The times of the players are saved in a set.
    9191            bool bTimeIsUp_; //True if one of the check points is reached too late.
    9292           
    93                
    94                 int playersAlive_;
    95 
    96        
     93            int playersAlive_;
    9794    };
    9895}
  • code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc

    r8968 r8970  
    5252    }
    5353
    54    SpaceRaceManager::~SpaceRaceManager()
     54    SpaceRaceManager::~SpaceRaceManager()
    5555    {
    5656        if (this->isInitialized())
     
    6060        }
    6161    }
    62     
    63      void SpaceRaceManager::addCheckpoint(RaceCheckPoint* checkpoint)
     62   
     63    void SpaceRaceManager::addCheckpoint(RaceCheckPoint* checkpoint)
    6464    {
    6565        this->checkpoints_.push_back(checkpoint);
     
    7676    int SpaceRaceManager::getIndex(RaceCheckPoint* r)
    7777    {
    78        
    79                  for (size_t i = 0; i < this->checkpoints_.size(); ++i)
    80                 if (this->checkpoints_[i]==r){return i;}
     78        for (size_t i = 0; i < this->checkpoints_.size(); ++i)
     79            if (this->checkpoints_[i]==r) {return i;}
    8180           
    82          
    83        
    84             return -1;
     81        return -1;
    8582    }
    8683   
    87      void SpaceRaceManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     84    void SpaceRaceManager::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    8885    {
    8986        SUPER(SpaceRaceManager, XMLPort, xmlelement, mode);
     
    9592    void SpaceRaceManager::tick(float dt)
    9693    {
    97     SUPER(SpaceRaceManager,tick,dt);
     94        SUPER(SpaceRaceManager,tick,dt);
    9895     
    99      if(this->checkpoints_[0] != NULL && !this->firstcheckpointvisible_)
    100          {this->checkpoints_[0]->setRadarVisibility(true);this->firstcheckpointvisible_=false;}
     96        if(this->checkpoints_[0] != NULL && !this->firstcheckpointvisible_)
     97        {
     98            this->checkpoints_[0]->setRadarVisibility(true);
     99            this->firstcheckpointvisible_=false;
     100        }
    101101         
    102          for (size_t i = 0; i < this->checkpoints_.size(); ++i){
    103                 if(this->checkpoints_[i]->reached_!=NULL)
     102        for (size_t i = 0; i < this->checkpoints_.size(); ++i)
     103        {
     104            if(this->checkpoints_[i]->reached_!=NULL)
    104105                this->checkpointReached(this->checkpoints_[i],this->checkpoints_[i]->reached_);
    105          
    106      }
     106        }
    107107    }
    108108   
    109109   
    110     void SpaceRaceManager::checkpointReached(RaceCheckPoint* check, PlayerInfo* player){
    111          SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
     110    void SpaceRaceManager::checkpointReached(RaceCheckPoint* check, PlayerInfo* player)
     111    {
     112        SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
    112113        assert(gametype);
    113114       
     115        bool b =false;   
     116           
     117        int index=gametype->getCheckpointReached(player);
     118        Vector3 v=Vector3 (-1,-1,-1);
     119        if (index>-1)
     120        {
     121            RaceCheckPoint* tmp= this->getCheckpoint(index);
     122            v= tmp->getNextcheckpoint();
    114123       
    115    
    116                  bool b =false;
    117                
    118                 int index=gametype->getCheckpointReached(player);
    119                 Vector3 v=Vector3 (-1,-1,-1);
    120                 if (index>-1){
    121                 RaceCheckPoint* tmp= this->getCheckpoint(index);
    122                 v= tmp->getNextcheckpoint();
     124            if (this->getCheckpoint(v.x) == check)
     125            {
     126                b = true;
     127            }   
    123128       
    124        
    125         if (this->getCheckpoint(v.x)==check){
    126                 b=true;
    127         }       
    128        
    129        if (this->getCheckpoint(v.y)==check){
    130                 b=true;
    131         }       
    132        if (this->getCheckpoint(v.z)==check){
    133                 b=true;
    134         }       }
    135         else{b=(this->getIndex(check)==0);}
    136                
     129            if (this->getCheckpoint(v.y) == check)
     130            {
     131                b = true;
     132            }   
     133            if (this->getCheckpoint(v.z) == check)
     134            {
     135                b = true;
     136            }   
     137        }
     138        else
     139        {
     140            b = (this->getIndex(check) == 0);
     141        }
     142           
    137143        if (gametype && b)
    138144        {
     
    148154            else
    149155            {
    150                 if (index > -1)this->setRadVis(player,false);
     156                if (index > -1)this->setRadVis(player,false);
    151157                gametype->newCheckpointReached(check,player);
    152158                check->setRadarObjectColour(ColourValue::Green); //sets the radar colour of the checkpoint to green if it is reached, else it is red.
    153159               
    154                
    155                
    156160                this->setRadVis(player, true);
    157                
    158161            }
    159162        }
    160         check->reached_=NULL;
     163        check->reached_=NULL;
    161164    }
    162165   
    163     void SpaceRaceManager::setRadVis(PlayerInfo* player, bool b){
    164         SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
     166    void SpaceRaceManager::setRadVis(PlayerInfo* player, bool b)
     167    {
     168        SpaceRace* gametype = orxonox_cast<SpaceRace*>(this->getGametype().get());
    165169        assert(gametype);
    166         int index=gametype->getCheckpointReached(player);
    167         Vector3 v=Vector3(-1,-1,-1);
    168         RaceCheckPoint* tmp= this->getCheckpoint(index);
    169                 v= tmp->getNextcheckpoint();
     170        int index = gametype->getCheckpointReached(player);
     171        Vector3 v = Vector3(-1,-1,-1);
     172        RaceCheckPoint* tmp = this->getCheckpoint(index);
     173        v = tmp->getNextcheckpoint();
    170174   
    171    
    172          if(v.x > -1){this->getCheckpoint(v.x)->setRadarVisibility(b);
    173                 this->getCheckpoint(v.x)->settingsChanged();}
    174                 if(v.y > -1){this->getCheckpoint(v.y)->setRadarVisibility(b);
    175                 this->getCheckpoint(v.y)->settingsChanged();}
    176                 if(v.z > -1){this->getCheckpoint(v.z)->setRadarVisibility(b);
    177                 this->getCheckpoint(v.z)->settingsChanged();}
    178    
     175        if(v.x > -1)
     176        {
     177            this->getCheckpoint(v.x)->setRadarVisibility(b);
     178            this->getCheckpoint(v.x)->settingsChanged();
     179        }
     180        if(v.y > -1)
     181        {
     182            this->getCheckpoint(v.y)->setRadarVisibility(b);
     183            this->getCheckpoint(v.y)->settingsChanged();
     184        }
     185        if(v.z > -1)
     186        {
     187            this->getCheckpoint(v.z)->setRadarVisibility(b);
     188            this->getCheckpoint(v.z)->settingsChanged();
     189        }
    179190    }
    180191   
    181    
    182    
    183    
    184     }
    185 
    186 
    187 
     192}
  • code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h

    r8968 r8970  
    5353    {
    5454        friend class RaceCheckPoint;
    55        
    56 
     55   
    5756        public:
    5857            SpaceRaceManager(BaseObject* creator);
    5958            virtual ~SpaceRaceManager() ;
    6059
    61            void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    62                 int getIndex(RaceCheckPoint* r);
     60            void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     61            int getIndex(RaceCheckPoint* r);
    6362            void addCheckpoint(RaceCheckPoint* checkpoint);
    6463            RaceCheckPoint* getCheckpoint(unsigned int index) const;
    65                
    66         void checkpointReached(RaceCheckPoint* check, PlayerInfo* player);
    67                
    68        
    69 
    70         void tick(float dt);
     64       
     65            void checkpointReached(RaceCheckPoint* check, PlayerInfo* player);
     66       
     67            void tick(float dt);
     68   
    7169        protected:
    72                  void setRadVis(PlayerInfo* player, bool b);
     70            void setRadVis(PlayerInfo* player, bool b);
     71   
    7372        private:
    74                 std::vector<RaceCheckPoint*> checkpoints_;
    75                 bool firstcheckpointvisible_;
    76                
    77                
    78  };
     73            std::vector<RaceCheckPoint*> checkpoints_;
     74            bool firstcheckpointvisible_;
     75       
     76    };
    7977}
    8078
Note: See TracChangeset for help on using the changeset viewer.