From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Tue, 2 Jun 2020 21:24:17 +0000 (+0200) Subject: improve strafehud mode branch logic X-Git-Tag: xonotic-v0.8.5~738^2~67 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7f957224497cd99fa38ccce9633491a7a37dad9f;p=xonotic%2Fxonotic-data.pk3dir.git improve strafehud mode branch logic --- diff --git a/qcsrc/client/hud/panel/strafehud.qc b/qcsrc/client/hud/panel/strafehud.qc index 12f168e1b..fb74c02e1 100644 --- a/qcsrc/client/hud/panel/strafehud.qc +++ b/qcsrc/client/hud/panel/strafehud.qc @@ -366,7 +366,7 @@ void HUD_StrafeHUD() { strafehud_currentangle_offset = strafehud_angle/strafehud_hudangle * panel_size.x/2; } - else if(strafehud_mode == 1) + else { strafehud_currentangle_offset = bound(-strafehud_hudangle, strafehud_angle, strafehud_hudangle)/strafehud_hudangle * panel_size.x/2 + panel_size.x/2; } @@ -676,7 +676,7 @@ void HUD_StrafeHUD() { drawfill(panel_pos - eY * ((strafehud_currentangle_size.y - panel_size.y) / 2) + eX * (panel_size.x/2 - strafehud_currentangle_size.x/2), strafehud_currentangle_size, strafehud_currentangle_color, autocvar_hud_panel_strafehud_angle_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); } - else if(strafehud_mode == 1) + else { drawfill(panel_pos - eY * ((strafehud_currentangle_size.y - panel_size.y) / 2) + eX * (strafehud_currentangle_offset - strafehud_currentangle_size.x/2), strafehud_currentangle_size, strafehud_currentangle_color, autocvar_hud_panel_strafehud_angle_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); }