rogue3: allow load and user count checks to be compiled out
This commit is contained in:
parent
3a3594dad7
commit
6188fd3be2
2 changed files with 7 additions and 2 deletions
|
|
@ -14,6 +14,7 @@
|
||||||
* Variables for checking to make sure the system isn't too loaded
|
* Variables for checking to make sure the system isn't too loaded
|
||||||
* for people to play
|
* for people to play
|
||||||
*/
|
*/
|
||||||
|
/* Comment out MAXLOAD or MAXUSERS to disable a check */
|
||||||
|
|
||||||
#define AUTHORUID 0
|
#define AUTHORUID 0
|
||||||
#define MAXUSERS 25 /* max number of users for this game */
|
#define MAXUSERS 25 /* max number of users for this game */
|
||||||
|
|
|
||||||
|
|
@ -428,10 +428,14 @@ too_much()
|
||||||
{
|
{
|
||||||
double avec[3];
|
double avec[3];
|
||||||
|
|
||||||
|
#ifdef MAXLOAD
|
||||||
if (md_loadav(avec) == 0)
|
if (md_loadav(avec) == 0)
|
||||||
return (avec[2] > (MAXLOAD / 10.0));
|
return (avec[2] > (MAXLOAD / 10.0));
|
||||||
else
|
#endif
|
||||||
return (md_ucount() > MAXUSERS);
|
#ifdef MAXUSERS
|
||||||
|
return (md_ucount() > MAXUSERS);
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue