aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index a5a605fc19e..ac0da0fef82 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12288,6 +12288,13 @@ void Unit::SendTeleportPacket(Position const& pos)
moveUpdateTeleport.Status->guid = GetGUID();
moveUpdateTeleport.Status->pos.Relocate(pos);
moveUpdateTeleport.Status->time = getMSTime();
+ if (TransportBase* transportBase = GetDirectTransport())
+ {
+ float tx, ty, tz, to;
+ pos.GetPosition(tx, ty, tz, to);
+ transportBase->CalculatePassengerOffset(tx, ty, tz, &to);
+ moveUpdateTeleport.Status->transport.pos.Relocate(tx, ty, tz, to);
+ }
}
// Broadcast the packet to everyone except self.