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

(cherry picked from commit 2dfea54533830b326ce9ac29d59de01d3fee503b)
This commit is contained in:
Gustavo
2021-11-23 23:18:58 +01:00
committed by Shauren
parent 0f334265c0
commit 10c915dd34
+1 -1
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