From 63b8a7800ab313c7230b01f3dc82fc9707432f27 Mon Sep 17 00:00:00 2001 From: James Turk Date: Thu, 9 Mar 2023 00:35:10 -0600 Subject: [PATCH] fix sfx on npc --- snowdogs.p8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snowdogs.p8 b/snowdogs.p8 index b9d58a1..4060932 100644 --- a/snowdogs.p8 +++ b/snowdogs.p8 @@ -429,6 +429,8 @@ function npc_upd() npc.draw = draw_fan npc.collide = heart npc.sound = 7 + else + npc.draw = nil end npc.last = distance npc.y = rnd(40) @@ -438,7 +440,6 @@ function npc_upd() if rnd() < 0.5 then npc.x += 140 npc.dx *= -1 - sound(7) end end @@ -451,6 +452,7 @@ function npc_upd() if npc.y > 80 and npc.x+8 > l and npc.x < r and npc.collide != nil then npc.collide() npc.collide = nil + sfx(npc.sound) end end