From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sat, 20 Jun 2020 15:40:04 +0000 (+0200) Subject: make sure angle indicator changes color when inside any strafe acceleration zone X-Git-Tag: xonotic-v0.8.5~738^2~59 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cf236b83dffa4a36b6ca64b7eb6d199d79ccb864;p=xonotic%2Fxonotic-data.pk3dir.git make sure angle indicator changes color when inside any strafe acceleration zone --- diff --git a/qcsrc/client/hud/panel/strafehud.qc b/qcsrc/client/hud/panel/strafehud.qc index 6a0c6218c..39e97bdc7 100644 --- a/qcsrc/client/hud/panel/strafehud.qc +++ b/qcsrc/client/hud/panel/strafehud.qc @@ -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; }