Create queue system to prevent team imbalance in teamplay
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.
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 botsDone. -
Check if it breaks the campaignDone. 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_teamsDone. -
Think what to do if one player leaves or goes to spectDone. -
Give an option to leave the queueDone. Press spectate to leave the queue. -
Support for 3-4 teamsHardcoded for 2 teams for now. -
Add cvar to enable/disableDone.
To test enable the following cvars at will:
- g_balance_teams_queue 1
- g_balance_teams_remove 1
Edited by z411