meteor-rejects
meteor-rejects copied to clipboard
[Suggestion] don't unregister keypresses in stopMomentum
Describe the bug
Toggling off Flight while holding a key will unregister the key so you have to press the key again to be able to walk.
I looked at the code and tried fixing it but can't really find a way, I understand why this happens but can't think of a way myself to fix it.
Steps to reproduce
1. enable stopMomentum in the flight module
2. toggle on flight
3. fly
4. toggle off flight (while pressing W,A,S,D)
5. You're not moving in the direction of what key you're pressing
Operating System
Windows
Rejects Version
latest
Meteor Version
latest dev build
Minecraft Version
1.17.1
Other mods
none
Probably due to this
A fix I can think off is to cancel player velocity (set to 0) instead of setting the keypress to false
it is setting player velocity to 0 right here, but it doesn't work properly without unregistering keypresses
it is setting player velocity to 0 right here, but it doesn't work properly without unregistering keypresses
Yeah what's the deal with that? I actually tried fixing it myself and just setting velocity to 0 but it doesn't work for some weird reason...