mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Merge branch 'extras-levelselect-fix' into 'next'
Extras level select fix See merge request STJr/SRB2!2084
This commit is contained in:
commit
1f799257a1
1 changed files with 16 additions and 2 deletions
16
src/m_menu.c
16
src/m_menu.c
|
@ -7112,8 +7112,22 @@ static void M_LevelSelectWarp(INT32 choice)
|
|||
fromlevelselect = true;
|
||||
|
||||
if (currentMenu == &SP_LevelSelectDef || currentMenu == &SP_PauseLevelSelectDef)
|
||||
{
|
||||
if (cursaveslot > 0) // do we have a save slot to load?
|
||||
G_LoadGame((UINT32)cursaveslot, startmap); // reload from SP save data: this is needed to keep score/lives/continues from reverting to defaults
|
||||
else
|
||||
else // no save slot, start new game but keep the current skin
|
||||
{
|
||||
M_ClearMenus(true);
|
||||
|
||||
G_DeferedInitNew(false, G_BuildMapName(startmap), cv_skin.value, false, fromlevelselect); // Not sure about using cv_skin here, but it seems fine in testing.
|
||||
COM_BufAddText("dummyconsvar 1\n"); // G_DeferedInitNew doesn't do this
|
||||
|
||||
if (levelselect.rows)
|
||||
Z_Free(levelselect.rows);
|
||||
levelselect.rows = NULL;
|
||||
}
|
||||
}
|
||||
else // start new game
|
||||
{
|
||||
cursaveslot = 0;
|
||||
M_SetupChoosePlayer(0);
|
||||
|
|
Loading…
Reference in a new issue