From 2e6ffa4285926a4ec0a4db081d40c87aca611a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Fri, 12 Sep 2025 14:58:07 +0300 Subject: [PATCH] No need to double check if its Guest or Staff --- src/openrct2/peep/GuestPathfinding.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index e7b3690ceb..6c15746a21 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -567,12 +567,12 @@ namespace OpenRCT2::PathFinding */ static uint8_t PeepPathfindGetMaxNumberJunctions(Peep& peep) { - if (peep.Is()) - return kMaxJunctionsStaff; - auto* guest = peep.As(); 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)