Core/Units: CanFly and CanHover will now return positive results when the creature has the according movement flags dispite not having the template movement field set as enabled. This fixes several edge cases with manually enabled flight movement
* renamed IsLevitating to IsGravityDisabled for consistency
This commit is contained in:
1 parent
4a25282f51
commit
813b82efa3
5 files changed
+9
-9
No files matched your search
@@ -14377,7 +14377,7 @@ bool Unit::SetDisableGravity(bool disable, bool packetOnly /*= false*/)
|
||||
{
|
||||
if (!packetOnly)
|
||||
{
|
||||
if (disable == IsLevitating())
|
||||
if (disable == IsGravityDisabled())
|
||||
return false;
|
||||
|
||||
if (disable)
|
||||
@@ -14454,7 +14454,7 @@ bool Unit::SetCanFly(bool enable, bool packetOnly)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsFlying() && !IsLevitating())
|
||||
if (IsFlying() && !IsGravityDisabled())
|
||||
SetFall(true);
|
||||
RemoveUnitMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_MASK_MOVING_FLY);
|
||||
|
||||
|
||||
Reference in new issue
Block a user