Skip to content

Create queue system to prevent team imbalance in teamplay

z411 requested to merge z411/team_queue into master

This MR implements a queue system for spectators to wait for another player to join to keep teams balanced. I assume this mostly works in populated servers.

team2

If you mark yourself as wanting to join a team, you'll stay in queue until a new player joins and then you'll be joined automatically along him.

Things remaining:

  • Testing with bots Done.
  • Check if it breaks the campaign Done. Disabled in campaign.
  • More signals that you or someone is in queue (scoreboard? info panel?) Done. Added in both scoreboard, info panel and centerprint.
  • Work with g_balance_teams Done.
  • Think what to do if one player leaves or goes to spect Done.
  • Give an option to leave the queue Done. Press spectate to leave the queue.
  • Support for 3-4 teams Hardcoded for 2 teams for now.
  • Add cvar to enable/disable Done.

To test enable the following cvars at will:

  • g_balance_teams_queue 1
  • g_balance_teams_remove 1
Edited by z411

Merge request reports