Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2009, 4:13:26 PM (15 years ago)
Author:
rgrieder
Message:

Fixed tick-time issue: Not all tick times were being taken into account.
As of now, only GSRoot and GSGraphics manage the tick times themselves (marked with "AddGameState(GSRoot, "root", false)")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp3/src/core/Game.cc

    r2927 r2996  
    168168            for (std::vector<GameState*>::const_iterator it = this->activeStates_.begin();
    169169                it != this->activeStates_.end(); ++it)
     170            {
     171                // Add tick time for most of the states
     172                uint64_t timeBeforeTick;
     173                if ((*it)->getCountTickTime())
     174                    timeBeforeTick = this->gameClock_->getRealMicroseconds();
     175               
    170176                (*it)->update(*this->gameClock_);
     177
     178                if ((*it)->getCountTickTime())
     179                    this->addTickTime(this->gameClock_->getRealMicroseconds() - timeBeforeTick);
     180            }
    171181
    172182            // STATISTICS
Note: See TracChangeset for help on using the changeset viewer.