From: Amadeusz Sławiński Date: Sat, 27 Feb 2016 17:14:09 +0000 (+0100) Subject: Regain ~10 fps X-Git-Tag: xonotic-v0.8.2~1172^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F287%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Regain ~10 fps commit 5a935f5c767deb9151a2e7b4f2bc190766190ab7 moved drawfill() after if() as far as I can tell it's unnecessary and putting it back into if-else restores 10 fps in my tests --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 7288f253e..b6b5c9cd0 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1318,18 +1318,14 @@ void HUD_Crosshair() void HUD_Draw() { - vector rgb = '0 0 0'; - float a = 1; if (MUTATOR_CALLHOOK(HUD_Draw_overlay)) { - rgb = MUTATOR_ARGV(0, vector); - a = MUTATOR_ARGV(0, float); + drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, MUTATOR_ARGV(0, vector), autocvar_hud_colorflash_alpha * MUTATOR_ARGV(0, float), DRAWFLAG_ADDITIVE); } else if(STAT(FROZEN)) { - rgb = ((STAT(REVIVE_PROGRESS)) ? ('0.25 0.90 1' + ('1 0 0' * STAT(REVIVE_PROGRESS)) + ('0 1 1' * STAT(REVIVE_PROGRESS) * -1)) : '0.25 0.90 1'); + drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, ((STAT(REVIVE_PROGRESS)) ? ('0.25 0.90 1' + ('1 0 0' * STAT(REVIVE_PROGRESS)) + ('0 1 1' * STAT(REVIVE_PROGRESS) * -1)) : '0.25 0.90 1'), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE); } - drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, rgb, autocvar_hud_colorflash_alpha * a, DRAWFLAG_ADDITIVE); if(!intermission) if(STAT(NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death {