Core/Maps: Use a fixed offset instead of full collision height when retrieving floor Z
This commit is contained in:
1 parent
4343dd6d55
commit
c12531b023
3 files changed
+4
-3
No files matched your search
@@ -2784,7 +2784,7 @@ float WorldObject::GetFloorZ() const
|
||||
{
|
||||
if (!IsInWorld())
|
||||
return m_staticFloorZ;
|
||||
return std::max<float>(m_staticFloorZ, GetMap()->GetGameObjectFloor(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ() + GetCollisionHeight()));
|
||||
return std::max<float>(m_staticFloorZ, GetMap()->GetGameObjectFloor(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ() + Z_OFFSET_FIND_HEIGHT));
|
||||
}
|
||||
|
||||
float WorldObject::GetMapWaterOrGroundLevel(float x, float y, float z, float* ground/* = nullptr*/) const
|
||||
@@ -2797,7 +2797,7 @@ float WorldObject::GetMapWaterOrGroundLevel(float x, float y, float z, float* gr
|
||||
float WorldObject::GetMapHeight(float x, float y, float z, bool vmap/* = true*/, float distanceToSearch/* = DEFAULT_HEIGHT_SEARCH*/) const
|
||||
{
|
||||
if (z != MAX_HEIGHT)
|
||||
z += GetCollisionHeight();
|
||||
z += Z_OFFSET_FIND_HEIGHT;
|
||||
|
||||
return GetMap()->GetHeight(GetPhaseShift(), x, y, z, vmap, distanceToSearch);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user