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

Method Process

src/SB/Game/zNPCGoalDuplotron.cpp:41–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41S32 zNPCGoalDuploLive::Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* xscn)
42{
43 zNPCDuplotron* npc = (zNPCDuplotron*)psyche->clt_owner;
44 S32 nextgoal = 0;
45
46 npc->VelStop();
47
48 switch (livestat)
49 {
50 case LIVESTAT_NORMAL:
51 {
52 if (tmr_chkPlyrDist < 0.0f)
53 {
54 CheckPlayer();
55 }
56
57 tmr_chkPlyrDist = MAX(-1.0f, tmr_chkPlyrDist - dt);
58
59 if (!npc->SndChanIsBusy(0))
60 {
61 npc->SndPlayRandom(NPC_STYP_CLANKING);
62 }
63
64 break;
65 }
66 case LIVESTAT_COUNTDOWN:
67 {
68 if (SDS_Countdown(dt))
69 {
70 *trantype = GOAL_TRAN_SET;
71 nextgoal = NPC_GOAL_DUPLODEAD;
72 }
73
74 break;
75 }
76 }
77
78 if (*trantype != GOAL_TRAN_NONE)
79 {
80 return nextgoal;
81 }
82
83 npc->flg_xtrarend |= 0x1;
84
85 npc->VFXCycleLights(dt, 0);
86 npc->VFXSmokeStack(dt);
87
88 return xGoal::Process(trantype, dt, updCtxt, xscn);
89}
90
91void zNPCGoalDuploLive::CheckPlayer()
92{

Callers

nothing calls this directly

Calls 7

SDS_CountdownFunction · 0.85
VelStopMethod · 0.80
SndChanIsBusyMethod · 0.80
SndPlayRandomMethod · 0.80
VFXCycleLightsMethod · 0.80
VFXSmokeStackMethod · 0.80
ProcessFunction · 0.50

Tested by

no test coverage detected