From 8112b0a7a47e75b0a4e68b8a3ae6364ddda9de62 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 25 Jan 2015 19:25:32 +0100 Subject: [PATCH] Improve distribution of the icons and therefore use of the available space in the simplest way --- qcsrc/client/hud.qc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 2b067dee8..e9ed89cd3 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -531,13 +531,8 @@ void HUD_Weapons(void) // reduce rows and columns as needed float columns_save = columns; - if(weapon_count <= rows) - { - rows = weapon_count; - columns = 1; - } - else - columns = ceil(weapon_count / rows); + columns = ceil(weapon_count / rows); + rows = ceil(weapon_count / columns); // enlarge weapon_size to match desired aspect ratio in order to capitalize on panel space if(columns < columns_save) -- 2.39.2