]> git.mxchange.org Git - flightgear.git/commitdiff
change update order to fdm -> events -> viewmanager
authormfranz <mfranz>
Tue, 6 Nov 2007 12:01:29 +0000 (12:01 +0000)
committermfranz <mfranz>
Tue, 6 Nov 2007 12:01:29 +0000 (12:01 +0000)
This removes some jitter in cases where Nasal is used to set up view
parameters from FDM data, such as position and orientation. (The event
subsystem handles Nasal's settimer() calls.)

src/Main/main.cxx

index ebb0230a8da9049320d4c7c9f09ae730b8327f33..13ac801ef0a26cf282558d365be5c95445a6e759 100644 (file)
@@ -180,9 +180,6 @@ void fgUpdateTimeDepCalcs() {
     globals->get_model_mgr()->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
     globals->get_ephem()->update( globals->get_time_params()->getMjd(),
                                   globals->get_time_params()->getLst(),
@@ -343,8 +340,6 @@ static void fgMainLoop( void ) {
 
     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, "======= ==== ====");
 
@@ -494,6 +489,11 @@ static void fgMainLoop( void ) {
             "Elapsed time is zero ... we're zinging" );
     }
 
+    globals->get_event_mgr()->update(delta_time_sec);
+
+    // update the view angle
+    globals->get_viewmgr()->update(delta_time_sec);
+
     // Do any I/O channel work that might need to be done
     globals->get_io()->update( real_delta_time_sec );