diff options
| author | megamage <none@none> | 2008-11-07 09:36:46 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2008-11-07 09:36:46 -0600 |
| commit | fd3fcb461253bb8d269faa90af877e1e3e8b12a8 (patch) | |
| tree | 8c23861b1fc3b14908d1a22c5f491c1aad9d2d21 /src/game/GridNotifiersImpl.h | |
| parent | fdff7330d29eee31d6f7849067d1a68441402370 (diff) | |
[svn] Remove isVisible function. Check stealth and invisible in canAttack();
Use new remove aura by interrupt flag function.
--HG--
branch : trunk
Diffstat (limited to 'src/game/GridNotifiersImpl.h')
| -rw-r--r-- | src/game/GridNotifiersImpl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/GridNotifiersImpl.h b/src/game/GridNotifiersImpl.h index 04eaa41d658..80ab442bcd6 100644 --- a/src/game/GridNotifiersImpl.h +++ b/src/game/GridNotifiersImpl.h @@ -74,7 +74,7 @@ inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c) // Creature AI reaction if(!c->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING)) { - if( c->AI() && c->AI()->IsVisible(pl) && !c->IsInEvadeMode() ) + if( c->AI() && c->IsWithinSightDist(pl) /*c->AI()->IsVisible(pl)*/ && !c->IsInEvadeMode() ) c->AI()->MoveInLineOfSight(pl); } } @@ -83,13 +83,13 @@ inline void CreatureCreatureRelocationWorker(Creature* c1, Creature* c2) { if(!c1->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING)) { - if( c1->AI() && c1->AI()->IsVisible(c2) && !c1->IsInEvadeMode() ) + if( c1->AI() && c1->IsWithinSightDist(c2) /*c1->AI()->IsVisible(c2)*/ && !c1->IsInEvadeMode() ) c1->AI()->MoveInLineOfSight(c2); } if(!c2->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING)) { - if( c2->AI() && c2->AI()->IsVisible(c1) && !c2->IsInEvadeMode() ) + if( c2->AI() && c1->IsWithinSightDist(c2) /*c2->AI()->IsVisible(c1)*/ && !c2->IsInEvadeMode() ) c2->AI()->MoveInLineOfSight(c1); } } |
