diff options
author | megamage <none@none> | 2009-06-10 09:53:21 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-10 09:53:21 -0500 |
commit | 40e353a9ca49fcad6ffa70224c7c2137e71ed205 (patch) | |
tree | 021480b9c9dce28b5ad8dc304504bc55d7a72598 | |
parent | b0fa2172e3df7bd098df5f6144d8231e1d98c4d9 (diff) |
*Fix a crash in relocation notify.
--HG--
branch : trunk
-rw-r--r-- | src/game/Map.cpp | 2 | ||||
-rw-r--r-- | 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(); } } |