forked from rosebudai/OpenRCT2-Web
Merge pull request #8896 from duncanspumpkin/fix_8885
Fix #8885. Incorrect function for calculating lowest water height.
This commit is contained in:
1 file changed
+8
-7
@@ -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