mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Transport: do not relocate players on board of vehicles when near teleporting. Vehicle should take care of that
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user