From: FruitieX Date: Thu, 21 Oct 2010 18:45:11 +0000 (+0300) Subject: add a "* hud_fade_alpha" into showspeed and showacceleration so they fade out nicely... X-Git-Tag: xonotic-v0.1.0preview~267^2~3 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=8f10af78993aa0e614a8677c2eaf13d08f82c9dd add a "* hud_fade_alpha" into showspeed and showacceleration so they fade out nicely when opening the scoreboard/menu --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 540a0269f3..e862fe10a4 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4799,11 +4799,11 @@ void HUD_ShowSpeed(void) pos = (vid_conheight - numsize_y) * cvar("cl_showspeed_position"); drawfont = hud_bigfont; - drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL); + drawstringcenter(eX + pos * eY, speed, numsize, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL); if (cvar("cl_showspeed_z") == 1) { zspeed = strcat(ftos(fabs(floor( pmove_vel_z * conversion_factor + 0.5 ))), unit); - drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL); + drawstringcenter(eX + pos * eY + numsize_y * eY, zspeed, numsize * 0.5, '1 1 1', autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL); } drawfont = hud_font; @@ -4849,9 +4849,9 @@ void HUD_ShowAcceleration(void) } if (acceleration > 0) - HUD_Panel_DrawProgressBar(pos, 0, acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawProgressBar(pos, 0, acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL); else - HUD_Panel_DrawProgressBar(pos + acceleration * scale * '40 0 0', 0, -acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawProgressBar(pos + acceleration * scale * '40 0 0', 0, -acceleration * scale * '40 0 0' + sz * eY, rgb, alpha * autocvar_hud_panel_fg_alpha * hud_fade_alpha, DRAWFLAG_NORMAL); } void HUD_Reset (void)