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

Method Upd_Mushroom

src/SB/Game/zNPCHazard.cpp:614–637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612}
613
614void NPCHazard::Upd_Mushroom(F32 dt)
615{
616 xVec3 pos_emit = { 0.0f, 0.0f, 0.0f };
617 HAZShroom* shroom = &this->custdata.shroom;
618
619 xVec3AddScaled(&this->pos_hazard, &shroom->vel_rise, dt);
620 xVec3AddScaled(&shroom->vel_rise, &shroom->acc_rise, dt);
621
622 shroom->rad_cur = LERP(this->pam_interp, shroom->rad_min, shroom->rad_max);
623
624 if (this->flg_hazard & 0x2000 && !(globals.player.DamageTimer > 0.0f))
625 {
626 if (ColPlyrSphere(shroom->rad_cur))
627 {
628 HurtThePlayer();
629 }
630 }
631
632 g_parf_default.custom_flags = 0x100;
633 xVec3Copy(&pos_emit, &this->pos_hazard);
634 xVec3Copy(&g_parf_default.pos, &pos_emit);
635
636 xParEmitterEmitCustom(g_pemit_default, dt, &g_parf_default);
637}
638
639void NPCHazard::Upd_Patriot(F32)
640{

Callers

nothing calls this directly

Calls 4

xVec3AddScaledFunction · 0.85
LERPFunction · 0.85
xVec3CopyFunction · 0.85
xParEmitterEmitCustomFunction · 0.50

Tested by

no test coverage detected