mirror of https://github.com/OpenRCT2/OpenRCT2.git
Apply review suggestion
This commit is contained in:
parent
5f515b6a73
commit
375ce5c123
|
@ -126,8 +126,9 @@ PathElement* MapGetFootpathElement(const CoordsXYZ& coords)
|
||||||
{
|
{
|
||||||
if (tileElement == nullptr)
|
if (tileElement == nullptr)
|
||||||
break;
|
break;
|
||||||
if (tileElement->GetType() == TileElementType::Path && tileElement->GetBaseZ() == coords.z)
|
auto* pathElement = tileElement->AsPath();
|
||||||
return tileElement->AsPath();
|
if (pathElement != nullptr && pathElement->GetBaseZ() == coords.z)
|
||||||
|
return pathElement;
|
||||||
} while (!(tileElement++)->IsLastForTile());
|
} while (!(tileElement++)->IsLastForTile());
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
Loading…
Reference in New Issue