From d7146a1d527ca203eb3952592ebacb8db0a30470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Sun, 4 Jun 2023 17:29:00 +0300 Subject: [PATCH] Account for unreflected missiles that got destroyed --- bundle/main.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bundle/main.lua b/bundle/main.lua index 56168e6..dd25f29 100644 --- a/bundle/main.lua +++ b/bundle/main.lua @@ -243,6 +243,9 @@ function updateMissiles(dt) while i <= #missiles do if missiles[i].y > 1 + missile_radius or not missiles[i].alive then -- Went off the bottom of the screen or exploded, delete + if not missiles[i].reflected then + unreflected_missiles = unreflected_missiles - 1 + end table.remove(missiles, i) else i = i + 1