1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 15:54:31 +01:00

Refactor tile_element_water_height to take CoordsXY

This commit is contained in:
duncanspumpkin
2019-08-13 19:25:39 +01:00
parent 5b92b64ec7
commit f3db7f877a
9 changed files with 16 additions and 20 deletions

View File

@@ -202,7 +202,7 @@ void rct_duck::UpdateSwim()
{
Invalidate();
int16_t landZ = tile_element_height({ x, y });
int16_t waterZ = tile_element_water_height(x, y);
int16_t waterZ = tile_element_water_height({ x, y });
if (z < landZ || waterZ == 0)
{
@@ -223,7 +223,7 @@ void rct_duck::UpdateSwim()
int32_t newX = x + DuckMoveOffset[direction].x;
int32_t newY = y + DuckMoveOffset[direction].y;
landZ = tile_element_height({ newX, newY });
waterZ = tile_element_water_height(newX, newY);
waterZ = tile_element_water_height({ newX, newY });
if (z >= landZ && z == waterZ)
{