]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Apply hud_dynamic effects to nade and frost timers too
authorterencehill <piuntn@gmail.com>
Mon, 1 May 2017 18:06:26 +0000 (20:06 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 1 May 2017 18:06:26 +0000 (20:06 +0200)
qcsrc/client/hud/hud.qc
qcsrc/client/hud/hud.qh
qcsrc/client/miscfunctions.qc
qcsrc/client/view.qc

index ee94af72705e032158b5139980e91a18429a087e..36de6b3f1622599438eda71ed03222b80ba4e2dd 100644 (file)
@@ -572,8 +572,6 @@ void HUD_Main()
 
        HUD_Configure_Frame();
 
-       Hud_Dynamic_Frame();
-
        if(scoreboard_fade_alpha == 1)
                if(autocvar__menu_alpha == 1)
                        return;
index 7ea0ce57916e51a95fda69fe15082299ece1b364..9f0f4e7bf0e9c5c1c5c77038450f71e435d98744 100644 (file)
@@ -2,6 +2,8 @@
 
 #include <common/weapons/_all.qh>
 
+void Hud_Dynamic_Frame();
+
 bool HUD_Radar_Clickable();
 void HUD_Radar_Mouse();
 
index a0d7b8789c2273ad34ed1cbe9750a2eb795e205c..27940b90c36d0276902b95f7993b7c3ce060a718 100644 (file)
@@ -392,6 +392,8 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector
        float d;
        vector ringsize, v, t;
        ringsize = radi * '1 1 0';
+       centre = HUD_Shift(centre);
+       ringsize = HUD_Scale(ringsize);
 
        float co = cos(f * 2 * M_PI);
        float si = sin(f * 2 * M_PI);
index 185fa3f2b76fe7fbc2630481fbf289306f97212a..8a70dcd610d3f9f64b4cf37c291a86f85944ee5f 100644 (file)
@@ -1355,6 +1355,8 @@ void HUD_Draw(entity this)
        if(!gametype)
                return;
 
+       Hud_Dynamic_Frame();
+
        if(!intermission)
        if (MUTATOR_CALLHOOK(HUD_Draw_overlay))
        {
@@ -1364,6 +1366,8 @@ void HUD_Draw(entity this)
        {
                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);
        }
+
+       HUD_Scale_Enable();
        if(!intermission)
        if(STAT(NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
        {
@@ -1380,6 +1384,7 @@ void HUD_Draw(entity this)
                DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
                drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
        }
+       HUD_Scale_Disable();
 
        if(autocvar_r_letterbox == 0)
                if(autocvar_viewsize < 120)