Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2008, 5:30:11 AM (16 years ago)
Author:
landauf
Message:

merged console branch into network branch

after several heavy troubles it compiles, but there is still a bug I couldn't fix: orxonox crashes as soon as one presses a key after opening the console… maybe someone else sees the problem?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/tools/Timer.cc

    r1293 r1446  
    2727 */
    2828
     29#include <set>
     30
    2931#include "OrxonoxStableHeaders.h"
    3032#include "Timer.h"
     
    3739namespace orxonox
    3840{
    39     ConsoleCommandShortcutExtern(delay, AccessLevel::None);
     41    SetConsoleCommandShortcutExtern(delay);
     42    SetConsoleCommandShortcutExtern(killdelays);
     43
     44    static std::set<StaticTimer*> delaytimerset;
    4045
    4146    /**
     
    4752    {
    4853        StaticTimer *delaytimer = new StaticTimer();
     54        delaytimerset.insert(delaytimer);
     55
    4956        ExecutorStatic* delayexecutor = createExecutor(createFunctor(&executeDelayedCommand));
    5057        delayexecutor->setDefaultValues(delaytimer, command);
     
    6168        CommandExecutor::execute(command);
    6269        delete timer;
     70        delaytimerset.erase(timer);
     71    }
     72
     73    /**
     74        @brief Kills all delayed commands.
     75    */
     76    void killdelays()
     77    {
     78        for (std::set<StaticTimer*>::iterator it = delaytimerset.begin(); it != delaytimerset.end(); ++it)
     79            delete (*it);
     80
     81        delaytimerset.clear();
    6382    }
    6483
Note: See TracChangeset for help on using the changeset viewer.