]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2597 "Game not listed in XonStats if a player has turned off stats tracking...
authorterencehill <piuntn@gmail.com>
Wed, 5 Jan 2022 00:10:02 +0000 (01:10 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 5 Jan 2022 00:10:02 +0000 (01:10 +0100)
This commit also reverts a422dfd5 "Respect cl_allow_uidtracking on player stats reset" in warmup as it was actually replicating the misbehaviour causing #2597

qcsrc/common/playerstats.qc
qcsrc/common/replicate.qh

index e648d29538ce507d0f524b780bc941b5e4e6f09f..3d0ca1ee6d6154f731f4eff2884522d7b5091552 100644 (file)
@@ -42,8 +42,7 @@ void PlayerStats_GameReport_Reset_All()
                // usually only possible by reconnecting to the server
                strfree(it.playerstats_id);
                PlayerStats_GameReport_AddEvent(sprintf("kills-%d", it.playerid));
-               if (IS_BOT_CLIENT(it) || CS_CVAR(it).cvar_cl_allow_uidtracking)
-                       PlayerStats_GameReport_AddPlayer(it);
+               PlayerStats_GameReport_AddPlayer(it);
        });
        FOREACH(Scores, true, {
                string label = scores_label(it);
index f9cb040fa8a2542141db235d56ffbec5b4d31caa..478181029766a3aa7162c4c2bb6faa3e00225d99 100644 (file)
@@ -4,7 +4,7 @@
 #if defined(CSQC)
        float autoswitch;
        bool cvar_cl_allow_uid2name;
-       float cvar_cl_allow_uidtracking;
+       string cvar_cl_allow_uidtracking;
        bool cvar_cl_allow_uidranking;
        float cvar_cl_autoscreenshot;
        float cvar_cl_autotaunt;
@@ -85,7 +85,8 @@ REPLICATE(cvar_cl_newusekeysupported, bool, "cl_newusekeysupported");
 */
 #ifdef CSQC
 // handled specially on the server
-REPLICATE(cvar_cl_allow_uidtracking, float, "cl_allow_uidtracking");
+// FIXME change cvar_cl_allow_uidtracking type from string to float without breaking playerstats
+REPLICATE(cvar_cl_allow_uidtracking, string, "cl_allow_uidtracking");
 #endif
 
 REPLICATE(cvar_cl_weaponpriority, string, "cl_weaponpriority");