1
0
mirror of https://github.com/chylex/Better-Controls.git synced 2025-04-09 15:15:51 +02:00

Fix sprinting not stopping when untoggling sometimes

This commit is contained in:
chylex 2020-10-18 16:01:40 +02:00
parent 5b3b633cbf
commit e55cef95b3

View File

@ -72,7 +72,7 @@ public final class PlayerTicker{
}
else if (wasSprintToggled){
stopSprintingAfterReleasingSprintKey = true;
waitingForSprintKeyRelease = false;
waitingForSprintKeyRelease = true;
}
else if (cfg().tapSprintKeyAgainToStopSprinting){
if (opts.keySprint.isPressed()){
@ -92,6 +92,7 @@ public final class PlayerTicker{
if (stopSprintingAfterReleasingSprintKey && !opts.keySprint.isPressed()){
stopSprintingAfterReleasingSprintKey = false;
waitingForSprintKeyRelease = false;
player.setSprinting(false);
}