From 5452eeeb4b29ed1b4d2ab231c2a0e1510ee65883 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Thu, 26 Sep 2024 18:59:05 +0200 Subject: [PATCH] strafehud: properly pass player entity to vangle function for use in macro even though it technically does not need it --- qcsrc/client/hud/panel/strafehud.qc | 2 +- qcsrc/client/hud/panel/strafehud/extra.qc | 4 ++-- qcsrc/client/hud/panel/strafehud/extra.qh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/client/hud/panel/strafehud.qc b/qcsrc/client/hud/panel/strafehud.qc index 1b385f39b..6d6198a1c 100644 --- a/qcsrc/client/hud/panel/strafehud.qc +++ b/qcsrc/client/hud/panel/strafehud.qc @@ -741,7 +741,7 @@ void HUD_StrafeHUD() } } - text_offset_bottom += StrafeHUD_DrawVerticalAngle(text_offset_bottom); + text_offset_bottom += StrafeHUD_DrawVerticalAngle(strafeplayer, text_offset_bottom); draw_beginBoldFont(); text_offset_bottom += StrafeHUD_DrawStartSpeed(speed, text_offset_bottom); diff --git a/qcsrc/client/hud/panel/strafehud/extra.qc b/qcsrc/client/hud/panel/strafehud/extra.qc index c82ecb51d..7651e7157 100644 --- a/qcsrc/client/hud/panel/strafehud/extra.qc +++ b/qcsrc/client/hud/panel/strafehud/extra.qc @@ -101,11 +101,11 @@ float StrafeHUD_DrawSlickDetector(entity e, bool onslick) } // vertical angle for weapon jumps -float StrafeHUD_DrawVerticalAngle(float text_offset_bottom) +float StrafeHUD_DrawVerticalAngle(entity e, float text_offset_bottom) { if(autocvar_hud_panel_strafehud_vangle) { - float vangle = -PHYS_INPUT_ANGLES(strafeplayer).x; + float vangle = -PHYS_INPUT_ANGLES(e).x; float vangle_height = autocvar_hud_panel_strafehud_vangle_size * panel_size.y; string vangle_text = strcat(ftos_decimals(vangle, 2), "°"); diff --git a/qcsrc/client/hud/panel/strafehud/extra.qh b/qcsrc/client/hud/panel/strafehud/extra.qh index eab553e78..079ad31a5 100644 --- a/qcsrc/client/hud/panel/strafehud/extra.qh +++ b/qcsrc/client/hud/panel/strafehud/extra.qh @@ -2,7 +2,7 @@ #include "../strafehud.qh" float StrafeHUD_DrawSlickDetector(entity, bool); -float StrafeHUD_DrawVerticalAngle(float); +float StrafeHUD_DrawVerticalAngle(entity, float); void StrafeHUD_Sonar(float, string); string StrafeHUD_UpdateSonarSound(); float StrafeHUD_DrawJumpHeight(entity, bool, bool, float); -- 2.39.2