mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Merge pull request #8896 from duncanspumpkin/fix_8885
Fix #8885. Incorrect function for calculating lowest water height.
This commit is contained in:
@@ -136,14 +136,15 @@ private:
|
||||
if (tile_element == nullptr)
|
||||
continue;
|
||||
|
||||
uint8_t height = tile_element->AsSurface()->GetWaterHeight();
|
||||
if (height != 0)
|
||||
uint8_t height = tile_element->base_height;
|
||||
if (tile_element->AsSurface()->GetWaterHeight() > 0)
|
||||
{
|
||||
height *= 2;
|
||||
if (maxHeight > height)
|
||||
{
|
||||
maxHeight = height;
|
||||
}
|
||||
height = tile_element->AsSurface()->GetWaterHeight() * 2;
|
||||
}
|
||||
|
||||
if (maxHeight > height)
|
||||
{
|
||||
maxHeight = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user