]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/zykure/playerstats_ladders' into samual/combined...
authorSamual Lenks <samual@xonotic.org>
Tue, 26 Nov 2013 02:23:29 +0000 (21:23 -0500)
committerSamual Lenks <samual@xonotic.org>
Tue, 26 Nov 2013 02:23:29 +0000 (21:23 -0500)
Conflicts:
qcsrc/common/playerstats.qc

1  2 
qcsrc/common/playerstats.qc
qcsrc/server/autocvars.qh
qcsrc/server/g_world.qc

index aed97691e0a4c84104feb5e791625c0107c5b0ef,e7d268798ae0c27691b07ec5dfe6ebe4b1c0873c..ac990ac9625afaf5554bfb75f09bfbcc4e20cacb
@@@ -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-<scoreboardname>: total score of that scoreboard item
 +               *   scoreboard-<scoreboardname>: end-of-game score of that scoreboard item (can differ in non-team games)
 +               *   achievement-<achievementname>: achievement counters (their "count" is usually 1 if nonzero at all)
 +               *   kills-<index>: number of kills against the indexed player
 +               *   rank <number>: rank of player
 +               *   acc-<weapon netname>-hit: total damage dealt
 +               *   acc-<weapon netname>-fired: total damage that all fired projectiles *could* have dealt
 +               *   acc-<weapon netname>-cnt-hit: amount of shots that actually hit
 +               *   acc-<weapon netname>-cnt-fired: amount of fired shots
 +               *   acc-<weapon netname>-frags: amount of frags dealt by weapon
 +               */
                case URL_READY_CANWRITE:
-                       url_fputs(fh, "V 8\n");
 +              {
 -#ifdef WATERMARK
+                       url_fputs(fh, "V 9\n");
 +                      #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);
Simple merge
Simple merge