Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 17, 2010, 8:25:21 PM (14 years ago)
Author:
landauf
Message:

removed network as dependency of tools. these libraries can build in parallel again now.
moved network synchronization of setTimeFactor from TimeFactorListener to GSRoot (GSRoot inherits from TimeFactorListener now)

File:
1 edited

Legend:

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

    r6417 r7172  
    3636#include "network/NetworkFunction.h"
    3737#include "tools/Timer.h"
    38 #include "tools/interfaces/TimeFactorListener.h"
    3938#include "tools/interfaces/Tickable.h"
    4039
     
    4342    DeclareGameState(GSRoot, "root", false, false);
    4443    SetConsoleCommandShortcut(GSRoot, printObjects);
     44
     45    registerStaticNetworkFunction(&TimeFactorListener::setTimeFactor);
    4546
    4647    GSRoot::GSRoot(const GameStateInfo& info)
     
    153154    }
    154155
    155     float GSRoot::getTimeFactor()
     156    void GSRoot::changedTimeFactor(float factor_new, float factor_old)
    156157    {
    157         return TimeFactorListener::getTimeFactor();
     158        if (!GameMode::isStandalone())
     159            callStaticNetworkFunction(&TimeFactorListener::setTimeFactor, CLIENTID_UNKNOWN, factor_new);
    158160    }
    159161}
Note: See TracChangeset for help on using the changeset viewer.