summaryrefslogtreecommitdiffstats
path: root/player.gd
diff options
context:
space:
mode:
Diffstat (limited to 'player.gd')
-rw-r--r--player.gd2
1 files changed, 2 insertions, 0 deletions
diff --git a/player.gd b/player.gd
index cc2a663..defd9d8 100644
--- a/player.gd
+++ b/player.gd
@@ -39,6 +39,8 @@ func _physics_process(delta: float):
var can_jump = coyote < coyote_max
if Input.is_action_just_pressed("jump") and can_jump:
velocity.y = -jump_strength
+ # Force coyote time to expire to forbid double jumps
+ coyote = coyote_max
var direction: float
if Input.is_action_pressed("move_left") and Input.is_action_pressed("move_right"):