From 7db8162a44f09f8220a54541a61986db43fe9460 Mon Sep 17 00:00:00 2001 From: jensj12 Date: Sat, 29 Jul 2017 11:58:08 +0200 Subject: [PATCH] Bugfix --- src/openrct2/world/map.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/openrct2/world/map.c b/src/openrct2/world/map.c index 94c122699a..f7bec0a91c 100644 --- a/src/openrct2/world/map.c +++ b/src/openrct2/world/map.c @@ -2395,32 +2395,32 @@ static money32 smooth_land(sint32 flags, sint32 centreX, sint32 centreY, sint32 for (y = mapTop; y <= mapBottom; y += 32) { mapElement = map_get_surface_element_at(x >> 5, y >> 5); - z = clamp(minHeight, map_element_get_corner_height(mapElement, 0), maxHeight); - z2 = clamp(minHeight, map_element_get_corner_height(mapElement, 1), maxHeight); + z = clamp(minHeight, map_element_get_corner_height(mapElement, 3), maxHeight); + z2 = clamp(minHeight, map_element_get_corner_height(mapElement, 2), maxHeight); totalCost += smooth_land_row_by_edge(flags, x, y, z, z2, -32, 0, 0, 1, 3, 2, raiseLand); } x = mapRight; for (y = mapTop; y <= mapBottom; y += 32) { mapElement = map_get_surface_element_at(x >> 5, y >> 5); - z = clamp(minHeight, map_element_get_corner_height(mapElement, 2), maxHeight); - z2 = clamp(minHeight, map_element_get_corner_height(mapElement, 3), maxHeight); + z = clamp(minHeight, map_element_get_corner_height(mapElement, 1), maxHeight); + z2 = clamp(minHeight, map_element_get_corner_height(mapElement, 0), maxHeight); totalCost += smooth_land_row_by_edge(flags, x, y, z, z2, 32, 0, 2, 3, 1, 0, raiseLand); } y = mapTop; for (x = mapLeft; x <= mapRight; x += 32) { mapElement = map_get_surface_element_at(x >> 5, y >> 5); - z = clamp(minHeight, map_element_get_corner_height(mapElement, 0), maxHeight); - z2 = clamp(minHeight, map_element_get_corner_height(mapElement, 3), maxHeight); + z = clamp(minHeight, map_element_get_corner_height(mapElement, 1), maxHeight); + z2 = clamp(minHeight, map_element_get_corner_height(mapElement, 2), maxHeight); totalCost += smooth_land_row_by_edge(flags, x, y, z, z2, 0, -32, 0, 3, 1, 2, raiseLand); } y = mapBottom; for (x = mapLeft; x <= mapRight; x += 32) { mapElement = map_get_surface_element_at(x >> 5, y >> 5); - z = clamp(minHeight, map_element_get_corner_height(mapElement, 1), maxHeight); - z2 = clamp(minHeight, map_element_get_corner_height(mapElement, 2), maxHeight); + z = clamp(minHeight, map_element_get_corner_height(mapElement, 0), maxHeight); + z2 = clamp(minHeight, map_element_get_corner_height(mapElement, 3), maxHeight); totalCost += smooth_land_row_by_edge(flags, x, y, z, z2, 0, 32, 1, 2, 0, 3, raiseLand); } }