mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Prevent losing level data with rollcredits
When rollcredits is ran during in-editor playtesting, all unsaved data is lost. To prevent this, just return to the editor if rollcredits is ran, with a note saying "Rolled credits".
This commit is contained in:
parent
96660cd235
commit
6767249558
1 changed files with 14 additions and 3 deletions
|
@ -1567,10 +1567,21 @@ void scriptclass::run(void)
|
||||||
}
|
}
|
||||||
else if (words[0] == "rollcredits")
|
else if (words[0] == "rollcredits")
|
||||||
{
|
{
|
||||||
|
#if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR)
|
||||||
|
if (map.custommode && !map.custommodeforreal)
|
||||||
|
{
|
||||||
|
game.returntoeditor();
|
||||||
|
ed.note = "Rolled credits";
|
||||||
|
ed.notedelay = 45;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
game.gamestate = GAMECOMPLETE;
|
game.gamestate = GAMECOMPLETE;
|
||||||
graphics.fademode = 4;
|
graphics.fademode = 4;
|
||||||
game.creditposition = 0;
|
game.creditposition = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (words[0] == "finalmode")
|
else if (words[0] == "finalmode")
|
||||||
{
|
{
|
||||||
map.finalmode = true;
|
map.finalmode = true;
|
||||||
|
|
Loading…
Reference in a new issue