1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01: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:
Misa 2023-06-10 11:41:32 -07:00
parent a6ff75d32e
commit c1a25aa4c2
2 changed files with 5 additions and 2 deletions

View file

@ -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;
}

View file

@ -61,7 +61,7 @@ static int savey = 0;
static int saverx = 0;
static int savery = 0;
static int savegc = 0;
static int savemusic = 0;
static int savemusic = -1;
static std::string playassets;
static std::string playtestname;