[7564] fixed WorldObject::HasInArc(): must return true if testing self

(cherry picked from commit b3c138ca9d59aff522f8a82cd2e1554fa0fbfc8d)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
fgenesis 2009-03-21 01:23:52 +01:00 committed by VladimirMangos
parent e0c60231bd
commit 8d8da21f95
2 changed files with 5 additions and 1 deletions

View file

@ -1159,6 +1159,10 @@ float WorldObject::GetAngle( const float x, const float y ) const
bool WorldObject::HasInArc(const float arcangle, const WorldObject* obj) const
{
// always have self in arc
if(obj == this)
return true;
float arc = arcangle;
// move arc to range 0.. 2*pi