]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/racetimer.qc
Merge branch 'terencehill/hud_updates' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / racetimer.qc
index ca45f352fba6cf614b01bbf6e8df4683e0a0fb9d..02b631b3000932cbd2ee69f812e5cc8446f2aed1 100644 (file)
@@ -1,8 +1,13 @@
-/** Race timer (#8) */
+#include "racetimer.qh"
+
+#include <common/mapinfo.qh>
+
+// Race timer (#6)
 
 // return the string of the onscreen race timer
 string MakeRaceString(int cp, float mytime, float theirtime, float lapdelta, string theirname)
 {
+       TC(int, cp);
        string col;
        string timestr;
        string cpname;
@@ -78,13 +83,17 @@ void HUD_RaceTimer ()
                if(spectatee_status == -1) return;
        }
 
-       HUD_Panel_UpdateCvars();
+       HUD_Panel_LoadCvars();
 
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
 
-       HUD_Panel_DrawBg(1);
+       if (autocvar_hud_panel_racetimer_dynamichud)
+               HUD_Scale_Enable();
+       else
+               HUD_Scale_Disable();
+       HUD_Panel_DrawBg();
        if(panel_bg_padding)
        {
                pos += '1 1 0' * panel_bg_padding;