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, set it to 2 to show only the held weapon"
+seta hud_panel_weapons_orderbyimpulse "" "List weapons in their impulse order instead of priority"
seta hud_panel_weapons_noncurrent_alpha "" "alpha of noncurrent weapons"
seta hud_panel_weapons_noncurrent_scale "" "scale of noncurrent weapons, relative to the current weapon"
seta hud_panel_weapons_selection_radius "" "number of weapons that get partially highlighted on each side of the currently selected weapon"
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_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "0.8"
seta hud_panel_weapons_noncurrent_scale "0.9"
seta hud_panel_weapons_selection_radius "0"
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_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "1"
seta hud_panel_weapons_noncurrent_scale "1"
seta hud_panel_weapons_selection_radius "0"
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_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "1"
seta hud_panel_weapons_noncurrent_scale "1"
seta hud_panel_weapons_selection_radius "0"
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_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "1"
seta hud_panel_weapons_noncurrent_scale "1"
seta hud_panel_weapons_selection_radius "0"
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_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "1"
seta hud_panel_weapons_noncurrent_scale "1"
seta hud_panel_weapons_selection_radius "0"
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_orderbyimpulse "1"
seta hud_panel_weapons_noncurrent_alpha "1"
seta hud_panel_weapons_noncurrent_scale "1"
seta hud_panel_weapons_selection_radius "0"
float autocvar_hud_panel_weapons_selection_speed = 10;
float autocvar_hud_panel_weapons_timeout;
int autocvar_hud_panel_weapons_timeout_effect;
+bool autocvar_hud_panel_weapons_orderbyimpulse = true;
float autocvar_hud_panel_weapons_timeout_fadebgmin;
float autocvar_hud_panel_weapons_timeout_fadefgmin;
float autocvar_hud_panel_weapons_timeout_speed_in = 0.25;
string weaponorder_byimpulse;
string weaponorder_bypriority;
+bool weapons_orderbyimpulse; // update priority list when toggling this
float vortex_charge_movingavg;
HUD_Write_Cvar("hud_panel_weapons_timeout_speed_in");
HUD_Write_Cvar("hud_panel_weapons_timeout_speed_out");
HUD_Write_Cvar("hud_panel_weapons_onlyowned");
+ HUD_Write_Cvar("hud_panel_weapons_orderbyimpulse");
HUD_Write_Cvar("hud_panel_weapons_noncurrent_alpha");
HUD_Write_Cvar("hud_panel_weapons_noncurrent_scale");
HUD_Write_Cvar("hud_panel_weapons_selection_radius");
HUD_Panel_LoadCvars();
// figure out weapon order (how the weapons are sorted) // TODO make this configurable
- if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
+ if(weaponorder_bypriority != autocvar_cl_weaponpriority || autocvar_hud_panel_weapons_orderbyimpulse != weapons_orderbyimpulse || !weaponorder[0])
{
int weapon_cnt;
+ weapons_orderbyimpulse = autocvar_hud_panel_weapons_orderbyimpulse;
strcpy(weaponorder_bypriority, autocvar_cl_weaponpriority);
- strcpy(weaponorder_byimpulse, W_FixWeaponOrder_BuildImpulseList(W_FixWeaponOrder_ForceComplete(W_NumberWeaponOrder(weaponorder_bypriority))));
+ string weporder = W_FixWeaponOrder_ForceComplete(W_NumberWeaponOrder(weaponorder_bypriority));
+ if(autocvar_hud_panel_weapons_orderbyimpulse)
+ weporder = W_FixWeaponOrder_BuildImpulseList(weporder);
+ strcpy(weaponorder_byimpulse, weporder);
weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
weapon_cnt = 0;