I like to jump a lot. And I also like to crouch a lot. That is why this bug is annoying me to no end.
I have a lot of movement related scripts including, null movement, improved crouch jump script, no up jump script (prevents accidental momentum halting stops). I understand how the scripts work and have tried to fix them myself, but being no mastermind it's easy to break them.
The bug
Say I have jumped off a ledge as scout and I am still holding the jump button. The crouch jump script causes me to be crouched in this state. Now if I start press the crouch button and release it. This results in a double jump, which is unintended.
The button sequence goes like this: +jumpB, +crouchB, -crouchB ---> 2nd unintended jump
Here should be all the related scripts:
// Null-cancelling movement script
// (prevents you from pressing two opposing directions, which causes you to stop moving)
bind i +mfwd
bind k +mback
bind j +mleft
bind l +mright
alias +mfwd "-back;+forward;alias checkfwd +forward; alias +checkForwardDepressed; alias -checkForwardDepressed"
alias +mback "-forward;+back;alias checkback +back; alias +unknownError; alias -unknownError"
alias +mleft "-moveright;+moveleft;alias checkleft +moveleft; alias +checkLeftDepressed; alias -checkLeftDepressed"
alias +mright "-moveleft;+moveright;alias checkright +moveright; alias +checkRightDepressed; alias -checkRightDepressed"
alias -mfwd "-forward;checkback;alias checkfwd; alias +lastDirection +forward; alias -lastDirection -forward; alias +checkForwardDepressed +unknownError; alias -checkForwardDepressed -unknownError"
alias -mback "-back;checkfwd;alias checkback; alias +lastDirection +back; alias -lastDirection -back; alias +unknownError +checkLeftDepressed; alias -unknownError -checkLeftDepressed"
alias -mleft "-moveleft;checkright;alias checkleft; alias +lastDirection +moveleft; alias -lastDirection -moveleft; alias +checkLeftDepressed +checkRightDepressed; alias -checkLeftDepressed -checkRightDepressed"
alias -mright "-moveright;checkleft;alias checkright; alias +lastDirection +moveright; alias -lastDirection -moveright; alias +checkRightDepressed +noKeysPressed; alias -checkRightDepressed -noKeysPressed"
alias checkfwd
alias checkback
alias checkleft
alias checkright
alias +testKeysPressed +checkForwardDepressed
alias -testKeysPressed -checkForwardDepressed
alias +checkForwardDepressed +unknownError
alias -checkForwardDepressed -unknownError
alias +unknownError +checkLeftDepressed
alias -unknownError -checkLeftDepressed
alias +checkLeftDepressed +checkRightDepressed
alias -checkLeftDepressed -checkRightDepressed
alias +checkRightDepressed +noKeysPressed
alias -checkRightDepressed -noKeysPressed
alias +noKeysPressed +lastDirection
alias -noKeysPressed -lastDirection
//Improved Crouch Jump Script
//By: Chdata
//Thanks to Stabby Stabby
alias +rj2 "spec_mode;-duck;+cr;alias checkrj +cr"
alias -rj2 "-cr;checkduck;alias checkrj"
alias +crouch "-cr;+duck;alias checkduck +duck"
alias -crouch "-duck;checkrj;alias checkduck"
alias checkduck
alias checkrj
alias +cr "+Qjump;+duck"
alias -cr "-duck;-Qjump"
bind alt +rj2
bind b +crouch
alias +crouchjump "+Qjump; +duck"
alias -crouchjump "-duck; -Qjump"
bind "ctrl" "+crouchjump"
//no up jump
alias +Qjump "+testKeysPressed; +jump"
alias -Qjump "-jump; -testKeysPressed"
alias enableQ+ "alias +Qjump "+testKeysPressed; +jump""
alias enableQ- "alias -Qjump "-jump; -testKeysPressed""
alias enable "enableQ+; enableQ-"
Note: I didn't make any of these scripts myself