mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Core/Units: do not take hover height into account for creatures that are underwater
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user