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

Method VFXSmokeStack

src/SB/Game/zNPCTypeDuplotron.cpp:446–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446void zNPCDuplotron::VFXSmokeStack(F32 dt)
447{
448 static const xVec3 vec_emitOffset = {};
449
450 NPCC_TmrCycle(&dt, 1.0f, this->tmr_smokeCycle);
451
452 if (this->IsAttackFrame(-1.0f, 0) != 0)
453 {
454 F32 ds2_cam = NPCC_ds2_toCam(this->Pos(), 0x0);
455 if (!(ds2_cam > SQ(25.0f)))
456 {
457 // temp var needed for .sdata2 match
458 F32 s = isin(this->tmr_smokeCycle * 2.0f * PI);
459 S32 npar = 5.0f * s;
460 if (0 < npar)
461 {
462 xVec3* pos_emit = NULL;
463 *pos_emit = vec_emitOffset;
464 xMat3x3RMulVec(pos_emit, (xMat3x3*)this->BoneMat(0xb), pos_emit);
465 *pos_emit += *(xVec3*)this->BonePos(0xb);
466 xMat3x3RMulVec(pos_emit, (xMat3x3*)this->BoneMat(0), pos_emit);
467 *pos_emit += *(xVec3*)this->BonePos(0);
468 for (S32 i = 0; i < npar; i++)
469 {
470 xVec3Copy(&g_parf_smoky.pos, pos_emit);
471 F32 rand = xurand();
472 g_parf_smoky.pos.y += 0.1f;
473 g_parf_smoky.pos.x += 0.1f * (2.0f * (rand - 0.5f));
474 rand = xurand();
475 g_parf_smoky.pos.z += 0.1f * (2.0f * (rand - 0.5f));
476 xParEmitterEmitCustom(g_pemit_smoky, dt, &g_parf_smoky);
477 }
478 }
479 }
480 }
481 return;
482}
483
484void zNPCDuplotron::VFXOverheat(F32 dt, F32)
485{

Callers 1

ProcessMethod · 0.80

Calls 11

isinFunction · 0.85
xVec3CopyFunction · 0.85
xurandFunction · 0.85
IsAttackFrameMethod · 0.80
BoneMatMethod · 0.80
BonePosMethod · 0.80
NPCC_TmrCycleFunction · 0.70
NPCC_ds2_toCamFunction · 0.70
xMat3x3RMulVecFunction · 0.50
xParEmitterEmitCustomFunction · 0.50
PosMethod · 0.45

Tested by

no test coverage detected