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/orxonox/gamestates/GSGraphics.cc

    r2928 r2996  
    5757namespace orxonox
    5858{
    59     AddGameState(GSGraphics, "graphics");
    60 
    61     GSGraphics::GSGraphics(const std::string& name)
    62         : GameState(name)
     59    AddGameState(GSGraphics, "graphics", false);
     60
     61    GSGraphics::GSGraphics(const std::string& name, bool countTickTime)
     62        : GameState(name, countTickTime)
    6363        , inputManager_(0)
    6464        , console_(0)
     
    213213        uint64_t timeBeforeTick = time.getRealMicroseconds();
    214214
    215         this->inputManager_->update(time);        // tick console
     215        this->inputManager_->update(time);
    216216        this->console_->update(time);
    217         this->guiManager_->update(time);
    218217
    219218        uint64_t timeAfterTick = time.getRealMicroseconds();
     
    222221        Game::getInstance().addTickTime(timeAfterTick - timeBeforeTick);
    223222
     223        // Process gui events
     224        this->guiManager_->update(time);
    224225        // Render
    225226        this->graphicsManager_->update(time);
Note: See TracChangeset for help on using the changeset viewer.