Core/Units: Correct Z coord change when enabling hover above ground

This commit is contained in:
Shauren
2025-10-26 15:42:35 +01:00
parent 36cb2d4a78
commit 8d49be5e1c

View File

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