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 } }