]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
account for zero friction frame in strafe efficiency code
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Wed, 14 Sep 2022 08:30:27 +0000 (10:30 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Wed, 14 Sep 2022 08:30:27 +0000 (10:30 +0200)
qcsrc/server/strafe.qc

index 86e017eed3807522a75d37999b8ab1aaa0cb8db8..b27afa9c6af328627a0b126e88668a5be1f36ab7 100644 (file)
@@ -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));