From 036993b07e6b1ad91b83bde055fa0943cf976a76 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 15 Nov 2010 20:38:30 +0100 Subject: [PATCH] Score panel: showing the distribution display a positive difference with the + sign, it's clearer --- qcsrc/client/hud.qc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index db87ef418..2f1dbae6f 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -3595,7 +3595,7 @@ void HUD_Score(void) mySize -= '2 2 0' * panel_bg_padding; } - float score, distribution, leader; + float score, distribution; string sign; vector distribution_color; entity tm, pl, me; @@ -3703,23 +3703,27 @@ void HUD_Score(void) if(autocvar__hud_configure) score = 123; - if(distribution >= 5) { + if(distribution >= 5) distribution_color = eY; - leader = 1; - } else if(distribution >= 0) { + else if(distribution >= 0) distribution_color = '1 1 1'; - leader = 1; - } else if(distribution >= -5) + else if(distribution >= -5) distribution_color = '1 1 0'; else distribution_color = eX; - drawstring_aspect(pos + eX * 0.75 * mySize_x, ftos(distribution), eX * 0.25 * mySize_x + eY * (1/3) * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL); - if (leader) + string distribution_str; + distribution_str = ftos(distribution); + if (distribution >= 0) + { + if (distribution > 0) + distribution_str = strcat("+", distribution_str); HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + } drawfont = hud_bigfont; drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize_x + eY * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL); drawfont = hud_font; + drawstring_aspect(pos + eX * 0.75 * mySize_x, distribution_str, eX * 0.25 * mySize_x + eY * (1/3) * mySize_y, distribution_color, panel_fg_alpha, DRAWFLAG_NORMAL); } else { // teamgames float max_fragcount; max_fragcount = -99; -- 2.39.2