From: Rudolf Polzer Date: Mon, 16 Jan 2012 19:39:08 +0000 (+0100) Subject: also send game duration X-Git-Tag: xonotic-v0.6.0~153^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f8c8bc2cd94c416143ddb80e16cd9e49d4598505;p=xonotic%2Fxonotic-data.pk3dir.git also send game duration --- diff --git a/qcsrc/server/playerstats.qc b/qcsrc/server/playerstats.qc index 672b031c1..2d0487671 100644 --- a/qcsrc/server/playerstats.qc +++ b/qcsrc/server/playerstats.qc @@ -184,6 +184,7 @@ void PlayerStats_TeamScore(float t, string event_id, float value) // TODO: doesn S: "hostname" of the server C: number of "unpure" cvar changes U: UDP port number of the server + D: duration of the match P: player ID of an existing player; this also sets the owner for all following "n", "e" and "t" lines (lower case!) n: nickname of the player (optional) t: team ID @@ -226,6 +227,7 @@ void PlayerStats_ready(entity fh, entity pass, float status) url_fputs(fh, sprintf("S %s\n", cvar_string("hostname"))); 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))); for(p = playerstats_last; (pn = db_get(playerstats_db, sprintf("%s:*", p))) != ""; p = pn) { url_fputs(fh, sprintf("P %s\n", p));