Fixed crash when copy/pasting objects in MP1
This commit is contained in:
parent
4084375dce
commit
e4d4beeaed
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue