From bb1aac3857150dfb87e85da04c6f504779967bfc Mon Sep 17 00:00:00 2001 From: Alayan-stk-2 Date: Fri, 16 Nov 2018 20:56:43 +0100 Subject: [PATCH] Fix the kart accelerating instead of slowing down when going backwards --- src/karts/kart.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index b9d24c5b0..cad3fb73d 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -2672,7 +2672,7 @@ float Kart::applyAirFriction(float engine_power) //Instead of making increasing gears have enormous power gaps, apply friction float mass_factor = m_kart_properties->getMass()/350.0f; - float compense_linear_slowdown = 39.33f*getSpeed()*mass_factor; + float compense_linear_slowdown = 39.33f*fabsf(getSpeed())*mass_factor; engine_power += compense_linear_slowdown;