1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Simplify velocity acceleration

This commit is contained in:
Matt
2021-02-20 17:59:18 +02:00
parent d3cae77230
commit 5b42fa0dbb

View File

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