summaryrefslogtreecommitdiffstats
path: root/player.gd
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-11-14 11:24:42 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-11-14 11:25:13 +0200
commitc6080b5666d4f961a11b2b420fecb581da69528e (patch)
tree4ac9a5828589aa99724be1d1a39a4b8b55afc947 /player.gd
parentcb5ddada498a44e8569bdf53359ee06ee11e3d44 (diff)
Add level system, fix coyote double jumps
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"):