]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add patch from Juhu/strafehud-fixes branch: "strafehud: improve angle indicator style...
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Mon, 22 Mar 2021 13:28:39 +0000 (14:28 +0100)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Mon, 22 Mar 2021 13:28:39 +0000 (14:28 +0100)
_hud_common.cfg
qcsrc/client/hud/panel/strafehud.qc
qcsrc/client/hud/panel/strafehud.qh

index 2d833ea6938cbb0bde5e51f16e4e59c541345a02..42fcb1be5d7111344cf7ec5ab8a77beb5283a03a 100644 (file)
@@ -145,7 +145,7 @@ seta hud_panel_strafehud_bar_accel_color "0 1 0" "color of the strafe meter acce
 seta hud_panel_strafehud_bar_accel_alpha "0.3" "opacity of the strafe meter acceleration zone"
 seta hud_panel_strafehud_bar_overturn_color "1 0 1" "color of the strafe meter overturn zone"
 seta hud_panel_strafehud_bar_overturn_alpha "0.3" "opacity of the strafe meter overturn zone"
-seta hud_panel_strafehud_angle_style "2" "set the angle indicator style: 0 = solid line, 1 = dashed line, 2 = none"
+seta hud_panel_strafehud_angle_style "0" "set the angle indicator style: 0 = none, 1 = solid line, 2 = dashed line"
 seta hud_panel_strafehud_angle_dashes "4" "determines the amount of dashes if the angle indicator uses a dashed line"
 seta hud_panel_strafehud_angle_alpha "0.8" "opacity of the indicator showing the player's current angle"
 seta hud_panel_strafehud_angle_height "1" "height of the indicator showing the player's current angle (relative to the panel height)"
index fb68f38d0a8624d3c7d6e252c57a6bf93e5c9d8a..9bcaf56e5e462e9c1dd91402a61ba511d863c8a2 100644 (file)
@@ -712,19 +712,19 @@ void HUD_StrafeHUD()
         {
             switch(autocvar_hud_panel_strafehud_angle_style)
             {
-                case 0:
+                case 1:
                     drawfill(panel_pos - eY * ((currentangle_size.y - panel_size.y) / 2) + eX * (currentangle_offset - currentangle_size.x/2), currentangle_size, currentangle_color, autocvar_hud_panel_strafehud_angle_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                     break;
-                case 1:
+                case 2:
                     vector line_size = currentangle_size;
-                    line_size.y = currentangle_size.y / (bound(2, autocvar_hud_panel_strafehud_angle_dashes, 100)*2-1);
+                    line_size.y = currentangle_size.y / (bound(2, autocvar_hud_panel_strafehud_angle_dashes, currentangle_size.y)*2-1);
                     for(float i = 0; i < currentangle_size.y; i += line_size.y*2)
                     {
                         if(i + line_size.y*2 >= currentangle_size.y) line_size.y = currentangle_size.y - i;
                         drawfill(panel_pos - eY * ((currentangle_size.y - panel_size.y) / 2 - i) + eX * (currentangle_offset - line_size.x/2), line_size, currentangle_color, autocvar_hud_panel_strafehud_angle_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                     }
                     break;
-                case 2:
+                case 0:
                 default:
             }
 
index 4fa3af3396a560d8519140abfb12c74f4a47cc92..edaa61e9659b5b0ace89018549622ee40e575942 100644 (file)
@@ -15,7 +15,7 @@ AUTOCVAR_SAVE(hud_panel_strafehud_bar_accel_color, vector, '0 1 0', "color of th
 AUTOCVAR_SAVE(hud_panel_strafehud_bar_accel_alpha, float, 0.3, "opacity of the strafe meter acceleration zone");
 AUTOCVAR_SAVE(hud_panel_strafehud_bar_overturn_color, vector, '1 0 1', "color of the strafe meter overturn zone");
 AUTOCVAR_SAVE(hud_panel_strafehud_bar_overturn_alpha, float, 0.3, "opacity of the strafe meter overturn zone");
-AUTOCVAR_SAVE(hud_panel_strafehud_angle_style, int, 2, "set the angle indicator style: 0 = solid line, 1 = dashed line, 2 = none");
+AUTOCVAR_SAVE(hud_panel_strafehud_angle_style, int, 0, "set the angle indicator style: 0 = none, 1 = solid line, 2 = dashed line");
 AUTOCVAR_SAVE(hud_panel_strafehud_angle_dashes, int, 4, "determines the amount of dashes if the angle indicator uses a dashed line");
 AUTOCVAR_SAVE(hud_panel_strafehud_angle_alpha, float, 0.8, "opacity of the indicator showing the player's current angle");
 AUTOCVAR_SAVE(hud_panel_strafehud_angle_height, float, 1, "height of the indicator showing the player's current angle (relative to the panel height)");