Fix #10477. Fix upper max height limit being very low for large 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.
This commit is contained in:
Duncan 2019-12-31 08:15:46 +00:00 committed by Michael Steenbeek
parent d486ac4d3b
commit c74339fed9
2 changed files with 4 additions and 4 deletions

View File

@ -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)
------------------------------------------------------------------------

View File

@ -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;
}