From 547973066c6aa5b6daa3438badc0630331f1afbe Mon Sep 17 00:00:00 2001 From: Jeroen D Stout Date: Thu, 11 Jan 2018 01:58:17 +0100 Subject: [PATCH] Add check for peep walking update to prevent walking onto blocked tiles --- src/openrct2/peep/Guest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index b3042e6a5a..1105c4bbca 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -5248,6 +5248,12 @@ void rct_peep::UpdateWalking() } } + rct_tile_element * path_element = map_get_path_element_at(destination_x / 32, destination_y / 32, next_z); + if (path_element && path_element->flags & TILE_ELEMENT_FLAG_BLOCKED_BY_VEHICLE) + { + return; + } + uint8 pathingResult; PerformNextAction(pathingResult); if (!(pathingResult & PATHING_DESTINATION_REACHED))