1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix #5449: Underflow of gNumGuestsHeadingForPark in SC4 import

This commit is contained in:
Richard Jenkins
2017-05-08 22:49:02 +01:00
committed by Michael Steenbeek
parent f9acdcb02d
commit 563cd78ef7

View File

@@ -1417,9 +1417,16 @@ private:
peep_update_name_sort(dst);
if (!dst->outside_of_park && dst->type == PEEP_TYPE_GUEST)
if (dst->type == PEEP_TYPE_GUEST)
{
gNumGuestsInPark++;
if (dst->outside_of_park && dst->state != PEEP_STATE_LEAVING_PARK)
{
gNumGuestsHeadingForPark++;
}
else
{
gNumGuestsInPark++;
}
}
}