1
0
Fork 0

UpdateLocal time when repositioning, the timezone might have changed

This commit is contained in:
Erik Hofman 2021-03-12 10:46:26 +01:00
parent c5c7532179
commit 8a9cc389e4

View file

@ -60,6 +60,7 @@
#include <simgear/embedded_resources/EmbeddedResourceManager.hxx>
#include <simgear/props/props_io.hxx>
#include <simgear/scene/tsync/terrasync.hxx>
#include <simgear/timing/sg_time.hxx>
#include <simgear/scene/material/Effect.hxx>
#include <simgear/scene/material/matlib.hxx>
@ -1238,6 +1239,10 @@ void fgStartReposition()
globals->get_subsystem("systems")->reinit();
globals->get_subsystem("instrumentation")->reinit();
globals->get_subsystem("xml-autopilot")->reinit();
// need to update the timezone
SGTime *t = globals->get_time_params();
t->updateLocal(globals->get_aircraft_position(), globals->get_fg_root() / "Timezone");
// setup state to end re-init
fgSetBool("/sim/signals/reinit", false);