fix(stats): report correctly resolved side instead of random in custom matches#22
Merged
x64-dev merged 1 commit intoJun 19, 2026
Conversation
cea37cf to
8dc7fdd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The player's side was previously persisted to the database when
Database.MatchHistory.CreatePlaceholderMatchHistory(db, lobby)was called at the start of the match.This was not an issue for quickmatch games because the player's side had already been resolved and assigned during lobby creation. For custom matches, however, the side was still
PLAYERTEMPLATE_RANDOMat that point, so the placeholder match history persisted the unresolved value.This change records the player's resolved side in
Database.MatchHistory.CommitPlayerOutcome, overriding the placeholder value in the database. By that point,PLAYERTEMPLATE_RANDOMhas been replaced with the actual resolved faction inPlayerTemplate, allowing the correct side to be persisted.Merge alongside GeneralsOnlineDevelopmentTeam/GameClient#520 (
fix(stats): pass resolved side in game outcome payload