]> git.mxchange.org Git - flightgear.git/blobdiff - src/Aircraft/replay.cxx
CMake update for new KLN89 file.
[flightgear.git] / src / Aircraft / replay.cxx
index 84663cc9328060989f7103b520b41c147b663834..aa976adcbf4c3d280c737377aae5124e5fab19fa 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <simgear/constants.h>
 
-#include <FDM/flight.hxx>
 #include <Main/fg_props.hxx>
 #include <Network/native_ctrls.hxx>
 #include <Network/native_fdm.hxx>
@@ -142,17 +141,17 @@ void FGReplay::update( double dt ) {
     timingInfo.clear();
     stamp("begin");
     static SGPropertyNode *replay_master
-        = fgGetNode( "/sim/freeze/replay", true );
+        = fgGetNode( "/sim/freeze/replay-state", true );
 
     if( disable_replay->getBoolValue() ) {
-        if( sim_time != 0.0 ) {
+        if ( sim_time != 0.0 ) {
             // we were recording data
             init();
         }
         return;
     }
     //stamp("point_01");
-    if ( replay_master->getBoolValue() ) {
+    if ( replay_master->getIntValue() > 0 ) {
         // don't record the replay session
         return;
     }
@@ -164,9 +163,10 @@ void FGReplay::update( double dt ) {
     //FGProps2NetFDM( &f, false );
 
     // sanity check, don't collect data if FDM data isn't good
-    if ( !cur_fdm_state->get_inited() ) {
+    if (!fgGetBool("/sim/fdm-initialized", false)) {
         return;
     }
+    
     //FGNetCtrls c;
     //FGProps2NetCtrls( &c, false, false );
     //stamp("point_04ba");
@@ -177,9 +177,9 @@ void FGReplay::update( double dt ) {
         r = new FGReplayData;
        stamp("Replay_02");
     } else {
-      r = recycler.front();
-      recycler.pop_front();
-    //stamp("point_04be");
+       r = recycler.front();
+       recycler.pop_front();
+       //stamp("point_04be");
     }
     r->sim_time = sim_time;
     //r->ctrls = c;