]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
make sure angle indicator changes color when inside any strafe acceleration zone
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Sat, 20 Jun 2020 15:40:04 +0000 (17:40 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Sat, 20 Jun 2020 15:40:04 +0000 (17:40 +0200)
qcsrc/client/hud/panel/strafehud.qc

index 6a0c6218c013abfb4f904f1c01f941687df9fcaa..39e97bdc71d0e3544e4900d690a2c31a63995111 100644 (file)
@@ -561,12 +561,12 @@ void HUD_StrafeHUD()
         // draw the actual strafe angle
         if(!bestangle_anywhere) // player gains speed with strafing
         {
-            if((direction > 0 && angle >= bestangle) ||
-                (direction < 0 && angle <= bestangle))
+            if((direction > 0 && (angle >= bestangle || angle <= -(bestangle + wishangle*2))) ||
+                (direction < 0 && (angle <= bestangle || angle >= -(bestangle + wishangle*2))))
             currentangle_color = autocvar_hud_panel_strafehud_good_color;
         }
 
-        if(fabs(moveangle) > 89.9) // player is overturning
+        if(fabs(moveangle) > 90) // player is overturning
         {
             currentangle_color = autocvar_hud_panel_strafehud_alert_color;
         }