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

Function hitCB

src/SB/Game/zNPCTypeBossPatrick.cpp:1978–2005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1976}
1977
1978static S32 hitCB(xGoal* rawgoal, void*, en_trantype* trantype, F32 dt, void*)
1979{
1980 zNPCGoalBossPatHit* hit = (zNPCGoalBossPatHit*)rawgoal;
1981 zNPCBPatrick* pat = (zNPCBPatrick*)hit->GetOwner();
1982 S32 nextgoal = 0;
1983
1984 if (globals.player.ControlOff & 0xffffbaff)
1985 {
1986 *trantype = GOAL_TRAN_SET;
1987 return NPC_GOAL_BOSSPATIDLE;
1988 }
1989
1990 if (pat->AnimTimeRemain(NULL) < f2280 * dt)
1991 {
1992 if (pat->round == 2)
1993 {
1994 nextgoal = NPC_GOAL_BOSSPATFUDGE;
1995 *trantype = GOAL_TRAN_SET;
1996 }
1997 else
1998 {
1999 nextgoal = pat->nextGoal();
2000 *trantype = GOAL_TRAN_SET;
2001 }
2002 }
2003
2004 return nextgoal;
2005}
2006
2007static S32 spitCB(xGoal* rawgoal, void*, en_trantype* trantype, F32 dt, void*)
2008{

Callers 1

xGridCheckPositionFunction · 0.50

Calls 3

GetOwnerMethod · 0.80
AnimTimeRemainMethod · 0.80
nextGoalMethod · 0.80

Tested by

no test coverage detected