From: Ant Zucaro Date: Fri, 2 Nov 2012 01:24:36 +0000 (-0400) Subject: Add ping to the scoreboard. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c2834a0b05cdca1bf129be8aed590cfd6e260053;p=xonotic%2Fxonstat.git Add ping to the scoreboard. Ping is being sent now in the POST requests. Show it if it exists in the player_game_stat row. --- diff --git a/xonstat/templates/scoreboard.mako b/xonstat/templates/scoreboard.mako index 288e271..1ce98e8 100644 --- a/xonstat/templates/scoreboard.mako +++ b/xonstat/templates/scoreboard.mako @@ -14,6 +14,11 @@ ${scoreboard_header(game_type_cd, pgstats[0])} ${pgstat.nick_html_colors()|n} % endif + % if pgstat.avg_latency is not None: + + ${int(round(pgstat.avg_latency))} + + % endif ${scoreboard_row(game_type_cd, pgstat)} ${pgstat.score} @@ -28,6 +33,9 @@ ${scoreboard_header(game_type_cd, pgstats[0])} Nick + % if pgstat.avg_latency is not None: + Ping + % endif Kills Deaths Suicides @@ -40,6 +48,9 @@ ${scoreboard_header(game_type_cd, pgstats[0])} Nick + % if pgstat.avg_latency is not None: + Ping + % endif Kills Captures Pickups @@ -54,6 +65,9 @@ ${scoreboard_header(game_type_cd, pgstats[0])} Nick + % if pgstat.avg_latency is not None: + Ping + % endif Kills Score @@ -64,6 +78,9 @@ ${scoreboard_header(game_type_cd, pgstats[0])} Nick + % if pgstat.avg_latency is not None: + Ping + % endif Kills Deaths Suicides