From: terencehill Date: Wed, 5 Jan 2022 00:10:02 +0000 (+0100) Subject: Fix #2597 "Game not listed in XonStats if a player has turned off stats tracking... X-Git-Tag: xonotic-v0.8.5~244 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e485bcaeede5f929c1ceefa26a51da840c2f1a1e;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2597 "Game not listed in XonStats if a player has turned off stats tracking" by handling cl_allow_uidtracking as string rather than float in the client (reverting change of commit 2d8c8577). This commit also reverts a422dfd5 "Respect cl_allow_uidtracking on player stats reset" in warmup as it was actually replicating the misbehaviour causing #2597 --- diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index e648d2953..3d0ca1ee6 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -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); diff --git a/qcsrc/common/replicate.qh b/qcsrc/common/replicate.qh index f9cb040fa..478181029 100644 --- a/qcsrc/common/replicate.qh +++ b/qcsrc/common/replicate.qh @@ -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");