From 9fb58a34539d830121affd2c6f8c6f4e663df4bb Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sat, 15 Sep 2018 11:45:50 +0200 Subject: [PATCH] Fix constants in map_height_from_slope() --- src/openrct2/world/Map.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index e6402205bc..22dda82c9a 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -694,18 +694,18 @@ void map_update_path_wide_flags() */ int32_t map_height_from_slope(int32_t x, int32_t y, int32_t slope) { - if (!(slope & TILE_ELEMENT_SLOPE_S_CORNER_UP)) + if (!(slope & FOOTPATH_PROPERTIES_FLAG_IS_SLOPED)) return 0; - switch (slope & TILE_ELEMENT_SLOPE_NE_SIDE_UP) + switch (slope & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK) { - case TILE_ELEMENT_SLOPE_FLAT: + case 0: return (31 - (x & 31)) / 2; - case TILE_ELEMENT_SLOPE_N_CORNER_UP: + case 1: return (y & 31) / 2; - case TILE_ELEMENT_SLOPE_E_CORNER_UP: + case 2: return (x & 31) / 2; - case TILE_ELEMENT_SLOPE_NE_SIDE_UP: + case 3: return (31 - (y & 31)) / 2; } return 0;