]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/clientkill.qc
Retract from queue by spectating
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / clientkill.qc
index 296a95bfe5f384c9d8428626f0a1cbd0282fff2f..660d02e36cfb59fd9f63bfed306a94e730137bea 100644 (file)
@@ -25,7 +25,11 @@ void ClientKill_Now_TeamChange(entity this)
        {
                if (blockSpectators)
                        Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_SPECTATE_WARNING, autocvar_g_maxplayers_spectator_blocktime);
-               PutObserverInServer(this, false, true);
+
+               if (CS(this).wants_join)
+                       SetPlayerTeam(this, -1, TEAM_CHANGE_SPECTATOR);
+               else
+                       PutObserverInServer(this, false, true);
        }
        else
        {