From 45b16ad0c9a1ee8180f8178e85e79fca2a00788d Mon Sep 17 00:00:00 2001 From: david Date: Tue, 22 Jul 2003 02:05:50 +0000 Subject: [PATCH] Eliminate divide-by-zero error. AI should spin down gradually again. --- src/Systems/vacuum.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Systems/vacuum.cxx b/src/Systems/vacuum.cxx index 5244a4e7b..3e6311d60 100644 --- a/src/Systems/vacuum.cxx +++ b/src/Systems/vacuum.cxx @@ -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; } -- 2.39.5