This commit is contained in:
parent
880c7dea9a
commit
45958bf2b5
4 changed files with 28 additions and 2 deletions
|
@ -798,8 +798,9 @@ void CNpcEnemy::shutdown()
|
||||||
|
|
||||||
if (m_actorGfx) delete m_actorGfx;
|
if (m_actorGfx) delete m_actorGfx;
|
||||||
|
|
||||||
CEnemyThing::shutdown();
|
deleteAllChild();
|
||||||
|
|
||||||
|
CEnemyThing::shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1251,13 +1251,13 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF
|
||||||
{
|
{
|
||||||
NPC_BUBBLE_PLATFORM,
|
NPC_BUBBLE_PLATFORM,
|
||||||
NPC_LINEAR_PLATFORM,
|
NPC_LINEAR_PLATFORM,
|
||||||
|
NPC_FALLING_PLATFORM,
|
||||||
NPC_CIRCULAR_PLATFORM,
|
NPC_CIRCULAR_PLATFORM,
|
||||||
NPC_COLLAPSING_BUBBLE_PLATFORM,
|
NPC_COLLAPSING_BUBBLE_PLATFORM,
|
||||||
NPC_FISH_HOOK_PLATFORM,
|
NPC_FISH_HOOK_PLATFORM,
|
||||||
NPC_RETRACTING_PLATFORM,
|
NPC_RETRACTING_PLATFORM,
|
||||||
NPC_GEYSER_PLATFORM,
|
NPC_GEYSER_PLATFORM,
|
||||||
NPC_BOBBING_PLATFORM,
|
NPC_BOBBING_PLATFORM,
|
||||||
NPC_FALLING_PLATFORM,
|
|
||||||
NPC_CART_PLATFORM,
|
NPC_CART_PLATFORM,
|
||||||
NPC_PLAYER_BUBBLE_PLATFORM,
|
NPC_PLAYER_BUBBLE_PLATFORM,
|
||||||
};
|
};
|
|
@ -582,6 +582,30 @@ CThing *List=Next;
|
||||||
m_numChildren = 0;
|
m_numChildren = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CThing::deleteAllChild()
|
||||||
|
{
|
||||||
|
CThing *List=Next;
|
||||||
|
|
||||||
|
while (List)
|
||||||
|
{
|
||||||
|
CThing *Next=List->Next;
|
||||||
|
List->Parent=NULL;
|
||||||
|
List->Next=NULL;
|
||||||
|
List->shutdown();
|
||||||
|
delete List;
|
||||||
|
List=Next;
|
||||||
|
}
|
||||||
|
Next=NULL;
|
||||||
|
|
||||||
|
m_numChildren = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Function:
|
Function:
|
||||||
Purpose:
|
Purpose:
|
||||||
|
|
|
@ -105,6 +105,7 @@ public:
|
||||||
void addChild(CThing *Child);
|
void addChild(CThing *Child);
|
||||||
void removeChild(CThing *Child);
|
void removeChild(CThing *Child);
|
||||||
void removeAllChild();
|
void removeAllChild();
|
||||||
|
void deleteAllChild();
|
||||||
bool hasChild(CThing *Child);
|
bool hasChild(CThing *Child);
|
||||||
int getNumChildren();
|
int getNumChildren();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue