Add sysconf BONES_POOLS to allow more bones-files per level
Reduce the chance of a player playing on a public server encountering their own bones, by implementing separate bones pools. The pool a player belongs to is determined at game start, and only bones in that pool are used. The sysconf BONES_POOLS allows the sysadmin to define how many pools there are.
This commit is contained in:
@@ -704,6 +704,10 @@ d_level *lev;
|
||||
Sprintf(dptr, ".%c", sptr->boneid);
|
||||
else
|
||||
Sprintf(dptr, ".%d", lev->dlevel);
|
||||
#ifdef SYSCF
|
||||
if (sysopt.bones_pools > 1)
|
||||
Sprintf(eos(file), ".%d", (ubirthday % sysopt.bones_pools));
|
||||
#endif
|
||||
#ifdef VMS
|
||||
Strcat(dptr, ";1");
|
||||
#endif
|
||||
@@ -2278,6 +2282,9 @@ int src;
|
||||
if (sysopt.genericusers)
|
||||
free((genericptr_t) sysopt.genericusers);
|
||||
sysopt.genericusers = dupstr(bufp);
|
||||
} else if (src == SET_IN_SYS && match_varname(buf, "BONES_POOLS", 10)) {
|
||||
n = atoi(bufp);
|
||||
sysopt.bones_pools = (n < 0) ? 0 : n;
|
||||
} else if (src == SET_IN_SYS && match_varname(buf, "SUPPORT", 7)) {
|
||||
if (sysopt.support)
|
||||
free((genericptr_t) sysopt.support);
|
||||
|
||||
Reference in New Issue
Block a user