delta-client
delta-client copied to clipboard
Implement double tap space to fly and double tap forwards to sprint
If you fix this issue it should help you get acquainted with Delta Client's input handling system.
I have grouped these two together because they are clearly very similar features.
The best way to implement this is probably to add a timeSinceForwards property and a timeSinceJump property to the InputState component. These properties can each be used to store an integer that counts up once per tick and resets when the respective key changes from not pressed to pressed. If the key is pressed a maximum of 6 ticks later, then trigger the respective double tap action (if the action is valid, i.e. if the player is allowed to fly or sprint).
Feel free to join the Discord server and ask for help if you get stuck. Everyone's happy to help!
I will do this one as soon as I get Xcode working
done in pr #170
Double tap forwards to sprint was implemented by jxhug, and now just double tap jump to fly remains.
Implement double tap space to unfly (currently the only way to 'unfly' is to hit the ground)
Done now