Core/Movement: Do not remove movement flags that have special opcodes associated with them on teleport

Closes #10162
This commit is contained in:
Shauren
2013-07-13 15:26:10 +02:00
parent 4aad735af9
commit 330dd624b6
2 changed files with 7 additions and 2 deletions

View File

@@ -2130,7 +2130,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
ExitVehicle();
// reset movement flags at teleport, because player will continue move with these flags after teleport
SetUnitMovementFlags(0);
SetUnitMovementFlags(GetUnitMovementFlags() & MOVEMENTFLAG_MASK_HAS_PLAYER_STATUS_OPCODE);
DisableSpline();
if (m_transport)

View File

@@ -735,8 +735,13 @@ enum MovementFlags
/// @todo if needed: add more flags to this masks that are exclusive to players
MOVEMENTFLAG_MASK_PLAYER_ONLY =
MOVEMENTFLAG_FLYING
MOVEMENTFLAG_FLYING,
/// Movement flags that have change status opcodes associated for players
MOVEMENTFLAG_MASK_HAS_PLAYER_STATUS_OPCODE = MOVEMENTFLAG_DISABLE_GRAVITY | MOVEMENTFLAG_ROOT |
MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_WATERWALKING | MOVEMENTFLAG_FALLING_SLOW | MOVEMENTFLAG_HOVER
};
enum MovementFlags2
{
MOVEMENTFLAG2_NONE = 0x00000000,