From fd148356c8109a2ee7ea29e004d72ad0a75ebbac Mon Sep 17 00:00:00 2001 From: mix <167040362+mixiate@users.noreply.github.com> Date: Fri, 7 Mar 2025 18:48:12 +0000 Subject: [PATCH] Fix #10582: Low clearance tunnels below water draw incorrectly --- distribution/changelog.txt | 1 + src/openrct2/paint/tile_element/Paint.Surface.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 5fb3b423ba..50de56e4a2 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -4,6 +4,7 @@ - Change: [#23932] The land rights window now checks 'Land Owned' by default. - Fix: [#4225] Ride Construction window offers non-existent banked sloped to level curve (original bug). - Fix: [#10379] Banners outside the park can be renamed and modified (original bug). +- Fix: [#10582] Low clearance tunnels below water are drawn incorrectly (original bug). - Fix: [#23743] Parks with guest goals over 32767 do not appear in the scenario list. - Fix: [#23844] Sound effects keep playing when loading another save. - Fix: [#23897] Reverse Freefall Coaster slope up to vertical track piece does not draw a vertical tunnel. diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index 07524d9614..50f1e09729 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -573,6 +573,9 @@ static void ViewportSurfaceDrawTileSideBottom( return; } + neighbourCornerHeight1 = std::max(cornerHeight1, neighbourCornerHeight1); + neighbourCornerHeight2 = std::max(cornerHeight2, neighbourCornerHeight2); + cornerHeight1 = height; cornerHeight2 = height; } @@ -763,6 +766,9 @@ static void ViewportSurfaceDrawTileSideTop( return; } + neighbourCornerHeight1 = std::max(cornerHeight1, neighbourCornerHeight1); + neighbourCornerHeight2 = std::max(cornerHeight2, neighbourCornerHeight2); + cornerHeight1 = height; cornerHeight2 = height; }