Skip to content

Commit

Permalink
fix sneaking and sprinting (attempt 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
KingContaria committed Apr 15, 2024
1 parent 14d0bc0 commit 160ddcc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public static boolean getSneaking(GameOptions options) {
public static void setSneaking(GameOptions options, boolean value) {
if (options instanceof StandardGameOptions) {
((StandardGameOptions) options).sneaking = value;
} else {
options.keySneak.setPressed(options.sneakToggled && value);
} else if (options.sneakToggled && options.keySneak.isPressed() != value) {
options.keySneak.setPressed(true);
}
}

Expand All @@ -126,8 +126,8 @@ public static boolean getSprinting(GameOptions options) {
public static void setSprinting(GameOptions options, boolean value) {
if (options instanceof StandardGameOptions) {
((StandardGameOptions) options).sprinting = value;
} else {
options.keySprint.setPressed(options.sprintToggled && value);
} else if (options.sprintToggled && options.keySprint.isPressed() != value) {
options.keySprint.setPressed(true);
}
}

Expand Down

0 comments on commit 160ddcc

Please sign in to comment.