Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/SB/Core/x/xBehaveMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void xBehaveMgr_ScenePrepare();
void xBehaveMgr_SceneReset();
void xBehaveMgr_Startup();
void xBehaveMgr_Shutdown();
void xBehaveMgr_SceneFinish();
xBehaveMgr* xBehaveMgr_GetSelf();

#endif
19 changes: 19 additions & 0 deletions src/SB/Game/zNPCMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,25 @@ void zNPCMgr::ScenePrepare(S32 npccnt)
g_firstFrameUpdateAllNPC = 1;
}

void zNPCMgr::SceneFinish()
{
for (int i = 0; i < npclist.cnt; i++)
{
((zNPCCommon*)npclist.list[i])->Destroy();
}
XOrdDone(&npclist, 0);
npcFactory->DestroyAll();
zNPCBoss_SceneFinish();
zNPCSubBoss_SceneFinish();
zNPCDuplotron_SceneFinish();
zNPCRobot_SceneFinish();
zNPCVillager_SceneFinish();
zNPCCommon_SceneFinish();
zNPCSpawner_SceneFinish();
zNPCMsg_SceneFinish();
xBehaveMgr_SceneFinish();
}

S32 zNPCMgr_OrdComp_npcid(void* vkey, void* vitem)
{
S32 rc;
Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zNPCMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ void zNPCMgr_scenePostSetup();
void zNPCMgr_sceneTimestep(xScene* xscn, F32 dt);
void zNPCMgr_scenePostRender();
void zNPCMgr_scenePostParticleRender();
void zNPCMsg_SceneFinish();
xEnt* zNPCMgr_createNPCInst(S32, xEntAsset* assdat);

S32 zNPCMgr_OrdComp_npcid(void* vkey, void* vitem);
Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zNPCTypeBoss.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ void ZNPC_Boss_Startup();
void ZNPC_Boss_Shutdown();
xFactoryInst* ZNPC_Create_Boss(S32 who, RyzMemGrow* grow, void*);
void ZNPC_Destroy_Boss(xFactoryInst* inst);
void zNPCBoss_SceneFinish();

xAnimTable* ZNPC_AnimTable_BossSBobbyArm();

Expand Down
1 change: 1 addition & 0 deletions src/SB/Game/zNPCTypeDuplotron.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ void ZNPC_Destroy_Duplotron(xFactoryInst* inst);
xAnimTable* ZNPC_AnimTable_Duplotron();
void DUPO_KillEffects();
void DUPO_InitEffects();
void zNPCDuplotron_SceneFinish();

#endif
1 change: 1 addition & 0 deletions src/SB/Game/zNPCTypeVillager.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ void ZNPC_Destroy_Villager(xFactoryInst* inst);
NPCSndTrax g_sndTrax_Villager;
S32 zParamGetFloatList(xModelAssetParam* parmdata, U32 pdatsize, const char* str32, S32 found,
F32* non_choices, F32 len_mvptspline);
void zNPCVillager_SceneFinish();

extern NPCSndTrax g_sndTrax_VillagerMale;
extern NPCSndTrax g_sndTrax_VillagerFemale;
Expand Down