From: terencehill <piuntn@gmail.com>
Date: Thu, 6 Jan 2022 20:54:48 +0000 (+0100)
Subject: Fully port cvar_cl_allow_uidtracking handling to REPLICATE (now possible because... 
X-Git-Tag: xonotic-v0.8.5~204^2~11
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1c568ffe133255f60533b18033b11dc6f8b7c2f5;p=xonotic%2Fxonotic-data.pk3dir.git

Fully port cvar_cl_allow_uidtracking handling to REPLICATE (now possible because cvar_cl_allow_uidtracking is an int)
---

diff --git a/qcsrc/common/replicate.qh b/qcsrc/common/replicate.qh
index cf04d778d6..a8818718b1 100644
--- a/qcsrc/common/replicate.qh
+++ b/qcsrc/common/replicate.qh
@@ -34,6 +34,7 @@ REPLICATE_FIELD(string, cvar_g_xonoticversion);
 REPLICATE(cvar_cl_autoswitch, bool, "cl_autoswitch");
 REPLICATE(cvar_cl_allow_uid2name, int, "cl_allow_uid2name");
 REPLICATE(cvar_cl_allow_uidranking, bool, "cl_allow_uidranking");
+REPLICATE(cvar_cl_allow_uidtracking, int, "cl_allow_uidtracking");
 REPLICATE(cvar_cl_autoscreenshot, int, "cl_autoscreenshot");
 REPLICATE(cvar_cl_autotaunt, float, "cl_autotaunt");
 REPLICATE(cvar_cl_clippedspectating, bool, "cl_clippedspectating");
@@ -55,10 +56,6 @@ REPLICATE(cvar_cl_weapon_switch_fallback_to_impulse, bool, "cl_weapon_switch_fal
 float cvar_cl_newusekeysupported;
 REPLICATE(cvar_cl_newusekeysupported, bool, "cl_newusekeysupported");
 */
-// cvar_cl_allow_uidtracking is handled specially on the server
-#ifdef CSQC
-REPLICATE(cvar_cl_allow_uidtracking, int, "cl_allow_uidtracking");
-#endif
 
 REPLICATE(cvar_cl_weaponpriority, string, "cl_weaponpriority");
 
diff --git a/qcsrc/server/command/getreplies.qc b/qcsrc/server/command/getreplies.qc
index 3beabbc419..c6e967de31 100644
--- a/qcsrc/server/command/getreplies.qc
+++ b/qcsrc/server/command/getreplies.qc
@@ -413,8 +413,6 @@ void GetCvars(entity this, entity store, int f)
 	GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[8], "cl_weaponpriority8", W_FixWeaponOrder_AllowIncomplete);
 	GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[9], "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
 
-	GetCvars_handleFloat(this, store, s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking");
-
 	// fixup of switchweapon (needed for LMS or when spectating is disabled, as PutClientInServer comes too early)
 	if (f > 0)
 	{