From d4c3620557384b78035a6fc6b8dc2c909958d189 Mon Sep 17 00:00:00 2001 From: silverice Date: Mon, 22 Mar 2010 18:46:48 +0200 Subject: [PATCH] restore work of IsInMap check --HG-- branch : trunk --- src/game/Object.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/Object.h b/src/game/Object.h index 20907fc9d1..9c073219d7 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()); }