X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fengineinfo.qc;h=4b4911e33c7ebe41f6b0f3b1fc42f42278db39b3;hb=78f029e455509478f3756ef6c9c0936222b54bbd;hp=db376a2ce859b389541b763cbcfc1177d448e9fa;hpb=23a5f74a3f11338f69eca57558fdac9520c3ee34;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/engineinfo.qc b/qcsrc/client/hud/panel/engineinfo.qc index db376a2ce..4b4911e33 100644 --- a/qcsrc/client/hud/panel/engineinfo.qc +++ b/qcsrc/client/hud/panel/engineinfo.qc @@ -1,15 +1,12 @@ #include "engineinfo.qh" -#include -#include +#include // Engine info (#13) -void HUD_EngineInfo_Export(entity panel, int fh) +void HUD_EngineInfo_Export(int fh) { // allow saving cvars that aesthetically change the panel into hud skin files - HUD_Write_Cvar("hud_panel_engineinfo_framecounter_time"); - HUD_Write_Cvar("hud_panel_engineinfo_framecounter_decimals"); } float prevfps; @@ -45,7 +42,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; @@ -74,7 +71,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); }