diff options
author | megamage <none@none> | 2009-05-14 16:50:47 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-14 16:50:47 -0500 |
commit | 047cc95388a67d5f33cb86082bbef03f654acec1 (patch) | |
tree | 90547d4892aa217a58408b3353fe943dcc51bb7b /src/game/GuardAI.cpp | |
parent | 811eee356ddd3c0b486a828b39822daffd8ac97e (diff) |
*Add some distance check functions. By VladimirMangos.
--HG--
branch : trunk
Diffstat (limited to 'src/game/GuardAI.cpp')
-rw-r--r-- | src/game/GuardAI.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/GuardAI.cpp b/src/game/GuardAI.cpp index b716642ebd7..b7268758583 100644 --- a/src/game/GuardAI.cpp +++ b/src/game/GuardAI.cpp @@ -126,7 +126,7 @@ void GuardAI::UpdateAI(const uint32 /*diff*/) bool GuardAI::IsVisible(Unit *pl) const { - return m_creature->GetDistance(pl) < sWorld.getConfig(CONFIG_SIGHT_GUARDER) + return m_creature->IsWithinDist(pl,sWorld.getConfig(CONFIG_SIGHT_GUARDER)) && pl->isVisibleForOrDetect(m_creature,true); } |