Implement new visibility system, based on Silverice patch for mangos

--HG--
branch : trunk
This commit is contained in:
n0n4m3 committed 2009-12-19 10:12:40 +01:00
1 parent 7a3e524df2
commit 243f33b5ea
15 files changed
+553 -165

No files matched your search

+11
View File
@@ -405,6 +405,8 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
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(); }
bool isCellMarked(uint32 pCellId) { return marked_cells.test(pCellId); }
@@ -517,6 +519,10 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
MapRefManager m_mapRefManager;
MapRefManager::iterator m_mapRefIter;
PeriodicTimer m_ObjectVisibilityNotifyTimer;
PeriodicTimer m_PlayerVisibilityNotifyTimer;
PeriodicTimer m_RelocationNotifyTimer;
typedef std::set<WorldObject*> ActiveNonPlayers;
ActiveNonPlayers m_activeNonPlayers;
ActiveNonPlayers::iterator m_activeNonPlayersIter;
@@ -537,6 +543,11 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
IntervalTimer m_notifyTimer;
void ProcessObjectsVisibility();
void ProcesssPlayersVisibility();
void ProcessRelocationNotifies();
void ResetNotifies(uint16 notify_mask);
bool i_notifyLock, i_scriptLock;
std::vector<Unit*> i_unitsToNotifyBacklog;
std::vector<Unit*> i_unitsToNotify;