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()));
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);
}
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);