mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 10:29:45 +01:00
Fix glitchy behavior switching soundtracks on silence
If there was absolutely no music playing, and you went to the in-game options to switch between MMMMMM and PPPPPP, the behavior would be a bit glitchy. If you started with PPPPPP, switching once to MMMMMM wouldn't play anything, but then switching back to PPPPPP would play MMMMMM track 15. Then switching back to MMMMMM wouldn't do anything, but then switching back to PPPPPP again would play PPPPPP track 15 - and from there, the behavior is stable. If you started with MMMMMM, switching once to PPPPPP would play MMMMMM track 15. Then switching back to MMMMMM wouldn't do anything, but then switching back to PPPPPP would play PPPPPP track 15 - and as above, the behavior is stable after that. Anyways, the point is, -1 shouldn't be passed to musicclass::play() unless you want glitchy things. And I'm not patching -1 out of musicclass::play() itself, because passing negative numbers results in a useful glitch (that's existed since 2.2) where you can play MMMMMM tracks while having PPPPPP selected, effectively doubling the amount of usable music tracks within a custom level; it also seems like the game does -1 checks elsewhere, so I'm just being consistent with the rest of the game (although, yes, I am technically single-case patching this).
This commit is contained in:
parent
0f36cdce0d
commit
8169a26f46
1 changed files with 4 additions and 1 deletions
|
@ -748,7 +748,10 @@ static void menuactionpress(void)
|
|||
//**** TOGGLE MMMMMM
|
||||
music.usingmmmmmm = !music.usingmmmmmm;
|
||||
music.playef(11);
|
||||
music.play(music.currentsong);
|
||||
if (music.currentsong > -1)
|
||||
{
|
||||
music.play(music.currentsong);
|
||||
}
|
||||
game.savestatsandsettings();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue