diff options
Diffstat (limited to 'src/game/GridNotifiersImpl.h')
-rw-r--r-- | src/game/GridNotifiersImpl.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h index 23b781cab4c..d9e27cc8bcc 100644 --- a/src/game/GridNotifiersImpl.h +++ b/src/game/GridNotifiersImpl.h @@ -44,25 +44,19 @@ inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c) // Creature AI reaction if(c->HasReactState(REACT_AGGRESSIVE) && !c->hasUnitState(UNIT_STAT_SIGHTLESS)) - { - if( c->IsAIEnabled && c->_IsWithinDist(pl, c->m_SightDistance, true) && !c->IsInEvadeMode() ) + if(c->_IsWithinDist(pl, c->m_SightDistance, true) && c->IsAIEnabled) c->AI()->MoveInLineOfSight(pl); - } } inline void CreatureCreatureRelocationWorker(Creature* c1, Creature* c2) { if(c1->HasReactState(REACT_AGGRESSIVE) && !c1->hasUnitState(UNIT_STAT_SIGHTLESS)) - { - if( c1->IsAIEnabled && c1->_IsWithinDist(c2, c1->m_SightDistance, true) && !c1->IsInEvadeMode() ) + if(c1->_IsWithinDist(c2, c1->m_SightDistance, true) && c1->IsAIEnabled) c1->AI()->MoveInLineOfSight(c2); - } if(c2->HasReactState(REACT_AGGRESSIVE) && !c2->hasUnitState(UNIT_STAT_SIGHTLESS)) - { - if( c2->IsAIEnabled && c1->_IsWithinDist(c2, c2->m_SightDistance, true) && !c2->IsInEvadeMode() ) + if(c1->_IsWithinDist(c2, c2->m_SightDistance, true) && c2->IsAIEnabled) c2->AI()->MoveInLineOfSight(c1); - } } template<class T> |