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

Function idleCB

src/SB/Game/zNPCTypeBossSB1.cpp:514–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514static S32 idleCB(xGoal* rawgoal, void*, en_trantype* trantype, F32, void*)
515{
516 zNPCB_SB1* sb1 = (zNPCB_SB1*)rawgoal->GetOwner();
517 zNPCGoalBossSB1Idle* idle = (zNPCGoalBossSB1Idle*)rawgoal;
518
519 S32 nextgoal = 0;
520
521 if (SB1_CheckFeetStomp(sb1, &nextgoal, trantype))
522 {
523 return nextgoal;
524 }
525
526 if (idle->timeInGoal > 0.75f)
527 {
528 if (sb1->m_tauntTimer < 0.0f)
529 {
530 nextgoal = NPC_GOAL_BOSSSB1TAUNT;
531 *trantype = GOAL_TRAN_SET;
532 }
533 else
534 {
535 nextgoal = NPC_GOAL_BOSSSB1SMASH;
536 *trantype = GOAL_TRAN_SET;
537 }
538 }
539
540 return nextgoal;
541}
542
543static S32 tauntCB(xGoal* rawgoal, void*, en_trantype* trantype, F32 dt, void*)
544{

Callers

nothing calls this directly

Calls 2

SB1_CheckFeetStompFunction · 0.85
GetOwnerMethod · 0.80

Tested by

no test coverage detected