1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 17:24:47 +01:00

Split of Needs supports changes from OpenRCT2/OpenRCT2#19446 (#19759)

This commit is contained in:
Duncan
2023-04-04 08:52:07 +01:00
committed by GitHub
parent a794c982ba
commit c0bd64f778
9 changed files with 46 additions and 30 deletions

View File

@@ -1099,6 +1099,22 @@ namespace OpenRCT2
it.element->SetInvisible(true);
}
}
else if (
it.element->GetType() == TileElementType::SmallScenery && os.GetHeader().TargetVersion < 22)
{
auto* sceneryElement = it.element->AsSmallScenery();
// Previous formats stored the needs supports flag in the primary colour
// We have moved it into a flags field to support extended colour sets
bool needsSupports = sceneryElement->GetPrimaryColour()
& RCT12_SMALL_SCENERY_ELEMENT_NEEDS_SUPPORTS_FLAG;
if (needsSupports)
{
sceneryElement->SetPrimaryColour(
sceneryElement->GetPrimaryColour()
& ~RCT12_SMALL_SCENERY_ELEMENT_NEEDS_SUPPORTS_FLAG);
sceneryElement->SetNeedsSupports();
}
}
}
}
ParkEntranceUpdateLocations();