Skip to content

bug: count a lineup's playing members for the over-capacity kick - #198

Merged
lukepolo merged 1 commit into
mainfrom
bug/captain-and-capacity
Sep 29, 2026
Merged

lukepolo merged 1 commit into
mainfrom
bug/captain-and-capacity

Conversation

@lukepolo

Copy link
Copy Markdown
Contributor

The over-capacity kick in OnPlayerConnect never fired: GetTeamCount counted teams with anyone on them (0 or 1), not players. This makes it count a lineup's playing members, so a sixth member of a full lineup is refused.

  • The new shared LineupCapacityUtility.IsOverCapacity counts the joiner's connected lineup-mates on T or CT and never counts the joiner. It counts by lineup, not by team side, because through a halftime swap the other lineup still stands on the joiner's placement side.
  • It only applies to lineup members headed for T or CT. Casters, admins and coaches are never counted or kicked.
  • The check now runs before the disconnect timer and the roster resume, and the kicked player's disconnect is skipped. So the kick can neither resume a paused match on their account nor file an abandon for them.
  • GetTeamCount is removed from both plugins; nothing else called it.
  • The .captain double-captain report (B3) did not reproduce: _captains holds one captain per side, the api trigger tau_match_lineup_players demotes the rest of the lineup on every claim, and live matches get fresh match data. The only overlap is a window of a few seconds before that refresh arrives.

Tests: new LineupCapacityTests. SixthMemberOfAPlayingLineupIsOverCapacity fails against main's counting and passes now. Both plugins build clean with --no-incremental. CSS 164/164, Swiftly 203/203.

GetTeamCount counted team entities with anyone on them, so it returned 0
or 1 and the sixth member of a full lineup was never kicked. The kick now
counts the joiner's connected lineup-mates on T or CT, excluding the
joiner, and only applies to a lineup member headed for T or CT.

It runs before the disconnect timer and the roster resume, and the kicked
player's disconnect is skipped, so the kick neither resumes a paused match
on their account nor starts an abandon timer for them.
@lukepolo
lukepolo merged commit 203d455 into main Sep 29, 2026
3 checks passed
@lukepolo
lukepolo deleted the bug/captain-and-capacity branch September 29, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant