From: Ant Zucaro Date: Sat, 9 Feb 2013 00:58:06 +0000 (-0500) Subject: Don't count kills in CTS X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=22faa8bef274f60b2f281d48f21252c23db94080;p=xonotic%2Fxonstat.git Don't count kills in CTS --- diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index b0d9051..95f83fe 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -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): """Game stats handler for all game types""" - pgstat = create_default_game_stat(session, game.game_type_cd) + game_type_cd = game.game_type_cd + + pgstat = create_default_game_stat(session, game_type_cd) # these fields should be on every pgstat record pgstat.game_id = game.game_id @@ -631,7 +633,9 @@ def create_game_stat(session, game_meta, game, server, gmap, player, events): if key == 'scoreboard-caps': pgstat.captures = int(value) if key == 'scoreboard-score': pgstat.score = int(round(float(value))) if key == 'scoreboard-deaths': pgstat.deaths = int(value) - if key == 'scoreboard-kills': pgstat.kills = int(value) + if key == 'scoreboard-kills': + if game_type_cd != 'cts': + pgstat.kills = int(value) if key == 'scoreboard-suicides': pgstat.suicides = int(value) if key == 'scoreboard-objectives': pgstat.collects = int(value) if key == 'scoreboard-captured': pgstat.captures = int(value)