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

Method isFollowerFreeToPathToPlayer

src/actmonster.cpp:14716–14733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14714}
14715
14716bool Entity::isFollowerFreeToPathToPlayer(Stat* myStats)
14717{
14718 Entity* currentTarget = uidToEntity(monsterTarget);
14719 if ( currentTarget )
14720 {
14721 if ( monsterState == MONSTER_STATE_ATTACK )
14722 {
14723 // fighting something.
14724 return false;
14725 }
14726 else if ( entityDist(this, currentTarget) < TOUCHRANGE * 2 )
14727 {
14728 // in the vicinity of our target
14729 return false;
14730 }
14731 }
14732 return true;
14733}
14734
14735bool Entity::isInertMimic() const
14736{

Callers 1

actMonsterFunction · 0.80

Calls 2

entityDistFunction · 0.85
uidToEntityFunction · 0.70

Tested by

no test coverage detected