From: Samual Lenks Date: Tue, 26 Nov 2013 02:23:29 +0000 (-0500) Subject: Merge remote-tracking branch 'origin/zykure/playerstats_ladders' into samual/combined... X-Git-Tag: xonotic-v0.8.0~139^2~1^2~107 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=85119d4a165562bcd7206c151255b8e680000367;p=xonotic%2Fxonotic-data.pk3dir.git Merge remote-tracking branch 'origin/zykure/playerstats_ladders' into samual/combined_updates Conflicts: qcsrc/common/playerstats.qc --- 85119d4a165562bcd7206c151255b8e680000367 diff --cc qcsrc/common/playerstats.qc index aed97691e,e7d268798..ac990ac96 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@@ -272,51 -232,11 +272,52 @@@ void PlayerStats_GameReport_Handler(ent switch(status) { + // ====================================== + // -- OUTGOING GAME REPORT INFORMATION -- + // ====================================== + /* SPECIFICATIONS: + * V: format version (always a fixed number) - this MUST be the first line! + * #: comment (MUST be ignored by any parser) + * R: release information on the server + * G: game type + * O: mod name (icon request) as in server browser + * M: map name + * I: match ID (see "matchid" in g_world.qc + * S: "hostname" of the server + * C: number of "unpure" cvar changes + * U: UDP port number of the server + * D: duration of the match ++ * 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!) + * n: nickname of the player (optional) + * t: team ID + * i: player index + * e: followed by an event name, a space, and the event count/score + * event names can be: + * alivetime: total playing time of the player + * avglatency: average network latency compounded throughout the match + * wins: number of games won (can only be set if matches is set) + * matches: number of matches played to the end (not aborted by map switch) + * joins: number of matches joined (always 1 unless player never played during the match) + * scoreboardvalid: set to 1 if the player was there at the end of the match + * total-: total score of that scoreboard item + * scoreboard-: end-of-game score of that scoreboard item (can differ in non-team games) + * achievement-: achievement counters (their "count" is usually 1 if nonzero at all) + * kills-: number of kills against the indexed player + * rank : rank of player + * acc--hit: total damage dealt + * acc--fired: total damage that all fired projectiles *could* have dealt + * acc--cnt-hit: amount of shots that actually hit + * acc--cnt-fired: amount of fired shots + * acc--frags: amount of frags dealt by weapon + */ case URL_READY_CANWRITE: + { - url_fputs(fh, "V 8\n"); + url_fputs(fh, "V 9\n"); -#ifdef WATERMARK + #ifdef WATERMARK url_fputs(fh, sprintf("R %s\n", WATERMARK)); -#endif + #endif url_fputs(fh, sprintf("G %s\n", GetGametype())); url_fputs(fh, sprintf("O %s\n", modname)); url_fputs(fh, sprintf("M %s\n", GetMapname())); @@@ -626,10 -642,11 +610,11 @@@ void PlayerInfo_Details( return; string uri; - uri = playerinfo_uri; // FIXME + uri = autocvar_g_playerinfo_uri; // FIXME if(uri != "" && crypto_getmyidstatus(0) > 0) { - uri = strcat(uri, "/player/", uri_escape(crypto_getmyidfp(0))); + //uri = strcat(uri, "/player/", uri_escape(crypto_getmyidfp(0))); + uri = strcat(uri, "/player/me"); print("Retrieving playerstats from URL: ", uri, "\n"); url_single_fopen(uri, FILE_APPEND, PlayerInfo_ready, world); } @@@ -647,11 -664,9 +632,9 @@@ void PlayerInfo_Details( return; string uri; - uri = playerinfo_uri; // FIXME + uri = autocvar_g_playerinfo_uri; // FIXME if(uri != "" && crypto_getmyidstatus(0) > 0) { - entity p = spawn(); - p.playerid = 0; // TODO: okay to use -1 for local player? or does local player already has an entity in MENUQC? uri = strcat(uri, "/player/", uri_escape(crypto_getmyidfp(0))); print("Retrieving playerstats from URL: ", uri, "\n"); url_single_fopen(uri, FILE_READ, PlayerInfo_ready, p);