diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-02 16:27:11 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-02 16:27:11 +0100 |
commit | 482ff4562f2ed4806c0e51f96b656a7ad80445c7 (patch) | |
tree | 71fb784b900c71e02826a393928cfb93f6a942d6 /src/vehicles/Transmission.cpp | |
parent | Fix arg (diff) | |
download | re3-482ff4562f2ed4806c0e51f96b656a7ad80445c7.tar re3-482ff4562f2ed4806c0e51f96b656a7ad80445c7.tar.gz re3-482ff4562f2ed4806c0e51f96b656a7ad80445c7.tar.bz2 re3-482ff4562f2ed4806c0e51f96b656a7ad80445c7.tar.lz re3-482ff4562f2ed4806c0e51f96b656a7ad80445c7.tar.xz re3-482ff4562f2ed4806c0e51f96b656a7ad80445c7.tar.zst re3-482ff4562f2ed4806c0e51f96b656a7ad80445c7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/vehicles/Transmission.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicles/Transmission.cpp b/src/vehicles/Transmission.cpp index 5287055d..109847a5 100644 --- a/src/vehicles/Transmission.cpp +++ b/src/vehicles/Transmission.cpp @@ -128,7 +128,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 |