]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
movetospec command: make it work even if the player is already spectating/observing...
authorterencehill <piuntn@gmail.com>
Sun, 28 May 2023 21:47:46 +0000 (23:47 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 28 May 2023 21:47:46 +0000 (23:47 +0200)
qcsrc/server/command/sv_cmd.qc

index 7627e177b83e432e14d8bf44d58deba0ad49219d..61861acbb2ac47f7f8212b57c277f356899d27d6 100644 (file)
@@ -1069,7 +1069,7 @@ void GameCommand_moveplayer(int request, int argc)
                                        else if (destination == "spectator")
                                        {
                                                string pl_name = playername(client.netname, client.team, false);
-                                               if (!IS_SPEC(client) && !IS_OBSERVER(client))
+                                               if (!(IS_SPEC(client) || IS_OBSERVER(client)) || INGAME(client))
                                                {
                                                        PutObserverInServer(client, true, true);