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

Move gNumGuestsHeadingForPark to GameState_t (#21277)

* Move gNumGuestsHeadingForPark to GameState_t

* Format code

* Remove change to contributors list

* Revert new line addition
This commit is contained in:
Harry Hopkinson
2024-01-28 10:26:22 +00:00
committed by GitHub
parent a14d471530
commit 01eecbaeba
9 changed files with 21 additions and 14 deletions

View File

@@ -69,7 +69,6 @@ using namespace OpenRCT2::Audio;
uint8_t gGuestChangeModifier;
uint32_t gNumGuestsInPark;
uint32_t gNumGuestsInParkLastWeek;
uint32_t gNumGuestsHeadingForPark;
uint8_t gPeepWarningThrottle[16];
@@ -2646,9 +2645,11 @@ void IncrementGuestsInPark()
void IncrementGuestsHeadingForPark()
{
if (gNumGuestsHeadingForPark < UINT32_MAX)
auto& gameState = GetGameState();
if (gameState.NumGuestsHeadingForPark < UINT32_MAX)
{
gNumGuestsHeadingForPark++;
gameState.NumGuestsHeadingForPark++;
}
else
{
@@ -2670,9 +2671,11 @@ void DecrementGuestsInPark()
void DecrementGuestsHeadingForPark()
{
if (gNumGuestsHeadingForPark > 0)
auto& gameState = GetGameState();
if (gameState.NumGuestsHeadingForPark > 0)
{
gNumGuestsHeadingForPark--;
gameState.NumGuestsHeadingForPark--;
}
else
{