From 337be31755891b541def881c34fbf8fc49473184 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Amadeusz=20S=C5=82awi=C5=84ski?= Date: Sat, 27 Feb 2016 18:14:09 +0100 Subject: [PATCH] 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 --- qcsrc/client/view.qc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 { -- 2.39.2