From 5e6c2b8e8241b85e2a1ce9a1bc466039e325946e Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 10 Mar 2014 12:02:10 +0000 Subject: [PATCH] Reset the Autopilot on reposition. - previously we restored AP state to initial; let's actually re-init it after re-position. --- src/Main/fg_init.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 5b8d4b9b7..27878f7c0 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -965,10 +965,6 @@ void fgStartReposition() terraSync->reposition(); } - // Force reupdating the positions of the ai 3d models. They are used for - // initializing ground level for the FDM. - //globals->get_subsystem("ai-model")->reinit(); - // Initialize the FDM globals->get_subsystem("flight")->reinit(); @@ -987,11 +983,13 @@ void fgStartReposition() } // need to bind FDMshell again, since we manually unbound it above... - globals->get_subsystem("flight")->bind(); + fdm->bind(); - // need to reset aircraft (systems/instruments) so they can adapt to current environment + // need to reset aircraft (systems/instruments/autopilot) + // so they can adapt to current environment globals->get_subsystem("systems")->reinit(); globals->get_subsystem("instrumentation")->reinit(); + globals->get_subsystem("xml-autopilot")->reinit(); // setup state to end re-init fgSetBool("/sim/signals/reinit", false); -- 2.39.5