]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Oops, do it properly
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 5 Sep 2010 23:47:56 +0000 (02:47 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 5 Sep 2010 23:47:56 +0000 (02:47 +0300)
data/qcsrc/client/sbar.qc

index a8ba383336698978a9daaf9efd32e96a518bf2cd..bea2ae5846e1343be9d42775262098ee3b20a663 100644 (file)
@@ -29,7 +29,6 @@ float ps_primary, ps_secondary;
 float ts_primary, ts_secondary;\r
 \r
 vector color;\r
-float SCOREBOARD_OFFSET = cvar("sbar_scoreboard_offset");\r
 \r
 void CSQC_kh_hudreset();\r
 void CSQC_kh_hud();\r
@@ -1384,7 +1383,7 @@ void Sbar_DrawScoreboard()
        sbwidth = Sbar_GetWidth(6.5 * sbar_fontsize_y);\r
 \r
        xmin = 0.5 * (vid_conwidth - sbwidth);\r
-       ymin = SCOREBOARD_OFFSET;\r
+       ymin = cvar("sbar_scoreboard_offset");\r
 \r
        xmax = vid_conwidth - xmin;\r
        ymax = vid_conheight - 0.2*vid_conheight;\r
@@ -2422,7 +2421,7 @@ void Sbar_DrawAccuracyStats()
 \r
        drawfont = sbar_bigfont;\r
        pos_x = 0;\r
-       pos_y = SCOREBOARD_OFFSET;\r
+       pos_y = cvar("sbar_scoreboard_offset");\r
        pos_z = 0;\r
        drawstringcenter(pos, "Weapon Accuracy", 2 * sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
 \r
@@ -2448,10 +2447,10 @@ void Sbar_DrawAccuracyStats()
                return;\r
        }\r
 \r
-       float top_border_hitscan = SCOREBOARD_OFFSET + 55;  // position where the hitscan row starts: pixels down the screen\r
+       float top_border_hitscan = cvar("sbar_scoreboard_offset") + 55;  // position where the hitscan row starts: pixels down the screen\r
        Sbar_DrawAccuracyStats_Description_Hitscan('1 0 0' * col_margin + '0 1 0' * top_border_hitscan);\r
 \r
-       float top_border_splash = SCOREBOARD_OFFSET + 175;  // position where the splash row starts: pixels down the screen\r
+       float top_border_splash = cvar("sbar_scoreboard_offset") + 175;  // position where the splash row starts: pixels down the screen\r
        Sbar_DrawAccuracyStats_Description_Splash('1 0 0' * col_margin + '0 1 0' * top_border_splash);\r
 \r
        for(i = WEP_FIRST; i <= WEP_LAST; ++i)\r