From 44a0b5a00ddb647ac57821b77fdab1b9c7363981 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Sun, 31 Mar 2024 21:42:32 -0700 Subject: [PATCH] Change participation criteria to count rounds --- src/k_serverstats.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/k_serverstats.c b/src/k_serverstats.c index 7ac610b0d..30b8fb640 100644 --- a/src/k_serverstats.c +++ b/src/k_serverstats.c @@ -282,7 +282,24 @@ void SV_BumpMatchStats(void) serverplayer_t *stat = SV_GetStatsByPlayerIndex(i); - if (!(players[i].pflags & PF_NOCONTEST)) + // It should never be advantageous to idle, only count rounds where the player accomplishes something. + // If you NO CONTESTed, assume no participation... + boolean participated = !(players[i].pflags & PF_NOCONTEST); + + if (gametyperules & GTR_CIRCUIT) + { + // ...unless you completed at least one lap... + if (players[i].laps > 1) + participated = true; + } + else if (gametyperules & GTR_BUMPERS) + { + // ...or scored at least 2 points. + if (players[i].roundscore > 1) + participated = true; + } + + if (participated) stat->finishedrounds++; } } \ No newline at end of file