Fix the kart accelerating instead of slowing down when going backwards

This commit is contained in:
Alayan-stk-2 2018-11-16 20:56:43 +01:00 committed by GitHub
parent c2481ba68c
commit bb1aac3857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;