aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.cpp
diff options
context:
space:
mode:
authorclick <none@none>2010-07-27 17:29:33 +0200
committerclick <none@none>2010-07-27 17:29:33 +0200
commite5b7f6ad01cbf85c6212f0cc4e8584c621f225b7 (patch)
tree2a007a1272a4cccd060bd3171c8aed4fb9c65e05 /src/server/game/Maps/Map.cpp
parentdbd76ef9edce23543c1d1732269c889da79fc350 (diff)
Add option for search distance to getHeight() functions and make Creature::FallGround() use VMaps properly. (Fix by Lynx3d)
This finally prevents flying creatures from falling to infinity (basically instantly diappearing) in several instances, aswell as prevent creatures from falling inside larger solid object around the world. --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r--src/server/game/Maps/Map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 6c9b505d6c9..8ae9c969b60 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -1680,7 +1680,7 @@ inline GridMap *Map::GetGrid(float x, float y)
return GridMaps[gx][gy];
}
-float Map::GetHeight(float x, float y, float z, bool pUseVmaps) const
+float Map::GetHeight(float x, float y, float z, bool pUseVmaps, float maxSearchDist) const
{
// find raw .map surface under Z coordinates
float mapHeight;
@@ -1704,7 +1704,7 @@ float Map::GetHeight(float x, float y, float z, bool pUseVmaps) const
if (vmgr->isHeightCalcEnabled())
{
// look from a bit higher pos to find the floor
- vmapHeight = vmgr->getHeight(GetId(), x, y, z + 2.0f);
+ vmapHeight = vmgr->getHeight(GetId(), x, y, z + 2.0f, maxSearchDist);
}
else
vmapHeight = VMAP_INVALID_HEIGHT_VALUE;