1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 23:04:36 +01:00

Pass object repository as a dependency when loading objects

This commit is contained in:
Ted John
2018-04-19 23:51:05 +01:00
parent 4edb450594
commit edb9dc39ab
8 changed files with 65 additions and 53 deletions

View File

@@ -234,7 +234,7 @@ namespace ObjectJsonHelpers
{
std::vector<rct_g1_element> result;
auto objectPath = FindLegacyObject(name);
auto obj = ObjectFactory::CreateObjectFromLegacyFile(objectPath.c_str());
auto obj = ObjectFactory::CreateObjectFromLegacyFile(context->GetObjectRepository(), objectPath.c_str());
if (obj != nullptr)
{
auto &imgTable = static_cast<const Object *>(obj)->GetImageTable();