diff options
author | megamage <none@none> | 2009-05-26 15:34:55 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-26 15:34:55 -0500 |
commit | ce8b7a68398bab602d8a8f71c7c3dbab5af137ea (patch) | |
tree | 1a65fc77411ce5bb9f9551ba239c6c736fcbf9c1 /src/game/Map.cpp | |
parent | 326940181ad63d2336d2a91214d9a9c930fb481d (diff) |
*Do not do visibility notification twice for bind sight players. This fixes the bug that bind sight is interrupted when target enters a populated area.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r-- | src/game/Map.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 4785d9bf91e..9e107af5b86 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -592,7 +592,7 @@ void Map::RelocationNotify() if(unit->GetTypeId() == TYPEID_PLAYER) { Trinity::PlayerRelocationNotifier notifier(*((Player*)unit)); - VisitAll(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance() + dist, notifier); + VisitAll(((Player*)unit)->m_seer->GetPositionX(), ((Player*)unit)->m_seer->GetPositionY(), World::GetMaxVisibleDistance() + dist, notifier); notifier.Notify(); } else @@ -677,12 +677,8 @@ void Map::Update(const uint32 &t_diff) } } - if(plr->m_seer != plr && !plr->hasUnitState(UNIT_STAT_ONVEHICLE)) - { - Trinity::PlayerVisibilityNotifier notifier(*plr); - VisitAll(plr->m_seer->GetPositionX(), plr->m_seer->GetPositionY(), World::GetMaxVisibleDistance(), notifier); - notifier.Notify(); - } + if(plr->m_seer != plr && !plr->m_Vehicle) + AddUnitToNotify(plr); } // non-player active objects |