From: terencehill Date: Mon, 1 May 2017 18:06:26 +0000 (+0200) Subject: Apply hud_dynamic effects to nade and frost timers too X-Git-Tag: xonotic-v0.8.5~2819 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3683a17cc01412841b9cece23434d3aaaf95febe;p=xonotic%2Fxonotic-data.pk3dir.git Apply hud_dynamic effects to nade and frost timers too --- diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index ee94af727..36de6b3f1 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -572,8 +572,6 @@ void HUD_Main() HUD_Configure_Frame(); - Hud_Dynamic_Frame(); - if(scoreboard_fade_alpha == 1) if(autocvar__menu_alpha == 1) return; diff --git a/qcsrc/client/hud/hud.qh b/qcsrc/client/hud/hud.qh index 7ea0ce579..9f0f4e7bf 100644 --- a/qcsrc/client/hud/hud.qh +++ b/qcsrc/client/hud/hud.qh @@ -2,6 +2,8 @@ #include +void Hud_Dynamic_Frame(); + bool HUD_Radar_Clickable(); void HUD_Radar_Mouse(); diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index a0d7b8789..27940b90c 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -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); diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 185fa3f2b..8a70dcd61 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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)