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

Method SpawnBeastie

src/SB/Game/zNPCSpawner.cpp:755–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

753}
754
755S32 zNPCSpawner::SpawnBeastie(SMNPCStatus* npcstat, SMSPStatus* spstat)
756{
757 zNPCCommon* npc;
758 zMovePoint* sp;
759 xVec3 pos_sp = { 0, 0, 0 };
760 zMovePoint* nav_dest = NULL;
761
762 npc = npcstat->npc;
763 sp = spstat->sp;
764 zMovePointGetNext(sp, sp, &nav_dest, NULL);
765
766 if (nav_dest == NULL)
767 {
768 nav_dest = sp;
769 }
770
771 xVec3Copy(&pos_sp, sp->PosGet());
772
773 npcstat->status = SM_NPC_SPAWNED;
774 XOrdRemove(&pendlist, npcstat, -1);
775 XOrdAppend(&actvlist, npcstat);
776
777 npc->Respawn(&pos_sp, nav_dest, sp);
778
779 cnt_spawn++;
780
781 zEntEvent(npc_owner, eEventDuploNPCBorn);
782
783 return 1;
784}
785
786SMNPCStatus* zNPCSpawner::ToastedBeastie(zNPCCommon* npc)
787{

Callers

nothing calls this directly

Calls 7

xVec3CopyFunction · 0.85
XOrdAppendFunction · 0.85
zMovePointGetNextFunction · 0.70
XOrdRemoveFunction · 0.50
zEntEventFunction · 0.50
PosGetMethod · 0.45
RespawnMethod · 0.45

Tested by

no test coverage detected