diff options
author | megamage <none@none> | 2009-04-04 13:02:57 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-04-04 13:02:57 -0600 |
commit | c0a131a63d8d5f9b5c7d5c3373e588dbc7beb074 (patch) | |
tree | 8d83b40686892d3c257f77037ffd6c3290bce94e /src/game/Map.cpp | |
parent | 98f3d4d8b3dc91953b56a9599ee0c48ca04cc889 (diff) |
*Fix visibility update bug.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r-- | src/game/Map.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 669baf275f8..21e6a26785d 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -615,7 +615,6 @@ void Map::RelocationNotify() if(Unit *unit = ObjectAccessor::GetObjectInWorld(*iter, (Unit*)NULL)) { i_unitsToNotify.push_back(unit); - unit->m_Notified = false; } } i_unitsToNotifyBacklog.clear(); @@ -624,11 +623,10 @@ 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) @@ -643,6 +641,10 @@ void Map::RelocationNotify() VisitAll(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance(), notifier); } } + for(std::vector<Unit*>::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter) + { + (*iter)->m_Notified = false; + } i_unitsToNotify.clear(); } @@ -656,10 +658,7 @@ void Map::AddUnitToNotify(Unit* u) if(i_lock) i_unitsToNotifyBacklog.push_back(u->GetGUID()); else - { i_unitsToNotify.push_back(u); - u->m_Notified = false; - } } void Map::Update(const uint32 &t_diff) |