diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index 517ed6d1d3..19e5ff9952 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -268,6 +268,12 @@ struct CoordsXYZ : public CoordsXY { return ToTileStart() + CoordsXYZ{ COORDS_XY_HALF_TILE, COORDS_XY_HALF_TILE, 0 }; } + + void setNull() + { + CoordsXY::setNull(); + z = 0; + } }; struct CoordsXYRangedZ : public CoordsXY @@ -459,6 +465,12 @@ struct TileCoordsXYZ : public TileCoordsXY } return { x * COORDS_XY_STEP, y * COORDS_XY_STEP, z * COORDS_Z_STEP }; } + + void setNull() + { + TileCoordsXY::setNull(); + z = 0; + } }; /** @@ -655,6 +667,12 @@ struct TileCoordsXYZD : public TileCoordsXYZ } return { x * COORDS_XY_STEP, y * COORDS_XY_STEP, z * COORDS_Z_STEP, direction }; } + + void setNull() + { + TileCoordsXYZ::setNull(); + direction = INVALID_DIRECTION; + } }; /**