Skip to content

Conversation

@Stubbjax
Copy link

@Stubbjax Stubbjax commented Sep 26, 2025

This change fixes an issue where only a single network command is cleared per connection upon leaving a game, rather than the entire list as expected. This occurs due to the command list iterator being invalidated when removing the current node.

This resolves cases where players are not immediately sent to the score screen after leaving a game due to network commands being left in the buffer.

@Stubbjax Stubbjax self-assigned this Sep 26, 2025
@Stubbjax Stubbjax added Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker Network Anything related to network, servers Gen Relates to Generals ZH Relates to Zero Hour labels Sep 26, 2025
@xezon
Copy link

xezon commented Oct 1, 2025

Does this fix #206 ?

Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@Mauller
Copy link

Mauller commented Oct 7, 2025

Does this fix #206 ?

i could look at testing this with some people to see if it makes a difference when integrated

@xezon
Copy link

xezon commented Oct 7, 2025

Stubbjax did write

This resolves cases where players are not immediately sent to the score screen after leaving a game due to network commands being left in the buffer.

It is not clear if this refers to #206

@Stubbjax
Copy link
Author

Stubbjax commented Oct 7, 2025

It is not clear if this refers to #206

I believe it covers some cases but not all of them.

@xezon xezon changed the title bugfix: All external network commands are now correctly cleared when leaving a game bugfix(network): All external network commands are now correctly cleared when leaving a game Oct 7, 2025
@xezon xezon changed the title bugfix(network): All external network commands are now correctly cleared when leaving a game bugfix(network): Fix clearing remote player commands in Connection::clearCommandsExceptFrom() to prevent local player left hanging in game over screen Oct 7, 2025
@xezon xezon merged commit 16ff7e4 into TheSuperHackers:main Oct 7, 2025
20 checks passed
@Mauller
Copy link

Mauller commented Oct 7, 2025

It appears to help speedup transitioning to the score screen when a game ends normally and the victory or defeat windows shows.

One thing it doesn't seem to help is if someone surrenders then quits straight away, the other player can get stuck on the victory screen for an extended period.

@Stubbjax Stubbjax deleted the fix-uncleared-network-commands branch October 21, 2025 11:51
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
…learCommandsExceptFrom() to prevent local player left hanging in game over screen (TheSuperHackers#1638)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker Network Anything related to network, servers ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants