MCPcopy Create free account
hub / github.com/JACoders/OpenJK / NPC_BSRemove

Function NPC_BSRemove

code/game/NPC_behavior.cpp:1021–1038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1019}
1020
1021void NPC_BSRemove (void)
1022{
1023 NPC_UpdateAngles ( qtrue, qtrue );
1024 if( !gi.inPVS( NPC->currentOrigin, g_entities[0].currentOrigin ) )//FIXME: use cg.vieworg?
1025 {
1026 G_UseTargets2( NPC, NPC, NPC->target3 );
1027 NPC->s.eFlags |= EF_NODRAW;
1028 NPC->svFlags &= ~SVF_NPC;
1029 NPC->s.eType = ET_INVISIBLE;
1030 NPC->contents = 0;
1031 NPC->health = 0;
1032 NPC->targetname = NULL;
1033
1034 //Disappear in half a second
1035 NPC->e_ThinkFunc = thinkF_G_FreeEntity;
1036 NPC->nextthink = level.time + FRAMETIME;
1037 }//FIXME: else allow for out of FOV???
1038}
1039
1040void NPC_BSSearch (void)
1041{

Callers 2

NPC_BehaviorSet_CharmedFunction · 0.70
NPC_BehaviorSet_DefaultFunction · 0.70

Calls 2

NPC_UpdateAnglesFunction · 0.70
G_UseTargets2Function · 0.70

Tested by

no test coverage detected