Fix locked camera angles if you spectate a particular player via the quickmenu while...
authorterencehill <piuntn@gmail.com>
Wed, 7 Oct 2020 12:29:28 +0000 (14:29 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 7 Oct 2020 12:29:28 +0000 (14:29 +0200)
qcsrc/server/command/cmd.qc

index 6426ce1a29ec217e0d2bf72084fb9a09fabbbf81..ce55570640d426d0002bf79e7906c665565d8faf 100644 (file)
@@ -647,10 +647,13 @@ void ClientCommand_spectate(entity caller, int request)
                                                int spec_accepted = VerifyClientEntity(client, false, false);
                                                if(spec_accepted > 0 && IS_PLAYER(client))
                                                {
+                                                       bool caller_is_observer = (IS_OBSERVER(caller));
                                                        Spectate(caller, client);
+                                                       if (caller_is_observer)
+                                                               TRANSMUTE(Spectator, caller);
                                                }
                                                else
-                                                       sprint(caller, "can't spectate ", argv(1), "^7\n");
+                                                       sprint(caller, "Can't spectate ", argv(1), "^7\n");
                                        }
                                        else
                                                sprint(caller, "cmd spectate client only works when you are spectator/observer\n");