Change update order to event manager -> view manager -> io manager.
This allows Nasal managed views thanks to the proximity of the event manager (which executes Nasal loops). The io manager must come after the view manager to avoid jitter in network replay.
This commit is contained in:
parent
e5b5f7c2b1
commit
366178f801
1 changed files with 9 additions and 8 deletions
|
@ -180,9 +180,6 @@ void fgUpdateTimeDepCalcs() {
|
||||||
globals->get_model_mgr()->update(delta_time_sec);
|
globals->get_model_mgr()->update(delta_time_sec);
|
||||||
globals->get_aircraft_model()->update(delta_time_sec);
|
globals->get_aircraft_model()->update(delta_time_sec);
|
||||||
|
|
||||||
// update the view angle
|
|
||||||
globals->get_viewmgr()->update(delta_time_sec);
|
|
||||||
|
|
||||||
// Update solar system
|
// Update solar system
|
||||||
globals->get_ephem()->update( globals->get_time_params()->getMjd(),
|
globals->get_ephem()->update( globals->get_time_params()->getMjd(),
|
||||||
globals->get_time_params()->getLst(),
|
globals->get_time_params()->getLst(),
|
||||||
|
@ -343,8 +340,6 @@ static void fgMainLoop( void ) {
|
||||||
|
|
||||||
SGTime *t = globals->get_time_params();
|
SGTime *t = globals->get_time_params();
|
||||||
|
|
||||||
globals->get_event_mgr()->update(delta_time_sec);
|
|
||||||
|
|
||||||
SG_LOG( SG_ALL, SG_DEBUG, "Running Main Loop");
|
SG_LOG( SG_ALL, SG_DEBUG, "Running Main Loop");
|
||||||
SG_LOG( SG_ALL, SG_DEBUG, "======= ==== ====");
|
SG_LOG( SG_ALL, SG_DEBUG, "======= ==== ====");
|
||||||
|
|
||||||
|
@ -494,9 +489,6 @@ static void fgMainLoop( void ) {
|
||||||
"Elapsed time is zero ... we're zinging" );
|
"Elapsed time is zero ... we're zinging" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do any I/O channel work that might need to be done
|
|
||||||
globals->get_io()->update( real_delta_time_sec );
|
|
||||||
|
|
||||||
// Run audio scheduler
|
// Run audio scheduler
|
||||||
#ifdef ENABLE_AUDIO_SUPPORT
|
#ifdef ENABLE_AUDIO_SUPPORT
|
||||||
if ( globals->get_soundmgr()->is_working() ) {
|
if ( globals->get_soundmgr()->is_working() ) {
|
||||||
|
@ -545,6 +537,15 @@ 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);
|
||||||
|
|
||||||
|
// Do any I/O channel work that might need to be done (must come after viewmgr)
|
||||||
|
globals->get_io()->update(real_delta_time_sec);
|
||||||
|
|
||||||
#ifdef ENABLE_AUDIO_SUPPORT
|
#ifdef ENABLE_AUDIO_SUPPORT
|
||||||
// Right now we make a simplifying assumption that the primary
|
// Right now we make a simplifying assumption that the primary
|
||||||
// aircraft is the source of all sounds and that all sounds are
|
// aircraft is the source of all sounds and that all sounds are
|
||||||
|
|
Loading…
Add table
Reference in a new issue