mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-04-02 08:21:09 +00:00
Unlock all cheat no longer sets game modified if it can't find anything to unlock
Sound test is also in the Options menu now.
This commit is contained in:
parent
b29ad1e804
commit
4d62fbf509
3 changed files with 29 additions and 8 deletions
|
@ -75,6 +75,7 @@ typedef struct
|
|||
static UINT8 cheatf_warp(void)
|
||||
{
|
||||
UINT8 i;
|
||||
boolean success = false;
|
||||
|
||||
/*if (modifiedgame)
|
||||
return 0;*/
|
||||
|
@ -82,12 +83,23 @@ static UINT8 cheatf_warp(void)
|
|||
if (menuactive && currentMenu != &MainDef)
|
||||
return 0; // Only on the main menu!
|
||||
|
||||
S_StartSound(0, sfx_kc42);
|
||||
|
||||
// Temporarily unlock EVERYTHING.
|
||||
G_SetGameModified(false);
|
||||
for (i = 0; i < MAXUNLOCKABLES; i++)
|
||||
unlockables[i].unlocked = true;
|
||||
{
|
||||
if (!unlockables[i].conditionset)
|
||||
continue;
|
||||
if (!unlockables[i].unlocked)
|
||||
{
|
||||
unlockables[i].unlocked = true;
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (success)
|
||||
{
|
||||
G_SetGameModified(false);
|
||||
S_StartSound(0, sfx_kc42);
|
||||
}
|
||||
|
||||
// Refresh secrets menu existing.
|
||||
M_ClearMenus(true);
|
||||
|
|
|
@ -117,8 +117,6 @@ unlockable_t unlockables[MAXUNLOCKABLES] =
|
|||
/* 02 */ {"Chaotic Kart Cup", "Collect 15 Emblems", 0, 2, SECRET_NONE, 0, false, false, 0},
|
||||
|
||||
/* 03 */ {"Record Attack", "", 0, -1, SECRET_RECORDATTACK, 0, true, true, 0},
|
||||
/* 04 */ {"Play Credits", "", 10, -1, SECRET_CREDITS, 0, true, true, 0},
|
||||
/* 05 */ {"Sound Test", "", 20, -1, SECRET_SOUNDTEST, 0, true, true, 0},
|
||||
};
|
||||
|
||||
// Default number of emblems and extra emblems
|
||||
|
|
15
src/m_menu.c
15
src/m_menu.c
|
@ -1042,7 +1042,7 @@ static menuitem_t OP_MainMenu[] =
|
|||
{IT_SUBMENU | IT_STRING, NULL, "Server Options...", &OP_ServerOptionsDef, 80},
|
||||
|
||||
{IT_CALL | IT_STRING, NULL, "Play Credits", M_Credits, 100},
|
||||
//{IT_KEYHANDLER | IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 110},
|
||||
{IT_KEYHANDLER | IT_STRING, NULL, "Sound Test", M_HandleSoundTest, 110},
|
||||
};
|
||||
|
||||
static menuitem_t OP_ControlsMenu[] =
|
||||
|
@ -1792,7 +1792,18 @@ menu_t MP_PlayerSetupDef =
|
|||
};
|
||||
|
||||
// Options
|
||||
menu_t OP_MainDef = DEFAULTMENUSTYLE("M_OPTTTL", OP_MainMenu, &MainDef, 60, 30);
|
||||
menu_t OP_MainDef =
|
||||
{
|
||||
"M_OPTTTL",
|
||||
sizeof (OP_MainMenu)/sizeof (menuitem_t),
|
||||
&MainDef,
|
||||
OP_MainMenu,
|
||||
M_DrawSkyRoom,
|
||||
60, 30,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
menu_t OP_ControlsDef = DEFAULTMENUSTYLE("M_CONTRO", OP_ControlsMenu, &OP_MainDef, 60, 30);
|
||||
//menu_t OP_ControlListDef = DEFAULTMENUSTYLE("M_CONTRO", OP_ControlListMenu, &OP_ControlsDef, 60, 30);
|
||||
menu_t OP_MoveControlsDef = CONTROLMENUSTYLE(OP_MoveControlsMenu, &OP_ControlsDef);
|
||||
|
|
Loading…
Reference in a new issue