]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/sv_cmd.qc
Merge branch 'terencehill/lms_spectatable' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / sv_cmd.qc
index 5a9fae567589e695843c8702ff91ef11e0dea5ea..47e9f922abe4daf27b5f8e696b05ff87b908d654 100644 (file)
@@ -184,8 +184,7 @@ void GameCommand_allspec(int request, int argc)
                        string reason = argv(1);
                        int n = 0;
                        FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), {
-                               if (it.caplayer) it.caplayer = 0;
-                               PutObserverInServer(it);
+                               PutObserverInServer(it, true);
                                ++n;
                        });
                        if (n)   bprint(strcat("Successfully forced all (", ftos(n), ") players to spectate", (reason ? strcat(" for reason: '", reason, "'") : ""), ".\n"));
@@ -1009,8 +1008,7 @@ void GameCommand_moveplayer(int request, int argc)
                                                string pl_name = playername(client.netname, client.team, false);
                                                if (!IS_SPEC(client) && !IS_OBSERVER(client))
                                                {
-                                                       if (client.caplayer) client.caplayer = 0;
-                                                       PutObserverInServer(client);
+                                                       PutObserverInServer(client, true);
 
                                                        successful = strcat(successful, (successful ? ", " : ""), pl_name);
                                                }