add MAXPLAYERS to SYSCF (trunk only)
Add MAXPLAYERS to SYSCF config file; deprecate (but continue to support) MAX_NR_OF_PLAYERS in nethack.sh since it is trivially overridden in many (all?) cases and isn't useful for ports that don't use nethack.sh.
This commit is contained in:
@@ -2078,6 +2078,15 @@ int src;
|
||||
if(sysopt.recover) free(sysopt.recover);
|
||||
sysopt.recover = alloc(strlen(bufp));
|
||||
(void) strcpy(sysopt.recover, bufp);
|
||||
} else if ( (src==SET_IN_SYS) && match_varname(buf, "MAXPLAYERS", 10)) {
|
||||
int temp = atoi(bufp);
|
||||
/* XXX to get more than 25, need to rewrite all lock code */
|
||||
if(temp > 0 && temp <= 25){
|
||||
sysopt.maxplayers = temp;
|
||||
} else {
|
||||
raw_printf("Illegal value in MAXPLAYERS.");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
} else if (match_varname(buf, "BOULDER", 3)) {
|
||||
(void) get_uchars(fp, buf, bufp, &iflags.bouldersym, TRUE,
|
||||
|
||||
Reference in New Issue
Block a user