From 2d23ccd650209061d6a97354217f775d3c69b9cc Mon Sep 17 00:00:00 2001 From: mfranz Date: Wed, 7 Nov 2007 15:57:38 +0000 Subject: [PATCH] mainloop: move event_mgr and viewmgr updated before spatial sound calculations --- src/Main/main.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 531bd71ef..6376c098e 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -543,6 +543,12 @@ static void fgMainLoop( void ) { } } + // run Nasal's settimer() loops right before the view manager + globals->get_event_mgr()->update(delta_time_sec); + + // update the view angle as late as possible, but before sound calculations + globals->get_viewmgr()->update(delta_time_sec); + #ifdef ENABLE_AUDIO_SUPPORT // Right now we make a simplifying assumption that the primary // aircraft is the source of all sounds and that all sounds are @@ -660,12 +666,6 @@ static void fgMainLoop( void ) { globals->get_soundmgr()->set_volume(init_volume); } - // run Nasal's settimer() loops right before the view manager - globals->get_event_mgr()->update(delta_time_sec); - - // update the view angle - globals->get_viewmgr()->update(delta_time_sec); - fgRequestRedraw(); SG_LOG( SG_ALL, SG_DEBUG, "" ); -- 2.39.5