restore work of IsInMap check

--HG--
branch : trunk
This commit is contained in:
silverice
2010-03-22 18:46:48 +02:00
parent 4478ccf6c4
commit d4c3620557
+4 -3
View File
@@ -560,9 +560,10 @@ class WorldObject : public Object, public WorldLocation
bool IsInMap(const WorldObject* obj) const bool IsInMap(const WorldObject* obj) const
{ {
if (!obj || !IsInWorld() || !(obj->IsInWorld()) || GetMap() != obj->GetMap() || !InSamePhase(obj)) if (obj)
return false; return IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap()) && InSamePhase(obj);
return true; else
return false;
} }
bool IsWithinDist3d(float x, float y, float z, float dist) const bool IsWithinDist3d(float x, float y, float z, float dist) const
{ return IsInDist(x, y, z, dist + GetObjectSize()); } { return IsInDist(x, y, z, dist + GetObjectSize()); }