From d38bf65cf2ee3efe0a7cdfa62f75b6652a31bb69 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Wed, 14 Dec 2011 22:52:19 -0500 Subject: [PATCH] Properly account for the new duel game type. --- xonstat/templates/scoreboard.mako | 4 ++-- xonstat/views/submission.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xonstat/templates/scoreboard.mako b/xonstat/templates/scoreboard.mako index a7da00a..e697691 100755 --- a/xonstat/templates/scoreboard.mako +++ b/xonstat/templates/scoreboard.mako @@ -32,7 +32,7 @@ ${scoreboard_header(game_type_cd, pgstats[0])} ##### SCOREBOARD HEADER ##### <%def name="scoreboard_header(game_type_cd, pgstat)"> -% if game_type_cd == 'dm' or game_type_cd == 'tdm': +% if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel': Nick @@ -87,7 +87,7 @@ ${scoreboard_header(game_type_cd, pgstats[0])} ##### SCOREBOARD ROWS ##### <%def name="scoreboard_row(game_type_cd, pgstat)"> -% if game_type_cd == 'dm' or game_type_cd == 'tdm': +% if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel': ${pgstat.kills} ${pgstat.deaths} ${pgstat.suicides} diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index c0e5a51..8f5b5ff 100755 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -324,7 +324,8 @@ def create_player_game_stat(session=None, player=None, # all games have a score pgstat.score = 0 - if game.game_type_cd == 'dm': + if game.game_type_cd == 'dm' or game.game_type_cd == 'tdm' + or game.game_type_cd == 'duel': pgstat.kills = 0 pgstat.deaths = 0 pgstat.suicides = 0 -- 2.39.2