aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-03 14:44:34 -0600
committermegamage <none@none>2009-04-03 14:44:34 -0600
commit19f725cd5127a565850d9de28ec5f12bf5af4e33 (patch)
tree604128f8b2dc095f3bd4a5ca3a4587a7c10076cf /src
parent893eb77a07f8c51351999174d5e7bd339099c1c9 (diff)
*Try to fix the bug of visibility update.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Map.cpp7
1 files changed, 4 insertions, 3 deletions
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<Unit*>::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)