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:
@@ -260,6 +260,7 @@ X11: toggle off perm_invent if user closes the perm inventory window
|
|||||||
X11: fix menu group accelerators
|
X11: fix menu group accelerators
|
||||||
X11: implement all text attributes for menus
|
X11: implement all text attributes for menus
|
||||||
X11: fix crash when loading a nonexistent font
|
X11: fix crash when loading a nonexistent font
|
||||||
|
Unix: don't complain about MAXPLAYERS with unknown command line param
|
||||||
|
|
||||||
|
|
||||||
General New Features
|
General New Features
|
||||||
|
|||||||
+2
-16
@@ -454,22 +454,8 @@ process_options(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc > 1) {
|
if (argc > 1)
|
||||||
int mxplyrs = atoi(argv[1]);
|
config_error_add("Unknown option: %.60s", origarg);
|
||||||
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
|
|
||||||
}
|
|
||||||
#ifdef MAX_NR_OF_PLAYERS
|
#ifdef MAX_NR_OF_PLAYERS
|
||||||
/* limit to compile-time limit */
|
/* limit to compile-time limit */
|
||||||
if (!gl.locknum || gl.locknum > MAX_NR_OF_PLAYERS)
|
if (!gl.locknum || gl.locknum > MAX_NR_OF_PLAYERS)
|
||||||
|
|||||||
Reference in New Issue
Block a user