From 5b42fa0dbb0a3f6036786fadcd37e06bec2816c1 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 20 Feb 2021 17:59:18 +0200 Subject: [PATCH] Simplify velocity acceleration --- src/openrct2/ride/Vehicle.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 5927f5f69a..81dbe824c8 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -9654,20 +9654,9 @@ int32_t Vehicle::UpdateTrackMotion(int32_t* outStation) newAcceleration += 511; } newAcceleration >>= 9; - int32_t curAcceleration = newAcceleration; - int32_t accelerationDecrease1 = vehicle->velocity; - if (accelerationDecrease1 < 0) - { - accelerationDecrease1 = -accelerationDecrease1; - accelerationDecrease1 >>= 12; - accelerationDecrease1 = -accelerationDecrease1; - } - else - { - accelerationDecrease1 >>= 12; - } - curAcceleration -= accelerationDecrease1; + int32_t curAcceleration = newAcceleration; + curAcceleration -= vehicle->velocity / 4096; curAcceleration -= GetAccelerationDecrease2(vehicle->velocity, totalMass); if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_POWERED)