From 40e353a9ca49fcad6ffa70224c7c2137e71ed205 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 10 Jun 2009 09:53:21 -0500 Subject: [PATCH] *Fix a crash in relocation notify. --HG-- branch : trunk --- src/game/Map.cpp | 2 +- src/game/Unit.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/Map.cpp b/src/game/Map.cpp index e3da8480719..f3835a851d3 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -616,7 +616,7 @@ void Map::RelocationNotify() void Map::AddUnitToNotify(Unit* u) { - if(u->m_NotifyListPos < 0) + if(u->m_NotifyListPos < 0 && u->IsInWorld()) { u->oldX = u->GetPositionX(); u->oldY = u->GetPositionY(); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 016abedf888..61460dc4f8e 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -11684,8 +11684,8 @@ void Unit::AddToWorld() { WorldObject::AddToWorld(); m_Notified = false; - //assert(m_NotifyListPos < 0); instance : crash - m_NotifyListPos = -1; + assert(m_NotifyListPos < 0); //instance : crash + //m_NotifyListPos = -1; SetToNotify(); } }