Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 2, 2012, 10:46:25 PM (13 years ago)
Author:
landauf
Message:

fixed start-countdown issue in spacerace

Location:
code/trunk/src/modules/gametypes
Files:
2 edited

Legend:

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

    r9260 r9261  
    7474    }
    7575
    76     void SpaceRace::start()
    77     {
    78         this->spawnPlayersIfRequested();
    79         Gametype::checkStart();
    80         this->cantMove_ = true;
    81 
    82         for (ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
    83             it->setActive(false);
    84 
    85         this->addBots(this->numberOfBots_);
    86     }
    87 
    8876    void SpaceRace::tick(float dt)
    8977    {
    9078        SUPER(SpaceRace,tick,dt);
     79
     80        if (this->isStartCountdownRunning() && !this->cantMove_)
     81        {
     82            this->spawnPlayersIfRequested();
     83            this->cantMove_ = true;
     84
     85            for (ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
     86                it->setActive(false);
     87        }
    9188
    9289        if (!this->isStartCountdownRunning() && this->cantMove_)
  • code/trunk/src/modules/gametypes/SpaceRace.h

    r9260 r9261  
    5959            void tick(float dt);
    6060
    61             virtual void start();
    6261            virtual void end();
    6362
Note: See TracChangeset for help on using the changeset viewer.