mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
CLI: Allow no music to be played if save pos used
If you provided any one of -playx, -playy, -playrx, -playry, -playgc, or -playmusic in command-line arguments for command-line playtesting, then the game would always try to play music, even if you passed a negative -playmusic. This wouldn't do anything in that case, unless you had MMMMMM installed, in which case it would play MMMMMM track 15 (Predestined Fate Final Level) due to the legacy wraparound bug. To fix this, only play music if the track provided is greater than -1. Additionally, to prevent it from playing Path Complete by default if you specify any of the other save position arguments but n ot -playmusic, it's now initialized to -1 instead of 0.
This commit is contained in:
@@ -5387,7 +5387,10 @@ void Game::customloadquick(const std::string& savfile)
|
||||
saverx = playrx;
|
||||
savery = playry;
|
||||
savegc = playgc;
|
||||
music.play(playmusic);
|
||||
if (playmusic > -1)
|
||||
{
|
||||
music.play(playmusic);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user