Core/Player: Remove all Motion Masters when teleporting

Fix #22859
This commit is contained in:
jackpoz
2019-06-09 16:25:00 +02:00
parent d0de3081a3
commit 72fc79a9e6
@@ -1665,6 +1665,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// reset movement flags at teleport, because player will continue move with these flags after teleport
SetUnitMovementFlags(GetUnitMovementFlags() & MOVEMENTFLAG_MASK_HAS_PLAYER_STATUS_OPCODE);
DisableSpline();
GetMotionMaster()->Clear();
if (Transport* transport = GetTransport())
{