mirror of
https://github.com/chylex/Better-Controls.git
synced 2025-05-18 10:34:05 +02:00
Fix sprinting not stopping when untoggling sometimes
This commit is contained in:
parent
5b3b633cbf
commit
e55cef95b3
@ -72,7 +72,7 @@ public final class PlayerTicker{
|
|||||||
}
|
}
|
||||||
else if (wasSprintToggled){
|
else if (wasSprintToggled){
|
||||||
stopSprintingAfterReleasingSprintKey = true;
|
stopSprintingAfterReleasingSprintKey = true;
|
||||||
waitingForSprintKeyRelease = false;
|
waitingForSprintKeyRelease = true;
|
||||||
}
|
}
|
||||||
else if (cfg().tapSprintKeyAgainToStopSprinting){
|
else if (cfg().tapSprintKeyAgainToStopSprinting){
|
||||||
if (opts.keySprint.isPressed()){
|
if (opts.keySprint.isPressed()){
|
||||||
@ -92,6 +92,7 @@ public final class PlayerTicker{
|
|||||||
|
|
||||||
if (stopSprintingAfterReleasingSprintKey && !opts.keySprint.isPressed()){
|
if (stopSprintingAfterReleasingSprintKey && !opts.keySprint.isPressed()){
|
||||||
stopSprintingAfterReleasingSprintKey = false;
|
stopSprintingAfterReleasingSprintKey = false;
|
||||||
|
waitingForSprintKeyRelease = false;
|
||||||
player.setSprinting(false);
|
player.setSprinting(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user