mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8489] Fixed player visibility update in case view point different from player itself.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
da44f2efe7
commit
91eb757e95
2 changed files with 15 additions and 4 deletions
|
|
@ -451,11 +451,22 @@ ObjectAccessor::UpdateObjectVisibility(WorldObject *obj)
|
|||
|
||||
void ObjectAccessor::UpdateVisibilityForPlayer( Player* player )
|
||||
{
|
||||
CellPair p = MaNGOS::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
|
||||
Cell cell(p);
|
||||
WorldObject const* viewPoint = player->GetViewPoint();
|
||||
Map* m = player->GetMap();
|
||||
|
||||
CellPair p(MaNGOS::ComputeCellPair(player->GetPositionX(), player->GetPositionY()));
|
||||
Cell cell(p);
|
||||
|
||||
m->UpdatePlayerVisibility(player, cell, p);
|
||||
|
||||
if (player!=viewPoint)
|
||||
{
|
||||
CellPair pView(MaNGOS::ComputeCellPair(viewPoint->GetPositionX(), viewPoint->GetPositionY()));
|
||||
Cell cellView(pView);
|
||||
|
||||
m->UpdateObjectsVisibilityFor(player, cellView, pView);
|
||||
}
|
||||
else
|
||||
m->UpdateObjectsVisibilityFor(player, cell, p);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8488"
|
||||
#define REVISION_NR "8489"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue