set g_cdtracks_dontusebydefault "rising-of-the-phoenix"
set menu_cdtrack "rising-of-the-phoenix"
-// maxidle (in seconds): kick players idle for more than that amount of time
-set sv_maxidle 0
-// when sv_maxidle is not 0, assume spectators are idle too
-set sv_maxidle_spectatorsareidle 0
+set sv_maxidle 0 "kick players idle for more than this amount of time in seconds"
+set sv_maxidle_spectatorsareidle 0 "when sv_maxidle is not 0, assume spectators are idle too"
// these entities are not referenced by anything directly, they just represent
// teams and are found by find() when needed
stuffcmd(self, strcat("name ", self.netname, substring(ftos(random()), 2, -1), "\n"));
}
- if(sv_maxidle && frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
+ if(sv_maxidle > 0 && frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
+ if(IS_PLAYER(self) || sv_maxidle_spectatorsareidle)
{
if (time - self.parm_idlesince < 1) // instead of (time == self.parm_idlesince) to support sv_maxidle <= 10
{
else if(self.specialcommand_pos && (c != substring(specialcommand, self.specialcommand_pos - 1, 1)))
self.specialcommand_pos = 0;
- if(!sv_maxidle_spectatorsareidle || self.movetype == MOVETYPE_WALK)
+ if(sv_maxidle > 0)
{
if(buttons != self.buttons_old || self.movement != self.movement_old || self.v_angle != self.v_angle_old)
self.parm_idlesince = time;