1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 23:04:36 +01:00

#21193: Move gParkEntranceFee to GameState_t (#21256)

This commit is contained in:
Hielke Morsink
2024-01-24 13:45:01 +01:00
committed by GitHub
parent b200ce02ef
commit fb420f6516
14 changed files with 33 additions and 30 deletions

View File

@@ -210,7 +210,8 @@ GameActions::Result RideCreateAction::Execute() const
price = 0;
}
if (!(GetGameState().ParkFlags & PARK_FLAGS_NO_MONEY))
const auto& gameState = GetGameState();
if (!(gameState.ParkFlags & PARK_FLAGS_NO_MONEY))
{
for (auto i = 0; i < RCT2::ObjectLimits::MaxShopItemsPerRideEntry; i++)
{
@@ -219,7 +220,7 @@ GameActions::Result RideCreateAction::Execute() const
if (rideEntry->shop_item[0] == ShopItem::None)
{
if (!ParkRidePricesUnlocked() || gParkEntranceFee > 0)
if (!ParkRidePricesUnlocked() || gameState.ParkEntranceFee > 0)
{
ride->price[0] = 0;
}