the correct fix for the maxclient issue

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5436 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-07-22 00:20:32 +00:00
parent dd59cbc8f1
commit 6cbd7cb554
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -53,6 +53,7 @@ extern int verbose;
#define AC_VERSION 1100
#define AC_MASTER_URI "assault.cubers.net"
#define AC_MASTER_PORT 28760
#define MAXCL 20
#endif
+1 -1
View File
@@ -1029,7 +1029,7 @@ void refreshservers(void *menu, bool init)
{
serverinfo &si = *servers[i];
si.menuline_to = si.menuline_from = ((gmenu *)menu)->items.length();
if(!showallservers && si.lastpingmillis < servermenumillis) continue; // no pong yet
if( (!showallservers && si.lastpingmillis < servermenumillis) || (si.maxclients>MAXCL && searchlan<2) ) continue; // no pong yet or forbidden
int banned = ((si.pongflags >> PONGFLAG_BANNED) & 1) | ((si.pongflags >> (PONGFLAG_BLACKLIST - 1)) & 2);
bool showthisone = !(banned && showonlygoodservers) && !(showonlyfavourites > 0 && si.favcat != showonlyfavourites - 1);
bool serverfull = si.numplayers >= si.maxclients;
+1 -1
View File
@@ -44,7 +44,7 @@ ENetSocket connectmaster()
{
if(!mastername[0]) return ENET_SOCKET_NULL;
extern servercommandline scl;
if(scl.maxclients>20) { logline(ACLOG_WARNING, "maxclient exceeded: cannot register"); return ENET_SOCKET_NULL; }
if(scl.maxclients>MAXCL) { logline(ACLOG_WARNING, "maxclient exceeded: cannot register"); return ENET_SOCKET_NULL; }
if(masteraddress.host == ENET_HOST_ANY)
{