From c248dd9fecfe27a34f8d170a0da18775421b2bbb Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Mon, 6 Sep 2010 02:47:56 +0300 Subject: [PATCH] Oops, do it properly --- data/qcsrc/client/sbar.qc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index a8ba3833..bea2ae58 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -29,7 +29,6 @@ float ps_primary, ps_secondary; float ts_primary, ts_secondary; vector color; -float SCOREBOARD_OFFSET = cvar("sbar_scoreboard_offset"); void CSQC_kh_hudreset(); void CSQC_kh_hud(); @@ -1384,7 +1383,7 @@ void Sbar_DrawScoreboard() sbwidth = Sbar_GetWidth(6.5 * sbar_fontsize_y); xmin = 0.5 * (vid_conwidth - sbwidth); - ymin = SCOREBOARD_OFFSET; + ymin = cvar("sbar_scoreboard_offset"); xmax = vid_conwidth - xmin; ymax = vid_conheight - 0.2*vid_conheight; @@ -2422,7 +2421,7 @@ void Sbar_DrawAccuracyStats() drawfont = sbar_bigfont; pos_x = 0; - pos_y = SCOREBOARD_OFFSET; + pos_y = cvar("sbar_scoreboard_offset"); pos_z = 0; drawstringcenter(pos, "Weapon Accuracy", 2 * sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); @@ -2448,10 +2447,10 @@ void Sbar_DrawAccuracyStats() return; } - float top_border_hitscan = SCOREBOARD_OFFSET + 55; // position where the hitscan row starts: pixels down the screen + float top_border_hitscan = cvar("sbar_scoreboard_offset") + 55; // position where the hitscan row starts: pixels down the screen Sbar_DrawAccuracyStats_Description_Hitscan('1 0 0' * col_margin + '0 1 0' * top_border_hitscan); - float top_border_splash = SCOREBOARD_OFFSET + 175; // position where the splash row starts: pixels down the screen + float top_border_splash = cvar("sbar_scoreboard_offset") + 175; // position where the splash row starts: pixels down the screen Sbar_DrawAccuracyStats_Description_Splash('1 0 0' * col_margin + '0 1 0' * top_border_splash); for(i = WEP_FIRST; i <= WEP_LAST; ++i) -- 2.39.2