Core/Maps: Use a fixed offset instead of full collision height when retrieving floor Z
Port From (https://github.com/TrinityCore/TrinityCore/commit/9bcff210f90d57689557b7b8cc20cd336b8ab035)
This commit is contained in:
@@ -3601,7 +3601,7 @@ namespace Game.Entities
|
||||
{
|
||||
if (!IsInWorld)
|
||||
return m_staticFloorZ;
|
||||
return Math.Max(m_staticFloorZ, GetMap().GetGameObjectFloor(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ() + GetCollisionHeight()));
|
||||
return Math.Max(m_staticFloorZ, GetMap().GetGameObjectFloor(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ() + MapConst.ZOffsetFindHeight));
|
||||
}
|
||||
|
||||
public float GetMapWaterOrGroundLevel(float x, float y, float z)
|
||||
@@ -3618,7 +3618,7 @@ namespace Game.Entities
|
||||
public float GetMapHeight(float x, float y, float z, bool vmap = true, float distanceToSearch = MapConst.DefaultHeightSearch)
|
||||
{
|
||||
if (z != MapConst.MaxHeight)
|
||||
z += GetCollisionHeight();
|
||||
z += MapConst.ZOffsetFindHeight;
|
||||
|
||||
return GetMap().GetHeight(GetPhaseShift(), x, y, z, vmap, distanceToSearch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user