Core/Movement: fix units falling through the ground when hover mode is disengaged
Port From (https://github.com/TrinityCore/TrinityCore/commit/ac6e242bffe433276d7aea66805a0755996ff904)
This commit is contained in:
@@ -1067,7 +1067,7 @@ namespace Game.Entities
|
|||||||
//! Dying creatures will MoveFall from setDeathState
|
//! Dying creatures will MoveFall from setDeathState
|
||||||
if (hoverHeight != 0 && (!IsDying() || !IsUnit()))
|
if (hoverHeight != 0 && (!IsDying() || !IsUnit()))
|
||||||
{
|
{
|
||||||
float newZ = GetPositionZ() - hoverHeight;
|
float newZ = Math.Max(GetFloorZ(), GetPositionZ() - hoverHeight);
|
||||||
UpdateAllowedPositionZ(GetPositionX(), GetPositionY(), ref newZ);
|
UpdateAllowedPositionZ(GetPositionX(), GetPositionY(), ref newZ);
|
||||||
UpdateHeight(newZ);
|
UpdateHeight(newZ);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user