Skip to content

fix(stats): Award win to winner when opponent disconnects and avoid resetting win streak#364

Merged
x64-dev merged 2 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
MrS-ibra:disconnect-win-award
Jun 21, 2026
Merged

fix(stats): Award win to winner when opponent disconnects and avoid resetting win streak#364
x64-dev merged 2 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
MrS-ibra:disconnect-win-award

Conversation

@MrS-ibra

Copy link
Copy Markdown
Member

When a player disconnects (taskmanager kill process or ethernet cable unplug), the remaining player was not being awarded a win, their win streak was being reset and a disconnect was being recorded against them incorrectly.

The issue was happening because when gameEndedInDisconnect was true in populatePlayerInfo, the code treated all players as if they had disconnected, including the winner. There was no check to see if the local player had actually won before recording disconnect against them.

The fix adds a isLocalAlliedVictory check inside gameEndedInDisconnect . if the local player won, a win is recorded and the win streak is incremented instead of being reset.

@MrS-ibra MrS-ibra force-pushed the disconnect-win-award branch from 7ae97aa to 6094275 Compare March 1, 2026 12:47
@MrS-ibra MrS-ibra force-pushed the disconnect-win-award branch from 6094275 to c6dede8 Compare March 1, 2026 12:49
@github-actions

Copy link
Copy Markdown

⚠️ Title/Commit Validation Failed

Invalid commit messages:

  • Award win to remaining and avoid resetting win streak when opponent disconnects
    PR titles and commit messages must follow conventional commits format:
type: Description
type(scope): Description

Allowed types: bugfix, build, chore, ci, docs, fix, feat, perf, refactor, revert, style, test, tweak, unify

See CONTRIBUTING.md for details.

@x64-dev x64-dev merged commit a795103 into GeneralsOnlineDevelopmentTeam:main Jun 21, 2026
4 of 5 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