Skip to content

Commit

Permalink
Fix OpenRCT2#21787: Map generator heightmap should respect increased …
Browse files Browse the repository at this point in the history
…height limits (OpenRCT2#21798)
  • Loading branch information
janisozaur authored Apr 15, 2024
1 parent 530a7de commit b64ec76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/openrct2-ui/windows/MapGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<int32_t>(_heightmapHigh + 1, kMaximumWaterHeight);
InvalidateWidget(WIDX_HEIGHTMAP_HIGH);
break;
case WIDX_HEIGHTMAP_HIGH_DOWN:
Expand Down

0 comments on commit b64ec76

Please sign in to comment.