rogue3: allow load and user count checks to be compiled out

This commit is contained in:
John "Elwin" Edwards 2009-12-29 12:45:38 +00:00
parent 3a3594dad7
commit 6188fd3be2
2 changed files with 7 additions and 2 deletions

View file

@ -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 */

View file

@ -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;
}
/*