From: Ant Zucaro Date: Sat, 26 Jan 2013 22:38:02 +0000 (-0500) Subject: fastest_cap -> fastest X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=604aca99414f31bb3eccb85faa1fddf6b2b361a0;p=xonotic%2Fxonstat.git fastest_cap -> fastest --- diff --git a/xonstat/templates/game_info.mako b/xonstat/templates/game_info.mako index b067cfe..2c5f1b3 100644 --- a/xonstat/templates/game_info.mako +++ b/xonstat/templates/game_info.mako @@ -77,7 +77,7 @@ Game Information ${pgs.nick_html_colors()|n} % endif - ${round(float(pgs.fastest_cap.seconds) + (pgs.fastest_cap.microseconds/1000000.0), 2)} + ${round(float(pgs.fastest.seconds) + (pgs.fastest.microseconds/1000000.0), 2)} % endfor diff --git a/xonstat/views/game.py b/xonstat/views/game.py index 11be028..4c4800d 100644 --- a/xonstat/views/game.py +++ b/xonstat/views/game.py @@ -84,10 +84,10 @@ def _game_info_data(request): captimes = [] if game.game_type_cd == 'ctf': for pgstat in pgstats: - if pgstat.fastest_cap is not None: + if pgstat.fastest is not None: captimes.append(pgstat) - captimes = sorted(captimes, key=lambda x:x.fastest_cap) + captimes = sorted(captimes, key=lambda x:x.fastest) pwstats = {} for (pwstat, pgstat, weapon) in DBSession.query(PlayerWeaponStat, PlayerGameStat, Weapon).\ diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index 78a85a8..9e1a6a9 100644 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -633,10 +633,10 @@ def create_game_stat(session, game_meta, game, server, gmap, player, events): if key == 'avglatency': pgstat.avg_latency = float(value) if key == 'scoreboard-captime': - pgstat.fastest_cap = datetime.timedelta(seconds=float(value)/100) + pgstat.fastest = datetime.timedelta(seconds=float(value)/100) if game.game_type_cd == 'ctf': update_fastest_cap(session, player.player_id, game.game_id, - gmap.map_id, pgstat.fastest_cap) + gmap.map_id, pgstat.fastest) # there is no "winning team" field, so we have to derive it if wins and pgstat.team is not None and game.winner is None: