From: terencehill Date: Sat, 4 Sep 2021 13:03:48 +0000 (+0200) Subject: Apply hud_panel_weapons_aspect to weapon icons in the Accuracy panel too X-Git-Tag: xonotic-v0.8.5~357 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e1d97f72ba9cddf688f998a8fd8cc3ed66183d90;p=xonotic%2Fxonotic-data.pk3dir.git Apply hud_panel_weapons_aspect to weapon icons in the Accuracy panel too --- diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 6dadc75ed..c0e0f04ae 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1243,7 +1243,8 @@ vector Scoreboard_AccuracyStats_Draw(vector pos, vector rgb, vector bg_size) rows = 2; int columnns = ceil(weapon_cnt / rows); - float weapon_height = hud_fontsize.y * 2.3; + float aspect = max(0.001, autocvar_hud_panel_weapons_aspect); + float weapon_height = hud_fontsize.y * 2.3 / aspect; float height = weapon_height + hud_fontsize.y; drawstring(pos + eX * panel_bg_padding, sprintf(_("Accuracy stats (average %d%%)"), average_accuracy), hud_fontsize, '1 1 1', panel_fg_alpha * scoreboard_acc_fade_alpha, DRAWFLAG_NORMAL); diff --git a/qcsrc/client/hud/panel/weapons.qc b/qcsrc/client/hud/panel/weapons.qc index 7ac8b8dae..a79b64c40 100644 --- a/qcsrc/client/hud/panel/weapons.qc +++ b/qcsrc/client/hud/panel/weapons.qc @@ -127,7 +127,7 @@ void HUD_Weapons() int weapon_count, weapon_id; int row, column, rows = 0, columns = 0; bool vertical_order = true; - float aspect = autocvar_hud_panel_weapons_aspect; + float aspect = max(0.001, autocvar_hud_panel_weapons_aspect); float timeout = autocvar_hud_panel_weapons_timeout; float timein_effect_length = autocvar_hud_panel_weapons_timeout_speed_in; //? 0.375 : 0);