diff options
author | r00ty-tc <r00ty-tc@users.noreply.github.com> | 2016-04-14 01:34:17 +0200 |
---|---|---|
committer | r00ty-tc <r00ty-tc@users.noreply.github.com> | 2016-04-14 01:34:17 +0200 |
commit | 87b4533046d337fe05d7891c3632d34f8811b73e (patch) | |
tree | cb0d9cac227a6ab0a099d83387c1320a52b369a1 /src/server/game/Maps/Map.cpp | |
parent | afaa8e2c6035d5279521b3087a54e85a0961ff59 (diff) |
[Core/Maps] Activate creatures and objects during opening cinematics and other flyby
cameras (sunwell etc).
Requires re-running map extractor to extract camera m2 files from data
files. These are very small.
Closes #4755
Closes #16772
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r-- | src/server/game/Maps/Map.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 18fabd20f24..664ed3dc8ec 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -714,6 +714,15 @@ void Map::Update(const uint32 t_diff) VisitNearbyCellsOf(player, grid_object_update, world_object_update); + // If player is using far sight, visit that object too + if (WorldObject* viewPoint = player->GetViewpoint()) + { + if (Creature* viewCreature = viewPoint->ToCreature()) + VisitNearbyCellsOf(viewCreature, grid_object_update, world_object_update); + else if (DynamicObject* viewObject = viewPoint->ToDynObject()) + VisitNearbyCellsOf(viewObject, grid_object_update, world_object_update); + } + // Handle updates for creatures in combat with player and are more than 60 yards away if (player->IsInCombat()) { @@ -2658,8 +2667,8 @@ void Map::UpdateObjectsVisibilityFor(Player* player, Cell cell, CellCoord cellpa cell.SetNoCreate(); TypeContainerVisitor<Trinity::VisibleNotifier, WorldTypeMapContainer > world_notifier(notifier); TypeContainerVisitor<Trinity::VisibleNotifier, GridTypeMapContainer > grid_notifier(notifier); - cell.Visit(cellpair, world_notifier, *this, *player, player->GetSightRange()); - cell.Visit(cellpair, grid_notifier, *this, *player, player->GetSightRange()); + cell.Visit(cellpair, world_notifier, *this, *player->m_seer, player->GetSightRange()); + cell.Visit(cellpair, grid_notifier, *this, *player->m_seer, player->GetSightRange()); // send data notifier.SendToSelf(); |