From d0f1828690a64d01143d4ab4f257d643456d02bf Mon Sep 17 00:00:00 2001 From: FruitieX Date: Thu, 21 Oct 2010 22:07:02 +0300 Subject: [PATCH] strzone a tempstring before storing in a global! create a new cvar for scaling up/down the scoreboard background --- defaultXonotic.cfg | 1 + qcsrc/client/View.qc | 4 +++- qcsrc/client/scoreboard.qc | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 8d40e2ff4..b45dc46a3 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1425,6 +1425,7 @@ seta scoreboard_highlight_alpha 0.10 "highlight alpha value (depends on hud_scor seta scoreboard_highlight_alpha_self 0.25 "self highlight alpha value" seta scoreboard_offset_left 0.04 "how many pixels the scoreboard is offset from the left screen edge" seta scoreboard_offset_right 0.148 "how many pixels the scoreboard is offset from the right screen edge" +seta scoreboard_bg_scale 0.1 "scale for the tiled scoreboard background" // for menu server list (eventually make them have engine support?) seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index ea257312a..215aa524e 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -1265,7 +1265,9 @@ void CSQC_common_hud(void) if(cvar_string("hud_panel_weapons_accuracy_color_levels") != acc_color_levels) if(!(gametype == GAME_RACE || gametype == GAME_CTS)) { - acc_color_levels = cvar_string("hud_panel_weapons_accuracy_color_levels"); + if(acc_color_levels) + strunzone(acc_color_levels); + acc_color_levels = strzone(cvar_string("hud_panel_weapons_accuracy_color_levels")); acc_levels = tokenize(acc_color_levels); if (acc_levels > MAX_ACCURACY_LEVELS) acc_levels = MAX_ACCURACY_LEVELS; diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 65e86fd34..9e07eed7e 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -1142,7 +1142,7 @@ void HUD_DrawScoreboard() drawfont = hud_font; // Draw the scoreboard - vector bg_size = drawgetimagesize("gfx/scoreboard/scoreboard_bg"); + vector bg_size = drawgetimagesize("gfx/scoreboard/scoreboard_bg") * cvar("scoreboard_bg_scale"); if(teamplay) { -- 2.39.2