From: andy Date: Wed, 9 Nov 2005 20:34:46 +0000 (+0000) Subject: Architectural fix allowing the "tip" popups (FOV, view name, etc...) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=14c3bc593272b511e87a266196709b6b5229a1f1;p=flightgear.git Architectural fix allowing the "tip" popups (FOV, view name, etc...) 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. --- diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index ac668cb16..0ad4ad032 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -1578,7 +1578,7 @@ bool fgInitSubsystems() { //////////////////////////////////////////////////////////////////// globals->get_event_mgr()->init(); - globals->get_event_mgr()->setFreezeProperty(fgGetNode("/sim/freeze/clock")); + globals->get_event_mgr()->setRealtimeProperty(fgGetNode("/sim/time/delta-realtime-sec", true)); //////////////////////////////////////////////////////////////////// // Initialize the property interpolator subsystem diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index a1475ac00..870d6def1 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -498,7 +498,7 @@ bool FGNasalSys::handleCommand(const SGPropertyNode* arg) // settimer(func, dt, simtime) extension function. The first argument // is a Nasal function to call, the second is a delta time (from now), // in seconds. The third, if present, is a boolean value indicating -// that "simulator" time (rather than real time) is to be used. +// that "real world" time (rather than simulator time) is to be used. // // Implementation note: the FGTimer objects don't live inside the // garbage collector, so the Nasal handler functions have to be @@ -515,7 +515,7 @@ void FGNasalSys::setTimer(int argc, naRef* args) naRef delta = argc > 1 ? args[1] : naNil(); if(naIsNil(delta)) return; - bool simtime = (argc > 2 && naTrue(args[2])) ? true : false; + bool simtime = (argc > 2 && naTrue(args[2])) ? false : true; // Generate and register a C++ timer handler NasalTimer* t = new NasalTimer;