mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 07:14:31 +01:00
Refactor the code that uses MapGetFootpathElement
This commit is contained in:
@@ -125,7 +125,8 @@ TileElement* FootpathRemoveAction::GetFootpathElement() const
|
||||
{
|
||||
bool getGhostPath = GetFlags() & GAME_COMMAND_FLAG_GHOST;
|
||||
|
||||
TileElement* tileElement = MapGetFootpathElement(_loc);
|
||||
// FIXME: This is a hack to get the footpath element. It should be done in a better way.
|
||||
TileElement* tileElement = MapGetFootpathElement(_loc)->as<TileElement>();
|
||||
TileElement* footpathElement = nullptr;
|
||||
if (tileElement != nullptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user