diff --git a/src/Time/TimeManager.cxx b/src/Time/TimeManager.cxx index e32827620..bb9c3693d 100644 --- a/src/Time/TimeManager.cxx +++ b/src/Time/TimeManager.cxx @@ -382,7 +382,12 @@ void TimeManager::computeTimeDeltasSimple(double& simDt, double& realDt) void TimeManager::computeTimeDeltas(double& simDt, double& realDt) { - if (_simpleTimeEnabled->getBoolValue()) { + bool simple_time = _simpleTimeEnabled->getBoolValue(); + if (simple_time != _simpleTimeEnabledPrev) { + _simpleTimeEnabledPrev = simple_time; + _firstUpdate = true; + } + if (simple_time) { computeTimeDeltasSimple(simDt, realDt); return; } diff --git a/src/Time/TimeManager.hxx b/src/Time/TimeManager.hxx index 27f6948ec..f173e38bf 100644 --- a/src/Time/TimeManager.hxx +++ b/src/Time/TimeManager.hxx @@ -128,6 +128,7 @@ private: SGPropertyNode_ptr _modelHz; SGPropertyNode_ptr _timeDelta, _simTimeDelta; + bool _simpleTimeEnabledPrev = false; SGPropertyNode_ptr _simpleTimeEnabled; SGPropertyNode_ptr _simpleTimeUtc; SGPropertyNode_ptr _simpleTimeFdm;