aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshenhuyong <shenhuyong@126.com>2021-06-19 20:32:10 +0800
committerChaouki Dhib <chaodhib@gmail.com>2021-06-19 21:17:42 +0200
commit9b05c3967bda1c49935e6f87b3b781afd9607035 (patch)
treeacb9cf12976fb149b79ea1b1fa5c67bbb2e9e47a /src
parentc3a013c49928acaa4676cd5350b3ed8fe1f0fddd (diff)
Fix kick after map changed and speed changed
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 3407da8dbdf..0d82a489ad8 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -1806,9 +1806,6 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
//remove auras before removing from map...
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP | AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_TURNING);
- // players on mount will be dismounted. the speed and height change should not require an ACK and should be applied directly
- PurgeAndApplyPendingMovementChanges(false);
-
if (!GetSession()->PlayerLogout())
{
// send transfer packets
@@ -1824,6 +1821,9 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if (oldmap)
oldmap->RemovePlayerFromMap(this, false);
+ // players on mount will be dismounted. the speed and height change should not require an ACK and should be applied directly
+ PurgeAndApplyPendingMovementChanges(false);
+
m_teleport_dest = WorldLocation(mapid, x, y, z, orientation);
m_teleport_options = options;
SetFallInformation(0, GetPositionZ());