]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't allow clearing ELO score; it fixes ELO value getting set to 0 on player join
authorterencehill <piuntn@gmail.com>
Sat, 6 May 2017 22:28:48 +0000 (00:28 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 6 May 2017 22:28:48 +0000 (00:28 +0200)
qcsrc/server/scores.qc

index c0ebfc54a6335da48be50c0798035412cd1cf797..09f230dd6bf4bcfa29a50a44171d0a7688f75e06 100644 (file)
@@ -266,7 +266,8 @@ float PlayerScore_Clear(entity player)
                if(sk.(scores(it)) != 0)
                        if(scores_label(it) != "")
                                sk.SendFlags |= (2 ** (i % 16));
-               sk.(scores(it)) = 0;
+               if(i != SP_ELO.m_id)
+                       sk.(scores(it)) = 0;
        });
 
        return 1;
@@ -283,7 +284,8 @@ void Score_ClearAll()
                        if(sk.(scores(it)) != 0)
                                if(scores_label(it) != "")
                                        sk.SendFlags |= (2 ** (i % 16));
-                       sk.(scores(it)) = 0;
+                       if(i != SP_ELO.m_id)
+                               sk.(scores(it)) = 0;
                });
        });
        for(t = 0; t < 16; ++t)