mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-28 23:21:58 +00:00
...you know what, just call G_LoadGame for SP_PauseLevelSelectDef in M_LevelSelectWarp too
This commit is contained in:
parent
77d70aaa1b
commit
fb00b65f41
1 changed files with 3 additions and 19 deletions
20
src/m_menu.c
20
src/m_menu.c
|
@ -7100,9 +7100,6 @@ static void M_DestroyRobots(INT32 choice)
|
||||||
|
|
||||||
static void M_LevelSelectWarp(INT32 choice)
|
static void M_LevelSelectWarp(INT32 choice)
|
||||||
{
|
{
|
||||||
boolean fromloadgame = (currentMenu == &SP_LevelSelectDef);
|
|
||||||
boolean frompause = (currentMenu == &SP_PauseLevelSelectDef);
|
|
||||||
|
|
||||||
(void)choice;
|
(void)choice;
|
||||||
|
|
||||||
if (W_CheckNumForName(G_BuildMapName(cv_nextmap.value)) == LUMPERROR)
|
if (W_CheckNumForName(G_BuildMapName(cv_nextmap.value)) == LUMPERROR)
|
||||||
|
@ -7114,24 +7111,11 @@ static void M_LevelSelectWarp(INT32 choice)
|
||||||
startmap = (INT16)(cv_nextmap.value);
|
startmap = (INT16)(cv_nextmap.value);
|
||||||
fromlevelselect = true;
|
fromlevelselect = true;
|
||||||
|
|
||||||
if (fromloadgame)
|
if (currentMenu == &SP_LevelSelectDef || currentMenu == &SP_PauseLevelSelectDef)
|
||||||
G_LoadGame((UINT32)cursaveslot, startmap);
|
G_LoadGame((UINT32)cursaveslot, startmap); // reload from SP save data: this is needed to keep score/lives/continues from reverting to defaults
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cursaveslot = 0;
|
cursaveslot = 0;
|
||||||
|
|
||||||
if (frompause)
|
|
||||||
{
|
|
||||||
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
|
|
||||||
M_SetupChoosePlayer(0);
|
M_SetupChoosePlayer(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue