From 2b338113aff2c06d4e9a8feb920359731abf9ad1 Mon Sep 17 00:00:00 2001 From: mfranz Date: Tue, 16 Oct 2007 07:55:43 +0000 Subject: [PATCH] give FDMs one update cycle time before setting the fdm-initialized signal (YASim needs that to fully initialize the landing gear) --- src/Main/main.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index c39620789..cd6b71b30 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -152,11 +152,6 @@ void fgUpdateTimeDepCalcs() { if ( cur_fdm_state->get_inited() ) { // we have been inited, and we are good to go ... - if ( !inited ) { - inited = true; - fgSetBool("/sim/signals/fdm-initialized", true); - } - if ( replay_state->getIntValue() == 0 ) { // replay off, run fdm cur_fdm_state->update( delta_time_sec ); @@ -172,6 +167,12 @@ void fgUpdateTimeDepCalcs() { // paused playback (don't advance replay time) } } + + if ( !inited ) { + inited = true; + fgSetBool("/sim/signals/fdm-initialized", true); + } + } else { // do nothing, fdm isn't inited yet }