]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/engineinfo.qc
strafehud: count everything as slick if the friction cvar is set to zero (slick detector)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / engineinfo.qc
index c8b7203eee9cfc240c09ac0556c3709aeaea7b32..41fdb3a5bbf3985c0a8401287d3dc3fe2a5d6fec 100644 (file)
@@ -1,7 +1,15 @@
 #include "engineinfo.qh"
 
+#include <client/autocvars.qh>
+#include <client/draw.qh>
+
 // Engine info (#13)
 
+void HUD_EngineInfo_Export(int fh)
+{
+       // allow saving cvars that aesthetically change the panel into hud skin files
+}
+
 float prevfps;
 float prevfps_time;
 int framecounter;
@@ -35,7 +43,7 @@ void HUD_EngineInfo()
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
-       float currentTime = gettime(GETTIME_REALTIME);
+       float currentTime = gettime(GETTIME_FRAMESTART);
        if(autocvar_hud_panel_engineinfo_framecounter_exponentialmovingaverage)
        {
                float currentframetime = currentTime - prevfps_time;
@@ -64,7 +72,6 @@ void HUD_EngineInfo()
                }
        }
 
-       vector color;
-       color = HUD_Get_Num_Color (prevfps, 100);
+       vector color = HUD_Get_Num_Color(prevfps, 100, true);
        drawstring_aspect(pos, sprintf(_("FPS: %.*f"), autocvar_hud_panel_engineinfo_framecounter_decimals, prevfps), mySize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
 }