]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
strafehud: add option to disable direction caps
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Tue, 23 Jun 2020 20:47:37 +0000 (22:47 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Tue, 23 Jun 2020 20:47:37 +0000 (22:47 +0200)
_hud_common.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud/panel/strafehud.qc

index 2d0d4a4c9292a0b3f28266428aef9f963128db0a..8d7195fc37a2a600612d3c17c1031fdc68d67469 100644 (file)
@@ -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"
index aa9d5626ea816dc0ec2e472896009a169ad0ac35..8ee8447442a9200d099fde7d4d924f80e41161fa 100644 (file)
@@ -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;
index 12576b29838727453a60ad9acf81fc6d3f300691..22afca216ab2c4fbba9e0f7be9d1045612a4ad03 100644 (file)
@@ -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