Add check for peep walking update to prevent walking onto blocked tiles

This commit is contained in:
Jeroen D Stout 2018-01-11 01:58:17 +01:00 committed by Ted John
parent 244209df56
commit 547973066c
1 changed files with 6 additions and 0 deletions

View File

@ -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))