fix bird menu from crashing (again) finally add an enum so this wont happen again
This commit is contained in:
1 parent
4e90b9260b
commit
43c718af37
1 file changed
+23
-5
+23
-5
@@ -1163,6 +1163,25 @@ static menuitem_t OP_MainMenu[] =
|
||||
{IT_CALL|IT_STRING, NULL, "Local Skin Options...", M_LocalSkinMenu, 165},
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ctrlsetup,
|
||||
vidopt,
|
||||
soundopt,
|
||||
focusopt,
|
||||
hudopt,
|
||||
camopt,
|
||||
gameopt,
|
||||
serveropt,
|
||||
dataopt,
|
||||
addonopt,
|
||||
tricksandshit,
|
||||
credits,
|
||||
satopt,
|
||||
bird,
|
||||
localskin
|
||||
};
|
||||
|
||||
static menuitem_t OP_ControlsMenu[] =
|
||||
{
|
||||
{IT_CALL | IT_STRING, NULL, "Player 1 Controls...", M_Setup1PControlsMenu, 10},
|
||||
@@ -7959,11 +7978,11 @@ static void M_Options(INT32 choice)
|
||||
(void)choice;
|
||||
|
||||
// if the player is not admin or server, disable gameplay & server options
|
||||
OP_MainMenu[5].status = OP_MainMenu[6].status = (Playing() && !(server || IsPlayerAdmin(consoleplayer))) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU);
|
||||
OP_MainMenu[gameopt].status = OP_MainMenu[serveropt].status = (Playing() && !(server || IsPlayerAdmin(consoleplayer))) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU);
|
||||
|
||||
OP_MainMenu[10].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL); // Play credits
|
||||
OP_MainMenu[credits].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL); // Play credits
|
||||
|
||||
OP_MainMenu[13].status = (!cv_showlocalskinmenus.value) ? (IT_DISABLED) : (IT_CALL|IT_STRING);
|
||||
OP_MainMenu[localskin].status = (!cv_showlocalskinmenus.value) ? (IT_DISABLED) : (IT_CALL|IT_STRING);
|
||||
|
||||
#ifdef HAVE_DISCORDRPC
|
||||
OP_DataOptionsMenu[4].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU); // Erase data
|
||||
@@ -7971,8 +7990,7 @@ static void M_Options(INT32 choice)
|
||||
OP_DataOptionsMenu[3].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU); // Erase data
|
||||
#endif
|
||||
|
||||
OP_GameOptionsMenu[3].status =
|
||||
(M_SecretUnlocked(SECRET_ENCORE)) ? (IT_CVAR|IT_STRING) : IT_SECRET; // cv_kartencore
|
||||
OP_GameOptionsMenu[3].status = (M_SecretUnlocked(SECRET_ENCORE)) ? (IT_CVAR|IT_STRING) : IT_SECRET; // cv_kartencore
|
||||
|
||||
OP_MainDef.prevMenu = currentMenu;
|
||||
M_SetupNextMenu(&OP_MainDef);
|
||||
|
||||
Reference in new issue
Block a user