From ca6c82a39d6a5856fc99b61d7ffd1bcf3114f8fa Mon Sep 17 00:00:00 2001 From: Broxzier Date: Thu, 9 Mar 2017 20:27:18 +0100 Subject: [PATCH] Fix issue for when smoothing raises a tile above water level --- src/openrct2/world/map_helpers.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/openrct2/world/map_helpers.c b/src/openrct2/world/map_helpers.c index e11ef8ed76..c0a0c73de9 100644 --- a/src/openrct2/world/map_helpers.c +++ b/src/openrct2/world/map_helpers.c @@ -398,6 +398,11 @@ sint32 tile_smooth(sint32 x, sint32 y) { // All corners are raised, raise the entire tile instead. surfaceElement->base_height = (surfaceElement->clearance_height += 2); + uint8 waterHeight = (surfaceElement->properties.surface.terrain & 0x1F) * 2; + if (waterHeight <= surfaceElement->base_height) + { + surfaceElement->properties.surface.terrain &= ~0x1F; + } } else {