Merge pull request #8896 from duncanspumpkin/fix_8885

Fix #8885. Incorrect function for calculating lowest water height.
This commit is contained in:
ζeh Matt authored and GitHub committed 2019-03-16 13:55:32 -07:00
commit cb88c713c3
1 file changed
+8 -7
+8 -7
View File
@@ -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;
}
}
}