]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use crouch status instead of crouch key to indicate when player is crouching in press...
authorMario <zacjardine@y7mail.com>
Thu, 6 Sep 2018 16:42:39 +0000 (02:42 +1000)
committerMario <zacjardine@y7mail.com>
Thu, 6 Sep 2018 16:42:39 +0000 (02:42 +1000)
qcsrc/server/client.qc

index 85514bdf9e0b02c553e3def6a750ad84b5043e49..262d1d1a7d12425cfcec14c609c267f10eb73775 100644 (file)
@@ -1647,7 +1647,7 @@ void GetPressedKeys(entity this)
        keys = BITSET(keys, KEY_LEFT,           CS(this).movement.y < 0);
 
        keys = BITSET(keys, KEY_JUMP,           PHYS_INPUT_BUTTON_JUMP(this));
-       keys = BITSET(keys, KEY_CROUCH,         PHYS_INPUT_BUTTON_CROUCH(this));
+       keys = BITSET(keys, KEY_CROUCH,         IS_DUCKED(this)); // workaround: player can't un-crouch until their path is clear, so we keep the button held here
        keys = BITSET(keys, KEY_ATCK,           PHYS_INPUT_BUTTON_ATCK(this));
        keys = BITSET(keys, KEY_ATCK2,          PHYS_INPUT_BUTTON_ATCK2(this));
        CS(this).pressedkeys = keys; // store for other users