From f82d5cb3fcef169cf7a62f83935fa6d6b105589d Mon Sep 17 00:00:00 2001 From: silver1ce Date: Wed, 6 Jan 2010 12:15:02 +0200 Subject: fixed the bug that GetVmapHeight returns incorrect height on terrains(flying units fall below map etc) also unlocked max ray lenght for getHeight, by default it's 10 yards --HG-- branch : trunk --- src/shared/vmap/VMapManager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shared/vmap/VMapManager.h') diff --git a/src/shared/vmap/VMapManager.h b/src/shared/vmap/VMapManager.h index bfeba3cfe67..9646a377bfc 100644 --- a/src/shared/vmap/VMapManager.h +++ b/src/shared/vmap/VMapManager.h @@ -105,7 +105,7 @@ namespace VMAP bool isInLineOfSight(const G3D::Vector3& pos1, const G3D::Vector3& pos2); bool getObjectHitPos(const G3D::Vector3& pos1, const G3D::Vector3& pos2, G3D::Vector3& pResultHitPos, float pModifyDist); - float getHeight(const G3D::Vector3& pPos); + float getHeight(const G3D::Vector3& pPos, float ray_lenght); bool PrepareTree(); bool loadMap(const std::string& pDirFileName, unsigned int pMapTileIdent); @@ -165,7 +165,7 @@ namespace VMAP fill the hit pos and return true, if an object was hit */ bool getObjectHitPos(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float &ry, float& rz, float pModifyDist); - float getHeight(unsigned int pMapId, float x, float y, float z); + float getHeight(unsigned int pMapId, float x, float y, float z, float ray_lenght); bool processCommand(char *pCommand); // for debug and extensions -- cgit v1.2.3