mirror of https://github.com/OpenRCT2/OpenRCT2.git
Use Is/Set Accounted
This commit is contained in:
parent
fae15fceca
commit
411e5c47a2
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue