Skip to content

fix(stats): report correctly resolved side instead of random in custom matches#22

Merged
x64-dev merged 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
JoKeRZH429:fix/side-resolution-in-outcome
Jun 19, 2026
Merged

fix(stats): report correctly resolved side instead of random in custom matches#22
x64-dev merged 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
JoKeRZH429:fix/side-resolution-in-outcome

Conversation

@JoKeRZH429

@JoKeRZH429 JoKeRZH429 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

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_RANDOM at 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_RANDOM has been replaced with the actual resolved faction in PlayerTemplate, allowing the correct side to be persisted.

Merge alongside GeneralsOnlineDevelopmentTeam/GameClient#520 (fix(stats): pass resolved side in game outcome payload

@JoKeRZH429 JoKeRZH429 force-pushed the fix/side-resolution-in-outcome branch from cea37cf to 8dc7fdd Compare June 19, 2026 13:26
@x64-dev x64-dev merged commit 37b5137 into GeneralsOnlineDevelopmentTeam:main Jun 19, 2026
16 checks passed
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