MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zNPCMsg_Timestep

Function zNPCMsg_Timestep

src/SB/Game/zNPCMessenger.cpp:59–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59void zNPCMsg_Timestep(xScene*, F32 dt)
60{
61 NPCPSData* office = NPCPS_postOffice();
62
63 for (S32 i = office->quelist.cnt - 1; i >= 0; i--)
64 {
65 NPCMsg* inmsg = (NPCMsg*)office->quelist.list[i];
66
67 inmsg->tmr_delay = MAX(-1.0f, inmsg->tmr_delay - dt);
68
69 if (inmsg->tmr_delay < 0.0f)
70 {
71 zNPCMsg_SendMsg(inmsg, -1.0f, 0);
72
73 XOrdRemove(&office->quelist, 0, i);
74
75 NPCPS_freeMsg(inmsg);
76 }
77 }
78}
79
80void zNPCMsg_SendMsg(en_NPC_MSG_ID msgevent, U32 npc_id)
81{

Callers 1

SceneTimestepMethod · 0.70

Calls 4

NPCPS_postOfficeFunction · 0.85
NPCPS_freeMsgFunction · 0.85
zNPCMsg_SendMsgFunction · 0.70
XOrdRemoveFunction · 0.50

Tested by

no test coverage detected