This commit is contained in:
Charles 2001-04-23 15:12:44 +00:00
parent 880c7dea9a
commit 45958bf2b5
4 changed files with 28 additions and 2 deletions

View File

@ -798,8 +798,9 @@ void CNpcEnemy::shutdown()
if (m_actorGfx) delete m_actorGfx;
CEnemyThing::shutdown();
deleteAllChild();
CEnemyThing::shutdown();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -1251,13 +1251,13 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF
{
NPC_BUBBLE_PLATFORM,
NPC_LINEAR_PLATFORM,
NPC_FALLING_PLATFORM,
NPC_CIRCULAR_PLATFORM,
NPC_COLLAPSING_BUBBLE_PLATFORM,
NPC_FISH_HOOK_PLATFORM,
NPC_RETRACTING_PLATFORM,
NPC_GEYSER_PLATFORM,
NPC_BOBBING_PLATFORM,
NPC_FALLING_PLATFORM,
NPC_CART_PLATFORM,
NPC_PLAYER_BUBBLE_PLATFORM,
};

View File

@ -582,6 +582,30 @@ CThing *List=Next;
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:
Purpose:

View File

@ -105,6 +105,7 @@ public:
void addChild(CThing *Child);
void removeChild(CThing *Child);
void removeAllChild();
void deleteAllChild();
bool hasChild(CThing *Child);
int getNumChildren();