]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename sv_maxidle_spectatorsareidle to sv_maxidle_alsokickspectators, enable by defau...
authorbones_was_here <bones_was_here@xa.org.au>
Sun, 2 May 2021 15:47:29 +0000 (01:47 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Sun, 2 May 2021 15:47:29 +0000 (01:47 +1000)
If it's not enabled, enabling sv_maxidle will have no effect when sv_maxidle_playertospectator is enabled

qcsrc/server/client.qc
qcsrc/server/client.qh
xonotic-server.cfg

index e988d4bdc9f9b88883bd182fb65c77a452398a78..01426367afebdb31c6419dfe3308cd10a60c1b3e 100644 (file)
@@ -2701,7 +2701,7 @@ void PlayerPostThink (entity this)
        if (autocvar_sv_maxidle > 0 || (IS_PLAYER(this) && autocvar_sv_maxidle_playertospectator > 0))
        if (frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
        if (IS_REAL_CLIENT(this))
-       if (IS_PLAYER(this) || autocvar_sv_maxidle_spectatorsareidle)
+       if (IS_PLAYER(this) || autocvar_sv_maxidle_alsokickspectators)
        if (!intermission_running) // NextLevel() kills all centerprints after setting this true
        {
                int totalClients = 0;
index ed3273be84e8f7125256f4d23d73bfd065b07341..1197ee3610fb44f1cb243c44aa03937940e14083 100644 (file)
@@ -34,7 +34,7 @@ string autocvar_g_mutatormsg;
 float autocvar_sv_foginterval;
 float autocvar_sv_maxidle;
 float autocvar_sv_maxidle_playertospectator;
-bool autocvar_sv_maxidle_spectatorsareidle;
+bool autocvar_sv_maxidle_alsokickspectators;
 int autocvar_sv_maxidle_slots;
 bool autocvar_sv_maxidle_slots_countbots;
 bool autocvar_g_forced_respawn;
index de85a58eecdfc500a373a21e5ea035317558f155..7b7fb72eb9d1e32394d083f99bddfedff84fd6ba 100644 (file)
@@ -412,7 +412,7 @@ sv_gameplayfix_droptofloorstartsolid 0
 set sv_foginterval 1 "force enable fog in regular intervals"
 
 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, kick idle spectators too"
+set sv_maxidle_alsokickspectators 1 "when sv_maxidle is > 0, kick idle spectators as well as players"
 set sv_maxidle_slots 0 "when not 0, only kick idlers when this many or less player slots are available"
 set sv_maxidle_slots_countbots 1 "count bots as player slots"