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

Method DoOnArriveStuff

src/SB/Game/zNPCGoalStd.cpp:570–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568}
569
570void zNPCGoalPatrol::DoOnArriveStuff()
571{
572 zNPCCommon* npc = (zNPCCommon*)psyche->clt_owner;
573
574 if (npc->nav_dest != NULL)
575 {
576 zEntEvent(npc, npc->nav_dest, eEventArrive);
577 }
578
579 flg_patrol |= (1 << 0);
580 flg_patrol &= ~(1 << 3);
581
582 npc->MvptCycle();
583 if (npc->nav_curr != NULL && npc->nav_curr->Delay() > 0.0f &&
584 npc->nav_curr->RadiusZone() < 0.25f)
585 {
586 tmr_wait = npc->nav_curr->Delay();
587 flg_patrol |= (1 << 1);
588 DoAutoAnim(NPC_GSPOT_PATROLPAUSE, 0);
589 }
590 else
591 {
592 Chk_AutoSmooth();
593 }
594}
595
596void zNPCGoalPatrol::PickTransition(S32* goal, en_trantype* trantype)
597{

Callers

nothing calls this directly

Calls 6

DoAutoAnimFunction · 0.85
Chk_AutoSmoothFunction · 0.85
MvptCycleMethod · 0.80
DelayMethod · 0.80
RadiusZoneMethod · 0.80
zEntEventFunction · 0.50

Tested by

no test coverage detected