From 6094a2bfd0e7a68e6150424e2b85a4260a7ef19d Mon Sep 17 00:00:00 2001 From: Rafael Barreto Date: Mon, 7 Jun 2010 19:32:47 +0000 Subject: [PATCH] spectate teams are in fact in CS_DEATH... the CS_SPECTATE is a bugged state (people cannot get out of this state by themselves)... git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5158 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/serverchecks.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/src/serverchecks.h b/source/src/serverchecks.h index 7220b027..530ed613 100644 --- a/source/src/serverchecks.h +++ b/source/src/serverchecks.h @@ -460,10 +460,11 @@ void check_afk(){ loopv(clients) if ( valid_client(i) ) { client &c = *clients[i]; + if ( team_isspect(c.team) ) continue; // spectate (CS_SPECTATE has a weird bug... FIXME) if ( ( c.state.state == CS_DEAD && c.state.lastdeath + 30 * 1000 < gamemillis ) || - ( c.state.state == CS_ALIVE && c.inputmillis + 30 * 1000 < servmillis ) ) { - logline(ACLOG_INFO, "[%s] %s %s", c.hostname, c.name, "is afk."); - defformatstring(msg)("Player %s is afk.", c.name); + ( c.state.state == CS_ALIVE && !cl->upspawnp && c.inputmillis + 30 * 1000 < servmillis ) ) { + logline(ACLOG_INFO, "[%s] %s %s", c.hostname, c.name, "is afk"); + defformatstring(msg)("%s is afk", c.name); sendservmsg(msg); disconnect_client(c.clientnum, DISC_AFK); }