From 891422379b35eb4a52e8815d86c3fd73c042fff6 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Wed, 25 Apr 2018 13:59:53 +0200 Subject: [PATCH] Core/Objects: simplified and corrected hover height addition for flying creatures --- src/server/game/Entities/Object/Object.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 9c8df8df78..7627919231 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -1674,10 +1674,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())) && !ToUnit()->IsUnderWater()) - { - uint32 hoverHeight = GetFloatValue(UNIT_FIELD_HOVERHEIGHT); - z += hoverHeight; - } + z += GetFloatValue(UNIT_FIELD_HOVERHEIGHT); break; } case TYPEID_PLAYER: