mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-23 19:02:04 -05:00
Modify ride update to match vanilla balance
This commit is contained in:
parent
ba6345e410
commit
ed54a28e38
1 changed files with 5 additions and 3 deletions
|
@ -1027,9 +1027,11 @@ void Ride::Update()
|
|||
// Various things include news messages
|
||||
if (lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION))
|
||||
{
|
||||
// Breakdown updates are distributed, only one ride can update the breakdown status per tick.
|
||||
const auto updatingRideId = (gCurrentTicks / 2) % MAX_RIDES;
|
||||
if (static_cast<ride_id_t>(updatingRideId) == id)
|
||||
// Breakdown updates originally were performed when (id == (gCurrentTicks / 2) & 0xFF)
|
||||
// with the increased MAX_RIDES the update is tied to the first byte of the id this allows
|
||||
// for identical balance with vanilla.
|
||||
const auto updatingRideByte = static_cast<uint8_t>((gCurrentTicks / 2) & 0xFF);
|
||||
if (updatingRideByte == static_cast<uint8_t>(id))
|
||||
ride_breakdown_status_update(this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue