Core/Player: fix teleporting while on vehicle. Closes #7812 thx joschiwald
This commit is contained in:
@@ -2113,6 +2113,9 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||||||
else
|
else
|
||||||
sLog->outDebug(LOG_FILTER_MAPS, "Player %s is being teleported to map %u", GetName(), mapid);
|
sLog->outDebug(LOG_FILTER_MAPS, "Player %s is being teleported to map %u", GetName(), mapid);
|
||||||
|
|
||||||
|
if (m_vehicle)
|
||||||
|
ExitVehicle();
|
||||||
|
|
||||||
// reset movement flags at teleport, because player will continue move with these flags after teleport
|
// reset movement flags at teleport, because player will continue move with these flags after teleport
|
||||||
SetUnitMovementFlags(0);
|
SetUnitMovementFlags(0);
|
||||||
DisableSpline();
|
DisableSpline();
|
||||||
|
|||||||
Reference in New Issue
Block a user