Minor replay issues
When disabling replay: don't clear buffers and restore most recent frame
This commit is contained in:
parent
4920e896dd
commit
3a90186341
1 changed files with 10 additions and 4 deletions
|
@ -24,6 +24,7 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <float.h>
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/structure/exception.hxx>
|
#include <simgear/structure/exception.hxx>
|
||||||
|
|
||||||
|
@ -156,11 +157,16 @@ void FGReplay::update( double dt )
|
||||||
timingInfo.clear();
|
timingInfo.clear();
|
||||||
stamp("begin");
|
stamp("begin");
|
||||||
|
|
||||||
if (( sim_time != 0.0 )&&
|
if ( disable_replay->getBoolValue() )
|
||||||
( disable_replay->getBoolValue() ))
|
|
||||||
{
|
{
|
||||||
// we were recording data
|
if (replay_master->getIntValue())
|
||||||
reinit();
|
{
|
||||||
|
// replay was active, restore most recent frame
|
||||||
|
replay(DBL_MAX);
|
||||||
|
}
|
||||||
|
replay_master->setIntValue(0);
|
||||||
|
replay_time->setDoubleValue(0);
|
||||||
|
disable_replay->setBoolValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int replay_state = replay_master->getIntValue();
|
int replay_state = replay_master->getIntValue();
|
||||||
|
|
Loading…
Add table
Reference in a new issue