mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-05-24 16:21:21 +00:00
Fixed bugs with copy/pasting instances
This commit is contained in:
parent
09bcf4114c
commit
87906aafb9
@ -260,7 +260,7 @@ CScriptObject* CScriptLoader::LoadObjectMP1(IInputStream& rSCLY)
|
|||||||
}
|
}
|
||||||
|
|
||||||
u32 InstanceID = rSCLY.ReadLong() & 0x03FFFFFF;
|
u32 InstanceID = rSCLY.ReadLong() & 0x03FFFFFF;
|
||||||
if (InstanceID == -1) InstanceID = mpArea->FindUnusedInstanceID();
|
if (InstanceID == 0x03FFFFFF) InstanceID = mpArea->FindUnusedInstanceID();
|
||||||
mpObj = new CScriptObject(InstanceID, mpArea, mpLayer, pTemp);
|
mpObj = new CScriptObject(InstanceID, mpArea, mpLayer, pTemp);
|
||||||
|
|
||||||
// Load connections
|
// Load connections
|
||||||
@ -374,7 +374,7 @@ CScriptObject* CScriptLoader::LoadObjectMP2(IInputStream& rSCLY)
|
|||||||
}
|
}
|
||||||
|
|
||||||
u32 InstanceID = rSCLY.ReadLong() & 0x03FFFFFF;
|
u32 InstanceID = rSCLY.ReadLong() & 0x03FFFFFF;
|
||||||
if (InstanceID == -1) InstanceID = mpArea->FindUnusedInstanceID();
|
if (InstanceID == 0x03FFFFFF) InstanceID = mpArea->FindUnusedInstanceID();
|
||||||
mpObj = new CScriptObject(InstanceID, mpArea, mpLayer, pTemplate);
|
mpObj = new CScriptObject(InstanceID, mpArea, mpLayer, pTemplate);
|
||||||
|
|
||||||
// Load connections
|
// Load connections
|
||||||
|
@ -116,7 +116,11 @@ void CPasteNodesCommand::redo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
mLinkedInstances << pLink->Receiver();
|
{
|
||||||
|
CScriptObject *pReceiver = pLink->Receiver();
|
||||||
|
pReceiver->AddLink(eIncoming, pLink);
|
||||||
|
mLinkedInstances << pReceiver;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user