Back to TPG

TPG.Stats.OnRoundEnd

S🏷️ Stats

Part of TPG namespace

TPG.Stats.OnRoundEnd(winningTeam)
View on GitHub|gamemode/systems/sv_stats.lua:441-463
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Apply the round result to everyone on a playing team, then save. Elo, not a flat win bonus. The result is predicted from the two teams' average ratings first, and each player only moves by how far the real result was from that prediction: beating a stacked team is worth a lot, beating a team you were always going to beat is worth almost nothing, and losing a match you were expected to lose barely costs you. See the comment above ELO_K for why that matters more than it looks. Spectators and the unassigned are skipped, and each affected player gets rounds + 1 (plus wins + 1 if they won) regardless of the rating move. Called from TPG.Rounds.EndRound.

Parameters

NameTypeDescription
winningTeamnumberTEAM_GREEN or TEAM_RED.

Returns

No return values documented.

Examples

No examples available.

Used In

No usages found in the codebase.