Fix reset during replay issue
Need to properly reset the replay manager's states on sim reset. Also remove obsolete method.
This commit is contained in:
parent
0114fd962e
commit
5ace4e9632
4 changed files with 10 additions and 20 deletions
|
@ -96,6 +96,9 @@ void FGReplay::clear()
|
|||
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -120,6 +123,9 @@ void FGReplay::reinit()
|
|||
{
|
||||
recycler.push_back(new FGReplayData);
|
||||
}
|
||||
replay_master->setIntValue(0);
|
||||
disable_replay->setBoolValue(0);
|
||||
replay_time->setDoubleValue(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -128,9 +134,6 @@ void FGReplay::reinit()
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ do_exit (const SGPropertyNode * arg)
|
|||
static bool
|
||||
do_reset (const SGPropertyNode * arg)
|
||||
{
|
||||
doSimulatorReset();
|
||||
fgReInitSubsystems();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1517,7 +1517,7 @@ bool fgInitSubsystems() {
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Reset: this is what the 'reset' command (and hence, GUI) is attached to
|
||||
void fgReInitSubsystems()
|
||||
{
|
||||
static const SGPropertyNode *master_freeze
|
||||
|
@ -1570,13 +1570,6 @@ void fgReInitSubsystems()
|
|||
}
|
||||
|
||||
|
||||
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,
|
||||
|
|
|
@ -62,16 +62,10 @@ bool fgInitGeneral ();
|
|||
// 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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue