From 9fd2b883a84acf18e82aaa06019242d1d49438ce Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 12 Mar 2020 15:27:58 +0100 Subject: [PATCH] Apply review request --- src/openrct2/ride/Ride.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index be55c92fb8..ad1488e34c 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -2754,8 +2754,9 @@ Peep* find_closest_mechanic(int32_t x, int32_t y, int32_t forInspection) continue; } - if (map_is_location_in_park({ x, y })) - if (!peep->AsStaff()->IsLocationInPatrol({ x & 0xFFE0, y & 0xFFE0 })) + auto location = CoordsXY(x, y).ToTileStart(); + if (map_is_location_in_park(location)) + if (!peep->AsStaff()->IsLocationInPatrol(location)) continue; if (peep->x == LOCATION_NULL)