From 3396e5b7fe0045e4e6d8984235535a2963e5b998 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Wed, 23 Mar 2011 18:54:55 +0200 Subject: [PATCH] Fix HUD blood splash being drawn at incorrect position / size. It was using the reticle positioning, which got filtered in a recent change. --- qcsrc/client/View.qc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 5d7f1ed56..81c0085a4 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -381,6 +381,7 @@ void CSQC_UpdateView(float w, float h) vid_height = vf_size_y; vector reticle_pos, reticle_size; + vector huddamage_pos, huddamage_size; WaypointSprite_Load(); @@ -729,6 +730,11 @@ void CSQC_UpdateView(float w, float h) if(autocvar_hud_damage) { + huddamage_size_x = max(vid_conwidth, vid_conheight); + huddamage_size_y = max(vid_conwidth, vid_conheight); + huddamage_pos_x = (vid_conwidth - huddamage_size_x) / 2; + huddamage_pos_y = (vid_conheight - huddamage_size_y) / 2; + float myhealth_flash_temp; myhealth = getstati(STAT_HEALTH); @@ -785,7 +791,7 @@ void CSQC_UpdateView(float w, float h) drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, autocvar_hud_damage_gentle_alpha_multiplier * bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL); } else - drawpic(reticle_pos, "gfx/blood", reticle_size, stov(autocvar_hud_damage_color), bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL); + drawpic(huddamage_pos, "gfx/blood", huddamage_size, stov(autocvar_hud_damage_color), bound(0, myhealth_flash_temp, 1) * autocvar_hud_damage, DRAWFLAG_NORMAL); } // Draw the mouse cursor -- 2.39.2