From e1d97f72ba9cddf688f998a8fd8cc3ed66183d90 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 4 Sep 2021 15:03:48 +0200 Subject: [PATCH] Apply hud_panel_weapons_aspect to weapon icons in the Accuracy panel too --- qcsrc/client/hud/panel/scoreboard.qc | 3 ++- qcsrc/client/hud/panel/weapons.qc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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); -- 2.39.2