]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Prevent idle kicking from functioning in local matches where it may kick the host Mario/local_idlekick_fix
authorMario <mario.mario@y7mail.com>
Sat, 29 May 2021 20:36:34 +0000 (06:36 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 29 May 2021 20:36:34 +0000 (06:36 +1000)
qcsrc/server/client.qc

index 7d3c1faca69520d5faa995bcfa443259d4ba668a..35c27767c70c39c6d35c91dfa029c69d34e89095 100644 (file)
@@ -2697,6 +2697,7 @@ void PlayerPostThink (entity this)
 {
        Player_Physics(this);
 
+       if (server_is_dedicated) // don't kick the local player in hosted matches!
        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))