From 714dc4045f3853dbbc3c285e9a8e8a67fefbc8d8 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Wed, 14 Sep 2022 10:30:27 +0200 Subject: [PATCH] account for zero friction frame in strafe efficiency code --- qcsrc/server/strafe.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/server/strafe.qc b/qcsrc/server/strafe.qc index 86e017eed..b27afa9c6 100644 --- a/qcsrc/server/strafe.qc +++ b/qcsrc/server/strafe.qc @@ -11,7 +11,7 @@ float calculate_strafe_efficiency(entity strafeplayer, vector movement, float dt if(strafeplayer) { // physics - bool onground = IS_ONGROUND(strafeplayer); + bool onground = IS_ONGROUND(strafeplayer) && !(PHYS_INPUT_BUTTON_JUMP(strafeplayer) || PHYS_INPUT_BUTTON_JETPACK(strafeplayer)); bool strafekeys; bool swimming = strafeplayer.waterlevel >= WATERLEVEL_SWIMMING; float speed = vlen(vec2(strafeplayer.velocity)); -- 2.39.2