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

Function zFrag_ParticleManager

src/SB/Game/zShrapnel.cpp:490–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490void zFrag_ParticleManager(F32 dt)
491{
492 zFrag* frag = sParticleList.next;
493
494 while (frag != NULL)
495 {
496 zFrag* next = frag->next;
497 zFragParticleAsset* passet = frag->info.particle.fasset;
498
499 frag->lifetime -= dt;
500 frag->alivetime += dt;
501
502 if (frag->lifetime < 0.0f)
503 {
504 zFrag_Free(frag);
505 }
506 else
507 {
508 if ((passet->source.type & eFragLocBoneUpdated) != 0)
509 {
510 zFragLoc_InitVec(&passet->source, &passet->emit.pos, frag->parent[0]);
511 }
512
513 if ((passet->vel.type & eFragLocBoneUpdated) != 0)
514 {
515 zFragLoc_InitDir(&passet->vel, &passet->emit.vel, frag->parent[0]);
516 }
517
518 frag = next;
519
520 if (passet->parEmitter != NULL)
521 {
522 xParEmitterEmitCustom(passet->parEmitter, dt, &passet->emit);
523 }
524 }
525 frag = next;
526 }
527}
528
529void zFrag_ProjectileCollData(zFrag* frag)
530{

Callers 1

zShrapnel_UpdateFunction · 0.70

Calls 4

zFrag_FreeFunction · 0.85
zFragLoc_InitVecFunction · 0.85
zFragLoc_InitDirFunction · 0.70
xParEmitterEmitCustomFunction · 0.50

Tested by

no test coverage detected