Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 31, 2008, 11:44:41 AM (15 years ago)
Author:
scheusso
Message:

Fixed that problems with statistical info of tick time/fps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/gamestates/GSRoot.cc

    r2555 r2558  
    104104
    105105        // reset frame counter
    106         this->frameCount_ = 0;
    107106        this->statisticsStartTime_ = 0;
    108107        this->statisticsTickTimes_.clear();
     
    223222
    224223        // STATISTICS
     224        assert(timeAfterTick - timeBeforeTick >= 0 );
    225225        statisticsTickInfo tickInfo = {timeAfterTick, timeAfterTick - timeBeforeTick};
    226226        statisticsTickTimes_.push_back(tickInfo);
     227        assert(statisticsTickTimes_.back().tickLength==tickInfo.tickLength);
    227228
    228229        // Ticks GSGraphics or GSDedicated
     
    230231
    231232        // Note: tickInfo.tickLength is modified by GSGraphics or GSDedicated!
    232         this->periodTickTime_ += statisticsTickTimes_.back().tickLength;
     233        this->periodTickTime_ += tickInfo.tickLength;
    233234        if (timeAfterTick > statisticsStartTime_ + statisticsRefreshCycle_)
    234235        {
     
    240241                do
    241242                {
     243                    assert(this->periodTickTime_ > it->tickLength);
    242244                    this->periodTickTime_ -= it->tickLength;
    243245                    ++it;
     
    254256        }
    255257
    256         ++this->frameCount_;
    257258    }
    258259
Note: See TracChangeset for help on using the changeset viewer.