X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2Ffdm_shell.cxx;h=f06303e2024b565ec1ce2d87fa100f34c39c1d5a;hb=8b05d7b2111aac07e048eed65433a2bb0ef37e1d;hp=faa37d788520db2368f12916fc8a78ff7ccd151c;hpb=5b8ab277fdafaa8e14679434205d8b60fafdccc9;p=flightgear.git diff --git a/src/FDM/fdm_shell.cxx b/src/FDM/fdm_shell.cxx index faa37d788..f06303e20 100644 --- a/src/FDM/fdm_shell.cxx +++ b/src/FDM/fdm_shell.cxx @@ -81,6 +81,7 @@ void FDMShell::init() _pressure_inhg = _props->getNode("environment/pressure-inhg", true); _density_slugft = _props->getNode("environment/density-slugft3", true); _data_logging = _props->getNode("/sim/temp/fdm-data-logging", true); + _replay_master = _props->getNode("/sim/freeze/replay-state", true); createImplementation(); } @@ -170,8 +171,20 @@ void FDMShell::update(double dt) _impl->ToggleDataLogging(doLog); } - if (!_impl->is_suspended()) - _impl->update(dt); + switch(_replay_master->getIntValue()) + { + case 0: + // normal FDM operation + _impl->update(dt); + break; + case 3: + // resume FDM operation at current replay position + _impl->reinit(); + break; + default: + // replay is active + break; + } } void FDMShell::createImplementation() @@ -261,14 +274,3 @@ void FDMShell::createImplementation() } } - -/* - * Return FDM subsystem. - */ - -SGSubsystem* FDMShell::getFDM() -{ - /* FIXME we could drop/replace this method, when _impl was a added - * to the global subsystem manager - like other proper subsystems... */ - return _impl; -}