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

Method Process

src/SB/Game/zNPCTypeTiki.cpp:637–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635}
636
637void zNPCTiki::Process(xScene* xscn, F32 dt)
638{
639 xVec3* t0;
640 U32 i;
641 xQuat* q0;
642
643 if (!(this->numChildren == NULL || ((this->tikiFlag & 8) != 0)))
644 {
645 return;
646 }
647
648 this->tikiFlag &= ~8;
649
650 if ((this->tikiFlag & 0x300) == 0x200)
651 {
652 zNPCCommon::Process(xscn, dt);
653 return;
654 }
655
656 if (this->tikiAnim != NULL && ((this->tikiFlag & 0xC0) == 0))
657 {
658 F32 duration = iAnimDuration(this->tikiAnim);
659 this->tikiAnimTime += dt;
660
661 if (this->tikiAnimTime >= duration)
662 {
663 if (xrand() & 1)
664 {
665 this->tikiAnimTime -= duration;
666 }
667 else
668 {
669 this->tikiAnimTime = 0.0f;
670 this->tikiFlag &= ~0xC0;
671 this->tikiFlag |= 0x40;
672 }
673 }
674
675 q0 = (xQuat*)giAnimScratch;
676 t0 = (xVec3*)(q0 + 0x41);
677 iAnimEval(this->tikiAnim, this->tikiAnimTime, 0, t0, q0);
678 iModelAnimMatrices(this->model->Data, q0, t0, this->model->Mat + 1);
679 }
680
681 xVec3 pos_save;
682 xVec3Copy(&pos_save, (xVec3*)&this->model->Mat->pos);
683
684 if (this->numParents != 0)
685 {
686 for (i = 0; i < 4; ++i)
687 {
688 if (this->parents[i] && !(this->updatedParents & (1 << i)))
689 {
690 this->parents[i]->tikiFlag |= 8;
691 this->parents[i]->Process(xscn, dt);
692 }
693 }
694 }

Callers

nothing calls this directly

Calls 15

RemoveFromFamilyMethod · 0.95
DamageMethod · 0.95
iAnimDurationFunction · 0.85
xrandFunction · 0.85
iAnimEvalFunction · 0.85
xVec3CopyFunction · 0.85
xprintfFunction · 0.85
xVec3AddScaledFunction · 0.85
xVec3SubFromFunction · 0.85
xVec3AddToFunction · 0.85
xVec3SubFunction · 0.85
xVec3Length2Function · 0.85

Tested by

no test coverage detected