1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Defer temp object Load/Unload to calling side

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

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());

View File

@@ -173,8 +173,6 @@ public:
}
auto object = _objectRepository.LoadObject(ori);
object->Load();
return object;
}

View File

@@ -276,8 +276,6 @@ namespace OpenRCT2::RCT1
auto& textObject = reinterpret_cast<ScenarioMetaObject&>(*obj);
name = textObject.GetScenarioName();
details = textObject.GetScenarioDetails();
obj->Unload();
}
}

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();
}
}