mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-29 01:35:06 +01:00
Apply review suggestion
This commit is contained in:
@@ -126,8 +126,9 @@ PathElement* MapGetFootpathElement(const CoordsXYZ& coords)
|
||||
{
|
||||
if (tileElement == nullptr)
|
||||
break;
|
||||
if (tileElement->GetType() == TileElementType::Path && tileElement->GetBaseZ() == coords.z)
|
||||
return tileElement->AsPath();
|
||||
auto* pathElement = tileElement->AsPath();
|
||||
if (pathElement != nullptr && pathElement->GetBaseZ() == coords.z)
|
||||
return pathElement;
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user