From 95d859737764abfc2f924af719c1bca776130d71 Mon Sep 17 00:00:00 2001 From: Dan Cojocaru Date: Mon, 21 Mar 2022 02:01:23 +0200 Subject: [PATCH] After game over, ball goes horizontally on resume --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index b54c261..7308050 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -155,12 +155,14 @@ void idle() { // Ball exited board on the left side rightScore += 1; ball.x = ball.y = 0; + ball.veloY = 0; gameRunning = false; } else if (ball.x - ball.radius > 1) { // Ball exited board on the right side leftScore += 1; ball.x = ball.y = 0; + ball.veloY = 0; gameRunning = false; } else if (ball.y - ball.radius < -1) {