1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

remove all unnecessary object resets

This commit is contained in:
Ted John
2016-07-07 23:32:45 +01:00
parent 4664b73488
commit 78c6b6a251
10 changed files with 23 additions and 33 deletions

View File

@@ -180,6 +180,22 @@ public:
reset_type_to_ride_entry_index_map();
}
void ResetObjects() override
{
if (_loadedObjects != nullptr)
{
for (size_t i = 0; i < OBJECT_ENTRY_COUNT; i++)
{
Object * loadedObject = _loadedObjects[i];
if (loadedObject != nullptr)
{
loadedObject->Unload();
loadedObject->Load();
}
}
}
}
private:
sint32 FindSpareSlot(uint8 objectType)
{