From 14c9a98cb2bceecb933e237c2ac37e083ade3b44 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Tue, 23 Jun 2020 22:47:37 +0200 Subject: [PATCH] strafehud: add option to disable direction caps --- _hud_common.cfg | 1 + qcsrc/client/autocvars.qh | 1 + qcsrc/client/hud/panel/strafehud.qc | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.2