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

Method PickTransition

src/SB/Game/zNPCGoalStd.cpp:596–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595
596void zNPCGoalPatrol::PickTransition(S32* goal, en_trantype* trantype)
597{
598 zNPCCommon* npc = (zNPCCommon*)psyche->clt_owner;
599
600 if (npc->npcset.allowWander && npc->nav_curr != NULL && npc->nav_curr->Delay() > 0.0f &&
601 npc->nav_curr->RadiusZone() > 0.0f)
602 {
603 *goal = NPC_GOAL_WANDER;
604 *trantype = GOAL_TRAN_PUSH;
605 flg_patrol |= (1 << 2);
606 flg_patrol &= ~(1 << 0);
607 }
608 else if (npc->nav_dest == NULL)
609 {
610 *goal = NPC_GOAL_IDLE;
611 *trantype = GOAL_TRAN_SET;
612 }
613}
614
615// Equivalent: scheduling
616void zNPCGoalPatrol::Chk_AutoSmooth()

Callers

nothing calls this directly

Calls 2

DelayMethod · 0.80
RadiusZoneMethod · 0.80

Tested by

no test coverage detected