From e1306afbf3f5b63b077b7062f30eab5c062bd1ea Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Fri, 27 May 2016 21:17:55 +0100 Subject: [PATCH] Fix #3717. Tunnels correctly drawn when paths underneath --- src/paint/map_element/surface.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/paint/map_element/surface.c b/src/paint/map_element/surface.c index dd2aab59fb..9fed05acd0 100644 --- a/src/paint/map_element/surface.c +++ b/src/paint/map_element/surface.c @@ -644,12 +644,14 @@ void viewport_surface_draw_land_side_bottom(enum edge edge, uint8 height, uint8 } } - sub_98196C(base_image_id, offset.x, offset.y, bounds.x, bounds.y, 15, curHeight * 16, rotation); + if (curHeight != RCT2_GLOBAL(tunnelArray, uint8)) { + sub_98196C(base_image_id, offset.x, offset.y, bounds.x, bounds.y, 15, curHeight * 16, rotation); - curHeight++; - continue; + curHeight++; + continue; + } } - + // Tunnels uint8 tunnelType = RCT2_GLOBAL(tunnelArray + 1, uint8); uint8 tunnelHeight = stru_97B570[tunnelType][0];