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

Method IsDead

src/SB/Game/zNPCSupport.cpp:351–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351S32 NPCTarget::IsDead()
352{
353 S32 dead = 0;
354
355 switch (this->typ_target)
356 {
357 case NPC_TGT_PLYR:
358 if (globals.player.Health < 1)
359 {
360 dead = 1;
361 }
362 break;
363 case NPC_TGT_ENT:
364 if (this->ent_target->baseType == eBaseTypeNPC)
365 {
366 if (!((zNPCCommon*)this->ent_target)->IsAlive())
367 {
368 dead = 1;
369 }
370 }
371 break;
372 case NPC_TGT_BASE:
373 break;
374 }
375
376 return dead;
377}
378
379// void NPCLaser::Render(xVec3* pos_src, xVec3* pos_tgt)
380// {

Callers 1

MonitorCoweringMethod · 0.80

Calls 1

IsAliveMethod · 0.45

Tested by

no test coverage detected