diff options
author | silverice <none@none> | 2010-03-22 18:46:48 +0200 |
---|---|---|
committer | silverice <none@none> | 2010-03-22 18:46:48 +0200 |
commit | d4c3620557384b78035a6fc6b8dc2c909958d189 (patch) | |
tree | 757f37c3db24efb887f2f4d015f08a887464d25f /src/game/Object.h | |
parent | 4478ccf6c4e34288ec61300206b18aeed150fe43 (diff) |
restore work of IsInMap check
--HG--
branch : trunk
Diffstat (limited to 'src/game/Object.h')
-rw-r--r-- | src/game/Object.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Object.h b/src/game/Object.h index 20907fc9d12..9c073219d7b 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -560,9 +560,10 @@ class WorldObject : public Object, public WorldLocation bool IsInMap(const WorldObject* obj) const { - if (!obj || !IsInWorld() || !(obj->IsInWorld()) || GetMap() != obj->GetMap() || !InSamePhase(obj)) - return false; - return true; + if (obj)
+ return IsInWorld() && obj->IsInWorld() && (GetMap() == obj->GetMap()) && InSamePhase(obj);
+ else
+ return false;
} bool IsWithinDist3d(float x, float y, float z, float dist) const { return IsInDist(x, y, z, dist + GetObjectSize()); } |