mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
Fix setNull on inherited classes leaving uninitialized variables
This commit is contained in:
parent
163fe3756d
commit
b7b3418b75
1 changed files with 18 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue