From 353b8a912101d6f20eae1301805765d1223005a9 Mon Sep 17 00:00:00 2001 From: 1029chris <1029chris@gmail.com> Date: Thu, 11 Aug 2016 22:53:36 -0700 Subject: Popup sound now makes sure it isnt already playing --- virus2.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/virus2.lua b/virus2.lua index 148c88e..19ef279 100644 --- a/virus2.lua +++ b/virus2.lua @@ -43,7 +43,11 @@ function drawPopup(id) love.graphics.setCanvas() end function addPopup(rand, x, y, w, h, ad, dup, m) - notification.sound3:play() + if notification.sound3:isPlaying() == true then + notification.sound3:rewind() + else + notification.sound3:play() + end if rand == true then table.insert(v2.pop.p, 1, { w = math.random(300,800), -- cgit