*Fix a crash in relocation notify.
--HG-- branch : trunk
This commit is contained in:
+1
-1
@@ -616,7 +616,7 @@ void Map::RelocationNotify()
|
|||||||
|
|
||||||
void Map::AddUnitToNotify(Unit* u)
|
void Map::AddUnitToNotify(Unit* u)
|
||||||
{
|
{
|
||||||
if(u->m_NotifyListPos < 0)
|
if(u->m_NotifyListPos < 0 && u->IsInWorld())
|
||||||
{
|
{
|
||||||
u->oldX = u->GetPositionX();
|
u->oldX = u->GetPositionX();
|
||||||
u->oldY = u->GetPositionY();
|
u->oldY = u->GetPositionY();
|
||||||
|
|||||||
+2
-2
@@ -11684,8 +11684,8 @@ void Unit::AddToWorld()
|
|||||||
{
|
{
|
||||||
WorldObject::AddToWorld();
|
WorldObject::AddToWorld();
|
||||||
m_Notified = false;
|
m_Notified = false;
|
||||||
//assert(m_NotifyListPos < 0); instance : crash
|
assert(m_NotifyListPos < 0); //instance : crash
|
||||||
m_NotifyListPos = -1;
|
//m_NotifyListPos = -1;
|
||||||
SetToNotify();
|
SetToNotify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user