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_pressedkeys_bg_alpha ""
seta hud_panel_pressedkeys_bg_border ""
seta hud_panel_pressedkeys_bg_padding "1"
- seta hud_panel_pressedkeys_aspect "1.6"
+ seta hud_panel_pressedkeys_aspect "1.8"
seta hud_panel_pressedkeys_attack "0"
seta hud_panel_chat_pos "0.010000 0.700000"
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_pressedkeys_bg_alpha ""
seta hud_panel_pressedkeys_bg_border ""
seta hud_panel_pressedkeys_bg_padding ""
- seta hud_panel_pressedkeys_aspect "1.6"
+ seta hud_panel_pressedkeys_aspect "1.8"
seta hud_panel_pressedkeys_attack "0"
seta hud_panel_chat_pos "0.010000 0.700000"
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_pressedkeys_bg_alpha ""
seta hud_panel_pressedkeys_bg_border ""
seta hud_panel_pressedkeys_bg_padding ""
- seta hud_panel_pressedkeys_aspect "1.6"
+ seta hud_panel_pressedkeys_aspect "1.8"
seta hud_panel_pressedkeys_attack "0"
seta hud_panel_chat_pos "0 0.775000"
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_pressedkeys_bg_alpha ""
seta hud_panel_pressedkeys_bg_border ""
seta hud_panel_pressedkeys_bg_padding ""
- seta hud_panel_pressedkeys_aspect "1.6"
+ seta hud_panel_pressedkeys_aspect "1.8"
seta hud_panel_pressedkeys_attack "0"
seta hud_panel_chat_pos "0 0.775000"
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_pressedkeys_bg_alpha ""
seta hud_panel_pressedkeys_bg_border ""
seta hud_panel_pressedkeys_bg_padding ""
- seta hud_panel_pressedkeys_aspect "1.6"
+ seta hud_panel_pressedkeys_aspect "1.8"
seta hud_panel_pressedkeys_attack "0"
seta hud_panel_chat_pos "0.020000 0.780000"
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"
seta hud_panel_pressedkeys_bg_alpha ""
seta hud_panel_pressedkeys_bg_border ""
seta hud_panel_pressedkeys_bg_padding ""
- seta hud_panel_pressedkeys_aspect "1.6"
+ seta hud_panel_pressedkeys_aspect "1.8"
seta hud_panel_pressedkeys_attack "0"
seta hud_panel_chat_pos "0 0.760000"
float autocvar_cl_announcer_maptime = 3;
bool autocvar_cl_autodemo_delete;
bool autocvar_cl_autodemo_delete_keeprecords;
- bool autocvar_cl_casings;
float autocvar_cl_casings_bronze_time;
int autocvar_cl_casings_maxcount = 100;
float autocvar_cl_casings_shell_time;
float autocvar_cl_spawnzoom_speed = 1;
float autocvar_cl_spawnzoom_factor = 2;
bool autocvar_cl_stripcolorcodes;
- bool autocvar_cl_vehicles_alarm = true;
+ bool autocvar_cl_vehicles_alarm = false;
bool autocvar_cl_vehicles_hud_tactical = true;
float autocvar_cl_vehicles_hudscale = 0.5;
float autocvar_cl_vehicles_notify_time = 15;
float autocvar_crosshair_ring_reload_alpha;
float autocvar_crosshair_ring_reload_size;
float autocvar_crosshair_size;
+ bool autocvar_crosshair_chase = true;
+ float crosshair_chase_playeralpha = 0.25;
int autocvar_ekg;
float autocvar_fov;
bool autocvar_hud_cursormode = true;
float autocvar_hud_panel_mapvote_highlight_border = 1;
bool autocvar_hud_panel_modicons;
int autocvar_hud_panel_modicons_ca_layout;
- int autocvar_hud_panel_modicons_dom_layout;
int autocvar_hud_panel_modicons_freezetag_layout;
bool autocvar_hud_panel_notify;
float autocvar_hud_panel_notify_fadetime;
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;
bool autocvar_hud_shownames_self;
bool autocvar_hud_shownames_status;
float autocvar_hud_shownames_statusbar_height;
+ float autocvar_hud_shownames_statusbar_highlight = 1;
float autocvar_hud_shownames_aspect;
float autocvar_hud_shownames_fontsize;
int autocvar_hud_shownames_decolorize;
// Additional OPTIONAL Fields and Globals
//float intermission;
float scoreboard_showscores;
- float scoreboard_showaccuracy;
.string message;
.float renderflags;
// float coop;
float w_issilent, w_random;
vector w_org, w_backoff;
+ float autoswitch;
+ bool cvar_cl_allow_uid2name;
+ bool cvar_cl_allow_uidranking;
+ float cvar_cl_autoscreenshot;
+ float cvar_cl_autotaunt;
+ float cvar_cl_clippedspectating;
+ int cvar_cl_gunalign;
+ float cvar_cl_handicap;
+ float cvar_cl_jetpack_jump;
+ float cvar_cl_movement_track_canjump;
+ float cvar_cl_noantilag;
+ string cvar_cl_physics;
+ float cvar_cl_voice_directional;
+ float cvar_cl_voice_directional_taunt_attenuation;
+ float cvar_cl_weaponimpulsemode;
+ string cvar_g_xonoticversion;
+ float cvar_cl_cts_noautoswitch;
+ bool cvar_cl_weapon_switch_reload;
+ bool cvar_cl_weapon_switch_fallback_to_impulse;
+
+ REPLICATE(autoswitch, bool, "cl_autoswitch");
+ REPLICATE(cvar_cl_allow_uid2name, bool, "cl_allow_uid2name");
+ REPLICATE(cvar_cl_allow_uidranking, bool, "cl_allow_uidranking");
+ REPLICATE(cvar_cl_autoscreenshot, int, "cl_autoscreenshot");
+ REPLICATE(cvar_cl_autotaunt, float, "cl_autotaunt");
+ REPLICATE(cvar_cl_clippedspectating, bool, "cl_clippedspectating");
+ REPLICATE(cvar_cl_gunalign, int, "cl_gunalign");
+ REPLICATE(cvar_cl_handicap, float, "cl_handicap");
+ REPLICATE(cvar_cl_jetpack_jump, bool, "cl_jetpack_jump");
+ REPLICATE(cvar_cl_movement_track_canjump, bool, "cl_movement_track_canjump");
+ REPLICATE(cvar_cl_noantilag, bool, "cl_noantilag");
+ REPLICATE(cvar_cl_physics, string, "cl_physics");
+ REPLICATE(cvar_cl_voice_directional, int, "cl_voice_directional");
+ REPLICATE(cvar_cl_voice_directional_taunt_attenuation, float, "cl_voice_directional_taunt_attenuation");
+ REPLICATE(cvar_cl_weaponimpulsemode, int, "cl_weaponimpulsemode");
+ REPLICATE(cvar_g_xonoticversion, string, "g_xonoticversion");
+ REPLICATE(cvar_cl_cts_noautoswitch, bool, "cl_cts_noautoswitch");
+ REPLICATE(cvar_cl_weapon_switch_reload, bool, "cl_weapon_switch_reload");
+ REPLICATE(cvar_cl_weapon_switch_fallback_to_impulse, bool, "cl_weapon_switch_fallback_to_impulse");
+ /*
+ // cvar cl_newusekeysupported doesn't exist
+ float cvar_cl_newusekeysupported;
+ REPLICATE(cvar_cl_newusekeysupported, bool, "cl_newusekeysupported");
+ */
+ string cvar_cl_allow_uidtracking;
+ REPLICATE(cvar_cl_allow_uidtracking, string, "cl_allow_uidtracking");
+
+ string cvar_cl_weaponpriority;
+ REPLICATE(cvar_cl_weaponpriority, string, "cl_weaponpriority");
+
+ string cvar_cl_weaponpriorities[10];
+ REPLICATE(cvar_cl_weaponpriorities[0], string, "cl_weaponpriority0");
+ REPLICATE(cvar_cl_weaponpriorities[1], string, "cl_weaponpriority1");
+ REPLICATE(cvar_cl_weaponpriorities[2], string, "cl_weaponpriority2");
+ REPLICATE(cvar_cl_weaponpriorities[3], string, "cl_weaponpriority3");
+ REPLICATE(cvar_cl_weaponpriorities[4], string, "cl_weaponpriority4");
+ REPLICATE(cvar_cl_weaponpriorities[5], string, "cl_weaponpriority5");
+ REPLICATE(cvar_cl_weaponpriorities[6], string, "cl_weaponpriority6");
+ REPLICATE(cvar_cl_weaponpriorities[7], string, "cl_weaponpriority7");
+ REPLICATE(cvar_cl_weaponpriorities[8], string, "cl_weaponpriority8");
+ REPLICATE(cvar_cl_weaponpriorities[9], string, "cl_weaponpriority9");
+
float bgmtime;
string weaponorder_byimpulse;
string weaponorder_bypriority;
+bool weapons_orderbyimpulse; // update priority list when toggling this
float vortex_charge_movingavg;
return aj - ai; // the string is in REVERSE order (higher prio at the right is what we want, but higher prio first is the string)
}
- #define HUD_WEAPONS_GET_FULL_LAYOUT() MACRO_BEGIN { \
+ #define HUD_WEAPONS_GET_FULL_LAYOUT() MACRO_BEGIN \
int nHidden = 0; \
FOREACH(Weapons, it != WEP_Null, { \
if (weapons_stat & WepSet_FromWeapon(it)) continue; \
- if ((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) nHidden += 1; \
+ if (it.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_SPECIALATTACK)) nHidden += 1; \
}); \
vector table_size = HUD_GetTableSize_BestItemAR((Weapons_COUNT - 1) - nHidden, panel_size, aspect); \
columns = table_size.x; \
rows = table_size.y; \
weapon_size.x = panel_size.x / columns; \
weapon_size.y = panel_size.y / rows; \
- } MACRO_END
+ MACRO_END
void HUD_Weapons()
{
float when = max(1, autocvar_hud_panel_weapons_complainbubble_time);
float fadetime = max(0, autocvar_hud_panel_weapons_complainbubble_fadetime);
- bool infinite_ammo = (STAT(ITEMS) & IT_UNLIMITED_WEAPON_AMMO);
+ bool infinite_ammo = (STAT(ITEMS) & IT_UNLIMITED_AMMO);
vector weapon_pos, weapon_size = '0 0 0';
vector color;
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;
{
int j = 0;
FOREACH(Weapons, it != WEP_Null && it.impulse >= 0 && (it.impulse % 3 != 0) && j < 6, {
- if(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED))
+ if(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && !(it.spawnflags & WEP_FLAG_SPECIALATTACK))
{
if(!panel_switchweapon || j < 4)
panel_switchweapon = it;
}
else
{
- if (((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) && !(weapons_stat & WepSet_FromWeapon(it)))
+ if (it.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_SPECIALATTACK)
+ && !(weapons_stat & WepSet_FromWeapon(it)))
+ {
continue;
+ }
}
// figure out the drawing position of weapon
}
// draw ammo status bar
- if(!infinite_ammo && autocvar_hud_panel_weapons_ammo && (it.ammo_type != RESOURCE_NONE))
+ if(!infinite_ammo && autocvar_hud_panel_weapons_ammo && (it.ammo_type != RES_NONE))
{
float ammo_full;
a = getstati(GetAmmoStat(it.ammo_type)); // how much ammo do we have?
{
switch (it.ammo_type)
{
- case RESOURCE_SHELLS: ammo_full = autocvar_hud_panel_weapons_ammo_full_shells; break;
- case RESOURCE_BULLETS: ammo_full = autocvar_hud_panel_weapons_ammo_full_nails; break;
- case RESOURCE_ROCKETS: ammo_full = autocvar_hud_panel_weapons_ammo_full_rockets; break;
- case RESOURCE_CELLS: ammo_full = autocvar_hud_panel_weapons_ammo_full_cells; break;
- case RESOURCE_PLASMA: ammo_full = autocvar_hud_panel_weapons_ammo_full_plasma; break;
- case RESOURCE_FUEL: ammo_full = autocvar_hud_panel_weapons_ammo_full_fuel; break;
+ case RES_SHELLS: ammo_full = autocvar_hud_panel_weapons_ammo_full_shells; break;
+ case RES_BULLETS: ammo_full = autocvar_hud_panel_weapons_ammo_full_nails; break;
+ case RES_ROCKETS: ammo_full = autocvar_hud_panel_weapons_ammo_full_rockets; break;
+ case RES_CELLS: ammo_full = autocvar_hud_panel_weapons_ammo_full_cells; break;
+ case RES_PLASMA: ammo_full = autocvar_hud_panel_weapons_ammo_full_plasma; break;
+ case RES_FUEL: ammo_full = autocvar_hud_panel_weapons_ammo_full_fuel; break;
default: ammo_full = 60;
}