Skip to content

Commit 8d49be5

Browse files
committed
Core/Units: Correct Z coord change when enabling hover above ground
1 parent 36cb2d4 commit 8d49be5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/game/Entities/Unit/Unit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13517,7 +13517,7 @@ bool Unit::SetHover(bool enable, bool updateAnimTier /*= true*/)
1351713517
//! No need to check height on ascent
1351813518
AddUnitMovementFlag(MOVEMENTFLAG_HOVER);
1351913519
if (hoverHeight && GetPositionZ() - GetFloorZ() < hoverHeight)
13520-
UpdateHeight(GetPositionZ() + hoverHeight);
13520+
UpdateHeight(std::max(GetFloorZ() + hoverHeight, GetPositionZ()));
1352113521
}
1352213522
else
1352313523
{

0 commit comments

Comments
 (0)