Fixed crash when copy/pasting objects in MP1

This commit is contained in:
Aruki 2017-07-26 03:43:22 -06:00
parent 4084375dce
commit e4d4beeaed
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ public:
Cooker.WriteInstance(Out, static_cast<CScriptNode*>(*It)->Instance());
// Replace instance ID with 0xFFFFFFFF to force it to generate a new one.
Out.Seek(0x6, SEEK_SET);
Out.Seek(mGame <= ePrime ? 0x5 : 0x6, SEEK_SET);
Out.WriteLong(0xFFFFFFFF);
if (!SetFirstNodePos)

View File

@ -55,7 +55,7 @@ void CPasteNodesCommand::redo()
if (rkNode.Type == eScriptNode)
{
CMemoryInStream In(rkNode.InstanceData.data(), rkNode.InstanceData.size(), IOUtil::eBigEndian);
CScriptObject *pInstance = CScriptLoader::LoadInstance(In, pArea, mpLayer, pArea->Game(), true);
CScriptObject *pInstance = CScriptLoader::LoadInstance(In, pArea, mpLayer, pArea->Game(), false);
pArea->AddInstanceToArea(pInstance);
mpLayer->AddInstance(pInstance);