mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-03 15:39:46 +01:00
Fix music stopping when restarting a time trial
This commit is contained in:
parent
a0d40b5d74
commit
f196fcd896
2 changed files with 37 additions and 151 deletions
|
@ -2095,7 +2095,6 @@ void gameinput(void)
|
||||||
//Quick restart of time trial
|
//Quick restart of time trial
|
||||||
graphics.fademode = 2;
|
graphics.fademode = 2;
|
||||||
game.completestop = true;
|
game.completestop = true;
|
||||||
music.fadeout();
|
|
||||||
game.quickrestartkludge = true;
|
game.quickrestartkludge = true;
|
||||||
}
|
}
|
||||||
else if (game.intimetrial)
|
else if (game.intimetrial)
|
||||||
|
|
|
@ -2713,172 +2713,59 @@ void scriptclass::startgamemode( int t )
|
||||||
graphics.fademode = 4;
|
graphics.fademode = 4;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
//Start Time Trial 1
|
|
||||||
hardreset();
|
|
||||||
game.nocutscenes = true;
|
|
||||||
game.intimetrial = true;
|
|
||||||
game.timetrialcountdown = 150;
|
|
||||||
game.timetrialparlost = false;
|
|
||||||
game.timetriallevel = 0;
|
|
||||||
game.timetrialpar = 75;
|
|
||||||
game.timetrialshinytarget = 2;
|
|
||||||
|
|
||||||
music.fadeout();
|
|
||||||
game.gamestate = GAMEMODE;
|
|
||||||
game.starttrial(game.timetriallevel);
|
|
||||||
game.jumpheld = true;
|
|
||||||
|
|
||||||
if (graphics.setflipmode) graphics.flipmode = true;//set flipmode
|
|
||||||
if(obj.entities.empty())
|
|
||||||
{
|
|
||||||
obj.createentity(game.savex, game.savey, 0, 0); //In this game, constant, never destroyed
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
map.resetplayer();
|
|
||||||
}
|
|
||||||
map.gotoroom(game.saverx, game.savery);
|
|
||||||
map.initmapdata();
|
|
||||||
graphics.fademode = 4;
|
|
||||||
break;
|
|
||||||
case 4:
|
case 4:
|
||||||
//Start Time Trial 2
|
|
||||||
hardreset();
|
|
||||||
game.nocutscenes = true;
|
|
||||||
game.intimetrial = true;
|
|
||||||
game.timetrialcountdown = 150;
|
|
||||||
game.timetrialparlost = false;
|
|
||||||
game.timetriallevel = 1;
|
|
||||||
game.timetrialpar = 165;
|
|
||||||
game.timetrialshinytarget = 4;
|
|
||||||
|
|
||||||
music.fadeout();
|
|
||||||
game.gamestate = GAMEMODE;
|
|
||||||
game.starttrial(game.timetriallevel);
|
|
||||||
game.jumpheld = true;
|
|
||||||
|
|
||||||
if (graphics.setflipmode) graphics.flipmode = true;//set flipmode
|
|
||||||
if(obj.entities.empty())
|
|
||||||
{
|
|
||||||
obj.createentity(game.savex, game.savey, 0, 0); //In this game, constant, never destroyed
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
map.resetplayer();
|
|
||||||
}
|
|
||||||
map.gotoroom(game.saverx, game.savery);
|
|
||||||
map.initmapdata();
|
|
||||||
graphics.fademode = 4;
|
|
||||||
break;
|
|
||||||
case 5:
|
case 5:
|
||||||
//Start Time Trial 3 tow
|
|
||||||
hardreset();
|
|
||||||
game.nocutscenes = true;
|
|
||||||
game.intimetrial = true;
|
|
||||||
game.timetrialcountdown = 150;
|
|
||||||
game.timetrialparlost = false;
|
|
||||||
game.timetriallevel = 2;
|
|
||||||
game.timetrialpar = 105;
|
|
||||||
game.timetrialshinytarget = 2;
|
|
||||||
|
|
||||||
music.fadeout();
|
|
||||||
game.gamestate = GAMEMODE;
|
|
||||||
game.starttrial(game.timetriallevel);
|
|
||||||
game.jumpheld = true;
|
|
||||||
|
|
||||||
if (graphics.setflipmode) graphics.flipmode = true;//set flipmode
|
|
||||||
if(obj.entities.empty())
|
|
||||||
{
|
|
||||||
obj.createentity(game.savex, game.savey, 0, 0); //In this game, constant, never destroyed
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
map.resetplayer();
|
|
||||||
}
|
|
||||||
map.gotoroom(game.saverx, game.savery);
|
|
||||||
map.initmapdata();
|
|
||||||
graphics.fademode = 4;
|
|
||||||
break;
|
|
||||||
case 6:
|
case 6:
|
||||||
//Start Time Trial 4 station
|
|
||||||
hardreset();
|
|
||||||
game.nocutscenes = true;
|
|
||||||
game.intimetrial = true;
|
|
||||||
game.timetrialcountdown = 150;
|
|
||||||
game.timetrialparlost = false;
|
|
||||||
game.timetriallevel = 3;
|
|
||||||
game.timetrialpar = 200;
|
|
||||||
game.timetrialshinytarget = 5;
|
|
||||||
|
|
||||||
music.fadeout();
|
|
||||||
game.gamestate = GAMEMODE;
|
|
||||||
game.starttrial(game.timetriallevel);
|
|
||||||
game.jumpheld = true;
|
|
||||||
|
|
||||||
if (graphics.setflipmode) graphics.flipmode = true;//set flipmode
|
|
||||||
if(obj.entities.empty())
|
|
||||||
{
|
|
||||||
obj.createentity(game.savex, game.savey, 0, 0); //In this game, constant, never destroyed
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
map.resetplayer();
|
|
||||||
}
|
|
||||||
map.gotoroom(game.saverx, game.savery);
|
|
||||||
map.initmapdata();
|
|
||||||
graphics.fademode = 4;
|
|
||||||
break;
|
|
||||||
case 7:
|
case 7:
|
||||||
//Start Time Trial 5 warp
|
|
||||||
hardreset();
|
|
||||||
game.nocutscenes = true;
|
|
||||||
game.intimetrial = true;
|
|
||||||
game.timetrialcountdown = 150;
|
|
||||||
game.timetrialparlost = false;
|
|
||||||
game.timetriallevel = 4;
|
|
||||||
game.timetrialpar = 120;
|
|
||||||
game.timetrialshinytarget = 1;
|
|
||||||
|
|
||||||
music.fadeout();
|
|
||||||
game.gamestate = GAMEMODE;
|
|
||||||
game.starttrial(game.timetriallevel);
|
|
||||||
game.jumpheld = true;
|
|
||||||
|
|
||||||
if (graphics.setflipmode) graphics.flipmode = true;//set flipmode
|
|
||||||
if(obj.entities.empty())
|
|
||||||
{
|
|
||||||
obj.createentity(game.savex, game.savey, 0, 0); //In this game, constant, never destroyed
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
map.resetplayer();
|
|
||||||
}
|
|
||||||
map.gotoroom(game.saverx, game.savery);
|
|
||||||
map.initmapdata();
|
|
||||||
graphics.fademode = 4;
|
|
||||||
break;
|
|
||||||
case 8:
|
case 8:
|
||||||
//Start Time Trial 6// final level!
|
//Start Time Trial
|
||||||
|
if (!game.intimetrial)
|
||||||
|
music.fadeout();
|
||||||
|
|
||||||
hardreset();
|
hardreset();
|
||||||
game.nocutscenes = true;
|
game.nocutscenes = true;
|
||||||
game.intimetrial = true;
|
game.intimetrial = true;
|
||||||
game.timetrialcountdown = 150;
|
game.timetrialcountdown = 150;
|
||||||
game.timetrialparlost = false;
|
game.timetrialparlost = false;
|
||||||
game.timetriallevel = 5;
|
game.timetriallevel = t - 3;
|
||||||
game.timetrialpar = 135;
|
|
||||||
game.timetrialshinytarget = 1;
|
switch (t) {
|
||||||
|
case 3:
|
||||||
|
game.timetrialpar = 75;
|
||||||
|
game.timetrialshinytarget = 2;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
game.timetrialpar = 165;
|
||||||
|
game.timetrialshinytarget = 4;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
game.timetrialpar = 105;
|
||||||
|
game.timetrialshinytarget = 2;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
game.timetrialpar = 200;
|
||||||
|
game.timetrialshinytarget = 5;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
game.timetrialpar = 120;
|
||||||
|
game.timetrialshinytarget = 1;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
game.timetrialpar = 135;
|
||||||
|
game.timetrialshinytarget = 1;
|
||||||
|
map.finalmode = true; //Enable final level mode
|
||||||
|
map.final_colormode = false;
|
||||||
|
map.final_mapcol = 0;
|
||||||
|
map.final_colorframe = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
music.fadeout();
|
|
||||||
map.finalmode = true; //Enable final level mode
|
|
||||||
map.final_colormode = false;
|
|
||||||
map.final_mapcol = 0;
|
|
||||||
map.final_colorframe = 0;
|
|
||||||
game.gamestate = GAMEMODE;
|
game.gamestate = GAMEMODE;
|
||||||
game.starttrial(game.timetriallevel);
|
game.starttrial(game.timetriallevel);
|
||||||
game.jumpheld = true;
|
game.jumpheld = true;
|
||||||
|
|
||||||
if (graphics.setflipmode) graphics.flipmode = true;//set flipmode
|
if (graphics.setflipmode) graphics.flipmode = true;//set flipmode
|
||||||
if(obj.entities.empty())
|
if (obj.entities.empty())
|
||||||
{
|
{
|
||||||
obj.createentity(game.savex, game.savey, 0, 0); //In this game, constant, never destroyed
|
obj.createentity(game.savex, game.savey, 0, 0); //In this game, constant, never destroyed
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue