Core/Transport: do not relocate players on board of vehicles when near teleporting. Vehicle should take care of that

(cherry picked from commit 7470bf6b97eed6732fd1e076bb290f4f97e402a3)
This commit is contained in:
ariel-
2017-02-19 15:34:57 +01:00
committed by joschiwald
parent b239afb0ef
commit b1b150a419
@@ -628,6 +628,11 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl
{
if ((*itr)->GetTypeId() == TYPEID_PLAYER)
{
// will be relocated in UpdatePosition of the vehicle
if (Unit* veh = (*itr)->ToUnit()->GetVehicleBase())
if (veh->GetTransport() == this)
continue;
float destX, destY, destZ, destO;
(*itr)->m_movementInfo.transport.pos.GetPosition(destX, destY, destZ, destO);
TransportBase::CalculatePassengerPosition(destX, destY, destZ, &destO, x, y, z, o);