to pop themselves down while the simulator is paused.
The problem was with the "real time" queue in the event manager,
causing the third argument of Nasal's settimer() (a flag for "sim
time") to be ignored. Inverts the default sense of the argument, as
there are lots of uses of settimer() in the current code, almost none
of which want to use real time.
Note this fix introduces a header file incompatibility in SimGear --
be sure to update.
void SGEventMgr::update(double delta_time_sec)
{
- _rtQueue.update(delta_time_sec);
- if(!_freezeProp || _freezeProp->getBoolValue() == false)
- _simQueue.update(delta_time_sec);
+ _simQueue.update(delta_time_sec);
+
+ double rt = _rtProp ? _rtProp->getDoubleValue() : 0;
+ _rtQueue.update(rt);
}
////////////////////////////////////////////////////////////////////////
class SGEventMgr : public SGSubsystem
{
public:
- SGEventMgr() { _freezeProp = 0; }
- ~SGEventMgr() { _freezeProp = 0; }
+ SGEventMgr() { _rtProp = 0; }
+ ~SGEventMgr() { _rtProp = 0; }
virtual void init() {}
virtual void update(double delta_time_sec);
- void setFreezeProperty(SGPropertyNode* node) { _freezeProp = node; }
+ void setRealtimeProperty(SGPropertyNode* node) { _rtProp = node; }
/**
* Add a single function callback event as a repeating task.
bool repeat, bool simtime);
SGPropertyNode* _freezeProp;
+ SGPropertyNode* _rtProp;
SGTimerQueue _rtQueue;
SGTimerQueue _simQueue;
};