]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Don't count kills in CTS
authorAnt Zucaro <azucaro@gmail.com>
Sat, 9 Feb 2013 00:58:06 +0000 (19:58 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 9 Feb 2013 00:58:06 +0000 (19:58 -0500)
xonstat/views/submission.py

index b0d90518c5b190f0a1ad69d782a61eb07ee241c5..95f83fec823e77ba81c47038f951f73b68fd7b0f 100644 (file)
@@ -600,7 +600,9 @@ def create_default_game_stat(session, game_type_cd):
 def create_game_stat(session, game_meta, game, server, gmap, player, events):\r
     """Game stats handler for all game types"""\r
 \r
-    pgstat = create_default_game_stat(session, game.game_type_cd)\r
+    game_type_cd = game.game_type_cd\r
+\r
+    pgstat = create_default_game_stat(session, game_type_cd)\r
 \r
     # these fields should be on every pgstat record\r
     pgstat.game_id       = game.game_id\r
@@ -631,7 +633,9 @@ def create_game_stat(session, game_meta, game, server, gmap, player, events):
         if key == 'scoreboard-caps': pgstat.captures = int(value)\r
         if key == 'scoreboard-score': pgstat.score = int(round(float(value)))\r
         if key == 'scoreboard-deaths': pgstat.deaths = int(value)\r
-        if key == 'scoreboard-kills': pgstat.kills = int(value)\r
+        if key == 'scoreboard-kills':\r
+            if game_type_cd != 'cts':\r
+                pgstat.kills = int(value)\r
         if key == 'scoreboard-suicides': pgstat.suicides = int(value)\r
         if key == 'scoreboard-objectives': pgstat.collects = int(value)\r
         if key == 'scoreboard-captured': pgstat.captures = int(value)\r