From: FruitieX Date: Sat, 3 Jul 2010 22:03:48 +0000 (+0300) Subject: fix nasty bug that could happen with the notify panel in the first few seconds of... X-Git-Tag: xonotic-v0.1.0preview~457^2~12 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=e207874565be389b62365b7bba38e2c2c8eeae2c fix nasty bug that could happen with the notify panel in the first few seconds of a match, branch now ready for merging --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index a666571bd1..d521475e07 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2797,6 +2797,7 @@ void HUD_Notify (void) float i, j; for(j = 0; j < entries; ++j) { + s = ""; if(autocvar_hud_notify_flip) i = j; else // rather nasty hack for ordering items from the bottom up @@ -2925,8 +2926,11 @@ void HUD_Notify (void) color = '0 0 1'; } } - drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, color, panel_fg_alpha * a, DRAWFLAG_NORMAL); - drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL); + if(s != "" && a) + { + drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, color, panel_fg_alpha * a, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL); + } } // X [did action to] Y else @@ -2998,9 +3002,12 @@ void HUD_Notify (void) s = "notify_void"; color = '1 1 1'; } - drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, color, panel_fg_alpha * a, DRAWFLAG_NORMAL); - drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL); - drawcolorcodedstring(pos_victim, victim, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL); + if(s != "" && a) + { + drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, color, panel_fg_alpha * a, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL); + drawcolorcodedstring(pos_victim, victim, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL); + } } } }