mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Disable irrelevant/dangerous-to-tweak options on the server menu under cetain conditions.
This commit is contained in:
parent
dff95bc30a
commit
7c07978277
1 changed files with 24 additions and 0 deletions
24
src/m_menu.c
24
src/m_menu.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue