1
0
Fork 0

Insert a sanity hack from Melchior that apparently prevents a NaN from

popping up and crashing when the B-29 model is in use.  This isn't the
right solution; we should fine the NaN condition.  But it's harmless
and allows development with the B-29 to continue.
This commit is contained in:
andy 2005-03-23 18:54:58 +00:00
parent e4142d94d4
commit c89e5203a5

View file

@ -176,6 +176,8 @@ void PropEngine::integrate(float dt)
_eng->setFuelState(_fuel); _eng->setFuelState(_fuel);
_prop->calc(_rho, speed, _omega * _gearRatio, &thrust, &propTorque); _prop->calc(_rho, speed, _omega * _gearRatio, &thrust, &propTorque);
if(_omega == 0.0)
_omega = 0.001; // hack to get around reports of NaNs somewhere...
propTorque *= _gearRatio; propTorque *= _gearRatio;
_eng->calc(_pressure, _temp, _omega); _eng->calc(_pressure, _temp, _omega);
_eng->integrate(dt); _eng->integrate(dt);