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_minigameboard "" "enable/disable this panel"
+seta hud_panel_minigameboard_pos "" "position of this panel"
+seta hud_panel_minigameboard_size "" "size of this panel"
+seta hud_panel_minigameboard_bg "" "if set to something else than \"\" = override default background"
+seta hud_panel_minigameboard_bg_color "" "if set to something else than \"\" = override default panel background color"
+seta hud_panel_minigameboard_bg_color_team "" "override panel color with team color in team based games"
+seta hud_panel_minigameboard_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
+seta hud_panel_minigameboard_bg_border "" "if set to something else than \"\" = override default size of border around the background"
+seta hud_panel_minigameboard_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+
+seta hud_panel_minigamestatus "" "enable/disable this panel"
+seta hud_panel_minigamestatus_pos "" "position of this panel"
+seta hud_panel_minigamestatus_size "" "size of this panel"
+seta hud_panel_minigamestatus_bg "" "if set to something else than \"\" = override default background"
+seta hud_panel_minigamestatus_bg_color "" "if set to something else than \"\" = override default panel background color"
+seta hud_panel_minigamestatus_bg_color_team "" "override panel color with team color in team based games"
+seta hud_panel_minigamestatus_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
+seta hud_panel_minigamestatus_bg_border "" "if set to something else than \"\" = override default size of border around the background"
+seta hud_panel_minigamestatus_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+
+seta hud_panel_minigamehelp "" "enable/disable this panel"
+seta hud_panel_minigamehelp_pos "" "position of this panel"
+seta hud_panel_minigamehelp_size "" "size of this panel"
+seta hud_panel_minigamehelp_bg "" "if set to something else than \"\" = override default background"
+seta hud_panel_minigamehelp_bg_color "" "if set to something else than \"\" = override default panel background color"
+seta hud_panel_minigamehelp_bg_color_team "" "override panel color with team color in team based games"
+seta hud_panel_minigamehelp_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
+seta hud_panel_minigamehelp_bg_border "" "if set to something else than \"\" = override default size of border around the background"
+seta hud_panel_minigamehelp_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+
+seta hud_panel_minigamemenu "" "enable/disable this panel"
+seta hud_panel_minigamemenu_pos "" "position of this panel"
+seta hud_panel_minigamemenu_size "" "size of this panel"
+seta hud_panel_minigamemenu_bg "" "if set to something else than \"\" = override default background"
+seta hud_panel_minigamemenu_bg_color "" "if set to something else than \"\" = override default panel background color"
+seta hud_panel_minigamemenu_bg_color_team "" "override panel color with team color in team based games"
+seta hud_panel_minigamemenu_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
+seta hud_panel_minigamemenu_bg_border "" "if set to something else than \"\" = override default size of border around the background"
+seta hud_panel_minigamemenu_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 "" "if set to something else than \"\" = override default background"
+ seta hud_panel_mapvote_bg_color "" "if set to something else than \"\" = override default panel background color"
+ seta hud_panel_mapvote_bg_color_team "" "override panel color with team color in team based games"
+ 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"
exec mutators.cfg
exec notifications.cfg
exec monsters.cfg
+exec minigames.cfg
+ exec physics.cfg
// load console command aliases and settings
exec commands.cfg
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.435000 0.840000"
- seta hud_panel_buffs_size "0.125000 0.035000"
- 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_default"
+ seta hud_panel_mapvote_bg_color ""
+ seta hud_panel_mapvote_bg_color_team ""
+ seta hud_panel_mapvote_bg_alpha ""
+ 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"
+seta hud_panel_minigameboard "1"
+seta hud_panel_minigameboard_pos "0.22 0.15"
+seta hud_panel_minigameboard_size "0.50 0.60"
+seta hud_panel_minigameboard_bg "border_small"
+seta hud_panel_minigameboard_bg_color ""
+seta hud_panel_minigameboard_bg_color_team ""
+seta hud_panel_minigameboard_bg_alpha ""
+seta hud_panel_minigameboard_bg_border ""
+seta hud_panel_minigameboard_bg_padding ""
+
+seta hud_panel_minigamestatus "1"
+seta hud_panel_minigamestatus_pos "0.74 0.15"
+seta hud_panel_minigamestatus_size "0.2 0.60"
+seta hud_panel_minigamestatus_bg "border_small"
+seta hud_panel_minigamestatus_bg_color ""
+seta hud_panel_minigamestatus_bg_color_team ""
+seta hud_panel_minigamestatus_bg_alpha ""
+seta hud_panel_minigamestatus_bg_border ""
+seta hud_panel_minigamestatus_bg_padding ""
+
+seta hud_panel_minigamehelp "1"
+seta hud_panel_minigamehelp_pos "0.22 0.78"
+seta hud_panel_minigamehelp_size "0.50 0.20"
+seta hud_panel_minigamehelp_bg ""
+seta hud_panel_minigamehelp_bg_color ""
+seta hud_panel_minigamehelp_bg_color_team ""
+seta hud_panel_minigamehelp_bg_alpha ""
+seta hud_panel_minigamehelp_bg_border ""
+seta hud_panel_minigamehelp_bg_padding ""
+
+seta hud_panel_minigamemenu "0"
+seta hud_panel_minigamemenu_pos "0 0.26"
+seta hud_panel_minigamemenu_size "0.2 0.49"
+seta hud_panel_minigamemenu_bg "border_small"
+seta hud_panel_minigamemenu_bg_color ""
+seta hud_panel_minigamemenu_bg_color_team ""
+seta hud_panel_minigamemenu_bg_alpha ""
+seta hud_panel_minigamemenu_bg_border ""
+seta hud_panel_minigamemenu_bg_padding ""
+
menu_sync
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 "0"
+ seta hud_panel_mapvote_bg_color ""
+ seta hud_panel_mapvote_bg_color_team ""
+ seta hud_panel_mapvote_bg_alpha ""
+ 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"
+seta hud_panel_minigameboard "1"
+seta hud_panel_minigameboard_pos "0.22 0.15"
+seta hud_panel_minigameboard_size "0.50 0.60"
+seta hud_panel_minigameboard_bg "border_small"
+seta hud_panel_minigameboard_bg_color ""
+seta hud_panel_minigameboard_bg_color_team ""
+seta hud_panel_minigameboard_bg_alpha ""
+seta hud_panel_minigameboard_bg_border ""
+seta hud_panel_minigameboard_bg_padding ""
+
+seta hud_panel_minigamestatus "1"
+seta hud_panel_minigamestatus_pos "0.74 0.15"
+seta hud_panel_minigamestatus_size "0.2 0.60"
+seta hud_panel_minigamestatus_bg "border_small"
+seta hud_panel_minigamestatus_bg_color ""
+seta hud_panel_minigamestatus_bg_color_team ""
+seta hud_panel_minigamestatus_bg_alpha ""
+seta hud_panel_minigamestatus_bg_border ""
+seta hud_panel_minigamestatus_bg_padding ""
+
+seta hud_panel_minigamehelp "1"
+seta hud_panel_minigamehelp_pos "0.22 0.78"
+seta hud_panel_minigamehelp_size "0.50 0.20"
+seta hud_panel_minigamehelp_bg ""
+seta hud_panel_minigamehelp_bg_color ""
+seta hud_panel_minigamehelp_bg_color_team ""
+seta hud_panel_minigamehelp_bg_alpha ""
+seta hud_panel_minigamehelp_bg_border ""
+seta hud_panel_minigamehelp_bg_padding ""
+
+seta hud_panel_minigamemenu "0"
+seta hud_panel_minigamemenu_pos "0 0.26"
+seta hud_panel_minigamemenu_size "0.2 0.49"
+seta hud_panel_minigamemenu_bg "border_small"
+seta hud_panel_minigamemenu_bg_color ""
+seta hud_panel_minigamemenu_bg_color_team ""
+seta hud_panel_minigamemenu_bg_alpha ""
+seta hud_panel_minigamemenu_bg_border ""
+seta hud_panel_minigamemenu_bg_padding ""
+
menu_sync
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 "0"
+ seta hud_panel_mapvote_bg_color ""
+ seta hud_panel_mapvote_bg_color_team ""
+ seta hud_panel_mapvote_bg_alpha ""
+ 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"
+seta hud_panel_minigameboard "1"
+seta hud_panel_minigameboard_pos "0.22 0.15"
+seta hud_panel_minigameboard_size "0.50 0.60"
+seta hud_panel_minigameboard_bg "border_small"
+seta hud_panel_minigameboard_bg_color ""
+seta hud_panel_minigameboard_bg_color_team ""
+seta hud_panel_minigameboard_bg_alpha ""
+seta hud_panel_minigameboard_bg_border ""
+seta hud_panel_minigameboard_bg_padding ""
+
+seta hud_panel_minigamestatus "1"
+seta hud_panel_minigamestatus_pos "0.74 0.15"
+seta hud_panel_minigamestatus_size "0.2 0.60"
+seta hud_panel_minigamestatus_bg "border_small"
+seta hud_panel_minigamestatus_bg_color ""
+seta hud_panel_minigamestatus_bg_color_team ""
+seta hud_panel_minigamestatus_bg_alpha ""
+seta hud_panel_minigamestatus_bg_border ""
+seta hud_panel_minigamestatus_bg_padding ""
+
+seta hud_panel_minigamehelp "1"
+seta hud_panel_minigamehelp_pos "0.22 0.78"
+seta hud_panel_minigamehelp_size "0.50 0.20"
+seta hud_panel_minigamehelp_bg ""
+seta hud_panel_minigamehelp_bg_color ""
+seta hud_panel_minigamehelp_bg_color_team ""
+seta hud_panel_minigamehelp_bg_alpha ""
+seta hud_panel_minigamehelp_bg_border ""
+seta hud_panel_minigamehelp_bg_padding ""
+
+seta hud_panel_minigamemenu "0"
+seta hud_panel_minigamemenu_pos "0 0.26"
+seta hud_panel_minigamemenu_size "0.2 0.49"
+seta hud_panel_minigamemenu_bg "border_small"
+seta hud_panel_minigamemenu_bg_color ""
+seta hud_panel_minigamemenu_bg_color_team ""
+seta hud_panel_minigamemenu_bg_alpha ""
+seta hud_panel_minigamemenu_bg_border ""
+seta hud_panel_minigamemenu_bg_padding ""
+
menu_sync
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 "0"
+ seta hud_panel_mapvote_bg_color ""
+ seta hud_panel_mapvote_bg_color_team ""
+ seta hud_panel_mapvote_bg_alpha ""
+ 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"
+seta hud_panel_minigameboard "1"
+seta hud_panel_minigameboard_pos "0.22 0.15"
+seta hud_panel_minigameboard_size "0.50 0.60"
+seta hud_panel_minigameboard_bg "border_small"
+seta hud_panel_minigameboard_bg_color ""
+seta hud_panel_minigameboard_bg_color_team ""
+seta hud_panel_minigameboard_bg_alpha ""
+seta hud_panel_minigameboard_bg_border ""
+seta hud_panel_minigameboard_bg_padding ""
+
+seta hud_panel_minigamestatus "1"
+seta hud_panel_minigamestatus_pos "0.74 0.15"
+seta hud_panel_minigamestatus_size "0.2 0.60"
+seta hud_panel_minigamestatus_bg "border_small"
+seta hud_panel_minigamestatus_bg_color ""
+seta hud_panel_minigamestatus_bg_color_team ""
+seta hud_panel_minigamestatus_bg_alpha ""
+seta hud_panel_minigamestatus_bg_border ""
+seta hud_panel_minigamestatus_bg_padding ""
+
+seta hud_panel_minigamehelp "1"
+seta hud_panel_minigamehelp_pos "0.22 0.78"
+seta hud_panel_minigamehelp_size "0.50 0.20"
+seta hud_panel_minigamehelp_bg ""
+seta hud_panel_minigamehelp_bg_color ""
+seta hud_panel_minigamehelp_bg_color_team ""
+seta hud_panel_minigamehelp_bg_alpha ""
+seta hud_panel_minigamehelp_bg_border ""
+seta hud_panel_minigamehelp_bg_padding ""
+
+seta hud_panel_minigamemenu "0"
+seta hud_panel_minigamemenu_pos "0 0.26"
+seta hud_panel_minigamemenu_size "0.2 0.49"
+seta hud_panel_minigamemenu_bg "border_small"
+seta hud_panel_minigamemenu_bg_color ""
+seta hud_panel_minigamemenu_bg_color_team ""
+seta hud_panel_minigamemenu_bg_alpha ""
+seta hud_panel_minigamemenu_bg_border ""
+seta hud_panel_minigamemenu_bg_padding ""
+
menu_sync
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 "0"
+ seta hud_panel_mapvote_bg_color ""
+ seta hud_panel_mapvote_bg_color_team ""
+ seta hud_panel_mapvote_bg_alpha ""
+ 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"
+seta hud_panel_minigameboard "1"
+seta hud_panel_minigameboard_pos "0.22 0.15"
+seta hud_panel_minigameboard_size "0.50 0.60"
+seta hud_panel_minigameboard_bg "border_small"
+seta hud_panel_minigameboard_bg_color ""
+seta hud_panel_minigameboard_bg_color_team ""
+seta hud_panel_minigameboard_bg_alpha ""
+seta hud_panel_minigameboard_bg_border ""
+seta hud_panel_minigameboard_bg_padding ""
+
+seta hud_panel_minigamestatus "1"
+seta hud_panel_minigamestatus_pos "0.74 0.15"
+seta hud_panel_minigamestatus_size "0.2 0.60"
+seta hud_panel_minigamestatus_bg "border_small"
+seta hud_panel_minigamestatus_bg_color ""
+seta hud_panel_minigamestatus_bg_color_team ""
+seta hud_panel_minigamestatus_bg_alpha ""
+seta hud_panel_minigamestatus_bg_border ""
+seta hud_panel_minigamestatus_bg_padding ""
+
+seta hud_panel_minigamehelp "1"
+seta hud_panel_minigamehelp_pos "0.22 0.78"
+seta hud_panel_minigamehelp_size "0.50 0.20"
+seta hud_panel_minigamehelp_bg ""
+seta hud_panel_minigamehelp_bg_color ""
+seta hud_panel_minigamehelp_bg_color_team ""
+seta hud_panel_minigamehelp_bg_alpha ""
+seta hud_panel_minigamehelp_bg_border ""
+seta hud_panel_minigamehelp_bg_padding ""
+
+seta hud_panel_minigamemenu "0"
+seta hud_panel_minigamemenu_pos "0 0.26"
+seta hud_panel_minigamemenu_size "0.2 0.49"
+seta hud_panel_minigamemenu_bg "border_small"
+seta hud_panel_minigamemenu_bg_color ""
+seta hud_panel_minigamemenu_bg_color_team ""
+seta hud_panel_minigamemenu_bg_alpha ""
+seta hud_panel_minigamemenu_bg_border ""
+seta hud_panel_minigamemenu_bg_padding ""
+
menu_sync
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 "0"
+ seta hud_panel_mapvote_bg_color ""
+ seta hud_panel_mapvote_bg_color_team ""
+ seta hud_panel_mapvote_bg_alpha ""
+ 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"
+seta hud_panel_minigameboard "1"
+seta hud_panel_minigameboard_pos "0.22 0.15"
+seta hud_panel_minigameboard_size "0.50 0.60"
+seta hud_panel_minigameboard_bg "border_small"
+seta hud_panel_minigameboard_bg_color ""
+seta hud_panel_minigameboard_bg_color_team ""
+seta hud_panel_minigameboard_bg_alpha ""
+seta hud_panel_minigameboard_bg_border ""
+seta hud_panel_minigameboard_bg_padding ""
+
+seta hud_panel_minigamestatus "1"
+seta hud_panel_minigamestatus_pos "0.74 0.15"
+seta hud_panel_minigamestatus_size "0.2 0.60"
+seta hud_panel_minigamestatus_bg "border_small"
+seta hud_panel_minigamestatus_bg_color ""
+seta hud_panel_minigamestatus_bg_color_team ""
+seta hud_panel_minigamestatus_bg_alpha ""
+seta hud_panel_minigamestatus_bg_border ""
+seta hud_panel_minigamestatus_bg_padding ""
+
+seta hud_panel_minigamehelp "1"
+seta hud_panel_minigamehelp_pos "0.22 0.78"
+seta hud_panel_minigamehelp_size "0.50 0.20"
+seta hud_panel_minigamehelp_bg ""
+seta hud_panel_minigamehelp_bg_color ""
+seta hud_panel_minigamehelp_bg_color_team ""
+seta hud_panel_minigamehelp_bg_alpha ""
+seta hud_panel_minigamehelp_bg_border ""
+seta hud_panel_minigamehelp_bg_padding ""
+
+seta hud_panel_minigamemenu "0"
+seta hud_panel_minigamemenu_pos "0 0.26"
+seta hud_panel_minigamemenu_size "0.2 0.49"
+seta hud_panel_minigamemenu_bg "border_small"
+seta hud_panel_minigamemenu_bg_color ""
+seta hud_panel_minigamemenu_bg_color_team ""
+seta hud_panel_minigamemenu_bg_alpha ""
+seta hud_panel_minigamemenu_bg_border ""
+seta hud_panel_minigamemenu_bg_padding ""
+
menu_sync
}
}
- // Buffs (#18)
- //
- void HUD_Buffs(void)
- {
- 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();
- }
-
+// Minigame
+//
+#include "../common/minigames/cl_minigames_hud.qc"
+
/*
==================
Main HUD system
}
hud_draw_maximized = 0;
- // draw panels in order specified by panel_order array
+ // draw panels in the order specified by panel_order array
for(i = HUD_PANEL_NUM - 1; i >= 0; --i)
- (panel = hud_panel[panel_order[i]]).panel_draw();
+ HUD_Panel_Draw(hud_panel[panel_order[i]]);
hud_draw_maximized = 1; // panels that may be maximized must check this var
// draw maximized panels on top
// set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
int prev_p_health, prev_p_armor;
-
- #define HUD_PANELS(HUD_PANEL) \
- HUD_PANEL(WEAPONS , HUD_Weapons , weapons, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(AMMO , HUD_Ammo , ammo, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(POWERUPS , HUD_Powerups , powerups, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(HEALTHARMOR , HUD_HealthArmor , healtharmor, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(NOTIFY , HUD_Notify , notify, PANEL_SHOW_ALWAYS ) \
- HUD_PANEL(TIMER , HUD_Timer , timer, PANEL_SHOW_ALWAYS ) \
- HUD_PANEL(RADAR , HUD_Radar , radar, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(SCORE , HUD_Score , score, PANEL_SHOW_ALWAYS ) \
- HUD_PANEL(RACETIMER , HUD_RaceTimer , racetimer, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(VOTE , HUD_Vote , vote, PANEL_SHOW_ALWAYS ) \
- HUD_PANEL(MODICONS , HUD_ModIcons , modicons, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(PRESSEDKEYS , HUD_PressedKeys , pressedkeys, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(CHAT , HUD_Chat , chat, PANEL_SHOW_ALWAYS ) \
- HUD_PANEL(ENGINEINFO , HUD_EngineInfo , engineinfo, PANEL_SHOW_ALWAYS ) \
- HUD_PANEL(INFOMESSAGES , HUD_InfoMessages , infomessages, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(PHYSICS , HUD_Physics , physics, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(CENTERPRINT , HUD_CenterPrint , centerprint, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(BUFFS , HUD_Buffs , buffs, PANEL_SHOW_MAINGAME ) \
- HUD_PANEL(MINIGAME_BOARD, HUD_MinigameBoard ,minigameboard, PANEL_SHOW_MINIGAME ) \
- HUD_PANEL(MINIGAME_STATUS,HUD_MinigameStatus,minigamestatus,PANEL_SHOW_MINIGAME ) \
- HUD_PANEL(MINIGAME_HELP, HUD_MinigameHelp ,minigamehelp, PANEL_SHOW_MINIGAME ) \
- HUD_PANEL(MINIGAME_MENU, HUD_MinigameMenu ,minigamemenu, PANEL_SHOW_ALWAYS )
+ void HUD_ItemsTime();
+
+ #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_PANEL(WEAPONS , HUD_Weapons , weapons, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(AMMO , HUD_Ammo , ammo, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(POWERUPS , HUD_Powerups , powerups, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(HEALTHARMOR , HUD_HealthArmor , healtharmor, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(NOTIFY , HUD_Notify , notify, PANEL_SHOW_ALWAYS ) \
++ HUD_PANEL(TIMER , HUD_Timer , timer, PANEL_SHOW_ALWAYS ) \
++ HUD_PANEL(RADAR , HUD_Radar , radar, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(SCORE , HUD_Score , score, PANEL_SHOW_ALWAYS ) \
++ HUD_PANEL(RACETIMER , HUD_RaceTimer , racetimer, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(VOTE , HUD_Vote , vote, PANEL_SHOW_ALWAYS ) \
++ HUD_PANEL(MODICONS , HUD_ModIcons , modicons, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(PRESSEDKEYS , HUD_PressedKeys , pressedkeys, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(CHAT , HUD_Chat , chat, PANEL_SHOW_ALWAYS ) \
++ HUD_PANEL(ENGINEINFO , HUD_EngineInfo , engineinfo, PANEL_SHOW_ALWAYS ) \
++ HUD_PANEL(INFOMESSAGES , HUD_InfoMessages , infomessages, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(PHYSICS , HUD_Physics , physics, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(CENTERPRINT , HUD_CenterPrint , centerprint, PANEL_SHOW_MAINGAME ) \
++ HUD_PANEL(MINIGAME_BOARD, HUD_MinigameBoard ,minigameboard, PANEL_SHOW_MINIGAME ) \
++ HUD_PANEL(MINIGAME_STATUS,HUD_MinigameStatus,minigamestatus,PANEL_SHOW_MINIGAME ) \
++ HUD_PANEL(MINIGAME_HELP, HUD_MinigameHelp ,minigamehelp, PANEL_SHOW_MINIGAME ) \
++ HUD_PANEL(MINIGAME_MENU, HUD_MinigameMenu ,minigamemenu, PANEL_SHOW_ALWAYS ) \
++ HUD_PANEL(MAPVOTE , MapVote_Draw ,mapvote, PANEL_SHOW_ALWAYS ) \
++ HUD_PANEL(ITEMSTIME , HUD_ItemsTime ,itemstime, PANEL_SHOW_MAINGAME )
+
+#define HUD_PANEL(NAME, draw_func, name, showflags) \
int HUD_PANEL_##NAME; \
void draw_func(void); \
void RegisterHUD_Panel_##NAME() { \
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels);
- CALL_ACCUMULATED_FUNCTION(RegisterBuffs);
+ CALL_ACCUMULATED_FUNCTION(RegisterEffects);
+ initialize_minigames();
+
WaypointSprite_Load();
// precaches
case ENT_CLIENT_SPAWNEVENT: Ent_ReadSpawnEvent(bIsNewEntity); break;
case ENT_CLIENT_NOTIFICATION: Read_Notification(bIsNewEntity); break;
case ENT_CLIENT_HEALING_ORB: ent_healer(); break;
+ case ENT_CLIENT_MINIGAME: ent_read_minigame(); break;
+ case ENT_CLIENT_VIEWLOC: ent_viewloc(); break;
+ case ENT_CLIENT_VIEWLOC_TRIGGER: ent_viewloc_trigger(); break;
+ case ENT_CLIENT_LADDER: ent_func_ladder(); break;
+ case ENT_CLIENT_TRIGGER_PUSH: ent_trigger_push(); break;
+ case ENT_CLIENT_TARGET_PUSH: ent_target_push(); break;
+ case ENT_CLIENT_CONVEYOR: ent_conveyor(); break;
+ case ENT_CLIENT_DOOR: ent_door(); break;
+ case ENT_CLIENT_PLAT: ent_plat(); break;
+ case ENT_CLIENT_SWAMP: ent_swamp(); break;
+ case ENT_CLIENT_CORNER: ent_corner(); break;
+ case ENT_CLIENT_KEYLOCK: ent_keylock(); break;
+ case ENT_CLIENT_TRAIN: ent_train(); break;
+ case ENT_CLIENT_TRIGGER_IMPULSE: ent_trigger_impulse(); break;
+ case ENT_CLIENT_EFFECT: Read_Effect(bIsNewEntity); break;
default:
//error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
../common/urllib.qc
../common/util.qc
- ../common/items/all.qc
+ ../common/viewloc.qc
+../common/minigames/minigames.qc
+../common/minigames/cl_minigames.qc
+
+ ../common/items/all.qc
../common/monsters/all.qc
+ ../common/mutators/all.qc
+ ../common/vehicles/all.qc
+ ../common/weapons/all.qc
- ../common/weapons/all.qc // TODO
+ ../common/turrets/cl_turrets.qc
+ ../common/turrets/turrets.qc
+
+ ../common/triggers/include.qc
../csqcmodellib/cl_model.qc
../csqcmodellib/cl_player.qc
CSQC_common_hud();
// crosshair goes VERY LAST
- if(!scoreboard_active && !camera_active && intermission != 2 && spectatee_status != -1 && hud == HUD_NORMAL && !csqcplayer.viewloc)
+ if(!scoreboard_active && !camera_active && intermission != 2 &&
- spectatee_status != -1 && hud == HUD_NORMAL &&
++ spectatee_status != -1 && hud == HUD_NORMAL && !csqcplayer.viewloc &&
+ !HUD_MinigameMenu_IsOpened() )
{
if (!autocvar_crosshair_enabled) // main toggle for crosshair rendering
return;
if(autocvar__hud_configure)
HUD_Panel_Mouse();
- if ( HUD_MinigameMenu_IsOpened() || minigame_isactive() )
++ else if ( HUD_MinigameMenu_IsOpened() || minigame_isactive() )
+ HUD_Minigame_Mouse();
+ else
+ HUD_Radar_Mouse();
if(hud && !intermission)
- {
- if(hud == HUD_SPIDERBOT)
- CSQC_SPIDER_HUD();
- else if(hud == HUD_WAKIZASHI)
- CSQC_WAKIZASHI_HUD();
- else if(hud == HUD_RAPTOR)
- CSQC_RAPTOR_HUD();
- else if(hud == HUD_BUMBLEBEE)
- CSQC_BUMBLE_HUD();
- else if(hud == HUD_BUMBLEBEE_GUN)
- CSQC_BUMBLE_GUN_HUD();
- }
+ if(hud == HUD_BUMBLEBEE_GUN)
+ CSQC_BUMBLE_GUN_HUD();
+ else
+ VEH_ACTION(hud, VR_HUD);
cl_notice_run();
const int ENT_CLIENT_TURRET = 40;
const int ENT_CLIENT_AUXILIARYXHAIR = 50;
const int ENT_CLIENT_VEHICLE = 60;
-
+ const int ENT_CLIENT_LADDER = 61;
+ const int ENT_CLIENT_TRIGGER_PUSH = 62;
+ const int ENT_CLIENT_TARGET_PUSH = 63;
+ const int ENT_CLIENT_CONVEYOR = 64;
+ const int ENT_CLIENT_DOOR = 65;
+ const int ENT_CLIENT_TRAIN = 66;
+ const int ENT_CLIENT_PLAT = 67;
+ const int ENT_CLIENT_TRIGGER_IMPULSE = 68;
+ const int ENT_CLIENT_SWAMP = 69;
+ const int ENT_CLIENT_CORNER = 70;
+ const int ENT_CLIENT_KEYLOCK = 71;
+ const int ENT_CLIENT_GENERATOR = 72;
+ const int ENT_CLIENT_CONTROLPOINT_ICON = 73;
+ const int ENT_CLIENT_EFFECT = 74;
+const int ENT_CLIENT_MINIGAME = 75;
-
+ const int ENT_CLIENT_VIEWLOC = 78;
+ const int ENT_CLIENT_VIEWLOC_TRIGGER = 79;
const int ENT_CLIENT_HEALING_ORB = 80;
+ const int ENT_CLIENT_MUTATOR = TE_CSQC_MUTATOR; // 99
+
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;
--- /dev/null
- #define ReadFloat ReadCoord
+#include "cl_minigames.qh"
+
+// Draw a square in the center of the avaliable area
+void minigame_hud_simpleboard(vector pos, vector mySize, string board_texture)
+{
+ if(panel.current_panel_bg != "0" && panel.current_panel_bg != "")
+ draw_BorderPicture(pos - '1 1 0' * panel_bg_border,
+ panel.current_panel_bg,
+ mySize + '1 1 0' * 2 * panel_bg_border,
+ panel_bg_color, panel_bg_alpha,
+ '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER));
+ drawpic(pos, board_texture, mySize, '1 1 1', panel_bg_alpha, DRAWFLAG_NORMAL);
+}
+
+// De-normalize (2D vector) v from relative coordinate inside pos mySize
+vector minigame_hud_denormalize(vector v, vector pos, vector mySize)
+{
+ v_x = pos_x + v_x * mySize_x;
+ v_y = pos_y + v_y * mySize_y;
+ return v;
+}
+// De-normalize (2D vector) v from relative size inside pos mySize
+vector minigame_hud_denormalize_size(vector v, vector pos, vector mySize)
+{
+ v_x = v_x * mySize_x;
+ v_y = v_y * mySize_y;
+ return v;
+}
+
+// Normalize (2D vector) v to relative coordinate inside pos mySize
+vector minigame_hud_normalize(vector v, vector pos, vector mySize)
+{
+ v_x = ( v_x - pos_x ) / mySize_x;
+ v_y = ( v_y - pos_y ) / mySize_y;
+ return v;
+}
+
+// Check if the mouse is inside the given area
+bool minigame_hud_mouse_in(vector pos, vector sz)
+{
+ return mousepos_x >= pos_x && mousepos_x < pos_x + sz_x &&
+ mousepos_y >= pos_y && mousepos_y < pos_y + sz_y ;
+}
+
+void initialize_minigames()
+{
+ entity last_minig = world;
+ entity minig;
+ #define MINIGAME(name,nicename) \
+ minig = spawn(); \
+ minig.classname = "minigame_descriptor"; \
+ minig.netname = strzone(strtolower(#name)); \
+ minig.message = nicename; \
+ minig.minigame_hud_board = name##_hud_board; \
+ minig.minigame_hud_status = name##_hud_status; \
+ minig.minigame_event = name##_client_event; \
+ if ( !last_minig ) minigame_descriptors = minig; \
+ else last_minig.list_next = minig; \
+ last_minig = minig;
+
+ REGISTERED_MINIGAMES
+
+ #undef MINIGAME
+}
+
+string minigame_texture_skin(string skinname, string name)
+{
+ return sprintf("gfx/hud/%s/minigames/%s", skinname, name);
+}
+string minigame_texture(string name)
+{
+ string path = minigame_texture_skin(autocvar_menu_skin,name);
+ if ( precache_pic(path) == "" )
+ path = minigame_texture_skin("default", name);
+ return path;
+}
+
+#define FIELD(Flags, Type, Name) MSLE_CLEAN_##Type(self.Name)
+#define MSLE_CLEAN_String(x) strunzone(x);
+#define MSLE_CLEAN_Byte(x)
+#define MSLE_CLEAN_Char(x)
+#define MSLE_CLEAN_Short(x)
+#define MSLE_CLEAN_Long(x)
+#define MSLE_CLEAN_Coord(x)
+#define MSLE_CLEAN_Angle(x)
+#define MSLE_CLEAN_Float(x)
+#define MSLE_CLEAN_Vector(x)
+#define MSLE_CLEAN_Vector2D(x)
+
+#define MSLE(Name,Fields) \
+ void msle_entremove_##Name() { strunzone(self.netname); Fields }
+MINIGAME_SIMPLELINKED_ENTITIES
+#undef MSLE
+#undef FIELD
+
+void minigame_autoclean_entity(entity e)
+{
+ dprint("CL Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
+ remove(e);
+}
+
+void HUD_MinigameMenu_CurrentButton();
+bool auto_close_minigamemenu;
+void deactivate_minigame()
+{
+ if ( !active_minigame )
+ return;
+
+ active_minigame.minigame_event(active_minigame,"deactivate");
+ entity e = world;
+ while( (e = findentity(e, owner, active_minigame)) )
+ if ( e.minigame_autoclean )
+ {
+ minigame_autoclean_entity(e);
+ }
+
+ minigame_self = world;
+ active_minigame = world;
+
+ if ( auto_close_minigamemenu )
+ {
+ HUD_MinigameMenu_Close();
+ auto_close_minigamemenu = 0;
+ }
+ else
+ HUD_MinigameMenu_CurrentButton();
+}
+
+void minigame_entremove()
+{
+ if ( self == active_minigame )
+ deactivate_minigame();
+}
+
+void activate_minigame(entity minigame)
+{
+ if ( !minigame )
+ {
+ deactivate_minigame();
+ return;
+ }
+
+ if ( !minigame.descriptor || minigame.classname != "minigame" )
+ {
+ dprint("Trying to activate unregistered minigame ",minigame.netname," in client\n");
+ return;
+ }
+
+ if ( minigame == active_minigame )
+ return;
+
+ if ( active_minigame )
+ {
+ deactivate_minigame();
+ }
+
+ if ( minigame_self.owner != minigame )
+ minigame_self = world;
+ active_minigame = minigame;
+ active_minigame.minigame_event(active_minigame,"activate");
+
+ if ( HUD_MinigameMenu_IsOpened() )
+ HUD_MinigameMenu_CurrentButton();
+ else
+ {
+ auto_close_minigamemenu = 1;
+ HUD_MinigameMenu_Open();
+ }
+}
+
+void minigame_player_entremove()
+{
+ if ( self.owner == active_minigame && self.minigame_playerslot == player_localentnum )
+ deactivate_minigame();
+}
+
+vector ReadVector2D() { vector v; v_x = ReadCoord(); v_y = ReadCoord(); v_z = 0; return v; }
+vector ReadVector() { vector v; v_x = ReadCoord(); v_y = ReadCoord(); v_z = ReadCoord(); return v; }
+string() ReadString_Raw = #366;
+string ReadString_Zoned() { return strzone(ReadString_Raw()); }
- #undef ReadFloat
+#define ReadString ReadString_Zoned
+#define FIELD(Flags, Type,Name) if ( sf & (Flags) ) self.Name = Read##Type();
+#define MSLE(Name,Fields) \
+ else if ( self.classname == #Name ) { \
+ if ( sf & MINIG_SF_CREATE ) { \
+ minigame_read_owner(); \
+ self.entremove = msle_entremove_##Name; \
+ } \
+ minigame_ent = self.owner; \
+ Fields \
+ }
+void minigame_read_owner()
+{
+ string owner_name = ReadString_Raw();
+ self.owner = world;
+ do
+ self.owner = find(self.owner,netname,owner_name);
+ while ( self.owner && self.owner.classname != "minigame" );
+ if ( !self.owner )
+ dprint("Got a minigame entity without a minigame!\n");
+}
+void ent_read_minigame()
+{
+ float sf = ReadByte();
+ if ( sf & MINIG_SF_CREATE )
+ {
+ self.classname = msle_classname(ReadShort());
+ self.netname = ReadString_Zoned();
+ }
+
+ entity minigame_ent = world;
+
+ if ( self.classname == "minigame" )
+ {
+ minigame_ent = self;
+
+ if ( sf & MINIG_SF_CREATE )
+ {
+ self.entremove = minigame_entremove;
+ self.descriptor = minigame_get_descriptor(ReadString_Raw());
+ if ( !self.descriptor )
+ dprint("Got a minigame without a client-side descriptor!\n");
+ else
+ self.minigame_event = self.descriptor.minigame_event;
+ }
+ if ( sf & MINIG_SF_UPDATE )
+ self.minigame_flags = ReadLong();
+ }
+ else if ( self.classname == "minigame_player" )
+ {
+ float activate = 0;
+ if ( sf & MINIG_SF_CREATE )
+ {
+ self.entremove = minigame_player_entremove;
+ minigame_read_owner();
+ float ent = ReadLong();
+ self.minigame_playerslot = ent;
+ dprint("Player: ",GetPlayerName(ent-1),"\n");
+
+ activate = (ent == player_localnum+1 && self.owner && self.owner != active_minigame);
+
+ }
+ minigame_ent = self.owner;
+
+ if ( sf & MINIG_SF_UPDATE )
+ self.team = ReadByte();
+
+ if ( activate )
+ {
+ minigame_self = self;
+ activate_minigame(self.owner);
+ }
+ }
+ MINIGAME_SIMPLELINKED_ENTITIES
+
+ if ( minigame_ent )
+ minigame_ent.minigame_event(minigame_ent,"network_receive",self,sf);
+
+ if ( sf & MINIG_SF_CREATE )
+ {
+ dprint("CL Reading entity: ",ftos(num_for_edict(self)),
+ " classname:",self.classname," enttype:",ftos(self.enttype) );
+ dprint(" sf:",ftos(sf)," netname:",self.netname,"\n\n");
+ }
+}
+#undef ReadString
+#undef FIELD
+#undef MSLE
+
+string minigame_getWrappedLine(float w, vector theFontSize, textLengthUpToWidth_widthFunction_t tw)
+{
+ int last_word;
+ string s;
+ int take_until;
+ int skip = 0;
+
+ s = getWrappedLine_remaining;
+
+ if(w <= 0)
+ {
+ getWrappedLine_remaining = string_null;
+ return s; // the line has no size ANYWAY, nothing would be displayed.
+ }
+
+ take_until = textLengthUpToWidth(s, w, theFontSize, tw);
+
+ if ( take_until > strlen(s) )
+ take_until = strlen(s);
+
+ for ( int i = 0; i < take_until; i++ )
+ if ( substring(s,i,1) == "\n" )
+ {
+ take_until = i;
+ skip = 1;
+ break;
+ }
+
+ if ( take_until > 0 || skip > 0 )
+ {
+ if ( skip == 0 && take_until < strlen(s) )
+ {
+ last_word = take_until;
+ while(last_word > 0 && substring(s, last_word, 1) != " ")
+ --last_word;
+
+ if ( last_word != 0 )
+ {
+ take_until = last_word;
+ skip = 1;
+ }
+ }
+
+ getWrappedLine_remaining = substring(s, take_until+skip, strlen(s) - (take_until+skip));
+ if(getWrappedLine_remaining == "")
+ getWrappedLine_remaining = string_null;
+ else if (tw("^7", theFontSize) == 0)
+ getWrappedLine_remaining = strcat(find_last_color_code(substring(s, 0, take_until)), getWrappedLine_remaining);
+ return substring(s, 0, take_until);
+ }
+ else
+ {
+ getWrappedLine_remaining = string_null;
+ return s;
+ }
+}
+
+vector minigame_drawstring_wrapped( float maxwidth, vector pos, string text,
+ vector fontsize, vector color, float theAlpha, int drawflags, float align )
+{
+ getWrappedLine_remaining = text;
+ vector mypos = pos;
+ while ( getWrappedLine_remaining )
+ {
+ string line = minigame_getWrappedLine(maxwidth,fontsize,stringwidth_nocolors);
+ if ( line == "" )
+ break;
+ mypos_x = pos_x + (maxwidth - stringwidth_nocolors(line, fontsize)) * align;
+ drawstring(mypos, line, fontsize, color, theAlpha, drawflags);
+ mypos_y += fontsize_y;
+ }
+ mypos_x = maxwidth;
+ mypos_y -= pos_y;
+ return mypos;
+}
+
+vector minigame_drawcolorcodedstring_wrapped( float maxwidth, vector pos,
+ string text, vector fontsize, float theAlpha, int drawflags, float align )
+{
+ getWrappedLine_remaining = text;
+ vector mypos = pos;
+ while ( getWrappedLine_remaining )
+ {
+ string line = minigame_getWrappedLine(maxwidth,fontsize,stringwidth_colors);
+ if ( line == "" )
+ break;
+ mypos_x = pos_x + (maxwidth - stringwidth_colors(line, fontsize)) * align;
+ drawcolorcodedstring(mypos, line, fontsize, theAlpha, drawflags);
+ mypos_y += fontsize_y;
+ }
+ mypos_x = maxwidth;
+ mypos_y -= pos_y;
+ return mypos;
+}
+
+void minigame_drawstring_trunc(float maxwidth, vector pos, string text,
+ vector fontsize, vector color, float theAlpha, int drawflags )
+{
+ string line = textShortenToWidth(text,maxwidth,fontsize,stringwidth_nocolors);
+ drawstring(pos, line, fontsize, color, theAlpha, drawflags);
+}
+
+void minigame_drawcolorcodedstring_trunc(float maxwidth, vector pos, string text,
+ vector fontsize, float theAlpha, int drawflags )
+{
+ string line = textShortenToWidth(text,maxwidth,fontsize,stringwidth_colors);
+ drawcolorcodedstring(pos, line, fontsize, theAlpha, drawflags);
+}
+
+void minigame_drawpic_centered( vector pos, string texture, vector sz,
+ vector color, float thealpha, int drawflags )
+{
+ drawpic( pos-sz/2, texture, sz, color, thealpha, drawflags );
+}
+
+// Workaround because otherwise variadic arguments won't work properly
+// It could be a bug in the compiler or in darkplaces
+void minigame_cmd_workaround(float dummy, string...cmdargc)
+{
+ string cmd;
+ cmd = "cmd minigame ";
+ float i;
+ for ( i = 0; i < cmdargc; i++ )
+ cmd = strcat(cmd,...(i,string));
+ localcmd(strcat(cmd,"\n"));
+}
+
+// Prompt the player to play in the current minigame
+// (ie: it's their turn and they should get back to the minigame)
+void minigame_prompt()
+{
+ if ( active_minigame && ! HUD_MinigameMenu_IsOpened() )
+ {
+ HUD_Notify_Push(sprintf("minigames/%s/icon_notif",active_minigame.descriptor.netname),
+ _("It's your turn"), "");
+ }
+}
--- /dev/null
- #define WriteFloat WriteCoord
+#include "minigames.qh"
+
+void player_clear_minigame(entity player)
+{
+ player.active_minigame = world;
+ player.minigame_players = world;
+ if ( IS_PLAYER(player) )
+ player.movetype = MOVETYPE_WALK;
+ else
+ player.movetype = MOVETYPE_FLY_WORLDONLY;
+ player.team_forced = 0;
+}
+
+void minigame_rmplayer(entity minigame_session, entity player)
+{
+ entity e;
+ entity p = minigame_session.minigame_players;
+
+ if ( p.minigame_players == player )
+ {
+ if ( p.list_next == world )
+ {
+ end_minigame(minigame_session);
+ return;
+ }
+ minigame_session.minigame_event(minigame_session,"part",player);
+ GameLogEcho(strcat(":minigame:part:",minigame_session.netname,":",
+ ftos(num_for_edict(player)),":",player.netname));
+ minigame_session.minigame_players = p.list_next;
+ remove ( p );
+ player_clear_minigame(player);
+ }
+ else
+ {
+ for ( e = p.list_next; e != world; e = e.list_next )
+ {
+ if ( e.minigame_players == player )
+ {
+ minigame_session.minigame_event(minigame_session,"part",player);
+ GameLogEcho(strcat(":minigame:part:",minigame_session.netname,":",
+ ftos(num_for_edict(player)),":",player.netname));
+ p.list_next = e.list_next;
+ remove(e);
+ player_clear_minigame(player);
+ return;
+ }
+ p = e;
+ }
+ }
+}
+
+
+#define FIELD(Flags, Type,Name) if ( sf & (Flags) ) Write##Type(MSG_ENTITY, self.Name);
+#define WriteVector(to,Name) WriteCoord(to,Name##_x); WriteCoord(to,Name##_y); WriteCoord(to,Name##_z)
+#define WriteVector2D(to,Name) WriteCoord(to,Name##_x); WriteCoord(to,Name##_y)
- #undef WriteFloat
+#define MSLE(Name,Fields) \
+ else if ( self.classname == #Name ) { \
+ if ( sf & MINIG_SF_CREATE ) WriteString(MSG_ENTITY,self.owner.netname); \
+ Fields }
+
+// Send an entity to a client
+// only use on minigame entities or entities with a minigame owner
+bool minigame_SendEntity(entity to, int sf)
+{
+ WriteByte(MSG_ENTITY, ENT_CLIENT_MINIGAME);
+ WriteByte(MSG_ENTITY, sf);
+
+ if ( sf & MINIG_SF_CREATE )
+ {
+ WriteShort(MSG_ENTITY,msle_id(self.classname));
+ WriteString(MSG_ENTITY,self.netname);
+ }
+
+ entity minigame_ent = self.owner;
+
+ if ( self.classname == "minigame" )
+ {
+ minigame_ent = self;
+
+ if ( sf & MINIG_SF_CREATE )
+ WriteString(MSG_ENTITY,self.descriptor.netname);
+
+ if ( sf & MINIG_SF_UPDATE )
+ WriteLong(MSG_ENTITY,self.minigame_flags);
+ }
+ else if ( self.classname == "minigame_player" )
+ {
+ if ( sf & MINIG_SF_CREATE )
+ {
+ WriteString(MSG_ENTITY,self.owner.netname);
+ WriteLong(MSG_ENTITY,num_for_edict(self.minigame_players));
+ }
+ if ( sf & MINIG_SF_UPDATE )
+ WriteByte(MSG_ENTITY,self.team);
+ }
+ MINIGAME_SIMPLELINKED_ENTITIES
+
+ minigame_ent.minigame_event(minigame_ent,"network_send",self,sf);
+
+ return true;
+
+}
+#undef FIELD
+#undef MSLE
+
+// Force resend all minigame entities
+void minigame_resend(entity minigame)
+{
+ minigame.SendFlags = MINIG_SF_ALL;
+ entity e = world;
+ while (( e = findentity(e,owner,minigame) ))
+ {
+ e.SendFlags = MINIG_SF_ALL;
+ }
+}
+
+bool minigame_CheckSend()
+{
+ entity e;
+ for ( e = self.owner.minigame_players; e != world; e = e.list_next )
+ if ( e.minigame_players == other )
+ return true;
+ return false;
+}
+
+int minigame_addplayer(entity minigame_session, entity player)
+{
+ if ( player.active_minigame )
+ {
+ if ( player.active_minigame == minigame_session )
+ return 0;
+ minigame_rmplayer(player.active_minigame,player);
+ }
+
+ int mgteam = minigame_session.minigame_event(minigame_session,"join",player);
+
+ if ( mgteam )
+ {
+ entity player_pointer = spawn();
+ player_pointer.classname = "minigame_player";
+ player_pointer.owner = minigame_session;
+ player_pointer.minigame_players = player;
+ player_pointer.team = mgteam;
+ player_pointer.list_next = minigame_session.minigame_players;
+ minigame_session.minigame_players = player_pointer;
+ player.active_minigame = minigame_session;
+ player.minigame_players = player_pointer;
+ player_pointer.customizeentityforclient = minigame_CheckSend;
+ Net_LinkEntity(player_pointer, false, 0, minigame_SendEntity);
+
+ if ( !IS_OBSERVER(player) && autocvar_sv_minigames_observer )
+ {
+ entity e = self;
+ self = player;
+ PutObserverInServer();
+ self = e;
+ }
+ if ( autocvar_sv_minigames_observer == 2 )
+ player.team_forced = -1;
+
+ minigame_resend(minigame_session);
+ }
+ GameLogEcho(strcat(":minigame:join",(mgteam?"":"fail"),":",minigame_session.netname,":",
+ ftos(num_for_edict(player)),":",player.netname));
+
+ return mgteam;
+}
+
+entity start_minigame(entity player, string minigame )
+{
+ if ( !autocvar_sv_minigames || !IS_REAL_CLIENT(player) )
+ return world;
+
+ entity e = minigame_get_descriptor(minigame);
+ if ( e )
+ {
+ entity minig = spawn();
+ minig.classname = "minigame";
+ minig.netname = strzone(strcat(e.netname,"_",ftos(num_for_edict(minig))));
+ minig.descriptor = e;
+ minig.minigame_event = e.minigame_event;
+ minig.minigame_event(minig,"start");
+ GameLogEcho(strcat(":minigame:start:",minig.netname));
+ if ( ! minigame_addplayer(minig,player) )
+ {
+ dprint("Minigame ",minig.netname," rejected the first player join!\n");
+ end_minigame(minig);
+ return world;
+ }
+ Net_LinkEntity(minig, false, 0, minigame_SendEntity);
+
+ if ( !minigame_sessions )
+ minigame_sessions = minig;
+ else
+ {
+ minigame_sessions.owner = minig;
+ minig.list_next = minigame_sessions;
+ minigame_sessions = minig;
+ }
+ return minig;
+ }
+
+ return world;
+}
+
+entity join_minigame(entity player, string game_id )
+{
+ if ( !autocvar_sv_minigames || !IS_REAL_CLIENT(player) )
+ return world;
+
+ entity minig;
+ for ( minig = minigame_sessions; minig != world; minig = minig.list_next )
+ {
+ if ( minig.netname == game_id )
+ if ( minigame_addplayer(minig,player) )
+ return minig;
+ }
+
+ return world;
+}
+
+void part_minigame(entity player )
+{
+ entity minig = player.active_minigame;
+
+ if ( minig && minig.classname == "minigame" )
+ minigame_rmplayer(minig,player);
+}
+
+void end_minigame(entity minigame_session)
+{
+ if ( minigame_session.owner )
+ minigame_session.owner.list_next = minigame_session.list_next;
+ else
+ minigame_sessions = minigame_session.list_next;
+
+ minigame_session.minigame_event(minigame_session,"end");
+ GameLogEcho(strcat(":minigame:end:",minigame_session.netname));
+
+
+ entity e = world;
+ while( (e = findentity(e, owner, minigame_session)) )
+ if ( e.minigame_autoclean )
+ {
+ dprint("SV Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
+ remove(e);
+ }
+
+ entity p;
+ for ( e = minigame_session.minigame_players; e != world; e = p )
+ {
+ p = e.list_next;
+ player_clear_minigame(e.minigame_players);
+ remove(e);
+ }
+
+ strunzone(minigame_session.netname);
+ remove(minigame_session);
+}
+
+void end_minigames()
+{
+ while ( minigame_sessions )
+ {
+ end_minigame(minigame_sessions);
+ }
+}
+
+void initialize_minigames()
+{
+ entity last_minig = world;
+ entity minig;
+ #define MINIGAME(name,nicename) \
+ minig = spawn(); \
+ minig.classname = "minigame_descriptor"; \
+ minig.netname = #name; \
+ minig.message = nicename; \
+ minig.minigame_event = name##_server_event; \
+ if ( !last_minig ) minigame_descriptors = minig; \
+ else last_minig.list_next = minig; \
+ last_minig = minig;
+
+ REGISTERED_MINIGAMES
+
+ #undef MINIGAME
+}
+
+string invite_minigame(entity inviter, entity player)
+{
+ if ( !inviter || !inviter.active_minigame )
+ return "Invalid minigame";
+ if ( !VerifyClientEntity(player, true, false) )
+ return "Invalid player";
+ if ( inviter == player )
+ return "You can't invite yourself";
+ if ( player.active_minigame == inviter.active_minigame )
+ return strcat(player.netname," is already playing");
+
+ Send_Notification(NOTIF_ONE, player, MSG_INFO, INFO_MINIGAME_INVITE,
+ inviter.active_minigame.netname, inviter.netname );
+
+ GameLogEcho(strcat(":minigame:invite:",inviter.active_minigame.netname,":",
+ ftos(num_for_edict(player)),":",player.netname));
+
+ return "";
+}
+
+entity minigame_find_player(entity client)
+{
+ if ( ! client.active_minigame )
+ return world;
+ entity e;
+ for ( e = client.active_minigame.minigame_players; e; e = e.list_next )
+ if ( e.minigame_players == client )
+ return e;
+ return world;
+}
+
+bool MinigameImpulse(int imp)
+{
+ entity e = minigame_find_player(self);
+ if ( imp && self.active_minigame && e )
+ {
+ return self.active_minigame.minigame_event(self.active_minigame,"impulse",e,imp);
+ }
+ return false;
+}
+
+
+
+void ClientCommand_minigame(int request, int argc, string command)
+{
+ if ( !autocvar_sv_minigames )
+ {
+ sprint(self,"Minigames are not enabled!\n");
+ return;
+ }
+
+ if (request == CMD_REQUEST_COMMAND )
+ {
+ string minig_cmd = argv(1);
+ if ( minig_cmd == "create" && argc > 2 )
+ {
+ entity minig = start_minigame(self, argv(2));
+ if ( minig )
+ sprint(self,"Created minigame session: ",minig.netname,"\n");
+ else
+ sprint(self,"Cannot start minigame session!\n");
+ return;
+ }
+ else if ( minig_cmd == "join" && argc > 2 )
+ {
+ entity minig = join_minigame(self, argv(2));
+ if ( minig )
+ sprint(self,"Joined: ",minig.netname,"\n");
+ else
+ {
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_JOIN_PREVENT_MINIGAME);
+ sprint(self,"Cannot join given minigame session!\n");
+ }
+ return;
+ }
+ else if ( minig_cmd == "list" )
+ {
+ entity e;
+ for ( e = minigame_descriptors; e != world; e = e.list_next )
+ sprint(self,e.netname," (",e.message,") ","\n");
+ return;
+ }
+ else if ( minig_cmd == "list-sessions" )
+ {
+ entity e;
+ for ( e = minigame_sessions; e != world; e = e.list_next )
+ sprint(self,e.netname,"\n");
+ return;
+ }
+ else if ( minig_cmd == "end" || minig_cmd == "part" )
+ {
+ if ( self.active_minigame )
+ {
+ part_minigame(self);
+ sprint(self,"Left minigame session\n");
+ }
+ else
+ sprint(self,"You aren't playing any minigame...\n");
+ return;
+ }
+ else if ( minig_cmd == "invite" && argc > 2 )
+ {
+ if ( self.active_minigame )
+ {
+ entity client = GetIndexedEntity(argc, 2);
+ string error = invite_minigame(self,client);
+ if ( error == "" )
+ {
+ sprint(self,"You have invited ",client.netname,
+ " to join your game of ", self.active_minigame.descriptor.message, "\n");
+ }
+ else
+ sprint(self,"Could not invite: ", error, ".\n");
+ }
+ else
+ sprint(self,"You aren't playing any minigame...\n");
+ return;
+ }
+ else if ( self.active_minigame )
+ {
+ entity e = minigame_find_player(self);
+ string subcommand = substring(command,argv_end_index(0),-1);
+ int arg_c = tokenize_console(subcommand);
+ if ( self.active_minigame.minigame_event(self.active_minigame,"cmd",e,arg_c,subcommand) )
+ return;
+
+ }
+ else sprint(self,strcat("Wrong command:^1 ",command,"\n"));
+ }
+
+ sprint(self, "\nUsage:^3 cmd minigame create <minigame>\n");
+ sprint(self, " Start a new minigame session\n");
+ sprint(self, "Usage:^3 cmd minigame join <session>\n");
+ sprint(self, " Join an exising minigame session\n");
+ sprint(self, "Usage:^3 cmd minigame list\n");
+ sprint(self, " List available minigames\n");
+ sprint(self, "Usage:^3 cmd minigame list-sessions\n");
+ sprint(self, " List available minigames sessions\n");
+ sprint(self, "Usage:^3 cmd minigame part|end\n");
+ sprint(self, " Leave the current minigame\n");
+ sprint(self, "Usage:^3 cmd minigame invite <player>\n");
+ sprint(self, " Invite the given player to join you in a minigame\n");
+}
MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SUICIDE, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^K1Suicide in ^COUNT"), "") \
MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout begins in ^COUNT"), "") \
MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout ends in ^COUNT"), "") \
- MSG_CENTER_NOTIF(1, CENTER_WEAPON_MINELAYER_LIMIT, 0, 1, "f1", NO_CPID, "0 0", _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "") \
- MSG_CENTER_NOTIF(1, CENTER_JOIN_PREVENT_MINIGAME, 0, 0, "", NO_CPID, "0 0", _("^K1Cannot join given minigame session!"), "" )
++ MSG_CENTER_NOTIF(1, CENTER_JOIN_PREVENT_MINIGAME, 0, 0, "", NO_CPID, "0 0", _("^K1Cannot join given minigame session!"), "" ) \
+ MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER, 0, 0, "pass_key", CPID_VEHICLES, "0 0", _("^BGPress ^F2DROPFLAG%s^BG to enter/exit the vehicle"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER_GUNNER, 0, 0, "pass_key", CPID_VEHICLES, "0 0", _("^BGPress ^F2DROPFLAG%s^BG to enter the vehicle gunner"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_VEHICLE_ENTER_STEAL, 0, 0, "pass_key", CPID_VEHICLES, "0 0", _("^BGPress ^F2DROPFLAG%s^BG to steal this vehicle"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_VEHICLE_STEAL, 0, 0, "", CPID_VEHICLES_OTHER, "0 0", _("^F2The enemy is stealing one of your vehicles!\n^F4Stop them!"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_VEHICLE_STEAL_SELF, 0, 0, "", CPID_VEHICLES_OTHER, "4 0", _("^F2You have stolen the enemy's vehicle, you are now visible on their radar!"), "") \
+ MSG_CENTER_NOTIF(1, CENTER_WEAPON_MINELAYER_LIMIT, 0, 1, "f1", NO_CPID, "0 0", _("^BGYou cannot place more than ^F2%s^BG mines at a time"), "")
#define MULTITEAM_MULTI2(default,prefix,anncepre,infopre,centerpre) \
MSG_MULTI_NOTIF(default, prefix##RED, anncepre##RED, infopre##RED, centerpre##RED) \
float autocvar_g_buffs_invisible_alpha;
float autocvar_g_buffs_flight_gravity;
float autocvar_g_buffs_jump_height;
+bool autocvar_sv_minigames;
+bool autocvar_sv_minigames_observer;
+ 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
#include "weapons/weaponsystem.qh"
#include "../common/net_notice.qh"
+ #include "../common/physics.qh"
+
+ #include "../common/items/all.qc"
+
+ #include "../common/triggers/subs.qh"
+ #include "../common/triggers/triggers.qh"
+ #include "../common/triggers/trigger/secret.qh"
+#include "../common/minigames/sv_minigames.qh"
+
#include "../common/items/inventory.qh"
#include "../common/monsters/sv_monsters.qh"
PlayerStats_GameReport_FinalizePlayer(self);
- if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); }
+ if ( self.active_minigame )
+ part_minigame(self);
+
+ if(IS_PLAYER(self)) { Send_Effect("spawn_event_neutral", self.origin, '0 0 0', 1); }
CheatShutdownClient();
#include "weapons/selection.qh"
#include "weapons/tracing.qh"
#include "weapons/weaponsystem.qh"
- #include "vehicles/vehicle.qh"
#include "waypointsprites.qh"
+#include "../common/minigames/sv_minigames.qh"
+
#include "../common/weapons/all.qh"
/*
#include "../common/playerstats.qh"
#include "../csqcmodellib/sv_model.qh"
+#include "../common/minigames/sv_minigames.qh"
+
#include "weapons/weaponstats.qh"
+ #include "../common/animdecide.qh"
+
void CopyBody_Think(void)
{
if(self.CopyBody_nextthink && time > self.CopyBody_nextthink)
server_is_dedicated = (stof(cvar_defstring("is_dedicated")) ? true : false);
// needs to be done so early because of the constants they create
- CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
- CALL_ACCUMULATED_FUNCTION(RegisterMonsters);
- CALL_ACCUMULATED_FUNCTION(RegisterItems);
- CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
+ static_init();
+ CALL_ACCUMULATED_FUNCTION(RegisterTurrets);
CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
- CALL_ACCUMULATED_FUNCTION(RegisterBuffs);
+ CALL_ACCUMULATED_FUNCTION(RegisterEffects);
+ initialize_minigames();
+
ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid));
TemporaryDB = db_create();
// g_lights.qc // TODO: was never used
g_models.qc
g_subs.qc
- g_triggers.qc
-g_tetris.qc
g_violence.qc
g_world.qc
+ generator.qc
ipban.qc
item_key.qc
mapvoting.qc
../common/buffs.qc
../common/campaign_file.qc
../common/campaign_setup.qc
+ ../common/effects.qc
../common/mapinfo.qc
- ../common/monsters/all.qc
../common/monsters/spawn.qc
../common/monsters/sv_monsters.qc
+../common/minigames/minigames.qc
+../common/minigames/sv_minigames.qc
+ ../common/movetypes/include.qc
../common/nades.qc
../common/net_notice.qc
../common/notifications.qc