mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/Movement: Fixed transport teleports on the same map (and teleporting on transports too)
This commit is contained in:
@@ -507,6 +507,7 @@ void Transport::UpdatePosition(float x, float y, float z, float o)
|
||||
Cell oldCell(GetPositionX(), GetPositionY());
|
||||
|
||||
Relocate(x, y, z, o);
|
||||
m_stationaryPosition.SetOrientation(o);
|
||||
UpdateModelPosition();
|
||||
|
||||
UpdatePassengerPositions(_passengers);
|
||||
@@ -619,6 +620,8 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdatePosition(x, y, z, o);
|
||||
|
||||
// Teleport players, they need to know it
|
||||
for (PassengerSet::iterator itr = _passengers.begin(); itr != _passengers.end(); ++itr)
|
||||
{
|
||||
@@ -637,7 +640,6 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl
|
||||
}
|
||||
}
|
||||
|
||||
UpdatePosition(x, y, z, o);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user