diff --git a/distribution/changelog.txt b/distribution/changelog.txt index b05a7855be..d547b05b37 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -5,6 +5,7 @@ - Fix: [#18064] Unable to dismiss notification messages. - Fix: [#18122] Ghosts count towards “Great scenery!” guest thought. - Fix: [#18134] Underground on-ride photo section partially clips through adjacent terrain edge. +- Fix: [#18257] Guests ‘waiting’ on extended railway crossings. - Improved: [#18192, #18214] Tycoon Park has been added Extras tab, Competition scenarios have received their own section. - Change: [#18230] Make the large flat to steep pieces available on the corkscrew roller coaster without cheats. 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 849e6af060..d922168124 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -321,9 +321,15 @@ bool Peep::CheckForPath() return false; } -bool Peep::PathIsBlockedByVehicle() +bool Peep::ShouldWaitForLevelCrossing() { auto curPos = TileCoordsXYZ(GetLocation()); + if (FootpathIsBlockedByVehicle(curPos)) + { + // If current position is blocked, try to get out of the way + return false; + } + auto dstPos = TileCoordsXYZ(CoordsXYZ{ GetDestination(), NextLoc.z }); if ((curPos.x != dstPos.x || curPos.y != dstPos.y) && FootpathIsBlockedByVehicle(dstPos)) { 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; diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index fda3b3c29e..0dd277ceeb 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -42,7 +42,7 @@ // This string specifies which version of network stream current build uses. // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "2" +#define NETWORK_STREAM_VERSION "3" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static Peep* _pickup_peep = nullptr;