diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-11-19 20:20:33 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-11-19 20:20:33 +0100 |
commit | b4d6ca277aef81a49e3654a3eec131ea621da991 (patch) | |
tree | 0fab0b7393f63a2baead5915e64b03d71c3173fd /src/common/Collision/Management/IVMapManager.h | |
parent | 225a1bbf7dabdc318bd340e15afa7378a7622612 (diff) |
Core/vmaps: Removed vmap lookup functions duplicating functionality of each other
(cherry picked from commit 45ee989c70682c001d4467d97bf1ecedcf7dbcc3)
Diffstat (limited to 'src/common/Collision/Management/IVMapManager.h')
-rw-r--r-- | src/common/Collision/Management/IVMapManager.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/common/Collision/Management/IVMapManager.h b/src/common/Collision/Management/IVMapManager.h index b25d93bd9b4..e48b4f38b75 100644 --- a/src/common/Collision/Management/IVMapManager.h +++ b/src/common/Collision/Management/IVMapManager.h @@ -53,17 +53,21 @@ namespace VMAP { struct AreaInfo { - AreaInfo(int32 _adtId, int32 _rootId, int32 _groupId, uint32 _flags) : adtId(_adtId), rootId(_rootId), groupId(_groupId), mogpFlags(_flags) { } - int32 const adtId; - int32 const rootId; - int32 const groupId; - uint32 const mogpFlags; + AreaInfo() = default; + AreaInfo(int32 _groupId, int32 _adtId, int32 _rootId, uint32 _mogpFlags, uint32 _uniqueId) + : groupId(_groupId), adtId(_adtId), rootId(_rootId), mogpFlags(_mogpFlags), uniqueId(_uniqueId) { } + int32 groupId = 0; + int32 adtId = 0; + int32 rootId = 0; + uint32 mogpFlags = 0; + uint32 uniqueId = 0; }; struct LiquidInfo { + LiquidInfo() = default; LiquidInfo(uint32 _type, float _level) : type(_type), level(_level) { } - uint32 const type; - float const level; + uint32 type = 0; + float level = 0.0f; }; float floorZ = VMAP_INVALID_HEIGHT; @@ -117,14 +121,12 @@ namespace VMAP bool isMapLoadingEnabled() const { return(iEnableLineOfSightCalc || iEnableHeightCalc ); } virtual std::string getDirFileName(unsigned int pMapId, int x, int y) const =0; + /** Query world model area info. \param z gets adjusted to the ground height for which this are info is valid */ - virtual bool getAreaInfo(uint32 mapId, float x, float y, float &z, uint32 &flags, int32 &adtId, int32 &rootId, int32 &groupId) const=0; - virtual bool GetLiquidLevel(uint32 mapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type, uint32& mogpFlags) const=0; - // get both area + liquid data in a single vmap lookup - virtual void getAreaAndLiquidData(unsigned int mapId, float x, float y, float z, uint8 reqLiquidType, AreaAndLiquidData& data) const=0; + virtual bool getAreaAndLiquidData(unsigned int mapId, float x, float y, float z, Optional<uint8> reqLiquidType, AreaAndLiquidData& data) const = 0; }; } |