From 75877e82f8aecad96992393534f828a47fb4a045 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sat, 15 Sep 2018 11:46:03 +0200 Subject: [PATCH] Fix access to path element --- src/openrct2/peep/Peep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 319bc7e07e..be8ea28313 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1021,7 +1021,7 @@ void rct_peep::UpdateFalling() // If a path check if we are on it if (tile_element->GetType() == TILE_ELEMENT_TYPE_PATH) { - int32_t height = map_height_from_slope(x, y, tile_element->AsSurface()->GetSlope()) + int32_t height = map_height_from_slope(x, y, tile_element->properties.path.type) + tile_element->base_height * 8; if (height < z - 1 || height > z + 4)