Fix for issue #4

This commit is contained in:
Colormatic
2024-01-08 11:42:31 -08:00
committed by GitHub
parent 1336907578
commit 01ff47493c

View File

@ -125,7 +125,7 @@ func handle_movement(delta, input_dir):
func handle_state(moving): func handle_state(moving):
if sprint_enabled: if sprint_enabled:
if sprint_mode == 0: if sprint_mode == 0:
if Input.is_action_pressed("sprint") and !Input.is_action_pressed("crouch"): if Input.is_action_pressed(SPRINT) and !Input.is_action_pressed(CROUCH):
if moving: if moving:
if state != "sprinting": if state != "sprinting":
enter_sprint_state() enter_sprint_state()
@ -147,7 +147,7 @@ func handle_state(moving):
if crouch_enabled: if crouch_enabled:
if crouch_mode == 0: if crouch_mode == 0:
if Input.is_action_pressed("crouch") and !Input.is_action_pressed("sprint"): if Input.is_action_pressed(CROUCH) and !Input.is_action_pressed(SPRINT):
if state != "crouching": if state != "crouching":
enter_crouch_state() enter_crouch_state()
elif state == "crouching" and !$CrouchCeilingDetection.is_colliding(): elif state == "crouching" and !$CrouchCeilingDetection.is_colliding():