X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fengineinfo.qc;h=4b4911e33c7ebe41f6b0f3b1fc42f42278db39b3;hb=78f029e455509478f3756ef6c9c0936222b54bbd;hp=908aa1defe7c68e76df489e0238fbaab3a62bf11;hpb=b166d47cbd29df04bc1afb5eb848016421c44e5f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/engineinfo.qc b/qcsrc/client/hud/panel/engineinfo.qc index 908aa1def..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(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); }