Defer temp object Load/Unload to calling side

This commit is contained in:
Aaron van Geffen committed 2025-05-28 00:58:25 +02:00
1 parent 342f10a63c
commit a4e92770fd
4 files changed
+1 -7

No files matched your search

+1 -1
View File
@@ -243,10 +243,10 @@ namespace OpenRCT2::Ui::Windows
return;
auto& objManager = GetContext()->GetObjectManager();
if (auto obj = objManager.LoadTempObject(source.textObjectId); obj != nullptr)
{
auto& scenarioMetaObj = reinterpret_cast<ScenarioMetaObject&>(*obj);
scenarioMetaObj.Load();
ParkPreview preview{};
preview.images.push_back(scenarioMetaObj.GetMiniMapImage());
-2
View File
@@ -173,8 +173,6 @@ public:
}
auto object = _objectRepository.LoadObject(ori);
object->Load();
return object;
}
-2
View File
@@ -276,8 +276,6 @@ namespace OpenRCT2::RCT1
auto& textObject = reinterpret_cast<ScenarioMetaObject&>(*obj);
name = textObject.GetScenarioName();
details = textObject.GetScenarioDetails();
obj->Unload();
}
}
-2
View File
@@ -301,8 +301,6 @@ namespace OpenRCT2::RCT2
auto& textObject = reinterpret_cast<ScenarioMetaObject&>(*obj);
dst->Name = textObject.GetScenarioName();
dst->Details = textObject.GetScenarioDetails();
obj->Unload();
}
}