Core/Movement: no longer override a player's movementInfo with the info returned from dismissing controlled vehicles as these do not belong to him. This fixes players getting stuck in a disable gravity state when exiting vehicle seats that have disabled a player's gravity

This commit is contained in:
Ovahlord committed 2022-01-04 12:59:55 +01:00
1 parent 5a66a295ee
commit 7b3f163ef6
2 files changed
+11 -6

No files matched your search

+3 -3
View File
@@ -25987,7 +25987,7 @@ bool Player::SetDisableGravity(bool disable, bool /*packetOnly = false*/, bool /
if (IsMovedByClient() && IsInWorld())
MovementPacketSender::SendMovementFlagChangeToMover(this, MOVEMENTFLAG_DISABLE_GRAVITY, disable);
else if (IsMovedByClient() && !IsInWorld()) // (1)
else
Unit::SetDisableGravity(disable, false, false);
return true;
@@ -26000,7 +26000,7 @@ bool Player::SetCanFly(bool enable, bool /*packetOnly = false*/)
if (IsMovedByClient() && IsInWorld())
MovementPacketSender::SendMovementFlagChangeToMover(this, MOVEMENTFLAG_CAN_FLY, enable);
else if (IsMovedByClient() && !IsInWorld()) // (1)
else
Unit::SetCanFly(enable);
return true;
@@ -26013,7 +26013,7 @@ bool Player::SetCanTransitionBetweenSwimAndFly(bool enable)
if (IsMovedByClient() && IsInWorld())
MovementPacketSender::SendMovementFlagChangeToMover(this, MOVEMENTFLAG2_CAN_SWIM_TO_FLY_TRANS, enable);
else if (IsMovedByClient() && !IsInWorld()) // (1)
else
Unit::SetCanTransitionBetweenSwimAndFly(enable);
return true;