aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Battlegrounds
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Battlegrounds')
-rw-r--r--src/server/scripts/Battlegrounds/StrandOfTheAncients/battleground_strand_of_the_ancients.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/server/scripts/Battlegrounds/StrandOfTheAncients/battleground_strand_of_the_ancients.cpp b/src/server/scripts/Battlegrounds/StrandOfTheAncients/battleground_strand_of_the_ancients.cpp
index feb9c4334d1..9cefe03b553 100644
--- a/src/server/scripts/Battlegrounds/StrandOfTheAncients/battleground_strand_of_the_ancients.cpp
+++ b/src/server/scripts/Battlegrounds/StrandOfTheAncients/battleground_strand_of_the_ancients.cpp
@@ -554,16 +554,12 @@ struct battleground_strand_of_the_ancients : BattlegroundScript
{
if (TransportBase* transport = boat->ToTransportBase())
{
- player->Relocate(spawnPositionOnTransport[_attackers]);
- transport->AddPassenger(player);
- player->m_movementInfo.transport.pos.Relocate(spawnPositionOnTransport[_attackers]);
- float x, y, z, o;
- spawnPositionOnTransport[_attackers].GetPosition(x, y, z, o);
- transport->CalculatePassengerPosition(x, y, z, &o);
- player->Relocate(x, y, z, o);
+ transport->AddPassenger(player, spawnPositionOnTransport[_attackers]);
+ Position position = transport->GetPositionWithOffset(player->m_movementInfo.transport.pos);
+ player->Relocate(position);
if (player->IsInWorld())
- player->NearTeleportTo({ x, y, z, o });
+ player->NearTeleportTo(position);
}
}
}