Core/Player: fix teleporting while on vehicle. Closes #7812 thx joschiwald

This commit is contained in:
Kandera
2012-09-24 12:08:25 -04:00
parent bec67b7acc
commit 5adc3d28a4
@@ -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();