mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 04:53:12 +01:00
* Add ObjectTypeIsTransient() and ObjectTypeIsIntransient() * Fix #19434, #19509: remove_unused_objects does not remove OpenRCT2 types
This commit is contained in:
committed by
GitHub
parent
e26a18f8b9
commit
6a89dfbfe9
@@ -671,11 +671,13 @@ int32_t EditorRemoveUnusedObjects()
|
||||
{
|
||||
const ObjectRepositoryItem* item = &items[i];
|
||||
ObjectType objectType = item->Type;
|
||||
|
||||
if (objectType >= ObjectType::SceneryGroup)
|
||||
{
|
||||
if (ObjectTypeIsIntransient(objectType))
|
||||
continue;
|
||||
|
||||
// These object types require exactly one object to be selected at all times.
|
||||
// Removing that object can badly break the game state.
|
||||
if (objectType == ObjectType::ParkEntrance || objectType == ObjectType::Water)
|
||||
continue;
|
||||
}
|
||||
|
||||
_numSelectedObjectsForType[EnumValue(objectType)]--;
|
||||
_objectSelectionFlags[i] &= ~ObjectSelectionFlags::Selected;
|
||||
|
||||
Reference in New Issue
Block a user