1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 20:43:04 +01:00

Do not read from repository when loading objects

This commit is contained in:
Gymnasiast
2025-09-21 01:32:16 +02:00
parent 3e11a8efdf
commit f768d2873e
4 changed files with 17 additions and 22 deletions

View File

@@ -47,18 +47,11 @@ namespace OpenRCT2
// Add path additions to 'Signs and items for footpaths' group, rather than lumping them in the Miscellaneous tab.
// Since this is already done the other way round for original items, avoid adding those to prevent duplicates.
auto& objectRepository = context->GetObjectRepository();
auto item = objectRepository.FindObject(GetDescriptor());
if (item != nullptr)
auto firstSourceGame = GetFirstSourceGame();
if (firstSourceGame == ObjectSourceGame::Custom)
{
auto sourceGame = item->GetFirstSourceGame();
if (sourceGame == ObjectSourceGame::WackyWorlds || sourceGame == ObjectSourceGame::TimeTwister
|| sourceGame == ObjectSourceGame::Custom)
{
auto scgPathX = Object::GetScgPathXHeader();
SetPrimarySceneryGroup(scgPathX);
}
auto scgPathX = Object::GetScgPathXHeader();
SetPrimarySceneryGroup(scgPathX);
}
}