Core/Objects: simplified and corrected hover height addition for flying creatures

This commit is contained in:
Ovahlord committed 2018-04-25 13:59:53 +02:00
1 parent cd4163eaca
commit 891422379b
1 file changed
+1 -4
+1 -4
View File
@@ -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: