Skip to content

Commit

Permalink
Fix OpenRCT2#10477. Fix upper max height limit being very low for lar…
Browse files Browse the repository at this point in the history
…ge scenery

Mistake made while improving mouse control when zoomed out caused the upper limit for multi tile scenery to be limited by the sum of all clearance z values instead of the greatest clearance z value.
  • Loading branch information
duncanspumpkin authored and Evan Haataja committed Apr 27, 2020
1 parent 2ab6571 commit 69565a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fix: [#10228] Can't import RCT1 Deluxe from Steam.
- Fix: [#10325] Crash when banners have no text.
- Fix: [#10420] Money effect causing false positive desync.
- Fix: [#10477] Large Scenery cannot be placed higher using SHIFT.

0.2.4 (2019-10-28)
------------------------------------------------------------------------
Expand Down
7 changes: 3 additions & 4 deletions src/openrct2-ui/windows/TopToolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1250,13 +1250,12 @@ static void sub_6E1F34(
rct_scenery_entry* scenery_entry = get_large_scenery_entry(selected_scenery);
if (scenery_entry)
{
int16_t tileZ = 0;
int16_t maxClearZ = 0;
for (int32_t i = 0; scenery_entry->large_scenery.tiles[i].x_offset != -1; ++i)
{
assert(i < MAXIMUM_MAP_SIZE_TECHNICAL);
tileZ += scenery_entry->large_scenery.tiles[i].z_clearance;
maxClearZ = std::max<int16_t>(maxClearZ, scenery_entry->large_scenery.tiles[i].z_clearance);
}
maxPossibleHeight = std::max(0, maxPossibleHeight - tileZ);
maxPossibleHeight = std::max(0, maxPossibleHeight - maxClearZ);
}
can_raise_item = true;
}
Expand Down

0 comments on commit 69565a0

Please sign in to comment.