From: terencehill Date: Mon, 11 Dec 2023 22:27:10 +0000 (+0100) Subject: Send total number of rounds played to xonstats X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=cad62a12f84bf6a588521395dce11c44c231a1e0;p=xonotic%2Fxonotic-data.pk3dir.git Send total number of rounds played to xonstats --- diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 17c76461f..1ac99701f 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -369,6 +369,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status) * C: number of "unpure" cvar changes * U: UDP port number of the server * D: duration of the match + * RP: number of rounds played * L: "ladder" in which the server is participating in * P: player ID of an existing player; this also sets the owner for all following "n", "e" and "t" lines (lower case!) * Q: team number of an existing team (format: team#NN); this also sets the owner for all following "e" lines (lower case!) @@ -409,7 +410,10 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status) url_fputs(fh, sprintf("C %d\n", cvar_purechanges_count)); url_fputs(fh, sprintf("U %d\n", cvar("port"))); url_fputs(fh, sprintf("D %f\n", max(0, time - game_starttime))); - url_fputs(fh, sprintf("L %s\n", autocvar_g_playerstats_gamereport_ladder)); + if (rounds_played > 0) + url_fputs(fh, sprintf("RP %d\n", rounds_played)); + if (autocvar_g_playerstats_gamereport_ladder != "") + url_fputs(fh, sprintf("L %s\n", autocvar_g_playerstats_gamereport_ladder)); // TEAMS if(teamplay)