*Add some distance check functions. By VladimirMangos.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-05-14 16:50:47 -05:00
1 parent 811eee356d
commit 047cc95388
17 files changed
+364 -61

No files matched your search

+1 -1
View File
@@ -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);
}