Fix #7588: Objects are broken in multiplay servers

Load objects when importing maps in network games.
This commit is contained in:
Ted John 2018-05-30 18:21:07 +01:00
parent e545c3a0f4
commit 58529b3726
1 changed files with 3 additions and 1 deletions

View File

@ -2059,8 +2059,10 @@ bool Network::LoadMap(IStream * stream)
try
{
auto context = GetContext();
auto objManager = context->GetObjectManager();
auto importer = ParkImporter::CreateS6(context->GetObjectRepository(), context->GetObjectManager());
importer->LoadFromStream(stream, false);
auto loadResult = importer->LoadFromStream(stream, false);
objManager->LoadObjects(loadResult.RequiredObjects.data(), loadResult.RequiredObjects.size());
importer->Import();
sprite_position_tween_reset();