From 1174063c27d460abd3812ea33b87f5a2ed0697dd Mon Sep 17 00:00:00 2001 From: Kevin Strehl Date: Sat, 1 Apr 2023 00:44:22 -0600 Subject: [PATCH] Improve check whether path is connected (#19788) --- distribution/changelog.txt | 1 + src/openrct2/world/Map.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 0c1a323546..132602dbe9 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -2,6 +2,7 @@ ------------------------------------------------------------------------ - Fix: [#19296] Crash due to a race condition for parallel object loading. - Fix: [#19756] Crash with title sequences containing no commands. +- Fix: [#19767] No message when path is not connected to ride exit and is therefore unreachable for mechanics. 0.4.4 (2023-03-28) ------------------------------------------------------------------------ diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index 1aef290df1..bbcc019c3d 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -703,7 +703,7 @@ bool MapCoordIsConnected(const TileCoordsXYZ& loc, uint8_t faceDirection) } else { - if (loc.z == tileElement->BaseHeight) + if (loc.z == tileElement->BaseHeight && (tileElement->AsPath()->GetEdges() & (1 << faceDirection))) return true; } } while (!(tileElement++)->IsLastForTile());