1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 08:14:38 +01:00

Refactor calculate_park_rating logic

...to avoid changing a local variable's meaning.
This commit is contained in:
Ted John
2015-10-19 12:20:21 +01:00
parent 671f45e45c
commit 3f99209219

View File

@@ -202,9 +202,8 @@ int calculate_park_rating()
result += 2 * min(250, (num_happy_peeps * 300) / RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_IN_PARK, uint16));
// Up to 25 guests can be lost without affecting the park rating.
num_lost_guests -= 25;
if (num_lost_guests > 0)
result -= num_lost_guests * 7;
if (num_lost_guests > 25)
result -= (num_lost_guests - 25) * 7;
}
// Rides