diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/Collision/DynamicTree.cpp | 13 | ||||
| -rw-r--r-- | src/common/Collision/DynamicTree.h | 1 | ||||
| -rw-r--r-- | src/common/Collision/Management/IVMapManager.h | 3 | ||||
| -rw-r--r-- | src/common/Collision/Management/VMapManager2.cpp | 19 | ||||
| -rw-r--r-- | src/common/Collision/Management/VMapManager2.h | 1 | ||||
| -rw-r--r-- | src/common/Collision/Maps/MapTree.cpp | 13 | ||||
| -rw-r--r-- | src/common/Collision/Maps/MapTree.h | 1 |
7 files changed, 0 insertions, 51 deletions
diff --git a/src/common/Collision/DynamicTree.cpp b/src/common/Collision/DynamicTree.cpp index a69d54c7f9a..96378ef9c0d 100644 --- a/src/common/Collision/DynamicTree.cpp +++ b/src/common/Collision/DynamicTree.cpp @@ -254,16 +254,3 @@ float DynamicMapTree::getHeight(float x, float y, float z, float maxSearchDist, else return -G3D::finf(); } - -float DynamicMapTree::getCeil(float x, float y, float z, float maxSearchDist, uint32 phasemask) const -{ - G3D::Vector3 v(x, y, z); - G3D::Ray r(v, G3D::Vector3(0, 0, 1)); - DynamicTreeIntersectionCallback callback(phasemask); - impl->intersectZAllignedRay(r, callback, maxSearchDist); - - if (callback.didHit()) - return v.z + maxSearchDist; - - return G3D::finf(); -} diff --git a/src/common/Collision/DynamicTree.h b/src/common/Collision/DynamicTree.h index aa7a4bb3d2a..9b7d5f15e20 100644 --- a/src/common/Collision/DynamicTree.h +++ b/src/common/Collision/DynamicTree.h @@ -51,7 +51,6 @@ public: float pModifyDist) const; float getHeight(float x, float y, float z, float maxSearchDist, uint32 phasemask) const; - float getCeil(float x, float y, float z, float maxSearchDist, uint32 phasemask) const; void insert(GameObjectModel const&); void remove(GameObjectModel const&); diff --git a/src/common/Collision/Management/IVMapManager.h b/src/common/Collision/Management/IVMapManager.h index 7fa9ddb12e3..e9aae51a025 100644 --- a/src/common/Collision/Management/IVMapManager.h +++ b/src/common/Collision/Management/IVMapManager.h @@ -49,8 +49,6 @@ namespace VMAP #define VMAP_INVALID_HEIGHT -100000.0f // for check #define VMAP_INVALID_HEIGHT_VALUE -200000.0f // real assigned value in unknown height case - #define VMAP_INVALID_CEIL_VALUE 200000.0f - #define VMAP_INVALID_CEIL 100000.0f struct AreaAndLiquidData { @@ -94,7 +92,6 @@ namespace VMAP virtual bool isInLineOfSight(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2, ModelIgnoreFlags ignoreFlags) = 0; virtual float getHeight(unsigned int pMapId, float x, float y, float z, float maxSearchDist) = 0; - virtual float getCeil(unsigned int /*pMapId*/, float /*x*/, float /*y*/, float /*z*/, float /*maxSearchDist*/) { return VMAP_INVALID_CEIL_VALUE; } /** test if we hit an object. return true if we hit one. rx, ry, rz will hold the hit position or the dest position, if no intersection was found return a position, that is pReduceDist closer to the origin diff --git a/src/common/Collision/Management/VMapManager2.cpp b/src/common/Collision/Management/VMapManager2.cpp index 922d68140d3..5b9cb34874b 100644 --- a/src/common/Collision/Management/VMapManager2.cpp +++ b/src/common/Collision/Management/VMapManager2.cpp @@ -234,25 +234,6 @@ namespace VMAP return VMAP_INVALID_HEIGHT_VALUE; } - float VMapManager2::getCeil(unsigned int mapId, float x, float y, float z, float maxSearchDist) - { - if (isHeightCalcEnabled() && !IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_HEIGHT)) - { - InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId); - if (instanceTree != iInstanceMapTrees.end()) - { - Vector3 pos = convertPositionToInternalRep(x, y, z); - float height = instanceTree->second->getCeil(pos, maxSearchDist); - if (!(height < G3D::finf())) - return height = VMAP_INVALID_CEIL_VALUE; // No height - - return height; - } - } - - return VMAP_INVALID_CEIL_VALUE; - } - bool VMapManager2::getAreaInfo(unsigned int mapId, float x, float y, float& z, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const { if (!IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_AREAFLAG)) diff --git a/src/common/Collision/Management/VMapManager2.h b/src/common/Collision/Management/VMapManager2.h index b50348b8928..831383ac555 100644 --- a/src/common/Collision/Management/VMapManager2.h +++ b/src/common/Collision/Management/VMapManager2.h @@ -113,7 +113,6 @@ namespace VMAP */ bool getObjectHitPos(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float& ry, float& rz, float modifyDist) override; float getHeight(unsigned int mapId, float x, float y, float z, float maxSearchDist) override; - float getCeil(unsigned int mapId, float x, float y, float z, float maxSearchDist) override; bool processCommand(char* /*command*/) override { return false; } // for debug and extensions diff --git a/src/common/Collision/Maps/MapTree.cpp b/src/common/Collision/Maps/MapTree.cpp index c96adb6c87c..3a927acc310 100644 --- a/src/common/Collision/Maps/MapTree.cpp +++ b/src/common/Collision/Maps/MapTree.cpp @@ -236,19 +236,6 @@ namespace VMAP return(height); } - float StaticMapTree::getCeil(const G3D::Vector3 & pPos, float maxSearchDist) const - { - float height = G3D::finf(); - Vector3 dir = Vector3(0, 0, 1); - G3D::Ray ray(pPos, dir); // direction with length of 1 - float maxDist = maxSearchDist; - if (getIntersectionTime(ray, maxDist, false, ModelIgnoreFlags::Nothing)) - { - height = pPos.z + maxDist; - } - return(height); - } - //========================================================= LoadResult StaticMapTree::CanLoadMap(const std::string &vmapPath, uint32 mapID, uint32 tileX, uint32 tileY) { diff --git a/src/common/Collision/Maps/MapTree.h b/src/common/Collision/Maps/MapTree.h index 186f1120915..48470bf0261 100644 --- a/src/common/Collision/Maps/MapTree.h +++ b/src/common/Collision/Maps/MapTree.h @@ -75,7 +75,6 @@ namespace VMAP bool isInLineOfSight(const G3D::Vector3& pos1, const G3D::Vector3& pos2, ModelIgnoreFlags ignoreFlags) const; bool getObjectHitPos(const G3D::Vector3& pos1, const G3D::Vector3& pos2, G3D::Vector3& pResultHitPos, float pModifyDist) const; float getHeight(const G3D::Vector3& pPos, float maxSearchDist) const; - float getCeil(const G3D::Vector3& pPos, float maxSearchDist) const; bool getAreaInfo(G3D::Vector3 &pos, uint32 &flags, int32 &adtId, int32 &rootId, int32 &groupId) const; bool GetLocationInfo(const G3D::Vector3 &pos, LocationInfo &info) const; |
