diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index 41eed0a1be..b196a67f2e 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -179,23 +179,19 @@ struct TileCoordsXY int32_t x = 0, y = 0; }; -struct CoordsXYZ +struct CoordsXYZ : public CoordsXY { - int32_t x = 0; - int32_t y = 0; int32_t z = 0; CoordsXYZ() = default; constexpr CoordsXYZ(int32_t _x, int32_t _y, int32_t _z) - : x(_x) - , y(_y) + : CoordsXY(_x, _y) , z(_z) { } constexpr CoordsXYZ(CoordsXY c, int32_t _z) - : x(c.x) - , y(c.y) + : CoordsXY(c) , z(_z) { } @@ -272,10 +268,16 @@ typedef uint8_t Direction; return dir < 4; } -struct CoordsXYZD +struct CoordsXYZD : public CoordsXYZ { - int32_t x, y, z; - Direction direction; + Direction direction = 0; + + CoordsXYZD() = default; + constexpr CoordsXYZD(int32_t _x, int32_t _y, int32_t _z, Direction _d) + : CoordsXYZ(_x, _y, _z) + , direction(_d) + { + } bool isNull() const {