]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Add race support to the scoreboard.
authorAnt Zucaro <azucaro@gmail.com>
Fri, 1 Feb 2013 20:53:29 +0000 (15:53 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Fri, 1 Feb 2013 20:53:29 +0000 (15:53 -0500)
xonstat/templates/scoreboard.mako

index 3bcf31fa4ba8c1a3d3b14f81ec431fa615edbf1e..e2433056284ce0e8d113d50d3d9e3f938f84cf5c 100644 (file)
@@ -225,6 +225,20 @@ ${scoreboard_header(game_type_cd, pgstats[0])}
     </thead>
 % endif
 
     </thead>
 % endif
 
+% if game_type_cd == 'rc':
+    <thead>
+    <tr>
+      <th class="nick">Nick</th>
+      % if show_latency:
+      <th class="ping">Ping</th>
+      % endif
+      <th class="laps">Laps</th>
+      <th class="fastest">Fastest Lap</th>
+      <th class="time">Time</th>
+    </tr>
+    </thead>
+% endif
+
 </%def>
 
 ##### SCOREBOARD ROWS #####
 </%def>
 
 ##### SCOREBOARD ROWS #####
@@ -299,4 +313,10 @@ ${scoreboard_header(game_type_cd, pgstats[0])}
         <td>${pgstat.drops}</td>
 % endif
 
         <td>${pgstat.drops}</td>
 % endif
 
+% if game_type_cd == 'rc':
+        <td>${pgstat.laps}</td>
+        <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
+        <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
+% endif
+
 </%def>
 </%def>