Skip to content

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

Open
MrS-ibra wants to merge 1 commit intoGeneralsOnlineDevelopmentTeam:mainfrom
MrS-ibra:disconnect-win-award
Open

fix(stats): Award win to winner when opponent disconnects and avoid resetting win streak#364
MrS-ibra wants to merge 1 commit intoGeneralsOnlineDevelopmentTeam:mainfrom
MrS-ibra:disconnect-win-award

Conversation

@MrS-ibra
Copy link

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
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.

1 participant