seta hud_panel_powerups "" "enable/disable this panel"
seta hud_panel_powerups_pos "" "position of this panel"
seta hud_panel_powerups_size "" "size of this panel"
- seta hud_panel_powerups_flip "" "flip strength/shield positions"
seta hud_panel_powerups_baralign "" "0 = align bars to the left, 1 = align bars to the right, 2 = align only left bar to the right, 3 = align only right bar to the right"
seta hud_panel_powerups_iconalign "" "0 = align icons to the left, 1 = align icons to the right, 2 = align only left icon to the right, 3 = align only right icon to the right"
seta hud_panel_powerups_bg "" "if set to something else than \"\" = override default background"
seta hud_panel_powerups_bg_border "" "if set to something else than \"\" = override default size of border around the background"
seta hud_panel_powerups_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
seta hud_panel_powerups_progressbar "" "enable progressbar in panel"
- seta hud_panel_powerups_progressbar_strength "" "progressbar image for strength"
- seta hud_panel_powerups_progressbar_shield "" "progressbar image for shield"
- seta hud_panel_powerups_progressbar_superweapons "" "progressbar image for superweapons"
- seta hud_panel_powerups_text "" "show text/icons in the powerups panel"
+ seta hud_panel_powerups_text "" "show text and icons in the powerups panel"
seta hud_panel_healtharmor "" "enable/disable this panel, 2 = combined health/armor display"
seta hud_panel_healtharmor_pos "" "position of this panel"
seta hud_panel_centerprint_fade_subsequent_minfontsize "" "minimum factor for the font size from the subsequent fading effects"
seta hud_panel_centerprint_fade_minfontsize "" "minimum factor for the font size from the fading in/out effects"
- seta hud_panel_buffs "" "enable/disable this panel"
- seta hud_panel_buffs_pos "" "position of this panel"
- seta hud_panel_buffs_size "" "size of this panel"
- seta hud_panel_buffs_bg "" "if set to something else than \"\" = override default background"
- seta hud_panel_buffs_bg_color "" "if set to something else than \"\" = override default panel background color"
- seta hud_panel_buffs_bg_color_team "" "override panel color with team color in team based games"
- seta hud_panel_buffs_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
- seta hud_panel_buffs_bg_border "" "if set to something else than \"\" = override default size of border around the background"
- seta hud_panel_buffs_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
-
seta hud_panel_mapvote "" "enable/disable this panel"
seta hud_panel_mapvote_pos "" "position of this panel"
seta hud_panel_mapvote_size "" "size of this panel"
seta hud_panel_mapvote_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
seta hud_panel_mapvote_bg_border "" "if set to something else than \"\" = override default size of border around the background"
seta hud_panel_mapvote_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+
+seta hud_panel_itemstime "" "enable/disable this panel, it shows left time until important items (mega health, large armor, powerups, superweapons, etc...) respawn in the map: 1 when spectating, 2 even playing in warmup stage"
+seta hud_panel_itemstime_pos "" "position of this base of the panel"
+seta hud_panel_itemstime_size "" "size of this panel"
+seta hud_panel_itemstime_bg "" "if set to something else than \"\" = override default background"
+seta hud_panel_itemstime_bg_color "" "if set to something else than \"\" = override default panel background color"
+seta hud_panel_itemstime_bg_color_team "" "override panel color with team color in team based games"
+seta hud_panel_itemstime_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
+seta hud_panel_itemstime_bg_border "" "if set to something else than \"\" = override default size of border around the background"
+seta hud_panel_itemstime_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+seta hud_panel_itemstime_iconalign "" "0 = align icons to the left, 1 = align icons to the right"
+seta hud_panel_itemstime_progressbar "" "use progressbar behind icons"
+seta hud_panel_itemstime_progressbar_name "" "name of progressbar to use behind icons"
+seta hud_panel_itemstime_progressbar_reduced "" "progressbar is displayed only in the text field"
+seta hud_panel_itemstime_text "" "show text"
+seta hud_panel_itemstime_ratio "" "ratio between space reserved for text and icon width of each item entry (min value is 2)"
+seta hud_panel_itemstime_dynamicsize "" "allow panel size reduction by removing spacing among items"
seta hud_progressbar_health_color "0.83 0.12 0"
seta hud_progressbar_armor_color "0.28 0.8 0"
seta hud_progressbar_fuel_color "0.77 0.67 0"
- seta hud_progressbar_strength_color "0.86 0.35 0"
- seta hud_progressbar_shield_color "0.28 0.8 0"
+ seta hud_progressbar_strength_color "1 0.39 0"
+ seta hud_progressbar_shield_color "0.36 1 0.07"
seta hud_progressbar_superweapons_color "0.77 0.67 0"
seta hud_progressbar_nexball_color "0.2 0.65 0.93"
seta hud_progressbar_speed_color "0.77 0.67 0"
seta hud_progressbar_vehicles_ammo1_color "0.77 0.67 0"
seta hud_progressbar_vehicles_ammo2_color "0.86 0.35 0"
-seta _hud_panelorder "17 15 12 9 5 10 6 14 0 7 4 11 2 1 3 8 13 16 "
+seta _hud_panelorder "17 15 12 9 5 10 6 14 0 7 4 11 2 1 3 8 13 16 18"
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.005000"
seta hud_panel_ammo_text "1"
seta hud_panel_powerups 1
- seta hud_panel_powerups_pos "0.325000 0.820000"
- seta hud_panel_powerups_size "0.350000 0.050000"
+ seta hud_panel_powerups_pos "0.325000 0.815000"
+ seta hud_panel_powerups_size "0.350000 0.055000"
seta hud_panel_powerups_bg "border_shadow_south"
seta hud_panel_powerups_bg_color ""
seta hud_panel_powerups_bg_color_team ""
seta hud_panel_powerups_bg_alpha ""
seta hud_panel_powerups_bg_border ""
seta hud_panel_powerups_bg_padding ""
- seta hud_panel_powerups_flip "1"
- seta hud_panel_powerups_iconalign "2"
- seta hud_panel_powerups_baralign "2"
+ seta hud_panel_powerups_iconalign "3"
+ seta hud_panel_powerups_baralign "3"
seta hud_panel_powerups_progressbar "1"
- seta hud_panel_powerups_progressbar_strength "progressbar"
- seta hud_panel_powerups_progressbar_shield "progressbar"
- seta hud_panel_powerups_progressbar_superweapons "progressbar"
seta hud_panel_powerups_text "1"
seta hud_panel_healtharmor 1
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
- seta hud_panel_buffs 1
- seta hud_panel_buffs_pos "0.325000 0.820000"
- seta hud_panel_buffs_size "0.350000 0.050000"
- seta hud_panel_buffs_bg "0"
- seta hud_panel_buffs_bg_color ""
- seta hud_panel_buffs_bg_color_team ""
- seta hud_panel_buffs_bg_alpha ""
- seta hud_panel_buffs_bg_border ""
- seta hud_panel_buffs_bg_padding ""
-
seta hud_panel_mapvote 1
seta hud_panel_mapvote_pos "0 0"
seta hud_panel_mapvote_size "1 1"
seta hud_panel_mapvote_bg_border ""
seta hud_panel_mapvote_bg_padding ""
+seta hud_panel_itemstime 2
+seta hud_panel_itemstime_pos "0.030000 0.260000"
+seta hud_panel_itemstime_size "0.070000 0.230000"
+seta hud_panel_itemstime_bg "border_itemstime"
+seta hud_panel_itemstime_bg_color ""
+seta hud_panel_itemstime_bg_color_team ""
+seta hud_panel_itemstime_bg_alpha ""
+seta hud_panel_itemstime_bg_border ""
+seta hud_panel_itemstime_bg_padding ""
+seta hud_panel_itemstime_iconalign "0"
+seta hud_panel_itemstime_progressbar "0"
+seta hud_panel_itemstime_progressbar_name "progressbar"
+seta hud_panel_itemstime_progressbar_reduced "0"
+seta hud_panel_itemstime_text "1"
+seta hud_panel_itemstime_ratio "2"
+seta hud_panel_itemstime_dynamicsize "1"
+
menu_sync
seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0"
seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0"
-seta _hud_panelorder "17 15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 "
+seta _hud_panelorder "17 15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 18"
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_powerups_bg_color_team ""
seta hud_panel_powerups_bg_alpha ""
seta hud_panel_powerups_bg_border ""
- seta hud_panel_powerups_bg_padding ""
- seta hud_panel_powerups_flip "1"
+ seta hud_panel_powerups_bg_padding "-2"
seta hud_panel_powerups_iconalign "3"
seta hud_panel_powerups_baralign "3"
seta hud_panel_powerups_progressbar "1"
- seta hud_panel_powerups_progressbar_strength "progressbar"
- seta hud_panel_powerups_progressbar_shield "progressbar"
- seta hud_panel_powerups_progressbar_superweapons "progressbar"
seta hud_panel_powerups_text "1"
seta hud_panel_healtharmor 1
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
- seta hud_panel_buffs 1
- seta hud_panel_buffs_pos "0.450000 0.855000"
- seta hud_panel_buffs_size "0.050000 0.070000"
- seta hud_panel_buffs_bg "0"
- seta hud_panel_buffs_bg_color ""
- seta hud_panel_buffs_bg_color_team ""
- seta hud_panel_buffs_bg_alpha ""
- seta hud_panel_buffs_bg_border ""
- seta hud_panel_buffs_bg_padding ""
-
seta hud_panel_mapvote 1
seta hud_panel_mapvote_pos "0 0"
seta hud_panel_mapvote_size "1 1"
seta hud_panel_mapvote_bg_border ""
seta hud_panel_mapvote_bg_padding ""
+seta hud_panel_itemstime 2
+seta hud_panel_itemstime_pos "0.030000 0.260000"
+seta hud_panel_itemstime_size "0.070000 0.230000"
+seta hud_panel_itemstime_bg "border_itemstime"
+seta hud_panel_itemstime_bg_color ""
+seta hud_panel_itemstime_bg_color_team ""
+seta hud_panel_itemstime_bg_alpha ""
+seta hud_panel_itemstime_bg_border ""
+seta hud_panel_itemstime_bg_padding ""
+seta hud_panel_itemstime_iconalign "0"
+seta hud_panel_itemstime_progressbar "0"
+seta hud_panel_itemstime_progressbar_name "progressbar"
+seta hud_panel_itemstime_progressbar_reduced "0"
+seta hud_panel_itemstime_text "1"
+seta hud_panel_itemstime_ratio "2"
+seta hud_panel_itemstime_dynamicsize "1"
+
menu_sync
seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0"
seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0"
-seta _hud_panelorder "17 10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 15 16 "
+seta _hud_panelorder "17 10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 15 16 18"
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_powerups_bg_alpha ""
seta hud_panel_powerups_bg_border ""
seta hud_panel_powerups_bg_padding "-3"
- seta hud_panel_powerups_flip "1"
seta hud_panel_powerups_iconalign "1"
seta hud_panel_powerups_baralign "1"
seta hud_panel_powerups_progressbar "1"
- seta hud_panel_powerups_progressbar_strength "progressbar"
- seta hud_panel_powerups_progressbar_shield "progressbar"
- seta hud_panel_powerups_progressbar_superweapons "progressbar"
seta hud_panel_powerups_text "1"
seta hud_panel_healtharmor 1
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
- seta hud_panel_buffs 1
- seta hud_panel_buffs_pos "0.450000 0.855000"
- seta hud_panel_buffs_size "0.050000 0.070000"
- seta hud_panel_buffs_bg "0"
- seta hud_panel_buffs_bg_color ""
- seta hud_panel_buffs_bg_color_team ""
- seta hud_panel_buffs_bg_alpha ""
- seta hud_panel_buffs_bg_border ""
- seta hud_panel_buffs_bg_padding ""
-
seta hud_panel_mapvote 1
seta hud_panel_mapvote_pos "0 0"
seta hud_panel_mapvote_size "1 1"
seta hud_panel_mapvote_bg_border ""
seta hud_panel_mapvote_bg_padding ""
+seta hud_panel_itemstime 2
+seta hud_panel_itemstime_pos "0.000000 0.310000"
+seta hud_panel_itemstime_size "0.070000 0.180000"
+seta hud_panel_itemstime_bg ""
+seta hud_panel_itemstime_bg_color ""
+seta hud_panel_itemstime_bg_color_team ""
+seta hud_panel_itemstime_bg_alpha ""
+seta hud_panel_itemstime_bg_border ""
+seta hud_panel_itemstime_bg_padding ""
+seta hud_panel_itemstime_iconalign "0"
+seta hud_panel_itemstime_progressbar "0"
+seta hud_panel_itemstime_progressbar_name "progressbar"
+seta hud_panel_itemstime_progressbar_reduced "0"
+seta hud_panel_itemstime_text "1"
+seta hud_panel_itemstime_ratio "2"
+seta hud_panel_itemstime_dynamicsize "1"
+
menu_sync
seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0"
seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0"
-seta _hud_panelorder "17 15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 "
+seta _hud_panelorder "17 15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 18"
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_powerups_bg_alpha ""
seta hud_panel_powerups_bg_border ""
seta hud_panel_powerups_bg_padding "-3"
- seta hud_panel_powerups_flip "1"
seta hud_panel_powerups_iconalign "1"
seta hud_panel_powerups_baralign "1"
seta hud_panel_powerups_progressbar "1"
- seta hud_panel_powerups_progressbar_strength "progressbar"
- seta hud_panel_powerups_progressbar_shield "progressbar"
- seta hud_panel_powerups_progressbar_superweapons "progressbar"
seta hud_panel_powerups_text "1"
seta hud_panel_healtharmor 1
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
- seta hud_panel_buffs 1
- seta hud_panel_buffs_pos "0.450000 0.855000"
- seta hud_panel_buffs_size "0.050000 0.070000"
- seta hud_panel_buffs_bg "0"
- seta hud_panel_buffs_bg_color ""
- seta hud_panel_buffs_bg_color_team ""
- seta hud_panel_buffs_bg_alpha ""
- seta hud_panel_buffs_bg_border ""
- seta hud_panel_buffs_bg_padding ""
-
seta hud_panel_mapvote 1
seta hud_panel_mapvote_pos "0 0"
seta hud_panel_mapvote_size "1 1"
seta hud_panel_mapvote_bg_border ""
seta hud_panel_mapvote_bg_padding ""
+seta hud_panel_itemstime 2
+seta hud_panel_itemstime_pos "0.000000 0.310000"
+seta hud_panel_itemstime_size "0.070000 0.180000"
+seta hud_panel_itemstime_bg ""
+seta hud_panel_itemstime_bg_color ""
+seta hud_panel_itemstime_bg_color_team ""
+seta hud_panel_itemstime_bg_alpha ""
+seta hud_panel_itemstime_bg_border ""
+seta hud_panel_itemstime_bg_padding ""
+seta hud_panel_itemstime_iconalign "0"
+seta hud_panel_itemstime_progressbar "0"
+seta hud_panel_itemstime_progressbar_name "progressbar"
+seta hud_panel_itemstime_progressbar_reduced "0"
+seta hud_panel_itemstime_text "1"
+seta hud_panel_itemstime_ratio "2"
+seta hud_panel_itemstime_dynamicsize "1"
+
menu_sync
seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0"
seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0"
-seta _hud_panelorder "17 15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 "
+seta _hud_panelorder "17 15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 18"
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_powerups_bg_alpha ""
seta hud_panel_powerups_bg_border ""
seta hud_panel_powerups_bg_padding ""
- seta hud_panel_powerups_flip "1"
seta hud_panel_powerups_iconalign "3"
seta hud_panel_powerups_baralign "3"
seta hud_panel_powerups_progressbar "1"
- seta hud_panel_powerups_progressbar_strength "progressbar"
- seta hud_panel_powerups_progressbar_shield "progressbar"
- seta hud_panel_powerups_progressbar_superweapons "progressbar"
seta hud_panel_powerups_text "1"
seta hud_panel_healtharmor 1
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
- seta hud_panel_buffs 1
- seta hud_panel_buffs_pos "0.450000 0.855000"
- seta hud_panel_buffs_size "0.050000 0.070000"
- seta hud_panel_buffs_bg "0"
- seta hud_panel_buffs_bg_color ""
- seta hud_panel_buffs_bg_color_team ""
- seta hud_panel_buffs_bg_alpha ""
- seta hud_panel_buffs_bg_border ""
- seta hud_panel_buffs_bg_padding ""
-
seta hud_panel_mapvote 1
seta hud_panel_mapvote_pos "0 0"
seta hud_panel_mapvote_size "1 1"
seta hud_panel_mapvote_bg_border ""
seta hud_panel_mapvote_bg_padding ""
+seta hud_panel_itemstime 2
+seta hud_panel_itemstime_pos "0.020000 0.490000"
+seta hud_panel_itemstime_size "0.090000 0.140000"
+seta hud_panel_itemstime_bg "0"
+seta hud_panel_itemstime_bg_color ""
+seta hud_panel_itemstime_bg_color_team ""
+seta hud_panel_itemstime_bg_alpha ""
+seta hud_panel_itemstime_bg_border ""
+seta hud_panel_itemstime_bg_padding ""
+seta hud_panel_itemstime_iconalign "0"
+seta hud_panel_itemstime_progressbar "1"
+seta hud_panel_itemstime_progressbar_name "progressbar"
+seta hud_panel_itemstime_progressbar_reduced "1"
+seta hud_panel_itemstime_text "1"
+seta hud_panel_itemstime_ratio "3.5"
+seta hud_panel_itemstime_dynamicsize "1"
+
menu_sync
seta hud_progressbar_vehicles_ammo1_color "0.8 0.7 0"
seta hud_progressbar_vehicles_ammo2_color "0.7 0.4 0"
-seta _hud_panelorder "17 15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 "
+seta _hud_panelorder "17 15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 18"
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.01"
seta hud_panel_powerups_bg_alpha ""
seta hud_panel_powerups_bg_border ""
seta hud_panel_powerups_bg_padding ""
- seta hud_panel_powerups_flip "1"
seta hud_panel_powerups_iconalign "0"
seta hud_panel_powerups_baralign "0"
seta hud_panel_powerups_progressbar "0"
- seta hud_panel_powerups_progressbar_strength "progressbar"
- seta hud_panel_powerups_progressbar_shield "progressbar"
- seta hud_panel_powerups_progressbar_superweapons "progressbar"
seta hud_panel_powerups_text "1"
seta hud_panel_healtharmor 1
seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
seta hud_panel_centerprint_fade_minfontsize "0"
- seta hud_panel_buffs 1
- seta hud_panel_buffs_pos "0.450000 0.855000"
- seta hud_panel_buffs_size "0.050000 0.070000"
- seta hud_panel_buffs_bg "0"
- seta hud_panel_buffs_bg_color ""
- seta hud_panel_buffs_bg_color_team ""
- seta hud_panel_buffs_bg_alpha ""
- seta hud_panel_buffs_bg_border ""
- seta hud_panel_buffs_bg_padding ""
-
seta hud_panel_mapvote 1
seta hud_panel_mapvote_pos "0 0"
seta hud_panel_mapvote_size "1 1"
seta hud_panel_mapvote_bg_border ""
seta hud_panel_mapvote_bg_padding ""
+seta hud_panel_itemstime 2
+seta hud_panel_itemstime_pos "0.000000 0.290000"
+seta hud_panel_itemstime_size "0.150000 0.060000"
+seta hud_panel_itemstime_bg "0"
+seta hud_panel_itemstime_bg_color ""
+seta hud_panel_itemstime_bg_color_team ""
+seta hud_panel_itemstime_bg_alpha ""
+seta hud_panel_itemstime_bg_border ""
+seta hud_panel_itemstime_bg_padding ""
+seta hud_panel_itemstime_iconalign "0"
+seta hud_panel_itemstime_progressbar "0"
+seta hud_panel_itemstime_progressbar_name "progressbar"
+seta hud_panel_itemstime_progressbar_reduced "0"
+seta hud_panel_itemstime_text "1"
+seta hud_panel_itemstime_ratio "2"
+seta hud_panel_itemstime_dynamicsize "1"
+
menu_sync
float autocvar_g_waypointsprite_edgeoffset_right;
float autocvar_g_waypointsprite_edgeoffset_top;
float autocvar_g_waypointsprite_fontsize;
+int autocvar_g_waypointsprite_itemstime;
float autocvar_g_waypointsprite_minalpha;
float autocvar_g_waypointsprite_minscale;
float autocvar_g_waypointsprite_normdistance;
float autocvar_hud_panel_healtharmor_progressbar_gfx_lowhealth;
float autocvar_hud_panel_healtharmor_progressbar_gfx_smooth;
int autocvar_hud_panel_healtharmor_text;
+int autocvar_hud_panel_itemstime = 2;
+float autocvar_hud_panel_itemstime_dynamicsize = 1;
+float autocvar_hud_panel_itemstime_ratio = 2;
+int autocvar_hud_panel_itemstime_iconalign;
+bool autocvar_hud_panel_itemstime_progressbar = 0;
+float autocvar_hud_panel_itemstime_progressbar_maxtime = 30;
+string autocvar_hud_panel_itemstime_progressbar_name = "progressbar";
+float autocvar_hud_panel_itemstime_progressbar_reduced;
+bool autocvar_hud_panel_itemstime_hidespawned = 1;
+int autocvar_hud_panel_itemstime_text = 1;
bool autocvar_hud_panel_infomessages;
bool autocvar_hud_panel_infomessages_flip;
bool autocvar_hud_panel_modicons;
float autocvar_hud_panel_physics_topspeed_time;
bool autocvar_hud_panel_powerups;
int autocvar_hud_panel_powerups_baralign;
- bool autocvar_hud_panel_powerups_flip;
int autocvar_hud_panel_powerups_iconalign;
bool autocvar_hud_panel_powerups_progressbar;
- bool autocvar_hud_panel_buffs;
- //float autocvar_hud_panel_buffs_iconalign;
- string autocvar_hud_panel_powerups_progressbar_shield;
- string autocvar_hud_panel_powerups_progressbar_strength;
- string autocvar_hud_panel_powerups_progressbar_superweapons;
bool autocvar_hud_panel_powerups_text;
int autocvar_hud_panel_pressedkeys;
float autocvar_hud_panel_pressedkeys_aspect;
// Powerups (#2)
//
+
+ // Powerup item fields (reusing existing fields)
+ .string message; // Human readable name
+ .string netname; // Icon name
+ .vector colormod; // Color
+ .float count; // Time left
+ .float lifetime; // Maximum time
+
+ entity powerupItems;
+ int powerupItemsCount;
+
+ void resetPowerupItems()
+ {
+ entity item;
+ for(item = powerupItems; item; item = item.chain)
+ item.count = 0;
+
+ powerupItemsCount = 0;
+ }
+
+ void addPowerupItem(string name, string icon, vector color, float currentTime, float lifeTime)
+ {
+ if(!powerupItems)
+ powerupItems = spawn();
+
+ entity item;
+ for(item = powerupItems; item.count; item = item.chain)
+ if(!item.chain)
+ item.chain = spawn();
+
+ item.message = name;
+ item.netname = icon;
+ item.colormod = color;
+ item.count = currentTime;
+ item.lifetime = lifeTime;
+
+ ++powerupItemsCount;
+ }
+
+ int getPowerupItemAlign(int align, int column, int row, int columns, int rows, bool isVertical)
+ {
+ if(align < 2)
+ return align;
+
+ bool isTop = isVertical && rows > 1 && row == 0;
+ bool isBottom = isVertical && rows > 1 && row == rows-1;
+ bool isLeft = !isVertical && columns > 1 && column == 0;
+ bool isRight = !isVertical && columns > 1 && column == columns-1;
+
+ if(isTop || isLeft) return (align == 2) ? 1 : 0;
+ if(isBottom || isRight) return (align == 2) ? 0 : 1;
+
+ return 2;
+ }
+
void HUD_Powerups(void)
{
- float strength_time, shield_time, superweapons_time;
if(intermission == 2) return;
+
+ int allItems = getstati(STAT_ITEMS, 0, 24);
+ int allBuffs = getstati(STAT_BUFFS, 0, 24);
+ int strengthTime, shieldTime, superTime;
+
+ // Initialize items
if(!autocvar__hud_configure)
{
if(!autocvar_hud_panel_powerups) return;
if(spectatee_status == -1) return;
- if(!(getstati(STAT_ITEMS, 0, 24) & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON))) return;
- if (getstati(STAT_HEALTH) <= 0) return;
+ if(getstati(STAT_HEALTH) <= 0) return;
+ if(!(allItems & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON)) && !allBuffs) return;
- strength_time = bound(0, getstatf(STAT_STRENGTH_FINISHED) - time, 99);
- shield_time = bound(0, getstatf(STAT_INVINCIBLE_FINISHED) - time, 99);
- superweapons_time = bound(0, getstatf(STAT_SUPERWEAPONS_FINISHED) - time, 99);
+ strengthTime = bound(0, getstatf(STAT_STRENGTH_FINISHED) - time, 99);
+ shieldTime = bound(0, getstatf(STAT_INVINCIBLE_FINISHED) - time, 99);
+ superTime = bound(0, getstatf(STAT_SUPERWEAPONS_FINISHED) - time, 99);
- if (getstati(STAT_ITEMS, 0, 24) & IT_UNLIMITED_SUPERWEAPONS)
- superweapons_time = 99; // force max
+ if(allItems & IT_UNLIMITED_SUPERWEAPONS)
+ superTime = 99;
- // prevent stuff to show up on mismatch that will be fixed next frame
- if (!(getstati(STAT_ITEMS, 0, 24) & IT_SUPERWEAPON))
- superweapons_time = 0;
+ // Prevent stuff to show up on mismatch that will be fixed next frame
+ if(!(allItems & IT_SUPERWEAPON))
+ superTime = 0;
}
else
{
- strength_time = 15;
- shield_time = 27;
- superweapons_time = 13;
+ strengthTime = 15;
+ shieldTime = 27;
+ superTime = 13;
+ allBuffs = 0;
}
- HUD_Panel_UpdateCvars();
+ // Add items to linked list
+ resetPowerupItems();
- draw_beginBoldFont();
+ if(strengthTime)
+ addPowerupItem("Strength", "strength", autocvar_hud_progressbar_strength_color, strengthTime, 30);
+ if(shieldTime)
+ addPowerupItem("Shield", "shield", autocvar_hud_progressbar_shield_color, shieldTime, 30);
+ if(superTime)
+ addPowerupItem("Superweapons", "superweapons", autocvar_hud_progressbar_superweapons_color, superTime, 30);
- vector pos, mySize;
- pos = panel_pos;
- mySize = panel_size;
+ entity item;
+ for(item = Buff_Type_first; item; item = item.enemy)
+ if(allBuffs & item.items)
+ addPowerupItem(item.message, strcat("buff_", item.netname), item.colormod, bound(0, getstatf(STAT_BUFF_TIME) - time, 99), 60);
+
+ if(!powerupItemsCount)
+ return;
+
+ // Draw panel background
+ HUD_Panel_UpdateCvars();
+ HUD_Panel_DrawBg(1);
+
+ // Set drawing area
+ vector pos = panel_pos;
+ vector size = panel_size;
+ bool isVertical = size.y > size.x;
- HUD_Panel_DrawBg(bound(0, max(strength_time, shield_time, superweapons_time), 1));
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
- mySize -= '2 2 0' * panel_bg_padding;
+ size -= '2 2 0' * panel_bg_padding;
}
- float panel_ar = mySize.x/mySize.y;
- bool is_vertical = (panel_ar < 1);
- vector shield_offset = '0 0 0', strength_offset = '0 0 0', superweapons_offset = '0 0 0';
-
- int superweapons_is = -1;
+ // Find best partitioning of the drawing area
+ const float DESIRED_ASPECT = 6;
+ float aspect = 0, a;
+ int columns = 0, c;
+ int rows = 0, r;
+ int i = 1;
- if(superweapons_time)
+ do
{
- if(strength_time)
- {
- if(shield_time)
- superweapons_is = 0;
- else
- superweapons_is = 2;
- }
- else
- {
- if(shield_time)
- superweapons_is = 1;
- else
- superweapons_is = 2;
- }
- }
+ c = floor(powerupItemsCount / i);
+ r = ceil(powerupItemsCount / c);
+ a = isVertical ? (size.y/r) / (size.x/c) : (size.x/c) / (size.y/r);
- // FIXME handle superweapons here
- if(superweapons_is == 0)
- {
- if (panel_ar >= 4 || (panel_ar >= 1/4 && panel_ar < 1))
+ if(i == 1 || fabs(DESIRED_ASPECT - a) < fabs(DESIRED_ASPECT - aspect))
{
- mySize.x *= (1.0 / 3.0);
- superweapons_offset.x = mySize.x;
- if (autocvar_hud_panel_powerups_flip)
- shield_offset.x = 2*mySize.x;
- else
- strength_offset.x = 2*mySize.x;
- }
- else
- {
- mySize.y *= (1.0 / 3.0);
- superweapons_offset.y = mySize.y;
- if (autocvar_hud_panel_powerups_flip)
- shield_offset.y = 2*mySize.y;
- else
- strength_offset.y = 2*mySize.y;
+ aspect = a;
+ columns = c;
+ rows = r;
}
}
- else
+ while(++i <= powerupItemsCount);
+
+ // Prevent single items from getting too wide
+ if(powerupItemsCount == 1 && aspect > DESIRED_ASPECT)
{
- if (panel_ar >= 4 || (panel_ar >= 1/4 && panel_ar < 1))
+ if(isVertical)
{
- mySize.x *= 0.5;
- if (autocvar_hud_panel_powerups_flip)
- shield_offset.x = mySize.x;
- else
- strength_offset.x = mySize.x;
+ size.y *= 0.5;
+ pos.y += size.y * 0.5;
}
else
{
- mySize.y *= 0.5;
- if (autocvar_hud_panel_powerups_flip)
- shield_offset.y = mySize.y;
- else
- strength_offset.y = mySize.y;
+ size.x *= 0.5;
+ pos.x += size.x * 0.5;
}
}
- bool shield_baralign, strength_baralign, superweapons_baralign;
- bool shield_iconalign, strength_iconalign, superweapons_iconalign;
+ // Draw items from linked list
+ vector itemPos = pos;
+ vector itemSize = eX * (size.x / columns) + eY * (size.y / rows);
+ vector textColor = '1 1 1';
- if (autocvar_hud_panel_powerups_flip)
- {
- strength_baralign = (autocvar_hud_panel_powerups_baralign == 2 || autocvar_hud_panel_powerups_baralign == 1);
- shield_baralign = (autocvar_hud_panel_powerups_baralign == 3 || autocvar_hud_panel_powerups_baralign == 1);
- strength_iconalign = (autocvar_hud_panel_powerups_iconalign == 2 || autocvar_hud_panel_powerups_iconalign == 1);
- shield_iconalign = (autocvar_hud_panel_powerups_iconalign == 3 || autocvar_hud_panel_powerups_iconalign == 1);
- }
- else
- {
- shield_baralign = (autocvar_hud_panel_powerups_baralign == 2 || autocvar_hud_panel_powerups_baralign == 1);
- strength_baralign = (autocvar_hud_panel_powerups_baralign == 3 || autocvar_hud_panel_powerups_baralign == 1);
- shield_iconalign = (autocvar_hud_panel_powerups_iconalign == 2 || autocvar_hud_panel_powerups_iconalign == 1);
- strength_iconalign = (autocvar_hud_panel_powerups_iconalign == 3 || autocvar_hud_panel_powerups_iconalign == 1);
- }
+ int fullSeconds = 0;
+ int align = 0;
+ int column = 0;
+ int row = 0;
- if(superweapons_is == 0)
- {
- superweapons_iconalign = strength_iconalign;
- superweapons_baralign = 2;
- }
- else if(superweapons_is == 1)
- {
- superweapons_offset = strength_offset;
- superweapons_iconalign = strength_iconalign;
- superweapons_baralign = strength_baralign;
- }
- else // if(superweapons_is == 2)
+ draw_beginBoldFont();
+ for(item = powerupItems; item.count; item = item.chain)
{
- superweapons_offset = shield_offset;
- superweapons_iconalign = shield_iconalign;
- superweapons_baralign = shield_baralign;
- }
+ itemPos = eX * (pos.x + column * itemSize.x) + eY * (pos.y + row * itemSize.y);
- if(shield_time)
- {
- const float maxshield = 30;
- float shield = ceil(shield_time);
+ // Draw progressbar
if(autocvar_hud_panel_powerups_progressbar)
- HUD_Panel_DrawProgressBar(pos + shield_offset, mySize, autocvar_hud_panel_powerups_progressbar_shield, shield/maxshield, is_vertical, shield_baralign, autocvar_hud_progressbar_shield_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
- if(autocvar_hud_panel_powerups_text)
{
- if(shield > 1)
- DrawNumIcon(pos + shield_offset, mySize, shield, "shield", is_vertical, shield_iconalign, '1 1 1', 1);
- if(shield <= 5)
- DrawNumIcon_expanding(pos + shield_offset, mySize, shield, "shield", is_vertical, shield_iconalign, '1 1 1', 1, bound(0, (shield - shield_time) / 0.5, 1));
+ align = getPowerupItemAlign(autocvar_hud_panel_powerups_baralign, column, row, columns, rows, isVertical);
+ HUD_Panel_DrawProgressBar(itemPos, itemSize, "progressbar", item.count / item.lifetime, isVertical, align, item.colormod, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- }
- if(strength_time)
- {
- const float maxstrength = 30;
- float strength = ceil(strength_time);
- if(autocvar_hud_panel_powerups_progressbar)
- HUD_Panel_DrawProgressBar(pos + strength_offset, mySize, autocvar_hud_panel_powerups_progressbar_strength, strength/maxstrength, is_vertical, strength_baralign, autocvar_hud_progressbar_strength_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ // Draw icon and text
if(autocvar_hud_panel_powerups_text)
{
- if(strength > 1)
- DrawNumIcon(pos + strength_offset, mySize, strength, "strength", is_vertical, strength_iconalign, '1 1 1', 1);
- if(strength <= 5)
- DrawNumIcon_expanding(pos + strength_offset, mySize, strength, "strength", is_vertical, strength_iconalign, '1 1 1', 1, bound(0, (strength - strength_time) / 0.5, 1));
+ align = getPowerupItemAlign(autocvar_hud_panel_powerups_iconalign, column, row, columns, rows, isVertical);
+ fullSeconds = ceil(item.count);
+ textColor = '0.6 0.6 0.6' + (item.colormod * 0.4);
+
+ if(item.count > 1)
+ DrawNumIcon(itemPos, itemSize, fullSeconds, item.netname, isVertical, align, textColor, panel_fg_alpha);
+ if(item.count <= 5)
+ DrawNumIcon_expanding(itemPos, itemSize, fullSeconds, item.netname, isVertical, align, textColor, panel_fg_alpha, bound(0, (fullSeconds - item.count) / 0.5, 1));
}
- }
- if(superweapons_time)
- {
- const float maxsuperweapons = 30;
- float superweapons = ceil(superweapons_time);
- if(autocvar_hud_panel_powerups_progressbar)
- HUD_Panel_DrawProgressBar(pos + superweapons_offset, mySize, autocvar_hud_panel_powerups_progressbar_superweapons, superweapons/maxsuperweapons, is_vertical, superweapons_baralign, autocvar_hud_progressbar_superweapons_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
- if(autocvar_hud_panel_powerups_text)
+ // Determine next section
+ if(isVertical)
{
- if(superweapons > 1)
- DrawNumIcon(pos + superweapons_offset, mySize, superweapons, "superweapons", is_vertical, superweapons_iconalign, '1 1 1', 1);
- if(superweapons <= 5)
- DrawNumIcon_expanding(pos + superweapons_offset, mySize, superweapons, "superweapons", is_vertical, superweapons_iconalign, '1 1 1', 1, bound(0, (superweapons - superweapons_time) / 0.5, 1));
+ if(++column >= columns)
+ {
+ column = 0;
+ ++row;
+ }
+ }
+ else
+ {
+ if(++row >= rows)
+ {
+ row = 0;
+ ++column;
+ }
}
}
-
draw_endBoldFont();
}
yellowflag = (stat_items/CTF_YELLOW_FLAG_TAKEN) & 3;
pinkflag = (stat_items/CTF_PINK_FLAG_TAKEN) & 3;
neutralflag = (stat_items/CTF_NEUTRAL_FLAG_TAKEN) & 3;
-
+
ctf_oneflag = (stat_items & CTF_FLAG_NEUTRAL);
mod_active = (redflag || blueflag || yellowflag || pinkflag || neutralflag);
}
}
- // Buffs (#18)
- //
- void HUD_Buffs(void)
- {
- if(intermission == 2) return;
- int buffs = getstati(STAT_BUFFS, 0, 24);
- if(!autocvar__hud_configure)
- {
- if(!autocvar_hud_panel_buffs) return;
- if(spectatee_status == -1) return;
- if(getstati(STAT_HEALTH) <= 0) return;
- if(!buffs) return;
- }
- else
- {
- buffs = Buff_Type_first.items; // force first buff
- }
-
- int b = 0; // counter to tell other functions that we have buffs
- entity e;
- string s = "";
- for(e = Buff_Type_first; e; e = e.enemy) if(buffs & e.items)
- {
- ++b;
- string o = strcat(rgb_to_hexcolor(Buff_Color(e.items)), Buff_PrettyName(e.items));
- if(s == "")
- s = o;
- else
- s = strcat(s, " ", o);
- }
-
- HUD_Panel_UpdateCvars();
-
- draw_beginBoldFont();
-
- vector pos, mySize;
- pos = panel_pos;
- mySize = panel_size;
-
- HUD_Panel_DrawBg(bound(0, b, 1));
- if(panel_bg_padding)
- {
- pos += '1 1 0' * panel_bg_padding;
- mySize -= '2 2 0' * panel_bg_padding;
- }
-
- //float panel_ar = mySize_x/mySize_y;
- //bool is_vertical = (panel_ar < 1);
- //float buff_iconalign = autocvar_hud_panel_buffs_iconalign;
- vector buff_offset = '0 0 0';
-
- for(e = Buff_Type_first; e; e = e.enemy) if(buffs & e.items)
- {
- //DrawNumIcon(pos + buff_offset, mySize, shield, "shield", is_vertical, buff_iconalign, '1 1 1', 1);
- drawcolorcodedstring_aspect(pos + buff_offset, s, mySize, panel_fg_alpha * 0.5, DRAWFLAG_NORMAL);
- }
-
- draw_endBoldFont();
- }
-
+// ItemsTime (#XX)
+//
+const float ITEMSTIME_MAXITEMS = 10;
+float ItemsTime_time[ITEMSTIME_MAXITEMS];
+float ItemsTime_availableTime[ITEMSTIME_MAXITEMS];
+string GetItemsTimePicture(float i)
+{
+ switch(i)
+ {
+ case 0: return "item_large_armor";
+ case 1: return "item_mega_health";
+ case 2: return "item_strength";
+ case 3: return "item_shield";
+ case 4: return "item_mega_health";
+ case 5: return "item_strength";
+ case 6: return "item_shield";
+ case 7: return "fuelregen";
+ case 8: return "jetpack";
+ case 9: return "superweapons";
+ default: return "";
+ }
+}
+
+void DrawItemsTimeItem(vector myPos, vector mySize, float ar, float itemcode, float item_time, bool item_available, float item_availableTime)
+{
+ float t = 0;
+ vector color = '0 0 0';
+ float picalpha;
+
+ if(autocvar_hud_panel_itemstime_hidespawned == 2)
+ picalpha = 1;
+ else if(item_available)
+ {
+ float BLINK_FACTOR = 0.15;
+ float BLINK_BASE = 0.85;
+ float BLINK_FREQ = 5;
+ picalpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
+ }
+ else
+ picalpha = 0.3;
+ t = floor(item_time - time + 0.999);
+ if(t < 5)
+ color = '0.7 0 0';
+ else if(t < 10)
+ color = '0.7 0.7 0';
+ else
+ color = '1 1 1';
+
+ vector picpos, numpos;
+ if(autocvar_hud_panel_itemstime_iconalign)
+ {
+ numpos = myPos;
+ picpos = myPos + eX * (ar - 1) * mySize_y;
+ }
+ else
+ {
+ numpos = myPos + eX * mySize_y;
+ picpos = myPos;
+ }
+
+ if(t > 0 && autocvar_hud_panel_itemstime_progressbar)
+ {
+ vector p_pos, p_size;
+ if(autocvar_hud_panel_itemstime_progressbar_reduced)
+ {
+ p_pos = numpos;
+ p_size = eX * ((ar - 1)/ar) * mySize_x + eY * mySize_y;
+ }
+ else
+ {
+ p_pos = myPos;
+ p_size = mySize;
+ }
+ HUD_Panel_DrawProgressBar(p_pos, p_size, autocvar_hud_panel_itemstime_progressbar_name, t/autocvar_hud_panel_itemstime_progressbar_maxtime, 0, autocvar_hud_panel_itemstime_iconalign, color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
+
+ if(t > 0 && autocvar_hud_panel_itemstime_text)
+ drawstring_aspect(numpos, ftos(t), eX * ((ar - 1)/ar) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+ else
+ picpos.x = myPos.x + mySize.x / 2 - mySize.y / 2;
+ if(item_availableTime)
+ drawpic_aspect_skin_expanding(picpos, GetItemsTimePicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * picalpha, DRAWFLAG_NORMAL, item_availableTime);
+ drawpic_aspect_skin(picpos, GetItemsTimePicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * picalpha, DRAWFLAG_NORMAL);
+}
+
+void HUD_ItemsTime(void)
+{
+ if(!autocvar__hud_configure)
+ {
+ if(!(
+ (autocvar_hud_panel_itemstime == 1 && spectatee_status != 0)
+ || (autocvar_hud_panel_itemstime == 2 && (spectatee_status != 0 || warmup_stage))
+ )) { return; }
+
+ ItemsTime_time[0] = getstatf(STAT_ARMOR_LARGE_TIME);
+ ItemsTime_time[1] = getstatf(STAT_HEALTH_MEGA_TIME);
+ ItemsTime_time[2] = getstatf(STAT_INVISIBLE_TIME);
+ ItemsTime_time[3] = getstatf(STAT_SPEED_TIME);
+ ItemsTime_time[4] = getstatf(STAT_EXTRALIFE_TIME);
+ ItemsTime_time[5] = getstatf(STAT_STRENGTH_TIME);
+ ItemsTime_time[6] = getstatf(STAT_SHIELD_TIME);
+ ItemsTime_time[7] = getstatf(STAT_FUELREGEN_TIME);
+ ItemsTime_time[8] = getstatf(STAT_JETPACK_TIME);
+ ItemsTime_time[9] = getstatf(STAT_SUPERWEAPONS_TIME);
+ }
+ else
+ {
+ // do not show here mutator-dependent items
+ ItemsTime_time[0] = time + 0;
+ ItemsTime_time[1] = time + 8;
+ ItemsTime_time[2] = -1; // mutator-dependent
+ ItemsTime_time[3] = -1; // mutator-dependent
+ ItemsTime_time[4] = -1; // mutator-dependent
+ ItemsTime_time[5] = time + 0;
+ ItemsTime_time[6] = time + 4;
+ ItemsTime_time[7] = time + 49;
+ ItemsTime_time[8] = -1;
+ ItemsTime_time[9] = time + 28;
+ }
+
+ float i;
+ float count = 0;
+ if(autocvar_hud_panel_itemstime_hidespawned == 1)
+ for (i = 0; i < ITEMSTIME_MAXITEMS; ++i)
+ count += (ItemsTime_time[i] > time || -ItemsTime_time[i] > time);
+ else if(autocvar_hud_panel_itemstime_hidespawned == 2)
+ for (i = 0; i < ITEMSTIME_MAXITEMS; ++i)
+ count += (ItemsTime_time[i] > time);
+ else
+ for (i = 0; i < ITEMSTIME_MAXITEMS; ++i)
+ count += (ItemsTime_time[i] != -1);
+ if (count == 0)
+ return;
+
+ HUD_Panel_UpdateCvars();
+
+ vector pos, mySize;
+ pos = panel_pos;
+ mySize = panel_size;
+
+ if(panel_bg_padding)
+ {
+ pos += '1 1 0' * panel_bg_padding;
+ mySize -= '2 2 0' * panel_bg_padding;
+ }
+
+ float rows, columns;
+ float ar = max(2, autocvar_hud_panel_itemstime_ratio) + 1;
+ rows = HUD_GetRowCount(count, mySize, ar);
+ columns = ceil(count/rows);
+
+ vector itemstime_size = eX * mySize.x*(1/columns) + eY * mySize.y*(1/rows);
+
+ vector offset = '0 0 0';
+ float newSize;
+ if(autocvar_hud_panel_itemstime_dynamicsize)
+ {
+ if(autocvar__hud_configure)
+ if(menu_enabled != 2)
+ HUD_Panel_DrawBg(1); // also draw the bg of the entire panel
+
+ // reduce panel to avoid spacing items
+ if(itemstime_size.x / itemstime_size.y < ar)
+ {
+ newSize = rows * itemstime_size.x / ar;
+ pos.y += (mySize.y - newSize) / 2;
+ mySize.y = newSize;
+ itemstime_size.y = mySize.y / rows;
+ }
+ else
+ {
+ newSize = columns * itemstime_size.y * ar;
+ pos.x += (mySize.x - newSize) / 2;
+ mySize.x = newSize;
+ itemstime_size.x = mySize.x / columns;
+ }
+ panel_pos = pos - '1 1 0' * panel_bg_padding;
+ panel_size = mySize + '2 2 0' * panel_bg_padding;
+ }
+ else
+ {
+ if(itemstime_size.x/itemstime_size.y > ar)
+ {
+ newSize = ar * itemstime_size.y;
+ offset.x = itemstime_size.x - newSize;
+ pos.x += offset.x/2;
+ itemstime_size.x = newSize;
+ }
+ else
+ {
+ newSize = 1/ar * itemstime_size.x;
+ offset.y = itemstime_size.y - newSize;
+ pos.y += offset.y/2;
+ itemstime_size.y = newSize;
+ }
+ }
+
+ HUD_Panel_DrawBg(1);
+
+ float row = 0, column = 0;
+ bool item_available;
+ for (i = 0; i < ITEMSTIME_MAXITEMS; ++i) {
+ if (ItemsTime_time[i] == -1)
+ continue;
+
+ float item_time = ItemsTime_time[i];
+ if(item_time < -1)
+ {
+ item_available = true;
+ item_time = -item_time;
+ }
+ else
+ item_available = (item_time <= time);
+
+ if(ItemsTime_time[i] >= 0)
+ {
+ if(time <= ItemsTime_time[i])
+ ItemsTime_availableTime[i] = 0;
+ else if(ItemsTime_availableTime[i] == 0)
+ ItemsTime_availableTime[i] = time;
+ }
+ else if(ItemsTime_availableTime[i] == 0)
+ ItemsTime_availableTime[i] = time;
+
+ float f = (time - ItemsTime_availableTime[i]) * 2;
+ f = (f > 1) ? 0 : bound(0, f, 1);
+
+ if(autocvar_hud_panel_itemstime_hidespawned == 1)
+ if(!(ItemsTime_time[i] > time || -ItemsTime_time[i] > time))
+ continue;
+
+ if(autocvar_hud_panel_itemstime_hidespawned == 2)
+ if(!(ItemsTime_time[i] > time))
+ continue;
+
+ DrawItemsTimeItem(pos + eX * column * (itemstime_size.x + offset.x) + eY * row * (itemstime_size.y + offset.y), itemstime_size, ar, i, item_time, item_available, f);
+ ++row;
+ if(row >= rows)
+ {
+ row = 0;
+ column = column + 1;
+ }
+ }
+}
+
++
/*
==================
Main HUD system
int prev_p_health, prev_p_armor;
- #define HUD_PANELS(HUD_PANEL) \
- HUD_PANEL(WEAPONS , HUD_Weapons , weapons) \
- HUD_PANEL(AMMO , HUD_Ammo , ammo) \
- HUD_PANEL(POWERUPS , HUD_Powerups , powerups) \
- HUD_PANEL(HEALTHARMOR , HUD_HealthArmor , healtharmor) \
- HUD_PANEL(NOTIFY , HUD_Notify , notify) \
- HUD_PANEL(TIMER , HUD_Timer , timer) \
- HUD_PANEL(RADAR , HUD_Radar , radar) \
- HUD_PANEL(SCORE , HUD_Score , score) \
- HUD_PANEL(RACETIMER , HUD_RaceTimer , racetimer) \
- HUD_PANEL(VOTE , HUD_Vote , vote) \
- HUD_PANEL(MODICONS , HUD_ModIcons , modicons) \
- HUD_PANEL(PRESSEDKEYS , HUD_PressedKeys , pressedkeys) \
- HUD_PANEL(CHAT , HUD_Chat , chat) \
- HUD_PANEL(ENGINEINFO , HUD_EngineInfo , engineinfo) \
- HUD_PANEL(INFOMESSAGES , HUD_InfoMessages , infomessages) \
- HUD_PANEL(PHYSICS , HUD_Physics , physics) \
- HUD_PANEL(CENTERPRINT , HUD_CenterPrint , centerprint) \
- HUD_PANEL(BUFFS , HUD_Buffs , buffs) \
+ #define HUD_PANELS(HUD_PANEL) \
+ HUD_PANEL(WEAPONS , HUD_Weapons , weapons) \
+ HUD_PANEL(AMMO , HUD_Ammo , ammo) \
+ HUD_PANEL(POWERUPS , HUD_Powerups , powerups) \
+ HUD_PANEL(HEALTHARMOR , HUD_HealthArmor , healtharmor) \
+ HUD_PANEL(NOTIFY , HUD_Notify , notify) \
+ HUD_PANEL(TIMER , HUD_Timer , timer) \
+ HUD_PANEL(RADAR , HUD_Radar , radar) \
+ HUD_PANEL(SCORE , HUD_Score , score) \
+ HUD_PANEL(RACETIMER , HUD_RaceTimer , racetimer) \
+ HUD_PANEL(VOTE , HUD_Vote , vote) \
+ HUD_PANEL(MODICONS , HUD_ModIcons , modicons) \
+ HUD_PANEL(PRESSEDKEYS , HUD_PressedKeys , pressedkeys) \
+ HUD_PANEL(CHAT , HUD_Chat , chat) \
+ HUD_PANEL(ENGINEINFO , HUD_EngineInfo , engineinfo) \
+ HUD_PANEL(INFOMESSAGES , HUD_InfoMessages , infomessages) \
+ HUD_PANEL(PHYSICS , HUD_Physics , physics) \
+ HUD_PANEL(CENTERPRINT , HUD_CenterPrint , centerprint) \
HUD_PANEL(MAPVOTE , MapVote_Draw , mapvote) \
+ HUD_PANEL(ITEMSTIME , HUD_ItemsTime , itemstime) \
// always add new panels to the end of list
#define HUD_PANEL(NAME, draw_func, name) \
HUD_Write_PanelCvar_q("_text");
break;
case HUD_PANEL_POWERUPS:
- HUD_Write_PanelCvar_q("_flip");
HUD_Write_PanelCvar_q("_iconalign");
HUD_Write_PanelCvar_q("_baralign");
HUD_Write_PanelCvar_q("_progressbar");
- HUD_Write_PanelCvar_q("_progressbar_strength");
- HUD_Write_PanelCvar_q("_progressbar_shield");
HUD_Write_PanelCvar_q("_text");
break;
case HUD_PANEL_HEALTHARMOR:
HUD_Write_PanelCvar_q("_fade_subsequent_passtwo_minalpha");
HUD_Write_PanelCvar_q("_fade_subsequent_minfontsize");
HUD_Write_PanelCvar_q("_fade_minfontsize");
+ break;
+ case HUD_PANEL_ITEMSTIME:
+ HUD_Write_PanelCvar_q("_iconalign");
+ HUD_Write_PanelCvar_q("_progressbar");
+ HUD_Write_PanelCvar_q("_progressbar_name");
+ HUD_Write_PanelCvar_q("_progressbar_reduced");
+ HUD_Write_PanelCvar_q("_text");
+ HUD_Write_PanelCvar_q("_ratio");
+ HUD_Write_PanelCvar_q("_dynamicsize");
+ break;
}
HUD_Write("\n");
}
const int ENT_CLIENT_SWAMP = 69;
const int ENT_CLIENT_CORNER = 70;
const int ENT_CLIENT_KEYLOCK = 71;
+ const int ENT_CLIENT_VIEWLOC = 78;
+ const int ENT_CLIENT_VIEWLOC_TRIGGER = 79;
const int ENT_CLIENT_HEALING_ORB = 80;
const int SPRITERULE_DEFAULT = 0;
const int SPRITERULE_TEAMPLAY = 1;
+const int SPRITERULE_SPECTATOR = 2;
const int RADARICON_NONE = 0;
const int RADARICON_FLAG = 1;
const int STAT_OK_AMMO_CHARGEPOOL = 86;
const int STAT_FROZEN = 87;
const int STAT_REVIVE_PROGRESS = 88;
-const int STAT_BUFF_TIME = 90;
-const int STAT_WEAPONSINMAP = 91;
-const int STAT_WEAPONSINMAP2 = 92;
-const int STAT_WEAPONSINMAP3 = 93;
-const int STAT_CTF_FLAGSTATUS = 94;
-// 95 empty?
-// 96 empty?
-// 97 empty?
-// 98 empty?
+const int STAT_ARMOR_LARGE_TIME = 89;
+const int STAT_HEALTH_MEGA_TIME = 90;
+const int STAT_INVISIBLE_TIME = 91;
+const int STAT_SPEED_TIME = 92;
+const int STAT_EXTRALIFE_TIME = 93;
+const int STAT_STRENGTH_TIME = 94;
+const int STAT_SHIELD_TIME = 95;
+const int STAT_FUELREGEN_TIME = 96;
+const int STAT_JETPACK_TIME = 97;
+const int STAT_SUPERWEAPONS_TIME = 98;
// 99 empty?
-
/* The following stats change depending on the gamemode, so can share the same ID */
// IDs 100 to 104 reserved for gamemodes
const int STAT_PL_CROUCH_VIEW_OFS1 = 117;
const int STAT_PL_CROUCH_VIEW_OFS2 = 118;
const int STAT_PL_CROUCH_VIEW_OFS3 = 119;
-// 120 empty?
-// 121 empty?
-// 122 empty?
-// 123 empty?
-// 124 empty?
+const int STAT_WEAPONSINMAP = 120;
+const int STAT_WEAPONSINMAP2 = 121;
+const int STAT_WEAPONSINMAP3 = 122;
- const int STAT_CTF_FLAGSTATUS = 123;
- // 124 empty?
++const int STAT_BUFF_TIME = 123;
++const int STAT_CTF_FLAGSTATUS = 124;
// 125 empty?
// 126 empty?
// 127 empty?
const int STAT_MOVEVARS_FRICTION_SLICK = 191;
const int STAT_MOVEVARS_FRICTION_ONLAND = 192;
const int STAT_MOVEVARS_JUMPSPEEDCAP_DISABLE_ONRAMPS = 193;
- const int STAT_MOVEVARS_JUMPSPEEDCAP_MAX = 194;
- const int STAT_MOVEVARS_JUMPSPEEDCAP_MIN = 195;
+ // 194 empty?
+ // 195 empty?
const int STAT_DOUBLEJUMP = 196;
const int STAT_MOVEVARS_TRACK_CANJUMP = 197;
const int STAT_MULTIJUMP_ADD = 198;
#include "xonotic/dialog_credits.qc"
#include "xonotic/dialog_firstrun.qc"
#include "xonotic/dialog_hudpanel_ammo.qc"
- #include "xonotic/dialog_hudpanel_buffs.qc"
#include "xonotic/dialog_hudpanel_centerprint.qc"
#include "xonotic/dialog_hudpanel_chat.qc"
#include "xonotic/dialog_hudpanel_engineinfo.qc"
#include "xonotic/dialog_hudpanel_healtharmor.qc"
#include "xonotic/dialog_hudpanel_infomessages.qc"
+#include "xonotic/dialog_hudpanel_itemstime.qc"
#include "xonotic/dialog_hudpanel_modicons.qc"
#include "xonotic/dialog_hudpanel_notification.qc"
#include "xonotic/dialog_hudpanel_physics.qc"
i.configureDialog(i);
me.addItemRightCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
- i = NEW(XonoticHUDBuffsDialog);
- i.configureDialog(i);
- me.addItemRightCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
+ i = NEW(XonoticHUDItemsTimeDialog);
+ i.configureDialog(i);
+ me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-
// dialogs used by settings
me.userbindEditDialog = i = NEW(XonoticUserbindEditDialog);
i.configureDialog(i);
int autocvar_sv_gentle;
#define autocvar_sv_gravity cvar("sv_gravity")
string autocvar_sv_intermission_cdtrack;
- float autocvar_sv_jumpspeedcap_max;
+float autocvar_sv_itemstime;
+ string autocvar_sv_jumpspeedcap_max;
float autocvar_sv_jumpspeedcap_max_disable_on_ramps;
- float autocvar_sv_jumpspeedcap_min;
+ string autocvar_sv_jumpspeedcap_min;
float autocvar_sv_jumpvelocity;
bool autocvar_sv_logscores_bots;
bool autocvar_sv_logscores_console;
bool autocvar_g_physics_clientselect;
string autocvar_g_physics_clientselect_options;
string autocvar_g_physics_clientselect_default;
+ bool autocvar_g_buffs_effects;
float autocvar_g_buffs_waypoint_distance;
bool autocvar_g_buffs_randomize;
float autocvar_g_buffs_random_lifetime;
float autocvar_g_buffs_vengeance_damage_multiplier;
float autocvar_g_buffs_bash_force;
float autocvar_g_buffs_bash_force_self;
- float autocvar_g_buffs_disability_time;
+ float autocvar_g_buffs_disability_slowtime;
float autocvar_g_buffs_disability_speed;
float autocvar_g_buffs_disability_rate;
+ float autocvar_g_buffs_disability_weaponspeed;
float autocvar_g_buffs_speed_speed;
float autocvar_g_buffs_speed_rate;
+ float autocvar_g_buffs_speed_weaponspeed;
float autocvar_g_buffs_speed_damage_take;
float autocvar_g_buffs_speed_regen;
float autocvar_g_buffs_vampire_damage_steal;
float autocvar_g_buffs_invisible_alpha;
float autocvar_g_buffs_flight_gravity;
float autocvar_g_buffs_jump_height;
+ float autocvar_g_buffs_inferno_burntime_factor;
+ float autocvar_g_buffs_inferno_burntime_min_time;
+ float autocvar_g_buffs_inferno_burntime_target_damage;
+ float autocvar_g_buffs_inferno_burntime_target_time;
+ float autocvar_g_buffs_inferno_damagemultiplier;
+ float autocvar_g_buffs_swapper_range;
+ float autocvar_g_buffs_magnet_range_item;
float autocvar_sv_player_scale;
#endif
if(IS_REAL_CLIENT(self))
{
+ Item_ItemsTime_SetTimesForPlayer(self);
msg_entity = self;
WriteByte(MSG_ONE, SVC_SETVIEW);
WriteEntity(MSG_ONE, self);
if(self.killcount != -666)
{
Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_SPECTATE, self.netname);
- if(autocvar_g_chat_nospectators == 1 || (cvar("g_warmup") && !(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2))
+ if(!intermission_running)
+ if(autocvar_g_chat_nospectators == 1 || (!(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2))
Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_CHAT_NOSPECTATORS);
if(self.just_joined == false) {
else
self.superweapons_finished = 0;
+ if(!warmup_stage)
+ Item_ItemsTime_ResetTimesForPlayer(self);
+
if(g_weaponarena_random) // WEAPONTODO: more stuff that should be in a mutator. also: rename those cvars
{
if(g_weaponarena_random_with_blaster)