mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-02 11:45:13 +01:00
Fix #14667: Unpurchaseable land tiles in Extreme Hawaiian Island
This commit is contained in:
committed by
GitHub
parent
654fb83d3c
commit
864de57877
@@ -2494,13 +2494,16 @@ void FixLandOwnershipTiles(std::initializer_list<TileCoordsXY> tiles)
|
||||
FixLandOwnershipTilesWithOwnership(tiles, OWNERSHIP_AVAILABLE);
|
||||
}
|
||||
|
||||
void FixLandOwnershipTilesWithOwnership(std::initializer_list<TileCoordsXY> tiles, uint8_t ownership)
|
||||
void FixLandOwnershipTilesWithOwnership(std::initializer_list<TileCoordsXY> tiles, uint8_t ownership, bool doNotDowngrade)
|
||||
{
|
||||
for (const TileCoordsXY* tile = tiles.begin(); tile != tiles.end(); ++tile)
|
||||
{
|
||||
auto surfaceElement = map_get_surface_element_at(tile->ToCoordsXY());
|
||||
if (surfaceElement != nullptr)
|
||||
{
|
||||
if (doNotDowngrade && surfaceElement->GetOwnership() == OWNERSHIP_OWNED)
|
||||
continue;
|
||||
|
||||
surfaceElement->SetOwnership(ownership);
|
||||
update_park_fences_around_tile({ (*tile).x * 32, (*tile).y * 32 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user