X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonstat.git;a=blobdiff_plain;f=xonstat%2Fviews%2Fsubmission.py;h=95f83fec823e77ba81c47038f951f73b68fd7b0f;hp=b0d90518c5b190f0a1ad69d782a61eb07ee241c5;hb=22faa8bef274f60b2f281d48f21252c23db94080;hpb=9a2bd083a5df36a119e99c397e603d4f6610f575 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)