From 7c079782774c2d276b3e5e5a034f01329220e054 Mon Sep 17 00:00:00 2001
From: toasterbabe <rollerorbital@gmail.com>
Date: Sun, 16 Apr 2017 15:00:58 +0100
Subject: [PATCH] Disable irrelevant/dangerous-to-tweak options on the server
 menu under cetain conditions.

---
 src/m_menu.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/src/m_menu.c b/src/m_menu.c
index 12d09275b1..1e1fe9ac44 100644
--- a/src/m_menu.c
+++ b/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);
 }
-- 
GitLab