mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Movement: fix units falling through the ground when hover mode is disengaged (PR #25518)
This commit is contained in:
@@ -13243,7 +13243,7 @@ bool Unit::SetHover(bool enable, bool /*packetOnly = false*/, bool /*updateAnima
|
||||
//! Dying creatures will MoveFall from setDeathState
|
||||
if (hoverHeight && (!isDying() || GetTypeId() != TYPEID_UNIT))
|
||||
{
|
||||
float newZ = GetPositionZ() - hoverHeight;
|
||||
float newZ = std::max<float>(GetFloorZ(), GetPositionZ() - hoverHeight);
|
||||
UpdateAllowedPositionZ(GetPositionX(), GetPositionY(), newZ);
|
||||
UpdateHeight(newZ);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user