]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commit
join queue: fix 2 bugs that could result in too many players on a team
authorbones_was_here <bones_was_here@xonotic.au>
Sat, 13 Jul 2024 11:18:42 +0000 (21:18 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Mon, 5 Aug 2024 16:26:26 +0000 (02:26 +1000)
commitd404645303d3817a42493268a6de8253cb7cddb2
tree3031d65c3e4781423d607a7485764cee4c538a30
parent5bf4bb1dd2ce71d8ebfbfe2683d2a401b0e07685
join queue: fix 2 bugs that could result in too many players on a team

Join(): when a client queued for red, then a blue player left the team,
then a client (re)joined blue, the client queued for red was joined too
(stacking red team). Fixed by only joining queued players in Join() when
teams are currently balanced (the unbalanced cases are handled by
TeamBalance_QueuedPlayersTagIn()).

ClientKill_Now_TeamChange(): when all queued client(s) chose specific
team(s) and the last client (which skips the queue and triggers the
joins) chose autoselect from the team selection UI, it was possible they
were assigned the same team as one of the queued clients.  Fixed by
deferring the autoselect to Join() when needed/possible.
qcsrc/server/client.qc
qcsrc/server/clientkill.qc