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

(cherry picked from commit 2dfea54533)
This commit is contained in:
Gustavo
2019-02-23 07:42:20 -03:00
committed by Shauren
parent 0f334265c0
commit 10c915dd34

View File

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