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

This commit is contained in:
ariel-
2016-09-03 22:00:20 -03:00
parent 14445d2202
commit 7470bf6b97

View File

@@ -616,6 +616,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);