aboutsummaryrefslogtreecommitdiff
path: root/src/game/GuardAI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GuardAI.cpp')
-rw-r--r--src/game/GuardAI.cpp2
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);
}