From 7f957224497cd99fa38ccce9633491a7a37dad9f Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Tue, 2 Jun 2020 23:24:17 +0200 Subject: [PATCH] improve strafehud mode branch logic --- qcsrc/client/hud/panel/strafehud.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.39.2