From b64ec76c9511d71f1f87d8d37cfc10c88774bd83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 15 Apr 2024 17:19:18 +0200 Subject: [PATCH] Fix #21787: Map generator heightmap should respect increased height limits (#21798) --- distribution/changelog.txt | 1 + src/openrct2-ui/windows/MapGen.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index f1771e3fb3..9fe2a96371 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -4,6 +4,7 @@ - Improved: [#21769] Expose “animation is backwards” wall property in Tile Inspector. - Change: [#21715] [Plugin] Remove access to the internal `owner` property. Note: `ownership` is still accessible. - Fix: [#866] Boat Hire boats get stuck entering track. +- Fix: [#21787] Map generator heightmap should respect increased height limits. 0.4.10 (2024-04-02) ------------------------------------------------------------------------ diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index 0f8b55182b..5f1b608fda 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -1089,7 +1089,7 @@ static uint64_t PressedWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { InvalidateWidget(WIDX_HEIGHTMAP_STRENGTH); break; case WIDX_HEIGHTMAP_LOW_UP: - _heightmapLow = std::min(_heightmapLow + 1, 142 - 1); + _heightmapLow = std::min(_heightmapLow + 1, kMaximumWaterHeight - 1); _heightmapHigh = std::max(_heightmapHigh, _heightmapLow + 1); InvalidateWidget(WIDX_HEIGHTMAP_LOW); break; @@ -1098,7 +1098,7 @@ static uint64_t PressedWidgets[WINDOW_MAPGEN_PAGE_COUNT] = { InvalidateWidget(WIDX_HEIGHTMAP_LOW); break; case WIDX_HEIGHTMAP_HIGH_UP: - _heightmapHigh = std::min(_heightmapHigh + 1, 142); + _heightmapHigh = std::min(_heightmapHigh + 1, kMaximumWaterHeight); InvalidateWidget(WIDX_HEIGHTMAP_HIGH); break; case WIDX_HEIGHTMAP_HIGH_DOWN: