seta hud_panel_weapons_accuracy "" "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars"
seta hud_panel_weapons_ammo "" "show ammo as a status bar"
seta hud_panel_weapons_onlyowned "" "show only owned weapons"
+seta hud_panel_weapons_onlyowned_icon_maxscale "" "scale icons up by this factor when there's enough available space; 0 means use maximum available scale"
seta hud_panel_ammo "" "enable/disable this panel"
seta hud_panel_ammo_pos "" "position of this panel"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "1"
+seta hud_panel_weapons_onlyowned_icon_maxscale "1.5"
seta hud_panel_ammo 1
seta hud_panel_ammo_pos "0.330000 0.865000"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "1"
+seta hud_panel_weapons_onlyowned_icon_maxscale "1.5"
seta hud_panel_ammo 1
seta hud_panel_ammo_pos "0.330000 0.960000"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "1"
+seta hud_panel_weapons_onlyowned_icon_maxscale "1.5"
seta hud_panel_ammo 1
seta hud_panel_ammo_pos "0.650000 0.890000"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "1"
+seta hud_panel_weapons_onlyowned_icon_maxscale "1.5"
seta hud_panel_ammo 1
seta hud_panel_ammo_pos "0.450000 0.630000"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "1"
+seta hud_panel_weapons_onlyowned_icon_maxscale "1.5"
seta hud_panel_ammo 1
seta hud_panel_ammo_pos "0.190000 0.920000"
seta hud_panel_weapons_timeout_speed_in "0.25"
seta hud_panel_weapons_timeout_speed_out "0.75"
seta hud_panel_weapons_onlyowned "0"
+seta hud_panel_weapons_onlyowned_icon_maxscale "1.5"
seta hud_panel_ammo 1
seta hud_panel_ammo_pos "0.160000 0.910000"
int autocvar_hud_panel_weapons_label;
float autocvar_hud_panel_weapons_label_scale = 0.5;
bool autocvar_hud_panel_weapons_onlyowned;
+float autocvar_hud_panel_weapons_onlyowned_icon_maxscale = 1.5;
float autocvar_hud_panel_weapons_timeout;
int autocvar_hud_panel_weapons_timeout_effect;
float autocvar_hud_panel_weapons_timeout_fadebgmin;
weapon_size.y = padded_panel_size.y / rows;
// reduce rows and columns as needed
- // NOTE: although weapons should aways look the same even if onlyowned is enabled,
- // we enlarge them a bit when possible to better match the desired aspect ratio
if(padded_panel_size.x / padded_panel_size.y < aspect)
{
columns = ceil(weapon_count / rows);
rows = ceil(weapon_count / columns);
- weapon_size.y = min(padded_panel_size.y / rows, weapon_size.x / aspect);
- weapon_size.x = min(padded_panel_size.x / columns, aspect * weapon_size.y);
}
else
{
rows = ceil(weapon_count / columns);
columns = ceil(weapon_count / rows);
- weapon_size.x = min(padded_panel_size.x / columns, aspect * weapon_size.y);
- weapon_size.y = min(padded_panel_size.y / rows, weapon_size.x / aspect);
+ }
+
+ // reduce cell size to match the desired aspect ratio
+ // NOTE: it doesn't reduce weapon icon size itself at all
+ // (assuming aspect ratio of the real weapon image == aspect)
+ if(weapon_size.x / weapon_size.y > aspect)
+ weapon_size.x = aspect * weapon_size.y;
+ else
+ weapon_size.y = weapon_size.x / aspect;
+
+ float maxscale = autocvar_hud_panel_weapons_onlyowned_icon_maxscale;
+ if(maxscale == 0)
+ maxscale = 99;
+ if(maxscale > 1)
+ {
+ weapon_size.x = min(padded_panel_size.x / columns, weapon_size.x * maxscale);
+ weapon_size.y = min(padded_panel_size.y / rows, weapon_size.y * maxscale);
+ if(weapon_size.x / weapon_size.y > aspect)
+ weapon_size.x = aspect * weapon_size.y;
+ else
+ weapon_size.y = weapon_size.x / aspect;
}
// reduce size of the panel
HUD_Write_PanelCvar_q("_timeout_speed_in");
HUD_Write_PanelCvar_q("_timeout_speed_out");
HUD_Write_PanelCvar_q("_onlyowned");
+ HUD_Write_PanelCvar_q("onlyowned_icon_maxscale");
break;
case HUD_PANEL_AMMO:
HUD_Write_PanelCvar_q("_onlycurrent");