summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Transmission.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-01-02 12:41:53 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-01-02 12:41:53 +0100
commit2268365c3b7bbb014093e95d3f737648d50bc18f (patch)
tree2b2fa9a137895c6d2f8875f164128c78f375790d /src/vehicles/Transmission.cpp
parentPartial controller buttons support (diff)
downloadre3-2268365c3b7bbb014093e95d3f737648d50bc18f.tar
re3-2268365c3b7bbb014093e95d3f737648d50bc18f.tar.gz
re3-2268365c3b7bbb014093e95d3f737648d50bc18f.tar.bz2
re3-2268365c3b7bbb014093e95d3f737648d50bc18f.tar.lz
re3-2268365c3b7bbb014093e95d3f737648d50bc18f.tar.xz
re3-2268365c3b7bbb014093e95d3f737648d50bc18f.tar.zst
re3-2268365c3b7bbb014093e95d3f737648d50bc18f.zip
Diffstat (limited to 'src/vehicles/Transmission.cpp')
-rw-r--r--src/vehicles/Transmission.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicles/Transmission.cpp b/src/vehicles/Transmission.cpp
index cc994ac6..b3e1af7d 100644
--- a/src/vehicles/Transmission.cpp
+++ b/src/vehicles/Transmission.cpp
@@ -123,7 +123,7 @@ cTransmission::CalculateDriveAcceleration(const float &gasPedal, uint8 &gear, fl
else
fCheat = 1.0f;
float targetVelocity = Gears[gear].fMaxVelocity*speedMul*fCheat;
- float accel = fEngineAcceleration*accelMul * (targetVelocity - fVelocity)/Abs(targetVelocity);
+ float accel = (targetVelocity - fVelocity) * (fEngineAcceleration*accelMul) / Abs(targetVelocity);
if(Abs(fVelocity) < Abs(Gears[gear].fMaxVelocity*fCheat))
fAcceleration = gasPedal * accel * CTimer::GetTimeStep();
else