mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-16 23:19:14 +01:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user