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

Function SB1_CheckFeetStomp

src/SB/Game/zNPCTypeBossSB1.cpp:492–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490}
491
492static S32 SB1_CheckFeetStomp(zNPCB_SB1* sb1, S32* goal, en_trantype* trantype)
493{
494 xVec3* player_pos = (xVec3*)&globals.player.ent.model->Mat->pos;
495 xVec3* boss_pos = (xVec3*)&sb1->model->Mat->pos;
496 F32 dist = xVec3Dist2(boss_pos, player_pos);
497
498 S32 result = 0;
499
500 if (dist < 64.0f)
501 {
502 result = 1;
503 *goal = NPC_GOAL_BOSSSB1STOMP;
504 *trantype = GOAL_TRAN_SET;
505 }
506 else
507 {
508 result = 0;
509 }
510
511 return result;
512}
513
514static S32 idleCB(xGoal* rawgoal, void*, en_trantype* trantype, F32, void*)
515{

Callers 3

idleCBFunction · 0.85
tauntCBFunction · 0.85
smashCBFunction · 0.85

Calls 1

xVec3Dist2Function · 0.85

Tested by

no test coverage detected