diff --git a/src/openrct2/management/Award.cpp b/src/openrct2/management/Award.cpp index c6529c0997..c5d5ba9974 100644 --- a/src/openrct2/management/Award.cpp +++ b/src/openrct2/management/Award.cpp @@ -194,10 +194,10 @@ static bool award_is_deserved_best_value(sint32 awardType, sint32 activeAwardTyp if (gParkFlags & (PARK_FLAGS_NO_MONEY | PARK_FLAGS_PARK_FREE_ENTRY)) return 0; - if (gTotalRideValue < MONEY(10, 00)) + if (gTotalRideValueForMoney < MONEY(10, 00)) return 0; - if (park_get_entrance_fee() + MONEY(0, 10) >= gTotalRideValue / 2) + if (park_get_entrance_fee() + MONEY(0, 10) >= gTotalRideValueForMoney / 2) return 0; return 1; @@ -251,7 +251,7 @@ static bool award_is_deserved_worst_value(sint32 awardType, sint32 activeAwardTy money32 parkEntranceFee = park_get_entrance_fee(); if (parkEntranceFee == MONEY(0, 00)) return 0; - if (gTotalRideValue >= parkEntranceFee) + if (parkEntranceFee <= gTotalRideValueForMoney) return 0; return 1; } diff --git a/src/openrct2/rct1.h b/src/openrct2/rct1.h index 5c44ef8627..4d966548e0 100644 --- a/src/openrct2/rct1.h +++ b/src/openrct2/rct1.h @@ -647,7 +647,7 @@ typedef struct rct1_s4 { uint32 unk_19953E; uint16 cheat_detection_land_owned; uint16 unk_199544; - money16 median_recommended_park_entry_fee; + money16 total_ride_value_for_money; money32 max_loan; money16 guest_initial_cash; uint8 guest_initial_hunger; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 92df2954f0..8c8cd38305 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -256,7 +256,7 @@ void S6Exporter::Export() _s6.guest_initial_happiness = gGuestInitialHappiness; _s6.park_size = gParkSize; _s6.guest_generation_probability = _guestGenerationProbability; - _s6.total_ride_value = gTotalRideValue; + _s6.total_ride_value_for_money = gTotalRideValueForMoney; _s6.maximum_loan = gMaxBankLoan; _s6.guest_initial_cash = gGuestInitialCash; _s6.guest_initial_hunger = gGuestInitialHunger; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index e64559bb4f..7554c3bc07 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -267,7 +267,7 @@ public: gGuestInitialHappiness = _s6.guest_initial_happiness; gParkSize = _s6.park_size; _guestGenerationProbability = _s6.guest_generation_probability; - gTotalRideValue = _s6.total_ride_value; + gTotalRideValueForMoney = _s6.total_ride_value_for_money; gMaxBankLoan = _s6.maximum_loan; gGuestInitialCash = _s6.guest_initial_cash; gGuestInitialHunger = _s6.guest_initial_hunger; diff --git a/src/openrct2/ride/ride.c b/src/openrct2/ride/ride.c index 0ead5d1294..f2e20bd48f 100644 --- a/src/openrct2/ride/ride.c +++ b/src/openrct2/ride/ride.c @@ -147,7 +147,7 @@ sint32 gRideRemoveTrackPieceCallbackZ; sint32 gRideRemoveTrackPieceCallbackDirection; sint32 gRideRemoveTrackPieceCallbackType; -money16 gTotalRideValue; +money16 gTotalRideValueForMoney; uint32 gSamePriceThroughoutParkA; uint32 gSamePriceThroughoutParkB; diff --git a/src/openrct2/ride/ride.h b/src/openrct2/ride/ride.h index 29a8037ddf..4b6d79ffb7 100644 --- a/src/openrct2/ride/ride.h +++ b/src/openrct2/ride/ride.h @@ -954,7 +954,7 @@ rct_ride_measurement * get_ride_measurement(sint32 index); for (i = 0; i < MAX_RIDES; i++) \ if ((ride = get_ride(i))->type != RIDE_TYPE_NULL) -extern money16 gTotalRideValue; +extern money16 gTotalRideValueForMoney; extern uint32 gSamePriceThroughoutParkA; extern uint32 gSamePriceThroughoutParkB; diff --git a/src/openrct2/scenario/scenario.c b/src/openrct2/scenario/scenario.c index 58b6f5f745..198a25bdfd 100644 --- a/src/openrct2/scenario/scenario.c +++ b/src/openrct2/scenario/scenario.c @@ -255,7 +255,7 @@ void scenario_success_submit_name(const char *name) static void scenario_entrance_fee_too_high_check() { uint16 x = 0, y = 0; - money16 totalRideValue = gTotalRideValue; + money16 totalRideValue = gTotalRideValueForMoney; money16 max_fee = totalRideValue + (totalRideValue / 2); if ((gParkFlags & PARK_FLAGS_PARK_OPEN) && park_get_entrance_fee() > max_fee) { diff --git a/src/openrct2/scenario/scenario.h b/src/openrct2/scenario/scenario.h index 65d9da7c8d..dd7bd34291 100644 --- a/src/openrct2/scenario/scenario.h +++ b/src/openrct2/scenario/scenario.h @@ -174,7 +174,7 @@ typedef struct rct_s6_data { uint8 guest_initial_happiness; uint16 park_size; uint16 guest_generation_probability; - uint16 total_ride_value; + uint16 total_ride_value_for_money; money32 maximum_loan; money16 guest_initial_cash; uint8 guest_initial_hunger; diff --git a/src/openrct2/world/park.c b/src/openrct2/world/park.c index 250d694dfb..0c820163ba 100644 --- a/src/openrct2/world/park.c +++ b/src/openrct2/world/park.c @@ -96,7 +96,7 @@ void park_init() gGuestChangeModifier = 0; gParkRating = 0; _guestGenerationProbability = 0; - gTotalRideValue = 0; + gTotalRideValueForMoney = 0; gResearchLastItemSubject = (uint32)-1; for (i = 0; i < 20; i++) @@ -367,12 +367,12 @@ static sint32 park_calculate_guest_generation_probability() { uint32 probability; sint32 i, suggestedMaxGuests; - money16 totalRideValue; + money16 totalRideValueForMoney; Ride *ride; // Calculate suggested guest maximum (based on ride type) and total ride value suggestedMaxGuests = 0; - totalRideValue = 0; + totalRideValueForMoney = 0; FOR_ALL_RIDES(i, ride) { if (ride->status != RIDE_STATUS_OPEN) continue; @@ -386,9 +386,9 @@ static sint32 park_calculate_guest_generation_probability() // Add ride value if (ride->value != RIDE_VALUE_UNDEFINED) { - money16 rideValue = (money16)(ride->value - ride->price); - if (rideValue > 0) { - totalRideValue += rideValue * 2; + money16 rideValueForMoney = (money16)(ride->value - ride->price); + if (rideValueForMoney > 0) { + totalRideValueForMoney += rideValueForMoney * 2; } } } @@ -419,7 +419,7 @@ static sint32 park_calculate_guest_generation_probability() } suggestedMaxGuests = min(suggestedMaxGuests, 65535); - gTotalRideValue = totalRideValue; + gTotalRideValueForMoney = totalRideValueForMoney; _suggestedGuestMaximum = suggestedMaxGuests; // Begin with 50 + park rating @@ -441,11 +441,11 @@ static sint32 park_calculate_guest_generation_probability() // Penalty for overpriced entrance fee relative to total ride value money16 entranceFee = park_get_entrance_fee(); - if (entranceFee > totalRideValue) { + if (entranceFee > totalRideValueForMoney) { probability /= 4; // Extra penalty for very overpriced entrance fee - if (entranceFee / 2 > totalRideValue) + if (entranceFee / 2 > totalRideValueForMoney) probability /= 4; }