bug: count a lineup's playing members for the over-capacity kick - #198
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The over-capacity kick in
OnPlayerConnectnever fired:GetTeamCountcounted 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.LineupCapacityUtility.IsOverCapacitycounts 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.GetTeamCountis removed from both plugins; nothing else called it..captaindouble-captain report (B3) did not reproduce:_captainsholds one captain per side, the api triggertau_match_lineup_playersdemotes 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.SixthMemberOfAPlayingLineupIsOverCapacityfails against main's counting and passes now. Both plugins build clean with--no-incremental. CSS 164/164, Swiftly 203/203.