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

Method VFXOverheat

src/SB/Game/zNPCTypeDuplotron.cpp:484–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482}
483
484void zNPCDuplotron::VFXOverheat(F32 dt, F32)
485{
486 static S32 idx_steam[2] = { 12, -1 };
487 static S32 idx_smoke[4] = { 7, 8, 9, -1 };
488
489 S32 rc;
490 xVec3 dir_emit;
491 xVec3 pos_emit;
492
493 if (xEntIsVisible(this))
494 {
495 if (((this->model)->Flags & 0x400) == 0)
496 {
497 static S32 skip = 0;
498
499 if (++skip >= 5)
500 {
501 skip = 0;
502
503 for (rc = *idx_smoke; -1 < rc; rc++)
504 {
505 if (this->GetVertPos(*(en_mdlvert*)rc, &pos_emit))
506 {
507 xVec3Copy(&g_parf_overheat.pos, &pos_emit);
508 xVec3Sub(&dir_emit, &pos_emit, xEntGetCenter(this));
509 xVec3Normalize(&dir_emit, &dir_emit);
510 xVec3SMul(&g_parf_overheat.vel, &dir_emit,
511 xVec3Length(&(g_pemit_overheat->tasset)->vel));
512 }
513 }
514
515 for (rc = *idx_steam; -1 < rc; rc++)
516 {
517 if (this->GetVertPos(*(en_mdlvert*)rc, &pos_emit))
518 {
519 xVec3Copy(&g_parf_steam.pos, &pos_emit);
520 xVec3Sub(&dir_emit, &pos_emit, xEntGetCenter(this));
521 xVec3Normalize(&dir_emit, &dir_emit);
522 xVec3SMul(&g_parf_steam.vel, &dir_emit,
523 xVec3Length(&(g_pemit_steam->tasset)->vel));
524 xParEmitterEmitCustom(g_pemit_steam, dt, &g_parf_steam);
525 }
526 }
527 }
528 }
529 }
530 return;
531}
532
533void zNPCDuplotron::VFXCycleLights(F32 dt, S32 fastpace)
534{

Callers 1

SDS_CountdownMethod · 0.80

Calls 9

xEntIsVisibleFunction · 0.85
xVec3CopyFunction · 0.85
xVec3SubFunction · 0.85
xEntGetCenterFunction · 0.85
xVec3SMulFunction · 0.85
xVec3LengthFunction · 0.85
GetVertPosMethod · 0.80
xVec3NormalizeFunction · 0.50
xParEmitterEmitCustomFunction · 0.50

Tested by

no test coverage detected