# HG changeset patch # User edwarj4 # Date 1262090738 0 # Node ID da77eb1839512d00722d164b482b0a2c8912db2f # Parent 03c99f5ee38a186c33cc7ddf84b1a2961f704123 rogue3: allow load and user count checks to be compiled out diff -r 03c99f5ee38a -r da77eb183951 rogue3/machdep.h --- a/rogue3/machdep.h Thu Nov 26 12:50:17 2009 +0000 +++ b/rogue3/machdep.h Tue Dec 29 12:45:38 2009 +0000 @@ -14,6 +14,7 @@ * Variables for checking to make sure the system isn't too loaded * for people to play */ +/* Comment out MAXLOAD or MAXUSERS to disable a check */ #define AUTHORUID 0 #define MAXUSERS 25 /* max number of users for this game */ diff -r 03c99f5ee38a -r da77eb183951 rogue3/main.c --- a/rogue3/main.c Thu Nov 26 12:50:17 2009 +0000 +++ b/rogue3/main.c Tue Dec 29 12:45:38 2009 +0000 @@ -428,10 +428,14 @@ { double avec[3]; +#ifdef MAXLOAD if (md_loadav(avec) == 0) return (avec[2] > (MAXLOAD / 10.0)); - else - return (md_ucount() > MAXUSERS); +#endif +#ifdef MAXUSERS + return (md_ucount() > MAXUSERS); +#endif + return 0; } /*