]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
Merge branch 'master' of git://git.xonotic.org/xonotic/xonotic-data.pk3dir
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index e279ca435b6f2da24d1b24c8b8dd47d39565eb99..16d413bd063a7552f904da7e565318f6a71d2029 100644 (file)
@@ -21,9 +21,13 @@ void WeaponStats_ready(entity fh, entity pass, float status)
        switch(status)
        {
                case URL_READY_CANWRITE:
+                       // url_fopen returned, we can write
                        prefix = strcat(autocvar_hostname, "\t", GetGametype(), "_", GetMapname(), "\t");
                        url_fputs(fh, "#begin statsfile\n");
                        url_fputs(fh, strcat("#date ", strftime(TRUE, "%a %b %e %H:%M:%S %Z %Y"), "\n"));
+#ifdef WATERMARK
+                       url_fputs(fh, strcat("#version ", WATERMARK(), "\n"));
+#endif
                        url_fputs(fh, strcat("#config ", ftos(crc16(FALSE, cvar_purechanges)), "\n"));
                        url_fputs(fh, strcat("#cvar_purechanges ", ftos(cvar_purechanges_count), "\n"));
                        n = tokenizebyseparator(cvar_purechanges, "\n");
@@ -47,6 +51,8 @@ void WeaponStats_ready(entity fh, entity pass, float status)
                        weaponstats_buffer = -1;
                        break;
                case URL_READY_CANREAD:
+                       // url_fclose is processing, we got a response for writing the data
+                       // this must come from HTTP
                        print("Got response from weapon stats server:\n");
                        while((s = url_fgets(fh)))
                                print("  ", s, "\n");
@@ -54,6 +60,7 @@ void WeaponStats_ready(entity fh, entity pass, float status)
                        url_fclose(fh, WeaponStats_ready, world);
                        break;
                case URL_READY_CLOSED:
+                       // url_fclose has finished
                        print("Weapon stats written\n");
                        break;
                case URL_READY_ERROR: