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:
committed by
Michael Steenbeek
parent
f217582f8e
commit
d6bf08e407
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user