mirror of https://github.com/OpenRCT2/OpenRCT2.git
Return PathElement instead of TileElement on MapGetFootpathElement
This commit is contained in:
parent
8f491eb0e4
commit
ad2b1959c8
|
@ -119,7 +119,7 @@ static bool entrance_has_direction(const EntranceElement& entranceElement, int32
|
||||||
return entranceElement.GetDirections() & (1 << (direction & 3));
|
return entranceElement.GetDirections() & (1 << (direction & 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
TileElement* MapGetFootpathElement(const CoordsXYZ& coords)
|
PathElement* MapGetFootpathElement(const CoordsXYZ& coords)
|
||||||
{
|
{
|
||||||
TileElement* tileElement = MapGetFirstElementAt(coords);
|
TileElement* tileElement = MapGetFirstElementAt(coords);
|
||||||
do
|
do
|
||||||
|
@ -127,7 +127,7 @@ TileElement* MapGetFootpathElement(const CoordsXYZ& coords)
|
||||||
if (tileElement == nullptr)
|
if (tileElement == nullptr)
|
||||||
break;
|
break;
|
||||||
if (tileElement->GetType() == TileElementType::Path && tileElement->GetBaseZ() == coords.z)
|
if (tileElement->GetType() == TileElementType::Path && tileElement->GetBaseZ() == coords.z)
|
||||||
return tileElement;
|
return tileElement->AsPath();
|
||||||
} while (!(tileElement++)->IsLastForTile());
|
} while (!(tileElement++)->IsLastForTile());
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
class FootpathObject;
|
class FootpathObject;
|
||||||
class FootpathSurfaceObject;
|
class FootpathSurfaceObject;
|
||||||
class FootpathRailingsObject;
|
class FootpathRailingsObject;
|
||||||
|
struct PathElement;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -184,7 +185,7 @@ extern const std::array<CoordsXY, NumOrthogonalDirections> DirectionOffsets;
|
||||||
extern const std::array<CoordsXY, NumOrthogonalDirections> BinUseOffsets;
|
extern const std::array<CoordsXY, NumOrthogonalDirections> BinUseOffsets;
|
||||||
extern const std::array<CoordsXY, NumOrthogonalDirections * 2> BenchUseOffsets;
|
extern const std::array<CoordsXY, NumOrthogonalDirections * 2> BenchUseOffsets;
|
||||||
|
|
||||||
TileElement* MapGetFootpathElement(const CoordsXYZ& coords);
|
PathElement* MapGetFootpathElement(const CoordsXYZ& coords);
|
||||||
void FootpathInterruptPeeps(const CoordsXYZ& footpathPos);
|
void FootpathInterruptPeeps(const CoordsXYZ& footpathPos);
|
||||||
money64 FootpathProvisionalSet(
|
money64 FootpathProvisionalSet(
|
||||||
ObjectEntryIndex type, ObjectEntryIndex railingsType, const CoordsXYZ& footpathLoc, int32_t slope,
|
ObjectEntryIndex type, ObjectEntryIndex railingsType, const CoordsXYZ& footpathLoc, int32_t slope,
|
||||||
|
|
Loading…
Reference in New Issue