Mercurial > hg > early-roguelike
changeset 29:da77eb183951
rogue3: allow load and user count checks to be compiled out
author | edwarj4 |
---|---|
date | Tue, 29 Dec 2009 12:45:38 +0000 |
parents | 03c99f5ee38a |
children | 09da55b986ca |
files | rogue3/machdep.h rogue3/main.c |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 */
--- 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; } /*