From 6b08e31b239ff8bf80c49fb347d977697eef87c1 Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Sun, 21 Mar 2021 23:20:36 +0000 Subject: [PATCH] src/Main/fg_init.cxx: Fixed uneven replay of user aircraft when frame rate changes. The problem was that we were recording aircraft state before the FDM updated it, which meant that simtime changes were out of step with aircraft position by one frame. The fix is to run the FGReplay subsystem after the FDM subsystem instead of before, which simply requires changing the code to use SGSubsystemMgr::POST_FDM. This makes './flightgear/scripts/python/recordreplay.py --test-motion' pass (it previously failed). --- src/Main/fg_init.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 325832405..cc611bb4f 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -1103,7 +1103,7 @@ void fgCreateSubsystems(bool duringReset) { //////////////////////////////////////////////////////////////////// // Initialize the replay subsystem //////////////////////////////////////////////////////////////////// - globals->add_new_subsystem(SGSubsystemMgr::GENERAL); + globals->add_new_subsystem(SGSubsystemMgr::POST_FDM); globals->add_subsystem("history", new FGFlightHistory); #ifdef ENABLE_AUDIO_SUPPORT