]> git.mxchange.org Git - flightgear.git/commitdiff
Changes to match simgear changes which allow overriding the current
authorcurt <curt>
Sun, 10 Feb 2002 04:18:10 +0000 (04:18 +0000)
committercurt <curt>
Sun, 10 Feb 2002 04:18:10 +0000 (04:18 +0000)
clock time.

src/ATC/atis.hxx
src/Main/main.cxx
src/Navaids/nav.hxx
src/Network/native_fdm.cxx

index 5809c1b5908322fdf0da928c50ddbee85e3e089a..b84cfa2d3bc59a42b2ac60407ec3362671ddb2a9 100644 (file)
@@ -113,7 +113,7 @@ operator >> ( istream& in, FGATIS& a )
     static double julian_date = 0;
     static const double MJD0    = 2415020.0;
     if ( first_time ) {
-       julian_date = sgTimeCurrentMJD( 0 ) + MJD0;
+       julian_date = sgTimeCurrentMJD() + MJD0;
        first_time = false;
     }
 
index e06a75e90e1a8eee65654c371b7d98a819cc3e4d..771a671bd32757dc2997f4f8d2966b2a3d3bb027 100644 (file)
@@ -999,6 +999,8 @@ static void fgMainLoop( void ) {
        = fgGetNode("/position/latitude-deg");
     static const SGPropertyNode *altitude
        = fgGetNode("/position/altitude-ft");
+    static const SGPropertyNode *cur_time_override
+       = fgGetNode("/sim/time/cur-time-override", true);
 
     static long remainder = 0;
     long elapsed;
@@ -1081,6 +1083,7 @@ static void fgMainLoop( void ) {
 
     t->update( longitude->getDoubleValue() * SGD_DEGREES_TO_RADIANS,
               latitude->getDoubleValue() * SGD_DEGREES_TO_RADIANS,
+              cur_time_override->getLongValue(),
               globals->get_warp() );
 
     if ( globals->get_warp_delta() != 0 ) {
index 5a521130472641e933b7536ee05bf0c051612625..ae8cf431bb2e3fc2daff396009e7e18fbf028341 100644 (file)
@@ -107,7 +107,7 @@ operator >> ( istream& in, FGNav& n )
     static double julian_date = 0;
     static const double MJD0    = 2415020.0;
     if ( first_time ) {
-       julian_date = sgTimeCurrentMJD( 0 ) + MJD0;
+       julian_date = sgTimeCurrentMJD() + MJD0;
        first_time = false;
     }
 
index 90e54b44b2da75cf77be6deec77d39237e16b705..b6e2c9765bd8c1a29a8254def53c51a6afd746e7 100644 (file)
@@ -168,6 +168,10 @@ static void net2global( FGNetFDM *net, FGInterface *global ) {
         cur_fdm_state->_set_V_calibrated_kts( net->vcas );
         cur_fdm_state->_set_Climb_Rate( net->climb_rate );
 
+       if ( ! net->cur_time ) {
+           fgSetLong("/sim/time/cur-time-override", net->cur_time);
+       }
+
         globals->set_warp( net->warp );
         if ( net->warp != last_warp ) {
             fgUpdateSkyAndLightingParams();