From d6a1516057fdb8261ddee94f97d15a8b4f3de3c7 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 16 Mar 2009 11:46:03 -0600 Subject: *Try to fix the bug that client get freezed when players teleported out of bg/arena. --HG-- branch : trunk --- src/game/Map.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 0322a0258fb..afc9fea0ce1 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -614,14 +614,14 @@ void Map::RelocationNotify() for(std::vector::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter) { Unit *unit = ObjectAccessor::GetObjectInWorld(*iter, (Unit*)NULL); - if(!unit) + if(!unit || !unit->IsInWorld() || !unit->GetMapId() == GetId()) + { + *iter = 0; continue; + } unit->m_Notified = true; - if(!unit->IsInWorld()) - continue; - if(unit->GetTypeId() == TYPEID_PLAYER) { Trinity::PlayerRelocationNotifier notifier(*((Player*)unit)); -- cgit v1.2.3