MCPcopy Create free account
hub / github.com/TurningWheel/Barony / friendlyFireProtection

Method friendlyFireProtection

src/entity.cpp:19394–19407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19392}
19393
19394bool Entity::friendlyFireProtection(Entity* your)
19395{
19396 if ( !your ) { return false; }
19397 if ( behavior == &actPlayer && (your->behavior == &actPlayer
19398 || your->monsterAllyGetPlayerLeader()
19399 || (your->behavior == &actMonster
19400 && your->getStats()
19401 && achievementObserver.checkUidIsFromPlayer(your->getStats()->leader_uid) >= 0)) )
19402 {
19403 return true;
19404 }
19405
19406 return false;
19407}
19408
19409/*-------------------------------------------------------------------------------
19410

Callers 15

attackMethod · 0.95
actArrowFunction · 0.80
actColliderMushroomCapFunction · 0.80
actFociGibFunction · 0.80
actThrownFunction · 0.80
barony_clearFunction · 0.80
actMagicMissileFunction · 0.80
actParticleTimerFunction · 0.80
spawnMagicTowerFunction · 0.80

Calls 3

checkUidIsFromPlayerMethod · 0.80
getStatsMethod · 0.45

Tested by

no test coverage detected