From 6188fd3be2008fdf1a0cf2df99f2271c33f500ce Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Tue, 29 Dec 2009 12:45:38 +0000 Subject: [PATCH] rogue3: allow load and user count checks to be compiled out --- rogue3/machdep.h | 1 + rogue3/main.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rogue3/machdep.h b/rogue3/machdep.h index a37c95f..82296f3 100644 --- a/rogue3/machdep.h +++ b/rogue3/machdep.h @@ -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 --git a/rogue3/main.c b/rogue3/main.c index 5954a83..de14013 100644 --- a/rogue3/main.c +++ b/rogue3/main.c @@ -428,10 +428,14 @@ too_much() { 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; } /*