mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Use Is/Set Accounted
This commit is contained in:
@@ -241,7 +241,7 @@ private:
|
||||
{
|
||||
if (tileElement->GetType() == TILE_ELEMENT_TYPE_LARGE_SCENERY)
|
||||
{
|
||||
tileElement->flags &= ~TILE_ELEMENT_FLAG_LARGE_SCENERY_ACCOUNTED;
|
||||
tileElement->AsLargeScenery()->SetIsAccounted(false);
|
||||
}
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
}
|
||||
|
||||
@@ -113,11 +113,11 @@ public:
|
||||
// scenery tile elements.
|
||||
if (flags & GAME_COMMAND_FLAG_PATH_SCENERY)
|
||||
{
|
||||
if (tileElement->flags & TILE_ELEMENT_FLAG_LARGE_SCENERY_ACCOUNTED)
|
||||
if (tileElement->AsLargeScenery()->IsAccounted())
|
||||
calculate_cost = false;
|
||||
|
||||
// Sets the flag to prevent this being counted in additional calls
|
||||
tileElement->flags |= TILE_ELEMENT_FLAG_LARGE_SCENERY_ACCOUNTED;
|
||||
tileElement->AsLargeScenery()->SetIsAccounted(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user