From 9cbb457ffd807273600af345ea9b04c89ded6ab5 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Tue, 5 May 2020 01:33:55 +0200 Subject: [PATCH] fix onground detection in spectate mode --- qcsrc/client/hud/panel/strafehud.qc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qcsrc/client/hud/panel/strafehud.qc b/qcsrc/client/hud/panel/strafehud.qc index c8557052f..4ba4634fe 100644 --- a/qcsrc/client/hud/panel/strafehud.qc +++ b/qcsrc/client/hud/panel/strafehud.qc @@ -1,8 +1,6 @@ // Name: StrafeHUD // Author: Juhu -// FIXME: strafehud doesn't work properly in spectate due to lack of IS_ONGROUND() - #include "strafehud.qh" #include @@ -76,7 +74,7 @@ void HUD_StrafeHUD() float strafehud_indicator_minspeed = autocvar_hud_panel_strafehud_indicator_minspeed; // physics - float strafehud_onground = IS_ONGROUND(strafeplayer); + float strafehud_onground = strafeplayer == csqcplayer ? IS_ONGROUND(strafeplayer) : !(strafeplayer.anim_implicit_state & ANIMIMPLICITSTATE_INAIR); float strafehud_speed = !autocvar__hud_configure ? vlen(vec2(csqcplayer.velocity)) : 1337; // use local csqcmodel entity for this even when spectating, flickers too much otherwise float strafehud_maxspeed_crouch_mod = IS_DUCKED(strafeplayer) ? .5 : 1; float strafehud_maxspeed_swamp_mod = strafeplayer.in_swamp ? strafeplayer.swamp_slowdown : 1; -- 2.39.2