1
0
Fork 0

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).
This commit is contained in:
Julian Smith 2021-03-21 23:20:36 +00:00
parent 5c76f41743
commit 6b08e31b23

View file

@ -1103,7 +1103,7 @@ void fgCreateSubsystems(bool duringReset) {
////////////////////////////////////////////////////////////////////
// Initialize the replay subsystem
////////////////////////////////////////////////////////////////////
globals->add_new_subsystem<FGReplay>(SGSubsystemMgr::GENERAL);
globals->add_new_subsystem<FGReplay>(SGSubsystemMgr::POST_FDM);
globals->add_subsystem("history", new FGFlightHistory);
#ifdef ENABLE_AUDIO_SUPPORT