mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[8524] New cell search algorithm implemented. You can now choose different visibility distances on continents, in BG/Arenas and instances.
Please, update your config files and check new options: Visibility.Distance.Continents = 90 Visibility.Distance.Instances = 120 Visibility.Distance.BGArenas = 180 Thanks everyone involved in patch tests! Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
81456dc416
commit
cfea99ea62
28 changed files with 434 additions and 123 deletions
|
|
@ -279,6 +279,10 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||
void MessageDistBroadcast(Player *, WorldPacket *, float dist, bool to_self, bool own_team_only = false);
|
||||
void MessageDistBroadcast(WorldObject *, WorldPacket *, float dist);
|
||||
|
||||
float GetVisibilityDistance() const { return m_VisibleDistance; }
|
||||
//function for setting up visibility distance for maps on per-type/per-Id basis
|
||||
virtual void InitVisibilityDistance();
|
||||
|
||||
void PlayerRelocation(Player *, float x, float y, float z, float angl);
|
||||
void CreatureRelocation(Creature *creature, float x, float y, float, float);
|
||||
|
||||
|
|
@ -424,7 +428,6 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||
GridMap *GetGrid(float x, float y);
|
||||
|
||||
void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; }
|
||||
//uint64 CalculateGridMask(const uint32 &y) const;
|
||||
|
||||
void SendInitSelf( Player * player );
|
||||
|
||||
|
|
@ -451,6 +454,8 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||
|
||||
NGridType* getNGrid(uint32 x, uint32 y) const
|
||||
{
|
||||
ASSERT(x < MAX_NUMBER_OF_GRIDS);
|
||||
ASSERT(y < MAX_NUMBER_OF_GRIDS);
|
||||
return i_grids[x][y];
|
||||
}
|
||||
|
||||
|
|
@ -470,6 +475,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||
uint32 i_id;
|
||||
uint32 i_InstanceId;
|
||||
uint32 m_unloadTimer;
|
||||
float m_VisibleDistance;
|
||||
|
||||
MapRefManager m_mapRefManager;
|
||||
MapRefManager::iterator m_mapRefIter;
|
||||
|
|
@ -557,6 +563,8 @@ class MANGOS_DLL_SPEC InstanceMap : public Map
|
|||
void SendResetWarnings(uint32 timeLeft) const;
|
||||
void SetResetSchedule(bool on);
|
||||
uint32 GetMaxPlayers() const;
|
||||
|
||||
virtual void InitVisibilityDistance();
|
||||
private:
|
||||
bool m_resetAfterUnload;
|
||||
bool m_unloadWhenEmpty;
|
||||
|
|
@ -575,6 +583,8 @@ class MANGOS_DLL_SPEC BattleGroundMap : public Map
|
|||
bool CanEnter(Player* player);
|
||||
void SetUnload();
|
||||
void UnloadAll(bool pForce);
|
||||
|
||||
virtual void InitVisibilityDistance();
|
||||
};
|
||||
|
||||
/*inline
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue