From 66685d1e5cdd5b7fb51a938bc4f326be85faa1f8 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 29 Apr 2011 20:30:44 +0200 Subject: [PATCH] Small cleanup --- qcsrc/client/hud.qc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index fd6ead540..c70003153 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2595,6 +2595,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count) score_color = '1 1 1'; const float name_size = mySize_x*0.75; + const float spacing_size = mySize_x*0.04; const float highlight_alpha = 0.2; float i, me_printed, first_pl; string s; @@ -2639,7 +2640,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count) score_color = GetTeamRGB(ColorByTeam(mod(i + 2, team_count))) * 0.8; s = textShortenToWidth(s, name_size, fontsize, stringwidth_colors); drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, TRUE, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); - drawstring(pos + eX * mySize_x*0.79, ftos(score), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL); + drawstring(pos + eX * (name_size + spacing_size), ftos(score), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL); pos_y += height; } return; @@ -2693,7 +2694,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count) score_color = GetTeamRGB(pl.team) * 0.8; s = textShortenToWidth(GetPlayerName(pl.sv_entnum), name_size, fontsize, stringwidth_colors); drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, TRUE, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); - drawstring(pos + eX * mySize_x*0.79, ftos(pl.(scores[ps_primary])), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL); + drawstring(pos + eX * (name_size + spacing_size), ftos(pl.(scores[ps_primary])), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL); pos_y += height; } } -- 2.39.2