aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.h
diff options
context:
space:
mode:
authortreeston <treeston.mmoc@gmail.com>2017-06-10 15:08:35 +0200
committertreeston <treeston.mmoc@gmail.com>2017-06-10 15:08:35 +0200
commitd57307f63d8deb51003d61163adccce4e2c1bd47 (patch)
tree16c3eeac40a43fe0898609d9051c4ad8c0b8e102 /src/server/game/Maps/Map.h
parent9e80e977df56834d4cdc76a57a417a86a1dbda65 (diff)
So, I came in trying to fix gameobject LoS. So I restructured some stuff.
Then it turned out that gameobject LoS is already fixed. So all this does, really, is restructure some stuff. And remove the hack from Sapphiron because I could.
Diffstat (limited to 'src/server/game/Maps/Map.h')
-rw-r--r--src/server/game/Maps/Map.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index ec7f1cc8752..5f55fc4f8f4 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -176,6 +176,14 @@ struct PositionFullTerrainStatus
Optional<LiquidData> liquidInfo;
};
+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 TC_GAME_API GridMap
{
uint32 _flags;
@@ -519,7 +527,7 @@ class TC_GAME_API Map : public GridRefManager<NGridType>
float GetWaterOrGroundLevel(uint32 phasemask, float x, float y, float z, float* ground = NULL, bool swim = false) 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, VMAP::ModelIgnoreFlags ignoreFlags) const;
+ bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, LineOfSightChecks checks, VMAP::ModelIgnoreFlags ignoreFlags) const;
void Balance() { _dynamicTree.balance(); }
void RemoveGameObjectModel(const GameObjectModel& model) { _dynamicTree.remove(model); }
void InsertGameObjectModel(const GameObjectModel& model) { _dynamicTree.insert(model); }