Core/Units: do not take hover height into account for creatures that are underwater
This commit is contained in:
1 parent
0c85670585
commit
ef129a851c
1 file changed
+1
-1
@@ -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