]> git.mxchange.org Git - flightgear.git/commitdiff
Allow negative thrust. This allows a single recoil or vibration
authormfranz <mfranz>
Thu, 4 Dec 2008 18:47:49 +0000 (18:47 +0000)
committermfranz <mfranz>
Thu, 4 Dec 2008 18:47:49 +0000 (18:47 +0000)
thruster to accelerate in both directions. THROTTLE input still
clamps to 0/1 by default.  (OK'ed by Andy)

src/FDM/YASim/Thruster.cpp

index cd57745a60b6d2a2129939cb0c5daf5228388291..cfc31a7a97c200056619874f523a3c17a23f4c73 100644 (file)
@@ -42,7 +42,7 @@ void Thruster::setDirection(float* dir)
 
 void Thruster::setThrottle(float throttle)
 {
-    _throttle = Math::clamp(throttle, 0, 1);
+    _throttle = Math::clamp(throttle, -1, 1);
 }
 
 void Thruster::setMixture(float mixture)