//seta hud_panel_scoreboard 1 "enable this panel"
seta hud_panel_scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
seta hud_panel_scoreboard_ctf_leaderboard 1 "show a capture time rankings leaderboard in the scoreboard if allowed by the server"
+seta hud_panel_strafehud 3 "enable this panel, 1 = show if not observing, 2 = show always, 3 = show only in race/cts if not observing"
seta hud_panel_weapons_dynamichud 1 "apply the dynamic hud effects to this panel"
seta hud_panel_ammo_dynamichud 1 "apply the dynamic hud effects to this panel"
seta hud_panel_centerprint_dynamichud 1 "apply the dynamic hud effects to this panel"
seta hud_panel_itemstime_dynamichud 1 "apply the dynamic hud effects to this panel"
seta hud_panel_scoreboard_dynamichud 0 "apply the dynamic hud effects to this panel"
+seta hud_panel_strafehud_dynamichud 1 "apply the dynamic hud effects to this panel"
seta hud_panel_weapons_ammo_full_shells 60 "show 100% of the status bar at this ammo count"
seta hud_panel_weapons_ammo_full_nails 320 "show 100% of the status bar at this ammo count"
seta hud_panel_engineinfo_framecounter_exponentialmovingaverage 1 "use an averaging method for calculating fps instead of counting frametime like engine does"
seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_new_weight 0.1 "weight of latest data point"
seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_instantupdate_change_threshold 0.5 "threshold for fps change when to update instantly, to make big fps changes update faster"
+ seta hud_panel_engineinfo_framecounter_decimals "0" "amount of decimals to show"
+ seta hud_panel_engineinfo_framecounter_time "0.1" "time between framerate display updates"
seta hud_panel_physics_acceleration_movingaverage 1 "use an averaging method for calculating acceleration instead of the real value"
seta hud_panel_physics_update_interval 0.016 "how often (in seconds) numeric values get updated on screen"
seta hud_panel_scoreboard_accuracy_showdelay_minpos 0.75 "delay displaying the accuracy panel only if its position is lower than this percentage of the screen height from the top"
seta hud_panel_scoreboard_team_size_position 0 "where to show the team size (0 = do not show, 1 = left of scoreboard, 2 = right of scoreboard), will move team scores to the other side if necessary"
+seta _hud_panel_strafehud_demo "0" "strafehud changes angle during configure"
+seta _hud_panel_strafehud_center "0" "puts the angle indicator in the center during HUD configure"
+seta hud_panel_strafehud_mode "0" "strafehud mode which controls whether the strafehud is centered at: \"0\" = view angle, \"1\" = velocity direction"
+seta hud_panel_strafehud_bar_alpha "0.3" "opacity of the strafe meter"
+seta hud_panel_strafehud_bar_color "1 1 1" "color of the strafe meter"
+seta hud_panel_strafehud_indicator_color "0 1 0" "color of the strafe angle indicator"
+seta hud_panel_strafehud_indicator_switch_color "1 1 0" "color of the strafe angle indicator on the opposite side"
+seta hud_panel_strafehud_angle "0" "the maximum angle displayed on the strafehud, \"0\" = dynamic"
+seta hud_panel_strafehud_good_color "0 1 1" "indicator color of the actual strafe angle if the angle matches the ideal angle"
+seta hud_panel_strafehud_warning_color "1 1 0" "indicator color of the actual strafe angle if the angle doesn't match the ideal angle"
+seta hud_panel_strafehud_alert_color "1 0 1" "indicator color of the actual strafe angle if the angle has a critical value"
+seta hud_panel_strafehud_angle_alpha "0.8" "indicator transparency of the actual strafe angle"
+seta hud_panel_strafehud_direction_color "0 0.5 1" "direction indicator color"
+seta hud_panel_strafehud_timeout_air "0" "time after take off before changing strafehud mode (prevents flickering on slick ramps)"
+seta hud_panel_strafehud_timeout_ground "0.03333333" "time after landing before changing strafehud mode (prevents flickering on regular strafe turns)"
+seta hud_panel_strafehud_timeout_strafe "0.1" "time after releasing the strafe keys before changing mode (prevents flickering when switching between left/right strafe turning)"
+seta hud_panel_strafehud_timeout_direction "0.5" "time it takes until direction changes (forward or backward strafe) are detected"
+seta hud_panel_strafehud_indicator_minspeed "-1" "speed at which strafehud indicators will be shown, uses maxspeed if negative"
+
// hud panel aliases
alias quickmenu "cl_cmd hud quickmenu ${* ?}"
seta hud_panel_engineinfo_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
seta hud_panel_engineinfo_bg_border "" "if set to something else than \"\" = override default size of border around the background"
seta hud_panel_engineinfo_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
- seta hud_panel_engineinfo_framecounter_decimals "" "amount of decimals to show"
- seta hud_panel_engineinfo_framecounter_time "" "time between framerate display updates"
seta hud_panel_infomessages_pos "" "position of this base of the panel"
seta hud_panel_infomessages_size "" "size of this panel"
seta hud_panel_scoreboard_bg_teams_color_team "" "override panel team color in team tables"
seta hud_panel_scoreboard_accuracy_doublerows "" "use two rows instead of one"
seta hud_panel_scoreboard_accuracy_nocolors "" "don't use colors displaying accuracy stats"
+
+seta hud_panel_strafehud_pos "" "position of this base of the panel"
+seta hud_panel_strafehud_size "" "size of this panel"
+seta hud_panel_strafehud_bg "" "if set to something else than \"\" = override default background"
+seta hud_panel_strafehud_bg_color "" "if set to something else than \"\" = override default panel background color"
+seta hud_panel_strafehud_bg_color_team "" "override panel color with team color in team based games"
+seta hud_panel_strafehud_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
+seta hud_panel_strafehud_bg_border "" "if set to something else than \"\" = override default size of border around the background"
+seta hud_panel_strafehud_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
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 18 23 19 20 21 22 24 "
+seta _hud_panelorder "17 25 15 12 9 5 10 6 14 0 7 4 11 2 1 3 8 13 16 18 23 19 20 21 22 24 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.005000"
seta hud_panel_engineinfo_bg_alpha ""
seta hud_panel_engineinfo_bg_border ""
seta hud_panel_engineinfo_bg_padding ""
- seta hud_panel_engineinfo_framecounter_time "0.1"
- seta hud_panel_engineinfo_framecounter_decimals "0"
seta hud_panel_infomessages_pos "0.680000 0.100000"
seta hud_panel_infomessages_size "0.280000 0.080000"
seta hud_panel_scoreboard_accuracy_doublerows "0"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_strafehud_pos "0.320000 0.570000"
+seta hud_panel_strafehud_size "0.360000 0.020000"
+seta hud_panel_strafehud_bg "0"
+seta hud_panel_strafehud_bg_color ""
+seta hud_panel_strafehud_bg_color_team ""
+seta hud_panel_strafehud_bg_alpha "0.7"
+seta hud_panel_strafehud_bg_border ""
+seta hud_panel_strafehud_bg_padding ""
+
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 18 23 19 20 21 22 24 "
+seta _hud_panelorder "17 25 15 12 9 10 5 6 14 0 7 4 11 2 1 3 8 13 16 18 23 19 20 21 22 24 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_engineinfo_bg_alpha ""
seta hud_panel_engineinfo_bg_border ""
seta hud_panel_engineinfo_bg_padding ""
- seta hud_panel_engineinfo_framecounter_time "0.1"
- seta hud_panel_engineinfo_framecounter_decimals "0"
seta hud_panel_infomessages_pos "0.680000 0.100000"
seta hud_panel_infomessages_size "0.280000 0.080000"
seta hud_panel_scoreboard_accuracy_doublerows "1"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_strafehud_pos "0.330000 0.570000"
+seta hud_panel_strafehud_size "0.340000 0.020000"
+seta hud_panel_strafehud_bg ""
+seta hud_panel_strafehud_bg_color ""
+seta hud_panel_strafehud_bg_color_team ""
+seta hud_panel_strafehud_bg_alpha ""
+seta hud_panel_strafehud_bg_border ""
+seta hud_panel_strafehud_bg_padding ""
+
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 18 23 19 20 21 22 24 "
+seta _hud_panelorder "17 10 3 0 14 6 9 13 4 1 2 11 12 7 5 8 25 15 16 18 23 19 20 21 22 24 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_engineinfo_bg_alpha ""
seta hud_panel_engineinfo_bg_border ""
seta hud_panel_engineinfo_bg_padding ""
- seta hud_panel_engineinfo_framecounter_time "0.1"
- seta hud_panel_engineinfo_framecounter_decimals "0"
seta hud_panel_infomessages_pos "0.710000 0"
seta hud_panel_infomessages_size "0.280000 0.090000"
seta hud_panel_scoreboard_accuracy_doublerows "1"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_strafehud_pos "0.380000 0.550000"
+seta hud_panel_strafehud_size "0.240000 0.025000"
+seta hud_panel_strafehud_bg ""
+seta hud_panel_strafehud_bg_color ""
+seta hud_panel_strafehud_bg_color_team ""
+seta hud_panel_strafehud_bg_alpha ""
+seta hud_panel_strafehud_bg_border ""
+seta hud_panel_strafehud_bg_padding ""
+
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 18 23 19 20 21 22 24 "
+seta _hud_panelorder "17 25 15 3 1 2 11 10 0 14 6 9 13 4 12 7 5 8 16 18 23 19 20 21 22 24 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_engineinfo_bg_alpha ""
seta hud_panel_engineinfo_bg_border ""
seta hud_panel_engineinfo_bg_padding ""
- seta hud_panel_engineinfo_framecounter_time "0.1"
- seta hud_panel_engineinfo_framecounter_decimals "0"
seta hud_panel_infomessages_pos "0.710000 0"
seta hud_panel_infomessages_size "0.280000 0.090000"
seta hud_panel_scoreboard_accuracy_doublerows "1"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_strafehud_pos "0.330000 0.700000"
+seta hud_panel_strafehud_size "0.340000 0.015000"
+seta hud_panel_strafehud_bg ""
+seta hud_panel_strafehud_bg_color ""
+seta hud_panel_strafehud_bg_color_team ""
+seta hud_panel_strafehud_bg_alpha ""
+seta hud_panel_strafehud_bg_border ""
+seta hud_panel_strafehud_bg_padding ""
+
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 18 23 19 20 21 22 24 "
+seta _hud_panelorder "17 25 15 10 9 6 8 14 5 0 4 13 2 7 1 3 11 12 16 18 23 19 20 21 22 24 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_engineinfo_bg_alpha ""
seta hud_panel_engineinfo_bg_border ""
seta hud_panel_engineinfo_bg_padding ""
- seta hud_panel_engineinfo_framecounter_time "0.1"
- seta hud_panel_engineinfo_framecounter_decimals "0"
seta hud_panel_infomessages_pos "0.510000 0"
seta hud_panel_infomessages_size "0.340000 0.090000"
seta hud_panel_scoreboard_accuracy_doublerows "1"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_strafehud_pos "0.320000 0.540000"
+seta hud_panel_strafehud_size "0.360000 0.025000"
+seta hud_panel_strafehud_bg ""
+seta hud_panel_strafehud_bg_color ""
+seta hud_panel_strafehud_bg_color_team ""
+seta hud_panel_strafehud_bg_alpha ""
+seta hud_panel_strafehud_bg_border ""
+seta hud_panel_strafehud_bg_padding ""
+
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 18 23 19 20 21 22 24 "
+seta _hud_panelorder "17 25 15 0 11 8 5 6 14 9 13 7 2 3 1 10 12 4 16 18 23 19 20 21 22 24 "
seta hud_configure_grid "1"
seta hud_configure_grid_xsize "0.010000"
seta hud_panel_engineinfo_bg_alpha ""
seta hud_panel_engineinfo_bg_border ""
seta hud_panel_engineinfo_bg_padding ""
- seta hud_panel_engineinfo_framecounter_time "0.1"
- seta hud_panel_engineinfo_framecounter_decimals "0"
seta hud_panel_infomessages_pos "0.690000 0.620000"
seta hud_panel_infomessages_size "0.300000 0.100000"
seta hud_panel_scoreboard_accuracy_doublerows "1"
seta hud_panel_scoreboard_accuracy_nocolors "0"
+seta hud_panel_strafehud_pos "0.360000 0.570000"
+seta hud_panel_strafehud_size "0.280000 0.025000"
+seta hud_panel_strafehud_bg "0"
+seta hud_panel_strafehud_bg_color ""
+seta hud_panel_strafehud_bg_color_team ""
+seta hud_panel_strafehud_bg_alpha ""
+seta hud_panel_strafehud_bg_border ""
+seta hud_panel_strafehud_bg_padding ""
+
menu_sync
float autocvar_cl_particles_quality;
bool autocvar_cl_projectiles_sloppy;
bool autocvar_cl_readpicture_force;
+ bool autocvar_cl_respawn_ghosts_keepcolors;
bool autocvar_cl_reticle = 1;
float autocvar_cl_reticle_normal_alpha = 1;
bool autocvar_cl_reticle_weapon = 1;
bool autocvar_cl_spawn_event_sound = 1;
// float autocvar_cl_spawn_point_model;
bool autocvar_cl_spawn_point_particles;
- float autocvar_cl_spawn_point_dist_min = 800;
float autocvar_cl_spawn_point_dist_max = 1200;
bool autocvar_cl_spawnzoom = 1;
float autocvar_cl_spawnzoom_speed = 1;
string autocvar_crosshair_hitindication_per_weapon_color;
float autocvar_crosshair_hitindication_speed;
bool autocvar_crosshair_hittest;
- bool autocvar_crosshair_hittest_blur;
+ bool autocvar_crosshair_hittest_blur_teammate = 0;
+ bool autocvar_crosshair_hittest_blur_wall = 1;
//float autocvar_crosshair_hittest_scale = 1.25;
bool autocvar_crosshair_hittest_showimpact;
bool autocvar_crosshair_per_weapon;
bool autocvar_hud_panel_physics_dynamichud = true;
bool autocvar_hud_panel_centerprint_dynamichud = true;
//bool autocvar_hud_panel_itemstime_dynamichud = true;
+bool autocvar_hud_panel_strafehud_dynamichud = true;
bool autocvar_hud_panel_healtharmor_hide_ondeath = false;
bool autocvar_hud_panel_ammo_hide_ondeath = false;
bool autocvar_hud_panel_powerups_hide_ondeath = false;
int autocvar_hud_panel_radar_maximized_zoommode;
bool autocvar_hud_panel_score;
bool autocvar_hud_panel_score_rankings;
+int autocvar_hud_panel_strafehud = 3;
+bool autocvar__hud_panel_strafehud_demo = false;
+bool autocvar__hud_panel_strafehud_center = false;
+int autocvar_hud_panel_strafehud_mode = 0;
+float autocvar_hud_panel_strafehud_bar_alpha = 0.3;
+vector autocvar_hud_panel_strafehud_bar_color = '1 1 1';
+vector autocvar_hud_panel_strafehud_indicator_color = '0 1 0';
+vector autocvar_hud_panel_strafehud_indicator_switch_color = '1 1 0';
+float autocvar_hud_panel_strafehud_angle = 0;
+vector autocvar_hud_panel_strafehud_good_color = '0 1 1';
+vector autocvar_hud_panel_strafehud_warning_color = '1 1 0';
+vector autocvar_hud_panel_strafehud_alert_color = '1 0 1';
+float autocvar_hud_panel_strafehud_angle_alpha = 0.8;
+vector autocvar_hud_panel_strafehud_direction_color = '0 0.5 1';
+float autocvar_hud_panel_strafehud_timeout_air = 0;
+float autocvar_hud_panel_strafehud_timeout_ground = 0.03333333;
+float autocvar_hud_panel_strafehud_timeout_strafe = 0.1;
+float autocvar_hud_panel_strafehud_timeout_direction = 0.5;
+float autocvar_hud_panel_strafehud_indicator_minspeed = -1;
bool autocvar_hud_panel_timer;
bool autocvar_hud_panel_timer_increment;
float autocvar_hud_panel_update_interval;
int autocvar__cl_playerskin;
string autocvar__cl_playermodel;
float autocvar_cl_deathglow;
+ float autocvar_cl_deathglow_min = 0.5;
bool autocvar_developer_csqcentities;
float autocvar_cl_jetpack_attenuation = 2;
bool autocvar_cl_showspectators;
#include <common/weapons/_all.qh>
#include <common/scores.qh>
+ vector OFFSET_CURSOR = '0 0 0';
+ vector SIZE_CURSOR = '32 32 0';
+ void draw_cursor(vector pos, vector ofs, string img, vector col, float a);
+ void draw_cursor_normal(vector pos, vector col, float a);
+ void LoadMenuSkinValues();
+
void Hud_Dynamic_Frame();
bool HUD_Radar_Clickable();
bool QuickMenu_IsOpened();
REGISTRY(hud_panels, BITS(6))
- #define hud_panels_from(i) _hud_panels_from(i, NULL)
REGISTER_REGISTRY(hud_panels)
- #define REGISTER_HUD_PANEL(id, draw_func, configflags, showflags) \
+ REGISTRY_DEFINE_GET(hud_panels, NULL)
+
+ #define _REGISTER_HUD_PANEL(id, draw_func, export_func, configflags, showflags) \
void draw_func(); \
+ void export_func(int fh); \
REGISTER(hud_panels, HUD_PANEL, id, m_id, new_pure(hud_panel)) { \
this.panel_id = this.m_id; \
this.panel_draw = draw_func; \
+ this.panel_export = export_func; \
this.panel_name = strzone(strtolower(#id)); \
this.panel_configflags = configflags; \
this.panel_showflags = showflags; \
}
+ #define REGISTER_HUD_PANEL(id, draw_func, configflags, showflags) \
+ _REGISTER_HUD_PANEL(id, draw_func, draw_func##_Export, configflags, showflags)
+
#define HUD_PANEL(NAME) HUD_PANEL_##NAME
// draw the background/borders
); \
MACRO_END
- int panel_order[hud_panels_MAX];
+ int panel_order[REGISTRY_MAX(hud_panels)];
string hud_panelorder_prev;
bool hud_draw_maximized;
void HUD_Radar_Hide_Maximized();
float HUD_GetRowCount(int item_count, vector size, float item_aspect);
- vector HUD_Get_Num_Color (float hp, float maxvalue);
+ vector HUD_Get_Num_Color(float hp, float maxvalue, bool blink);
void DrawNumIcon(vector myPos, vector mySize, float theTime, string icon, bool vertical, bool icon_right_align, vector color, float theAlpha);
void DrawNumIcon_expanding(vector myPos, vector mySize, float theTime, string icon, bool vertical, int icon_right_align, vector color, float theAlpha, float fadelerp);
void HUD_Panel_DrawHighlight(vector pos, vector mySize, vector color, float theAlpha, int drawflag);
const float BORDER_MULTIPLIER = 4;
float scoreboard_bottom;
- int weapon_accuracy[Weapons_MAX];
+ int weapon_accuracy[REGISTRY_MAX(Weapons)];
entity complain_weapon;
int complain_weapon_type;
string panel_bg_padding_str;
classfield(HUDPanel) .void() panel_draw;
+ classfield(HUDPanel) .void(int fh) panel_export;
// chat panel can be reduced / moved while the mapvote is active
// let know the mapvote panel about chat pos and size
REGISTER_HUD_PANEL(ITEMSTIME, HUD_ItemsTime, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // ITEMSTIME
REGISTER_HUD_PANEL(QUICKMENU, HUD_QuickMenu, PANEL_CONFIG_MAIN , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME ) // QUICKMENU
REGISTER_HUD_PANEL(SCOREBOARD, Scoreboard_Draw, PANEL_CONFIG_NO , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // SCOREBOARD
+REGISTER_HUD_PANEL(STRAFEHUD, HUD_StrafeHUD, PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME ) // STRAFEHUD
// always add new panels to the end of list
// Because calling lots of functions in QC apparently cuts fps in half on many machines:
#include <menu/xonotic/demolist.qh>
#include <menu/xonotic/dialog.qh>
#include <menu/xonotic/dialog_credits.qh>
- #include <menu/xonotic/dialog_disconnect.qc>
+ #include <menu/xonotic/dialog_disconnect.qh>
#include <menu/xonotic/dialog_firstrun.qh>
#include <menu/xonotic/dialog_hudpanel_ammo.qh>
#include <menu/xonotic/dialog_hudpanel_centerprint.qh>
#include <menu/xonotic/dialog_hudpanel_racetimer.qh>
#include <menu/xonotic/dialog_hudpanel_radar.qh>
#include <menu/xonotic/dialog_hudpanel_score.qh>
+#include <menu/xonotic/dialog_hudpanel_strafehud.qh>
#include <menu/xonotic/dialog_hudpanel_timer.qh>
#include <menu/xonotic/dialog_hudpanel_vote.qh>
#include <menu/xonotic/dialog_hudpanel_weapons.qh>