Core/Transports: do not teleport players via opcode when the transport is still on the same map. The client handles that on his own

This commit is contained in:
Ovahlord
2019-04-11 20:36:34 +02:00
parent f0204840b2
commit 682db83528

View File

@@ -1101,25 +1101,6 @@ bool MapTransport::TeleportTransport(uint32 newMapid, float x, float y, float z,
else
{
UpdatePosition(x, y, z, o);
// Teleport players, they need to know it
for (PassengerSet::iterator itr = _passengers.begin(); itr != _passengers.end(); ++itr)
{
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);
(*itr)->ToUnit()->NearTeleportTo(destX, destY, destZ, destO);
}
}
return false;
}
}