]> git.mxchange.org Git - flightgear.git/commitdiff
Eliminate divide-by-zero error. AI should spin down gradually again.
authordavid <david>
Tue, 22 Jul 2003 02:05:50 +0000 (02:05 +0000)
committerdavid <david>
Tue, 22 Jul 2003 02:05:50 +0000 (02:05 +0000)
src/Systems/vacuum.cxx

index 5244a4e7b3ad9128afff5416db7151eef66f4793..3e6311d60f399a0560abc9d1a8eb70ef76b56d85 100644 (file)
@@ -55,7 +55,7 @@ VacuumSystem::update (double dt)
 
         // simple regulator model that clamps smoothly to about 5 inhg
         // over a normal rpm range
-        double max = 5.39 - 1.0 / ( rpm * 0.00111 );
+        double max = (rpm > 0 ? 5.39 - 1.0 / ( rpm * 0.00111 ) : 0);
         if ( suction < 0.0 ) suction = 0.0;
         if ( suction > max ) suction = max;
     }