Skip to content

Conversation

@themuffinator
Copy link
Owner

Summary

  • add a queue for requested balance team changes and track pending requests during round-based play
  • defer TeamBalance changes during active rounds and apply them once the round has ended
  • expose balance queue processing and run it when a round concludes

Testing

  • not run (not requested)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

https://github.com/themuffinator/muffmode/blob/8d69ec5fca0b5cb1958fccbcdbc6df4e4044b8d0/src/g_cmds.cpp#L1965-L1969
P1 Badge Ignore disconnected clients when simulating queued balances

TeamBalance adjusts red_count/blue_count using every queued request even if that client has already disconnected. If a player queued to swap teams leaves mid‑round, their stale entry still cancels out the perceived imbalance, so auto‑balance stops enqueuing replacements while the real teams remain uneven; ProcessBalanceQueue later skips the disconnected slot and nothing changes, leaving the next round imbalanced.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants