mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-17 09:14:34 +00:00
feat(Core/LOS): restruct LOS functions and add LineOfSight check (#1459)
This commit is contained in:
committed by
Francesco Borzì
parent
6908d333db
commit
cb81f3c17a
@@ -142,6 +142,14 @@ struct LiquidData
|
||||
float depth_level;
|
||||
};
|
||||
|
||||
enum LineOfSightChecks
|
||||
{
|
||||
LINEOFSIGHT_CHECK_VMAP = 0x1, // check static floor layout data
|
||||
LINEOFSIGHT_CHECK_GOBJECT = 0x2, // check dynamic game object data
|
||||
|
||||
LINEOFSIGHT_ALL_CHECKS = (LINEOFSIGHT_CHECK_VMAP | LINEOFSIGHT_CHECK_GOBJECT)
|
||||
};
|
||||
|
||||
class GridMap
|
||||
{
|
||||
uint32 _flags;
|
||||
@@ -448,7 +456,7 @@ class Map : public GridRefManager<NGridType>
|
||||
|
||||
float GetWaterOrGroundLevel(float x, float y, float z, float* ground = NULL, bool swim = false, float maxSearchDist = 50.0f) const;
|
||||
float GetHeight(uint32 phasemask, float x, float y, float z, bool vmap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const;
|
||||
bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const;
|
||||
bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, LineOfSightChecks checks) const;
|
||||
void Balance() { _dynamicTree.balance(); }
|
||||
void RemoveGameObjectModel(const GameObjectModel& model) { _dynamicTree.remove(model); }
|
||||
void InsertGameObjectModel(const GameObjectModel& model) { _dynamicTree.insert(model); }
|
||||
|
||||
Reference in New Issue
Block a user