]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Properly account for the new duel game type.
authorAnt Zucaro <azucaro@gmail.com>
Thu, 15 Dec 2011 03:52:19 +0000 (22:52 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Thu, 15 Dec 2011 03:52:19 +0000 (22:52 -0500)
xonstat/templates/scoreboard.mako
xonstat/views/submission.py

index a7da00a7f9b99a118219576a4a31fe8ac21898a5..e697691d3652df878f20b0c4507203ecc7b219eb 100755 (executable)
@@ -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':
     <thead>
                <tr>
                        <th class="nick">Nick</th>
@@ -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':
         <td>${pgstat.kills}</td>
         <td>${pgstat.deaths}</td>
         <td>${pgstat.suicides}</td>
index c0e5a5130032c5590f25323cbefddd1c9082380b..8f5b5ff19e9c6192719ca80e08c7a2b2648ad77f 100755 (executable)
@@ -324,7 +324,8 @@ def create_player_game_stat(session=None, player=None,
     # all games have a score\r
     pgstat.score = 0\r
 \r
-    if game.game_type_cd == 'dm':\r
+    if game.game_type_cd == 'dm' or game.game_type_cd == 'tdm' \r
+        or game.game_type_cd == 'duel':\r
         pgstat.kills = 0\r
         pgstat.deaths = 0\r
         pgstat.suicides = 0\r