From 9b4cb56cc9b6c444f50180299fd6420b5348dfd0 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Tue, 16 Feb 2021 21:25:15 +0100 Subject: [PATCH] Set Simtime correctly --- test_suite/FGTestApi/testGlobals.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test_suite/FGTestApi/testGlobals.cxx b/test_suite/FGTestApi/testGlobals.cxx index bede4df29..45462bc59 100644 --- a/test_suite/FGTestApi/testGlobals.cxx +++ b/test_suite/FGTestApi/testGlobals.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -270,8 +271,11 @@ void runForTime(double t) const int logInterval = 0.5 * tickHz; int nextLog = 0; + long startTime = globals->get_time_params()->get_cur_time(); + for (int t = 0; t < ticks; ++t) { globals->inc_sim_time_sec(tickDuration); + globals->get_time_params()->update(globals->get_view_position(), startTime, t * tickDuration); globals->get_subsystem_mgr()->update(tickDuration); if (nextLog == 0) {