diff options
author | megamage <none@none> | 2009-09-02 12:46:26 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-09-02 12:46:26 -0500 |
commit | 8efb15c52a7e79c4f312b643ec7933e608effe47 (patch) | |
tree | fed7753924bf0a7225b665f7deb1a14c7c4ea1f5 /src/game/GridNotifiersImpl.h | |
parent | c150629f8d9ef38a25e939354b931098517874cc (diff) |
*Try to fix the bug that creature does not regenerate after evade.
--HG--
branch : trunk
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> |