Core/Players: Cleanup the visibility updater

--HG--
branch : trunk
This commit is contained in:
linencloth
2010-11-15 23:08:02 +01:00
parent 8bb215d938
commit 8f96f37c2e

View File

@@ -20698,17 +20698,15 @@ void Player::UpdateObjectVisibility(bool forced)
else
{
Unit::UpdateObjectVisibility(true);
// updates visibility of all objects around point of view for current player
Trinity::VisibleNotifier notifier(*this);
m_seer->VisitNearbyObject(GetVisibilityRange(), notifier);
notifier.SendToSelf(); // send gathered data
UpdateVisibilityForPlayer();
}
}
void Player::UpdateVisibilityForPlayer()
{
// updates visibility of all objects around point of view for current player
Trinity::VisibleNotifier notifier(*this);
m_seer->VisitNearbyObject(GetVisibilityRange(), notifier);
m_seer->VisitNearbyObject(GetSightRange(), notifier);
notifier.SendToSelf(); // send gathered data
}