feat: adds a cd to the jump to prevent spam jumping up a slope

This commit is contained in:
DottsGit
2026-06-05 00:54:19 -04:00
parent 9f3264170e
commit 2c35f5074a
7 changed files with 23 additions and 7 deletions
+2 -1
View File
@@ -98,7 +98,7 @@ func update(delta: float) -> void:
vel -= machine.wall_normal * 2.0
# ── Wall jump ─────────────────────────────────────────────────────────
if machine.input_jump_just_pressed:
if machine.input_jump_just_pressed and machine.jump_cooldown_timer <= 0.0:
# Base jump off velocity on current preserved momentum
var jump_vel: Vector3 = _current_tangent * _run_speed
@@ -114,6 +114,7 @@ func update(delta: float) -> void:
machine.wall_side = 0.0
machine.wall_cooldown_timer = 0.3
machine.register_chain_mechanic("wall_jump")
machine.jump_cooldown_timer = params.jump_cooldown
machine.switch_to("air")
return