diff options
author | silver1ce <none@none> | 2010-02-27 15:25:14 +0200 |
---|---|---|
committer | silver1ce <none@none> | 2010-02-27 15:25:14 +0200 |
commit | fcaa318fb36aca077ca9ba5bfe2707ae0fcbd377 (patch) | |
tree | 81007144350a78785d58a9797aac0385edb25589 /src/game/Map.h | |
parent | 1815d19b85c8b6685850e761a49e1c0d2d7f366b (diff) |
Update visibility system
*visibility updates and ai relocations processed simultaneously for each grid
*these operations now are not synchronized for different grids
*some changes into structure of visibility notifiers
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.h')
-rw-r--r-- | src/game/Map.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/game/Map.h b/src/game/Map.h index 8bef03bf8ea..292431eeecb 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -379,7 +379,6 @@ class Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockabl virtual bool RemoveBones(uint64 guid, float x, float y); void UpdateObjectVisibility(WorldObject* obj, Cell cell, CellPair cellpair); - void UpdatePlayerVisibility( Player* player, Cell cell, CellPair cellpair ); void UpdateObjectsVisibilityFor(Player* player, Cell cell, CellPair cellpair ); void resetMarkedCells() { marked_cells.reset(); } @@ -491,9 +490,7 @@ class Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockabl MapRefManager m_mapRefManager; MapRefManager::iterator m_mapRefIter; - PeriodicTimer m_ObjectVisibilityNotifyTimer; - PeriodicTimer m_PlayerVisibilityNotifyTimer; - PeriodicTimer m_RelocationNotifyTimer; + int32 m_VisibilityNotifyPeriod; typedef std::set<WorldObject*> ActiveNonPlayers; ActiveNonPlayers m_activeNonPlayers; @@ -510,10 +507,9 @@ class Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockabl GridMap *GridMaps[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS]; std::bitset<TOTAL_NUMBER_OF_CELLS_PER_MAP*TOTAL_NUMBER_OF_CELLS_PER_MAP> marked_cells; - void ProcessObjectsVisibility(); - void ProcesssPlayersVisibility(); - void ProcessRelocationNotifies(); - void ResetNotifies(uint16 notify_mask); + //these functions used to process player/mob aggro reactions and + //visibility calculations. Highly optimized for massive calculations + void ProcessRelocationNotifies(const uint32 &diff); bool i_scriptLock; std::set<WorldObject *> i_objectsToRemove; @@ -526,9 +522,6 @@ class Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockabl void AddToGrid(T*, NGridType *, Cell const&); template<class T> - void AddNotifier(T*); - - template<class T> void RemoveFromGrid(T*, NGridType *, Cell const&); template<class T> |