From ab075045d5bd5a07d9d57cad82091f7bd11b7a68 Mon Sep 17 00:00:00 2001 From: yuki Date: Fri, 14 Nov 2025 23:35:42 -0300 Subject: [PATCH] only connect player timer to _on_hit_end once --- scenes/ball/ball.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scenes/ball/ball.gd b/scenes/ball/ball.gd index d97edaa..34b342b 100644 --- a/scenes/ball/ball.gd +++ b/scenes/ball/ball.gd @@ -27,7 +27,8 @@ func _on_hit(hitbox: Area2D) -> void: var player: Player = hitbox.get_parent() var timer: Timer = player.hit_timer launch() - timer.connect("timeout", _on_hit_end) + if not timer.is_connected("timeout", _on_hit_end): + timer.connect("timeout", _on_hit_end) EventBus.ball_hit.emit(player.id, linear_velocity) is_hit = true