From 5aa94b269c56dff9c5656e57190a778f79f1a4f8 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 29 Aug 2019 14:56:38 +1000 Subject: [PATCH] Add cl_allow_uidranking to the Profile menu --- qcsrc/client/defs.qh | 2 ++ qcsrc/menu/xonotic/dialog_multiplayer_profile.qc | 7 ++++++- xonotic-client.cfg | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/defs.qh b/qcsrc/client/defs.qh index 7720f071b..7d111f174 100644 --- a/qcsrc/client/defs.qh +++ b/qcsrc/client/defs.qh @@ -111,6 +111,7 @@ vector w_org, w_backoff; float autoswitch; bool cvar_cl_allow_uid2name; +bool cvar_cl_allow_uidranking; float cvar_cl_autoscreenshot; float cvar_cl_autotaunt; float cvar_cl_clippedspectating; @@ -129,6 +130,7 @@ bool cvar_cl_weapon_switch_fallback_to_impulse; REPLICATE(autoswitch, bool, "cl_autoswitch"); REPLICATE(cvar_cl_allow_uid2name, bool, "cl_allow_uid2name"); +REPLICATE(cvar_cl_allow_uidranking, bool, "cl_allow_uidranking"); REPLICATE(cvar_cl_autoscreenshot, int, "cl_autoscreenshot"); REPLICATE(cvar_cl_autotaunt, float, "cl_autotaunt"); REPLICATE(cvar_cl_clippedspectating, bool, "cl_clippedspectating"); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc index f87e0dbbe..4405d98de 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc @@ -131,7 +131,12 @@ void XonoticProfileTab_fill(entity me) me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, "cl_allow_uid2name", _("Allow player statistics to use your nickname"))); e.sendCvars = true; setDependent(e, "cl_allow_uidtracking", 1, 1); - me.gotoRC(me, 4, 3.1); // TOP RIGHT + me.TR(me); + me.TDempty(me, 0.25); + me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, "cl_allow_uidranking", _("Allow player statistics to rank you in leaderboards"))); + e.sendCvars = true; + setDependent(e, "cl_allow_uidtracking", 1, 1); + me.gotoRC(me, 4.5, 3.1); // TOP RIGHT //me.gotoRC(me, 12.5, 3.1); // BOTTOM RIGHT //me.gotoRC(me, 12.5, 0); // BOTTOM LEFT me.TDempty(me, 0.25); diff --git a/xonotic-client.cfg b/xonotic-client.cfg index 68ee07917..4f6a006ef 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -810,7 +810,6 @@ set cl_db_saveasdump 0 "write client.db in dump format (loads slower, easier to seta cl_allow_uid2name -1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid2name (allows showing your name in race rankings for instance)" seta cl_allow_uidtracking 1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid tracking (allows associating your data with your player ID)" seta cl_allow_uidranking 1 "0 = disable, 1 = enable uid ranking (allows statistics like elo to rank you in leaderboards)" -// FIXME set to -1 before release, once we have a dialog for this! // polygonoffset for submodel SUCKS SUCKS SUCKS (only a hack for quake1, we don't need that) r_polygonoffset_submodel_offset 0 -- 2.39.2