]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Prototype cvar for disabling elo tracking (dysfunctional)
authorMario <mario@smbclan.net>
Sat, 9 Sep 2017 22:52:13 +0000 (08:52 +1000)
committerMario <mario@smbclan.net>
Sat, 9 Sep 2017 22:52:13 +0000 (08:52 +1000)
qcsrc/common/playerstats.qc
qcsrc/server/defs.qh
qcsrc/server/miscfunctions.qc

index d8af629624b5e8ea10c22f7cc446681fb8346362..cc31a8cca83ec5e06f51f9b6d9fdc97a0a904272 100644 (file)
@@ -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)
                                {
index 4c3b1d221ea4ae73be7f0ff7cc7b7ed5d7b9000f..9c1270d597085a4388798d93d7bf11bd1d28629b 100644 (file)
@@ -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;
index 554da5f804bbaa2b35a633053b5c3a9c1bd55fa3..e350bafb707021bbcf5d25e32344e9908b1eafdf 100644 (file)
@@ -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");