From 19f725cd5127a565850d9de28ec5f12bf5af4e33 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 3 Apr 2009 14:44:34 -0600 Subject: *Try to fix the bug of visibility update. --HG-- branch : trunk --- src/game/Map.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/game/Map.cpp b/src/game/Map.cpp index ebe6c8c3061..669baf275f8 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -377,12 +377,14 @@ void Map::AddNotifier(T*) template<> void Map::AddNotifier(Player* obj) { + obj->m_IsInNotifyList = false; AddUnitToNotify(obj); } template<> void Map::AddNotifier(Creature* obj) { + obj->m_IsInNotifyList = false; AddUnitToNotify(obj); } @@ -468,8 +470,6 @@ bool Map::Add(Player *player) SendInitSelf(player); SendInitTransports(player); - player->m_IsInNotifyList = false; - player->m_Notified = false; player->m_clientGUIDs.clear(); AddNotifier(player); @@ -624,10 +624,11 @@ void Map::RelocationNotify() for(std::vector::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter) { Unit *unit = *iter; + unit->m_IsInNotifyList = false; + if(!unit->IsInWorld() || unit->GetMapId() != GetId()) continue; - unit->m_IsInNotifyList = false; unit->m_Notified = true; if(unit->GetTypeId() == TYPEID_PLAYER) -- cgit v1.2.3