From ef129a851c74befaa37f192d1ba3dd057c937c3e Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Tue, 24 Apr 2018 23:26:43 +0200 Subject: [PATCH] Core/Units: do not take hover height into account for creatures that are underwater --- src/server/game/Entities/Object/Object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index ee3af2f8431..9c8df8df784 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1673,7 +1673,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const } // Creatures that are simulating flight effects or actual flight should use HoverHeight - if (ToUnit() && (ToUnit()->IsFlying() || ToUnit()->IsHovering() || ToUnit()->IsLevitating())) + if ((ToUnit() && (ToUnit()->IsFlying() || ToUnit()->IsHovering() || ToUnit()->IsLevitating())) && !ToUnit()->IsUnderWater()) { uint32 hoverHeight = GetFloatValue(UNIT_FIELD_HOVERHEIGHT); z += hoverHeight;