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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user