fix music control bugs

This commit is contained in:
Kistaro Windrider 2024-02-28 23:41:38 -08:00
parent e83f7002a2
commit 69e9336d7f
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -726,7 +726,10 @@ end
function zonk_mode:onmchg() function zonk_mode:onmchg()
if (musicmode & 2 == 0 and not self.xbgm) then if (musicmode & 2 == 0 and not self.xbgm) then
music(self.nextbgm or self.bgm or -1, 500, 7) music(self.nextbgm or self.bgm or -1, 500, 7)
if self.nextbgm then
self.bgm = self.nextbgm
self.nextbgm = nil self.nextbgm = nil
end
else else
music(-1, 250) music(-1, 250)
end end
@ -861,6 +864,7 @@ function zonk_mode:u()
if (self.d and self.d:u()) seq:next() if (self.d and self.d:u()) seq:next()
if not self.d and self.nextbgm and not self.xbgm and (musicmode & 2 == 0) and stat(56) <= 0 then if not self.d and self.nextbgm and not self.xbgm and (musicmode & 2 == 0) and stat(56) <= 0 then
music(self.nextbgm, 500, 7) music(self.nextbgm, 500, 7)
self.bgm = self.nextbgm
self.nextbgm = nil self.nextbgm = nil
end end
end end
@ -1527,7 +1531,7 @@ function arcade_level:av()
font_compact() font_compact()
end end
function ggwp:onmchg() function arcade_level:onmchg()
music((musicmode & 0x1 == 0) and 0 or -1, 500, 7) music((musicmode & 0x1 == 0) and 0 or -1, 500, 7)
end end