-// FIXME - replay manager should handle most of this
- int replayState = fgGetInt("/sim/freeze/replay-state", 0);
- if (replayState == 0) {
- _impl->update(dt); // normal code path
- } else if (replayState == 1) {
- // should be inside FGReplay!
- SGPropertyNode* replay_time = fgGetNode("/sim/replay/time", true);
- FGReplay *r = (FGReplay *)(globals->get_subsystem( "replay" ));
- r->replay( replay_time->getDoubleValue() );
- replay_time->setDoubleValue( replay_time->getDoubleValue()
- + ( dt
- * fgGetInt("/sim/speed-up") ) );
-
- } else if (replayState == 2) {
- // paused replay, no-op
- } else {
- throw sg_range_exception("unknown FGReplay state");
- }
+ switch(_replay_master->getIntValue())
+ {
+ case 0:
+ // normal FDM operation
+ _impl->update(dt);
+ break;
+ case 3:
+ // resume FDM operation at current replay position
+ _impl->reinit();
+ break;
+ default:
+ // replay is active
+ break;
+ }