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

Method Chk_AutoSmooth

src/SB/Game/zNPCGoalStd.cpp:616–666  ·  view source on GitHub ↗

Equivalent: scheduling

Source from the content-addressed store, hash-verified

614
615// Equivalent: scheduling
616void zNPCGoalPatrol::Chk_AutoSmooth()
617{
618 zNPCCommon* npc = (zNPCCommon*)psyche->clt_owner;
619
620 if (npc->spl_mvptspline != NULL)
621 {
622 return;
623 }
624
625 if (npc->nav_curr == NULL)
626 {
627 return;
628 }
629
630 if (npc->nav_dest == NULL)
631 {
632 return;
633 }
634
635 if (npc->nav_curr == NULL)
636 {
637 return;
638 }
639
640 if (npc->nav_dest == NULL)
641 {
642 return;
643 }
644
645 if (npc->nav_lead == NULL)
646 {
647 return;
648 }
649
650 if (npc->nav_curr == npc->nav_dest)
651 {
652 return;
653 }
654
655 if (npc->nav_curr == npc->nav_lead)
656 {
657 return;
658 }
659
660 static F32 ds2_min = SQ(1.5f);
661
662 if (npc->XZDstSqToPos(npc->nav_dest->PosGet(), NULL, NULL) > ds2_min)
663 {
664 flg_patrol |= (1 << 4) | (1 << 3);
665 }
666}
667
668S32 zNPCGoalFidget::Enter(F32 dt, void* updCtxt)
669{

Callers

nothing calls this directly

Calls 1

PosGetMethod · 0.45

Tested by

no test coverage detected