From 6b6beaaf5888562dac2c774121a90b97d8401da3 Mon Sep 17 00:00:00 2001 From: FrancescoBorzi Date: Mon, 1 Jun 2026 10:20:54 +0200 Subject: [PATCH] fix: spawn entry-rebalanced player at own base --- src/CFBG.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CFBG.cpp b/src/CFBG.cpp index 8f627d7..42aad88 100644 --- a/src/CFBG.cpp +++ b/src/CFBG.cpp @@ -442,6 +442,12 @@ void CFBG::BalanceTeamsOnEntry(Battleground* bg, Player* player) bg->DecreaseInvitedCount(provisional); bg->IncreaseInvitedCount(corrected); player->GetBGData().bgTeamId = corrected; + + // The player was already teleported to the provisional base before AddPlayer; + // move them to the corrected base so they don't spawn at the enemy's. + Position const* startPos = bg->GetTeamStartPosition(corrected); + player->TeleportTo(bg->GetMapId(), startPos->GetPositionX(), startPos->GetPositionY(), + startPos->GetPositionZ(), startPos->GetOrientation()); } uint32 CFBG::GetMorphFromRace(uint8 race, uint8 gender)