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

Method SyncCattleProd

src/SB/Game/zNPCGoalRobo.cpp:2807–2838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2805}
2806
2807S32 zNPCGoalAttackFodder::SyncCattleProd()
2808{
2809 xVec3 vec1;
2810 zNPCRobot* npc = (zNPCRobot*)this->psyche->clt_owner;
2811
2812 S32 var1 = this->flg_attack & 0x3;
2813
2814 if (!this->haz_cattle)
2815 {
2816 return var1;
2817 }
2818
2819 if (this->haz_cattle->tmr_remain < 0.35f)
2820 {
2821 this->haz_cattle->tym_lifespan = npc->AnimDuration(NULL);
2822 this->haz_cattle->tmr_remain = npc->AnimTimeRemain(NULL);
2823 }
2824
2825 if (!npc->GetVertPos(NPC_MDLVERT_ATTACK, &vec1))
2826 {
2827 return this->flg_attack & 0x3;
2828 }
2829
2830 this->haz_cattle->PosSet(&vec1);
2831
2832 if (this->haz_cattle->flg_hazard & 0x40000000)
2833 {
2834 this->flg_attack |= 0x3;
2835 }
2836
2837 return this->flg_attack & 0x3;
2838}
2839
2840S32 zNPCGoalAttackChomper::Enter(F32 dt, void* updCtxt)
2841{

Callers 1

ProcessMethod · 0.95

Calls 4

AnimDurationMethod · 0.80
AnimTimeRemainMethod · 0.80
GetVertPosMethod · 0.80
PosSetMethod · 0.45

Tested by

no test coverage detected