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

Function can_damage

src/SB/Game/zEntCruiseBubble.cpp:442–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440 }
441
442 U8 can_damage(xEnt* ent)
443 {
444 if (ent == NULL)
445 {
446 return false;
447 }
448 if (!(ent->moreFlags & 0x10))
449 {
450 return false;
451 }
452 if (ent->baseType == eBaseTypeDestructObj &&
453 zEntDestructObj_isDestroyed((zEntDestructObj*)ent) != NULL)
454 {
455 return false;
456 }
457 if (ent->baseType == eBaseTypeNPC && !((zNPCCommon*)ent)->IsHealthy())
458 {
459 return false;
460 }
461
462 return true;
463 }
464
465 U8 was_damaged(xEnt* ent)
466 {

Callers 2

collideMethod · 0.85
operator()Method · 0.85

Calls 2

IsHealthyMethod · 0.45

Tested by

no test coverage detected