Need to properly reset the replay manager's states on sim reset.
Also remove obsolete method.
void FGReplay::init()
{
+ disable_replay = fgGetNode( "/sim/replay/disable", true );
+ replay_master = fgGetNode( "/sim/freeze/replay-state", true );
+ replay_time = fgGetNode( "/sim/replay/time", true);
reinit();
}
{
recycler.push_back(new FGReplayData);
}
+ replay_master->setIntValue(0);
+ disable_replay->setBoolValue(0);
+ replay_time->setDoubleValue(0);
}
/**
void FGReplay::bind()
{
- disable_replay = fgGetNode( "/sim/replay/disable", true );
- replay_master = fgGetNode( "/sim/freeze/replay-state", true );
- replay_time = fgGetNode( "/sim/replay/time", true);
}
static bool
do_reset (const SGPropertyNode * arg)
{
- doSimulatorReset();
+ fgReInitSubsystems();
return true;
}
return true;
}
-
+// Reset: this is what the 'reset' command (and hence, GUI) is attached to
void fgReInitSubsystems()
{
static const SGPropertyNode *master_freeze
}
-void doSimulatorReset(void) // from gui_local.cxx -- TODO merge with fgReInitSubsystems()
-{
-
-
- fgReInitSubsystems();
-}
-
///////////////////////////////////////////////////////////////////////////////
// helper object to implement the --show-aircraft command.
// resides here so we can share the fgFindAircraftInDir template above,
// gear, its initialization call should located in this routine.
bool fgInitSubsystems();
-
-// Reset
+
+// Reset: this is what the 'reset' command (and hence, GUI) is attached to
void fgReInitSubsystems();
-/**
- * this is what the 'reset' command (and hence, GUI) is attached too
- * it overlaps with fgReInitSubsystems quite substantially
- */
-void doSimulatorReset(void);
-
// Set the initial position based on presets (or defaults)
bool fgInitPosition();