From 3f992092190d58f5f24506d60bd0377cfc7d6f60 Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 19 Oct 2015 12:20:21 +0100 Subject: [PATCH] Refactor calculate_park_rating logic ...to avoid changing a local variable's meaning. --- src/world/park.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/world/park.c b/src/world/park.c index 1b7dc588d2..267061dac9 100644 --- a/src/world/park.c +++ b/src/world/park.c @@ -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