1
0
Fork 0

Modified the loop so that the simulation is suspended whenever the user

set the property fdm/jsbsim/simulation/terminate to true.
This commit is contained in:
Bertrand Coconnier 2015-04-12 18:20:00 +02:00
parent 70c4972f48
commit 45de8ddf80

View file

@ -523,7 +523,12 @@ void FGJSBsim::update( double dt )
trimmed->setBoolValue(false);
for ( int i=0; i < multiloop; i++ ) {
fdmex->Run();
if (!fdmex->Run()) {
// The property fdm/jsbsim/simulation/terminate has been set to true
// by the user. The sim is considered crashed.
crashed = true;
break;
}
update_external_forces(fdmex->GetSimTime() + i * fdmex->GetDeltaT());
}