]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Regain ~10 fps 287/head
authorAmadeusz Sławiński <amade@asmblr.net>
Sat, 27 Feb 2016 17:14:09 +0000 (18:14 +0100)
committerAmadeusz Sławiński <amade@asmblr.net>
Sat, 27 Feb 2016 20:02:31 +0000 (21:02 +0100)
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

index 7288f253e768207f0376705948ba8b260d1509ed..b6b5c9cd075d5bdbe51134a4e892b775ef2c1996 100644 (file)
@@ -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
        {