From 2632947b3e785460efcb3e53fd37b2cf39201b5c Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Thu, 22 Jul 2010 18:26:24 +0000 Subject: [PATCH] removing unused code and disabling afk autokick if the server have less than 5 players git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5442 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clients2c.cpp | 1 - source/src/serverchecks.h | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index be7d53a4..2dfcd496 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -105,7 +105,6 @@ void updatelagtime(playerent *d) extern void trydisconnect(); VARP(maxrollremote, 0, 1, 1); // bound remote "roll" values by our maxroll?! -VARP(testvel, 0, 0, 1); void parsepositions(ucharbuf &p) { diff --git a/source/src/serverchecks.h b/source/src/serverchecks.h index 50b7591c..0ca088af 100644 --- a/source/src/serverchecks.h +++ b/source/src/serverchecks.h @@ -454,10 +454,12 @@ void checkfrag (client *target, client *actor, int gun, bool gib) int next_afk_check = 200, wait_afk = 45 * 1000; +/* this function is managed to the PUBS, id est, many people playing in an open server */ void check_afk() { next_afk_check = servmillis + 7 * 1000; - if ( totalclients < scl.maxclients && !m_teammode ) return; + /* if we have few people (like 2x2), or it is not a teammode with the server not full: do nothing! */ + if ( totalclients < 5 || ( totalclients < scl.maxclients && !m_teammode) ) return; loopv(clients) { client &c = *clients[i];