From e5b7f6ad01cbf85c6212f0cc4e8584c621f225b7 Mon Sep 17 00:00:00 2001 From: click Date: Tue, 27 Jul 2010 17:29:33 +0200 Subject: 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 --- src/server/collision/Management/VMapManager2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/collision/Management/VMapManager2.cpp') 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 -- cgit v1.2.3