Core/Units: Correct Z coord change when enabling hover above ground
(cherry picked from commit 8d49be5e1cb84e26b93fa2cde415b3eba9353164)
This commit is contained in:
@@ -13601,7 +13601,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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user