Skip to content

fix: regression introduced in my previous commit + add guard#148

Merged
Nyeriah merged 1 commit into
masterfrom
fix-regression
May 26, 2026
Merged

fix: regression introduced in my previous commit + add guard#148
Nyeriah merged 1 commit into
masterfrom
fix-regression

Conversation

@FrancescoBorzi
Copy link
Copy Markdown

No description provided.

@Nyeriah Nyeriah merged commit 7b19749 into master May 26, 2026
1 check passed
@Nyeriah Nyeriah deleted the fix-regression branch May 26, 2026 13:22
Nyeriah added a commit that referenced this pull request May 30, 2026
OnBattlefieldPlayerLeaveZone stopped clearing the fake in #147, and
the deferred OnPlayerUpdateZone path added alongside #148 has an
InBattleground() guard that prevents the clear once the teleport
lands on the BG map. The WG fake therefore persists into the BG,
where it short-circuits both BalanceTeamsOnEntry (its IsPlayerFake
guard) and SetFakeRaceAndMorph (same guard), and can desync
bgTeamId from GetTeamId() -- most visibly when a player queues for
a BG before WG war pops, gets faked Horde mid-queue, and lands on
the Alliance queue-side with a Horde faction and visual.

Clear any pre-existing fake at the top of ValidatePlayerForBG so
the BG entry path re-evaluates against bgTeamId. The #147 timing
concern does not apply here -- Battlefield::HandlePlayerLeaveZone
has already finished by the time Battleground::AddPlayer runs on
the new map.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants