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

Method Process

src/SB/Game/zNPCGoalAmbient.cpp:49–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49S32 zNPCGoalJellyBumped::Process(en_trantype* trantyp, F32 dt, void* updCxt, xScene* xscn)
50{
51 S32 nextgoal = 0;
52 zNPCJelly* npc = (zNPCJelly*)psyche->clt_owner;
53 xVec3 pos;
54 F32 pam;
55
56 PlayWithAnimSpd();
57 MoveSwoosh(dt);
58
59 npc->JellyBoneWorldPos(&pos, -1);
60
61 zFX_SpawnBubbleTrail(&pos, 0x4);
62
63 StreakUpdate();
64
65 pam = npc->AnimTimeRemain(NULL) / npc->AnimDuration(NULL);
66 pam = CLAMP(pam, 0.01f, 1.0f);
67
68 if (npc->hitpoints < 1)
69 {
70 npc->SetAlpha(pam);
71 }
72
73 if (npc->hitpoints < 1 && pam < 0.01f)
74 {
75 *trantyp = GOAL_TRAN_SET;
76 nextgoal = 'NGN5';
77 }
78
79 if (*trantyp != GOAL_TRAN_NONE)
80 {
81 return nextgoal;
82 }
83
84 return zNPCGoalPushAnim::Process(trantyp, dt, updCxt, xscn);
85}
86
87void LERP(float dt, xVec3* pos_update, const xVec3*, const xVec3*);
88F32 SMOOTH(float, float, float);

Callers

nothing calls this directly

Calls 7

ZapperUpdateFunction · 0.85
AnimTimeRemainMethod · 0.80
AnimDurationMethod · 0.80
zFX_SpawnBubbleTrailFunction · 0.70
StreakUpdateFunction · 0.50
ProcessFunction · 0.50
SetAlphaMethod · 0.45

Tested by

no test coverage detected