Part of TPG namespace
TPG.PlayerTeams.ScrambleAll()Description
Rebuild both teams from scratch, balanced by rating AND objective play. Two things have to come out even, not one. Rating splits the players who win fights; it does NOT split the players who stand on points, draft purely on rating often enough and one side ends up with every capper on the server while the scoreboard says the teams are even. So the pool is split into cappers and everyone else (by lifetime captures+flags per round, systems/sv_stats.lua) and each bucket is drafted separately, which forces the objective players to alternate. Within a bucket the next-best player goes to whichever team is currently weaker by total rating, with team sizes never allowed to differ by more than one. That balances totals better than a fixed snake pattern. Ratings are jittered by TPG.Config.scrambleJitter first. Without it the same roster produces the same two teams every single scramble, which is exactly the "we keep playing the same match" complaint; the jitter is small enough that it only ever reorders players who were close anyway. Spectators are left alone, they chose to watch. Anyone actually moved has their duplicator cooldown cleared and, under the per-player economy, any active purchase refunded (the vehicle is removed as part of that refund) so the scramble costs them nothing.
Parameters
No parameters.
Returns
No return values documented.
Examples
No examples available.
Used In
No usages found in the codebase.