mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
No need to double check if its Guest or Staff
This commit is contained in:
@@ -567,12 +567,12 @@ namespace OpenRCT2::PathFinding
|
||||
*/
|
||||
static uint8_t PeepPathfindGetMaxNumberJunctions(Peep& peep)
|
||||
{
|
||||
if (peep.Is<Staff>())
|
||||
return kMaxJunctionsStaff;
|
||||
|
||||
auto* guest = peep.As<Guest>();
|
||||
if (guest == nullptr)
|
||||
{
|
||||
// Peep can be only Staff and Guest, so when not a Guest it means its Staff.
|
||||
return kMaxJunctionsStaff;
|
||||
}
|
||||
|
||||
bool isLeavingPark = (guest->PeepFlags & PEEP_FLAGS_LEAVING_PARK) != 0;
|
||||
if (isLeavingPark && guest->GuestIsLostCountdown < 90)
|
||||
|
||||
Reference in New Issue
Block a user