From: Ant Zucaro Date: Thu, 15 Dec 2011 03:52:19 +0000 (-0500) Subject: Properly account for the new duel game type. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d38bf65cf2ee3efe0a7cdfa62f75b6652a31bb69;p=xonotic%2Fxonstat.git Properly account for the new duel game type. --- 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