From 7c2ec714f7cea4087145c0c7a7c2fb3b0275be77 Mon Sep 17 00:00:00 2001 From: Rik Smeets <30838294+rik-smeets@users.noreply.github.com> Date: Sun, 9 Oct 2022 11:01:10 +0200 Subject: [PATCH] Improve method name for level crossing check --- src/openrct2/entity/Guest.cpp | 2 +- src/openrct2/entity/Peep.cpp | 2 +- src/openrct2/entity/Peep.h | 2 +- src/openrct2/entity/Staff.cpp | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 5e354873df..9411da9991 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -5289,7 +5289,7 @@ void Guest::UpdateWalking() } } - if (PathIsBlockedByVehicle()) + if (ShouldWaitForLevelCrossing()) { // Wait for vehicle to pass return; diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 2c11923675..d922168124 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -321,7 +321,7 @@ bool Peep::CheckForPath() return false; } -bool Peep::PathIsBlockedByVehicle() +bool Peep::ShouldWaitForLevelCrossing() { auto curPos = TileCoordsXYZ(GetLocation()); if (FootpathIsBlockedByVehicle(curPos)) diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index fff6eb4601..1b3f742fd0 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -412,7 +412,7 @@ public: // Peep // TODO: Make these private again when done refactoring public: // Peep [[nodiscard]] bool CheckForPath(); - bool PathIsBlockedByVehicle(); + bool ShouldWaitForLevelCrossing(); bool IsOnLevelCrossing(); void PerformNextAction(uint8_t& pathing_result); void PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result); diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index d072b252ec..147ca180b2 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -1338,7 +1338,7 @@ void Staff::UpdateHeadingToInspect() if (!CheckForPath()) return; - if (PathIsBlockedByVehicle() && !IsMechanicHeadingToFixRideBlockingPath()) + if (ShouldWaitForLevelCrossing() && !IsMechanicHeadingToFixRideBlockingPath()) return; uint8_t pathingResult; @@ -1446,7 +1446,7 @@ void Staff::UpdateAnswering() if (!CheckForPath()) return; - if (PathIsBlockedByVehicle() && !IsMechanicHeadingToFixRideBlockingPath()) + if (ShouldWaitForLevelCrossing() && !IsMechanicHeadingToFixRideBlockingPath()) return; uint8_t pathingResult; @@ -1781,7 +1781,7 @@ void Staff::UpdatePatrolling() if (!CheckForPath()) return; - if (PathIsBlockedByVehicle() && !IsMechanicHeadingToFixRideBlockingPath()) + if (ShouldWaitForLevelCrossing() && !IsMechanicHeadingToFixRideBlockingPath()) return; uint8_t pathingResult;