mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
[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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user