mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-13 23:26:19 +00:00
Fully implemented delete, added an easy-to-use ID lookup system for undo commands, fixed a bunch of crashes when undoing/redoing after creating/deleting an object
This commit is contained in:
@@ -20,7 +20,7 @@ protected:
|
||||
|
||||
public:
|
||||
explicit CScriptExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent = 0)
|
||||
: CSceneNode(pScene, pParent),
|
||||
: CSceneNode(pScene, -1, pParent),
|
||||
mpInstance(pInstance),
|
||||
mGame(pInstance->Template()->Game())
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ void CSplinePathExtra::AddWaypoints()
|
||||
if ( (pLink->State() == 0x49533030 && pLink->Message() == 0x41544348) || // InternalState00/Attach
|
||||
(pLink->State() == 0x4D4F5450 && pLink->Message() == 0x41544348) ) // MotionPath/Attach
|
||||
{
|
||||
CScriptNode *pNode = mpScene->ScriptNodeByID(pLink->ReceiverID());
|
||||
CScriptNode *pNode = mpScene->NodeForInstanceID(pLink->ReceiverID());
|
||||
|
||||
if (pNode && pNode->Object()->ObjectTypeID() == 0x57415950) // Waypoint
|
||||
{
|
||||
|
||||
@@ -85,7 +85,7 @@ void CWaypointExtra::BuildLinks()
|
||||
|
||||
if (IsPathLink(pLink))
|
||||
{
|
||||
CScriptNode *pNode = mpScene->ScriptNodeByID(pLink->ReceiverID());
|
||||
CScriptNode *pNode = mpScene->NodeForInstanceID(pLink->ReceiverID());
|
||||
|
||||
SWaypointLink Link;
|
||||
Link.pWaypoint = pNode;
|
||||
@@ -117,7 +117,7 @@ bool CWaypointExtra::IsPathLink(CLink *pLink)
|
||||
|
||||
if (Valid)
|
||||
{
|
||||
CScriptNode *pNode = mpScene->ScriptNodeByID(pLink->ReceiverID());
|
||||
CScriptNode *pNode = mpScene->NodeForInstanceID(pLink->ReceiverID());
|
||||
|
||||
if (pNode)
|
||||
return pNode->Object()->ObjectTypeID() == mpInstance->ObjectTypeID();
|
||||
|
||||
Reference in New Issue
Block a user