Disable irrelevant/dangerous-to-tweak options on the server menu under cetain conditions.

This commit is contained in:
toasterbabe 2017-04-16 15:00:58 +01:00
parent dff95bc30a
commit 7c07978277
1 changed files with 24 additions and 0 deletions

View File

@ -7018,6 +7018,30 @@ static void M_ServerOptions(INT32 choice)
{
(void)choice;
#ifndef NONET
if ((splitscreen && !netgame) || currentMenu == &MP_SplitServerDef)
{
OP_ServerOptionsMenu[ 1].status = IT_GRAYEDOUT; // Server name
OP_ServerOptionsMenu[ 2].status = IT_GRAYEDOUT; // Max players
OP_ServerOptionsMenu[ 3].status = IT_GRAYEDOUT; // Allow WAD downloading
OP_ServerOptionsMenu[ 4].status = IT_GRAYEDOUT; // Allow players to join
OP_ServerOptionsMenu[28].status = IT_GRAYEDOUT; // Master server
OP_ServerOptionsMenu[29].status = IT_GRAYEDOUT; // Attempts to resynchronise
}
else
{
OP_ServerOptionsMenu[ 1].status = IT_STRING | IT_CVAR | IT_CV_STRING;
OP_ServerOptionsMenu[ 2].status = IT_STRING | IT_CVAR;
OP_ServerOptionsMenu[ 3].status = IT_STRING | IT_CVAR;
OP_ServerOptionsMenu[ 4].status = IT_STRING | IT_CVAR;
if (netgame)
OP_ServerOptionsMenu[28].status = IT_GRAYEDOUT;
else
OP_ServerOptionsMenu[28].status = IT_STRING | IT_CVAR | IT_CV_STRING;
OP_ServerOptionsMenu[29].status = IT_STRING | IT_CVAR;
}
#endif
OP_ServerOptionsDef.prevMenu = currentMenu;
M_SetupNextMenu(&OP_ServerOptionsDef);
}