Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 3, 2012, 12:04:35 AM (12 years ago)
Author:
landauf
Message:

store the next checkpoints in a set instead of Vector3
+ some refactoring in SpaceRaceManager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/gametypes/SpaceRace.cc

    r9262 r9263  
    104104    void SpaceRace::newCheckpointReached(RaceCheckPoint* checkpoint, PlayerInfo* player)
    105105    {
    106         int index = checkpoint->getCheckpointIndex();
    107         this->checkpointReached_[player] = index;
     106        this->checkpointReached_[player] = checkpoint;
    108107
    109108        this->clock_.capture();
     
    111110        int ms = this->clock_.getMilliseconds() % 1000;
    112111
    113         const std::string& message = "Checkpoint " + multi_cast<std::string>(index + 1)
     112        const std::string& message = "Checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1)
    114113            + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.";
    115114        const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    116115        ChatManager::message(message);
    117     }
    118 
    119     void SpaceRace::playerEntered(PlayerInfo* player)
    120     {
    121         Gametype::playerEntered(player);
    122 
    123         this->checkpointReached_[player] = -1;
    124116    }
    125117
Note: See TracChangeset for help on using the changeset viewer.