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- authored and Aokromes committed 2016-09-04 11:25:28 +02:00
1 parent d09c1712cd
commit e31fec6c92
1 file changed
+5
@@ -621,6 +621,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);