From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Tue, 23 Jun 2020 20:47:37 +0000 (+0200) Subject: strafehud: add option to disable direction caps X-Git-Tag: xonotic-v0.8.5~738^2~31 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=14c9a98cb2bceecb933e237c2ac37e083ade3b44;p=xonotic%2Fxonotic-data.pk3dir.git strafehud: add option to disable direction caps --- diff --git a/_hud_common.cfg b/_hud_common.cfg index 2d0d4a4c9..8d7195fc3 100644 --- a/_hud_common.cfg +++ b/_hud_common.cfg @@ -140,6 +140,7 @@ seta hud_panel_strafehud_angle_width "0.005" "indicator width of the actual stra 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_direction_show "1" "show the direction indicator caps" seta hud_panel_strafehud_direction_color "0 0.5 1" "direction indicator color" seta hud_panel_strafehud_direction_width "0.25" "direction indicator width relative to the panel height" seta hud_panel_strafehud_direction_length "0.02" "direction indicator length relative to the panel width" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index aa9d5626e..8ee844744 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -338,6 +338,7 @@ float autocvar_hud_panel_strafehud_angle_width = 0.005; 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'; +bool autocvar_hud_panel_strafehud_direction_show = true; vector autocvar_hud_panel_strafehud_direction_color = '0 0.5 1'; float autocvar_hud_panel_strafehud_direction_width = 0.25; float autocvar_hud_panel_strafehud_direction_length = 0.02; diff --git a/qcsrc/client/hud/panel/strafehud.qc b/qcsrc/client/hud/panel/strafehud.qc index 12576b298..22afca216 100644 --- a/qcsrc/client/hud/panel/strafehud.qc +++ b/qcsrc/client/hud/panel/strafehud.qc @@ -565,7 +565,7 @@ void HUD_StrafeHUD() HUD_Panel_DrawStrafeHUD_drawfill(bar_offset, bar_width, autocvar_hud_panel_strafehud_bar_color, autocvar_hud_panel_strafehud_bar_alpha); } - if(direction != 0) + if(autocvar_hud_panel_strafehud_direction_show && direction != 0) { bool indicator_direction = direction < 0; // invert left/right when strafing backwards or when strafing towards the opposite side indicated by the direction variable