From 404c3209732775127d5286f46a967ba69a6b4b31 Mon Sep 17 00:00:00 2001 From: Jason Hilder Date: Thu, 8 Oct 2026 07:43:21 +0200 Subject: [PATCH] reset ball now clears trail effect. --- src/entity_ball.odin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/entity_ball.odin b/src/entity_ball.odin index de86e2c..0dd35e3 100644 --- a/src/entity_ball.odin +++ b/src/entity_ball.odin @@ -36,6 +36,8 @@ reset_ball :: proc(ball: ^Entity) { ball.pos = rl.Vector2{(VIEWPORT_W / 2), (VIEWPORT_H / 2)} ball.vel = rl.Vector2{0,0} ball.speed = 300 + ball.trail_positions = {} + ball.trail_count = 0 } update_ball :: proc(ball: ^Entity, level: ^Level, dt: f32) { @@ -119,7 +121,6 @@ increment_score :: proc(score_side: ^int, max_score: int, player: bool, ball: ^E score_side^ += 1 if score_side^ == max_score { emit_event(Game_Over_Data{player}) - ball.trail_count = 0 } }