Core/Units: Only update height in SetHover if unit is bellow HoverHeight (#23061)

This commit is contained in:
Gustavo
2019-02-23 07:42:20 -03:00
committed by Giacomo Pozzoni
parent f86d453651
commit 2dfea54533

View File

@@ -13152,7 +13152,7 @@ bool Unit::SetHover(bool enable, bool /*packetOnly = false*/)
{
//! No need to check height on ascent
AddUnitMovementFlag(MOVEMENTFLAG_HOVER);
if (hoverHeight)
if (hoverHeight && GetPositionZ() - GetFloorZ() < hoverHeight)
UpdateHeight(GetPositionZ() + hoverHeight);
}
else