From: Mario Date: Sat, 9 Sep 2017 22:52:13 +0000 (+1000) Subject: Prototype cvar for disabling elo tracking (dysfunctional) X-Git-Tag: xonotic-v0.8.5~1355^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3023b150382d40ae1d4eca273c406b8c4a274954;p=xonotic%2Fxonotic-data.pk3dir.git Prototype cvar for disabling elo tracking (dysfunctional) --- diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index d8af62962..cc31a8cca 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -151,6 +151,9 @@ void PlayerStats_GameReport_FinalizePlayer(entity p) float latency = (CS(p).latency_sum / CS(p).latency_cnt); if(latency) { PS_GR_P_ADDVAL(p, PLAYERSTATS_AVGLATENCY, latency); } } + + if(CS(p).cvar_cl_allow_eloranking) + db_put(PS_GR_OUT_DB, sprintf("%s:_elo", p.playerstats_id), ftos(CS(p).cvar_cl_allow_eloranking)); } strunzone(p.playerstats_id); @@ -375,6 +378,10 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status) url_fputs(fh, sprintf("t %s\n", tt)); } + // elo ranking enabled + nn = db_get(PS_GR_OUT_DB, sprintf("%s:_elo", p)); + if(nn != "") { url_fputs(fh, sprintf("E %s\n", nn)); } + // output player events for(e = PS_GR_OUT_EVL; (en = db_get(PS_GR_OUT_DB, sprintf("*:%s", e))) != ""; e = en) { diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 4c3b1d221..9c1270d59 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -174,6 +174,7 @@ float default_weapon_alpha; .float cvar_cl_allow_uid2name; .float cvar_cl_allow_uidtracking; +.bool cvar_cl_allow_eloranking; .string stored_netname; string gamemode_name; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 554da5f80..e350bafb7 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -379,6 +379,8 @@ REPLICATE(autoswitch, bool, "cl_autoswitch"); REPLICATE(cvar_cl_allow_uid2name, bool, "cl_allow_uid2name"); +REPLICATE(cvar_cl_allow_eloranking, bool, "cl_allow_eloranking"); + REPLICATE(cvar_cl_autoscreenshot, int, "cl_autoscreenshot"); REPLICATE(cvar_cl_autotaunt, float, "cl_autotaunt");