From: Des <xon@damianv.com.ar>
Date: Wed, 14 Aug 2024 12:58:18 +0000 (-0300)
Subject: Don't save race times if player doesn't want tracking, even if we have uuid2name... 
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=baa0d564ed1442765a9d3f6af0d5f0dcc1c3c872;p=xonotic%2Fxonotic-data.pk3dir.git

Don't save race times if player doesn't want tracking, even if we have uuid2name stored.
---

diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc
index a799bff1d..065bfefe9 100644
--- a/qcsrc/server/race.qc
+++ b/qcsrc/server/race.qc
@@ -405,7 +405,8 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e,
 		return;
 	}
 
-	if(uid2name(myuid) == "^1Unregistered Player")
+	if(CS_CVAR(e).cvar_cl_allow_uidtracking != 1 || CS_CVAR(e).cvar_cl_allow_uid2name != 1
+	   || uid2name(myuid) == "^1Unregistered Player")
 	{
 		if(showmessage)
 			Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_RACE_NEW_MISSING_NAME, mynetname, t);