From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Wed, 24 Jun 2020 01:59:59 +0000 (+0200) Subject: strafehud: limit angle indicator height to prevent it from going too far outside... X-Git-Tag: xonotic-v0.8.5~738^2~30 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=39d0d4e23028e876f3770402bce5390ff5ec8bb9;p=xonotic%2Fxonotic-data.pk3dir.git strafehud: limit angle indicator height to prevent it from going too far outside of the panel area --- diff --git a/qcsrc/client/hud/panel/strafehud.qc b/qcsrc/client/hud/panel/strafehud.qc index 22afca216..6f8abeb3c 100644 --- a/qcsrc/client/hud/panel/strafehud.qc +++ b/qcsrc/client/hud/panel/strafehud.qc @@ -430,7 +430,7 @@ void HUD_StrafeHUD() { currentangle_offset = bound(-hudangle/2, angle, hudangle/2)/hudangle * panel_size.x + panel_size.x/2; } - currentangle_size.y = max(panel_size.y * autocvar_hud_panel_strafehud_angle_height, 1); + currentangle_size.y = max(panel_size.y * min(autocvar_hud_panel_strafehud_angle_height, 2), 1); // best strafe acceleration angle bestangle_offset = bestangle/hudangle * panel_size.x + panel_size.x/2; switch_bestangle_offset = -bestangle/hudangle * panel_size.x + panel_size.x/2;