diff options
author | click <none@none> | 2010-07-27 17:29:33 +0200 |
---|---|---|
committer | click <none@none> | 2010-07-27 17:29:33 +0200 |
commit | e5b7f6ad01cbf85c6212f0cc4e8584c621f225b7 (patch) | |
tree | 2a007a1272a4cccd060bd3171c8aed4fb9c65e05 /src/server/collision/Management/VMapManager2.cpp | |
parent | dbd76ef9edce23543c1d1732269c889da79fc350 (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/collision/Management/VMapManager2.cpp')
-rw-r--r-- | src/server/collision/Management/VMapManager2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp index 61b202c9342..4f009fabeb1 100644 --- a/src/server/collision/Management/VMapManager2.cpp +++ b/src/server/collision/Management/VMapManager2.cpp @@ -235,7 +235,7 @@ namespace VMAP get height or INVALID_HEIGHT if no height available */ - float VMapManager2::getHeight(unsigned int pMapId, float x, float y, float z) + float VMapManager2::getHeight(unsigned int pMapId, float x, float y, float z, float maxSearchDist) { float height = VMAP_INVALID_HEIGHT_VALUE; //no height if (isHeightCalcEnabled()) @@ -244,7 +244,7 @@ namespace VMAP if (instanceTree != iInstanceMapTrees.end()) { Vector3 pos = convertPositionToInternalRep(x,y,z); - height = instanceTree->second->getHeight(pos); + height = instanceTree->second->getHeight(pos, maxSearchDist); if (!(height < G3D::inf())) { height = VMAP_INVALID_HEIGHT_VALUE; //no height |