1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 01:35:06 +01:00

Fix #22133: Ride time is incorrect for extremely low speeds (#22311)

This commit is contained in:
lewyche
2024-09-29 09:02:02 -04:00
committed by GitHub
parent e3dc02441a
commit 0f58efe198
3 changed files with 3 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ using namespace OpenRCT2;
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
constexpr uint8_t kNetworkStreamVersion = 1;
constexpr uint8_t kNetworkStreamVersion = 2;
const std::string kNetworkStreamID = std::string(OPENRCT2_VERSION) + "-" + std::to_string(kNetworkStreamVersion);

View File

@@ -848,7 +848,7 @@ void Vehicle::UpdateMeasurements()
curRide->max_speed = absVelocity;
}
if (curRide->average_speed_test_timeout == 0 && absVelocity > 0x8000)
if (curRide->average_speed_test_timeout == 0 && absVelocity > 0)
{
curRide->average_speed = AddClamp<int32_t>(curRide->average_speed, absVelocity);
stationForTestSegment.SegmentTime++;