Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 19, 2009, 6:11:00 PM (15 years ago)
Author:
rgrieder
Message:

Moved global game clock to Core. Use getGameClock() for a const reference to an object that can tell you the time since the game was started or since the last capture() (which is usually once a frame).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/Game.cc

    r2805 r2807  
    8989        this->abort_ = false;
    9090
    91         this->core_ = new orxonox::Core(argc, argv);
    92         if (!this->core_->isLoaded())
    93         {
    94             COUT(0) << "Core was not fully loaded, probably an exception occurred during consruction. Aborting" << std::endl;
    95             abort();
    96         }
     91        this->core_ = new orxonox::Core();
     92        this->gameClock_ = this->core_->initialise(argc, argv);
    9793    }
    9894
     
    142138        root.addChild(&dedicated);
    143139
    144 
    145         // start global orxonox time
    146         Clock clock;
    147 
    148140        root.activate();
    149141
     
    153145        while (!this->abort_)
    154146        {
    155             clock.capture();
     147            this->gameClock_->capture();
    156148
    157             root.tick(clock);
     149            root.tick(*this->gameClock_);
    158150
    159151            if (root.stateRequest_ != "")
Note: See TracChangeset for help on using the changeset viewer.