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

Fix #7030: Ride reliability underflows

This commit is contained in:
pss9205
2018-01-28 12:04:14 +01:00
committed by Michael Steenbeek
parent f217582f8e
commit d6bf08e407
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ typedef struct GameAction GameAction;
// This define specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "28"
#define NETWORK_STREAM_VERSION "29"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
#ifdef __cplusplus

View File

@@ -2327,7 +2327,7 @@ static void ride_breakdown_update(sint32 rideIndex)
// Calculate breakdown probability?
sint32 unreliabilityAccumulator = ride->unreliability_factor + get_age_penalty(ride);
ride->reliability = Math::Max((uint16)0, (uint16)(ride->reliability - unreliabilityAccumulator));
ride->reliability = (uint16) Math::Max(0, (ride->reliability - unreliabilityAccumulator));
ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE;
// Random probability of a breakdown. Roughly this is 1 in