From: Ant Zucaro Date: Sat, 6 Jun 2015 13:20:58 +0000 (-0400) Subject: Make valid NB games those w/ nonzero scores ONLY. Fixes #152. X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=8e6c25d2079cd5155a86b723ff16f0ed3e2346e4;p=xonotic%2Fxonstat.git Make valid NB games those w/ nonzero scores ONLY. Fixes #152. --- diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index da7e3bc..006a437 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -100,6 +100,10 @@ def is_blank_game(gametype, players): 1) a match in which no player made a fastest lap AND was on the scoreboard + + ... or for NB, in which not all maps have weapons + + 1) a match in which no player made a positive or negative score """ r = re.compile(r'acc-.*-cnt-fired') flg_nonzero_score = False @@ -118,6 +122,8 @@ def is_blank_game(gametype, players): if gametype == 'cts': return not flg_fastest_lap + elif gametype == 'nb': + return not flg_nonzero_score else: return not (flg_nonzero_score and flg_acc_events)