]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/player.qc
Fix crouching in 2D mode
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / player.qc
index f6ab29715a298c07a7bc9c317d0a69d4d9636298..572bee349f205ca81caac2d23d0ff6da1d839696 100644 (file)
@@ -119,6 +119,8 @@ void PM_ClientMovement_UpdateStatus(entity this)
                }
        }
        bool do_crouch = PHYS_INPUT_BUTTON_CROUCH(this);
+       if(this.viewloc && !(this.viewloc.spawnflags & VIEWLOC_FREEMOVE) && PHYS_CS(this).movement.x < 0)
+               do_crouch = true;
        if (have_hook) {
                do_crouch = false;
        //} else if (this.waterlevel >= WATERLEVEL_SWIMMING) {