Don't complain about MAXPLAYERS with unknown command line param

Unix command line handling treated an unknown command line parameter
as a maximum number of allowed concurrent players.  This emitted
a complaint about expected MAXPLAYERS, and as it can be now set
in sysconf, remove this - most likely unused - functionality.
This commit is contained in:
Pasi Kallinen
2026-08-18 19:44:48 +03:00
parent f6a592b7f9
commit d44b6385d7
2 changed files with 3 additions and 16 deletions
+1
View File
@@ -260,6 +260,7 @@ X11: toggle off perm_invent if user closes the perm inventory window
X11: fix menu group accelerators
X11: implement all text attributes for menus
X11: fix crash when loading a nonexistent font
Unix: don't complain about MAXPLAYERS with unknown command line param
General New Features
+2 -16
View File
@@ -454,22 +454,8 @@ process_options(int argc, char *argv[])
}
}
if (argc > 1) {
int mxplyrs = atoi(argv[1]);
boolean mx_ok = (mxplyrs > 0);
#ifdef SYSCF
config_error_add("%s%s%s",
mx_ok ? "MAXPLAYERS are set in sysconf file"
: "Expected MAXPLAYERS, found \"",
mx_ok ? "" : argv[1], mx_ok ? "" : "\"");
#else
/* XXX This is deprecated in favor of SYSCF with MAXPLAYERS */
if (mx_ok)
gl.locknum = mxplyrs;
else
config_error_add("Invalid MAXPLAYERS \"%s\"", argv[1]);
#endif
}
if (argc > 1)
config_error_add("Unknown option: %.60s", origarg);
#ifdef MAX_NR_OF_PLAYERS
/* limit to compile-time limit */
if (!gl.locknum || gl.locknum > MAX_NR_OF_PLAYERS)