Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 2, 2012, 11:08:21 PM (12 years ago)
Author:
landauf
Message:

fixed bug in SpaceRaceManager - it used the wrong index to identify Checkpoints (the order in which they appear in the XML file instead of RaceCheckPoint::getCheckpointIndex())
+ some more cleanup

File:
1 edited

Legend:

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

    r9261 r9262  
    7878        SUPER(SpaceRace,tick,dt);
    7979
     80        // spawn the players already when the countdown starts, but deactivate their engines
    8081        if (this->isStartCountdownRunning() && !this->cantMove_)
    8182        {
     
    8788        }
    8889
     90        // activate the engines again if the countdown ends
    8991        if (!this->isStartCountdownRunning() && this->cantMove_)
    9092        {
     
    104106        int index = checkpoint->getCheckpointIndex();
    105107        this->checkpointReached_[player] = index;
     108
    106109        this->clock_.capture();
    107110        int s = this->clock_.getSeconds();
    108111        int ms = this->clock_.getMilliseconds() % 1000;
    109         const std::string& message = "Checkpoint " + multi_cast<std::string>(index)
     112
     113        const std::string& message = "Checkpoint " + multi_cast<std::string>(index + 1)
    110114            + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.";
    111115        const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
Note: See TracChangeset for help on using the changeset viewer.