]> git.mxchange.org Git - flightgear.git/commitdiff
Stomp out a long standing bug in the replay system. Originally we didn't
authorcurt <curt>
Mon, 22 Mar 2010 00:55:34 +0000 (00:55 +0000)
committerTim Moore <timoore33@gmail.com>
Sat, 27 Mar 2010 12:47:52 +0000 (13:47 +0100)
collect flight data while the replay was running, but along the way someone
(who shall remain nameless) tweaked a property name and didn't update the
name in the replay system.  This led to a problem where the replay system
continued to collect replayed data into the buffer while it replayed it,
leading to an infinite loop.  And then due to the tiered recording rate
system, you would never see the highly detailed final minute of your flight.
This is now fixed!

src/Aircraft/replay.cxx

index 84663cc9328060989f7103b520b41c147b663834..21c4a1d44bfd524b0af273b0f22ba67fef0e3bcd 100644 (file)
@@ -142,17 +142,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;
     }
@@ -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;