]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Make valid NB games those w/ nonzero scores ONLY. Fixes #152.
authorAnt Zucaro <azucaro@gmail.com>
Sat, 6 Jun 2015 13:20:58 +0000 (09:20 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 6 Jun 2015 13:20:58 +0000 (09:20 -0400)
xonstat/views/submission.py

index da7e3bc13865cd0a48f7c599204c20034ef4954e..006a437aa0f8d479112ab2371432854788e17af6 100644 (file)
@@ -100,6 +100,10 @@ def is_blank_game(gametype, players):
 \r
     1) a match in which no player made a fastest lap AND was\r
     on the scoreboard\r
+\r
+    ... or for NB, in which not all maps have weapons\r
+\r
+    1) a match in which no player made a positive or negative score\r
     """\r
     r = re.compile(r'acc-.*-cnt-fired')\r
     flg_nonzero_score = False\r
@@ -118,6 +122,8 @@ def is_blank_game(gametype, players):
 \r
     if gametype == 'cts':\r
         return not flg_fastest_lap\r
+    elif gametype == 'nb':\r
+        return not flg_nonzero_score\r
     else:\r
         return not (flg_nonzero_score and flg_acc_events)\r
 \r