From: terencehill Date: Wed, 7 Oct 2020 12:29:28 +0000 (+0200) Subject: Fix locked camera angles if you spectate a particular player via the quickmenu while... X-Git-Tag: xonotic-v0.8.5~742 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bca355b90c59de6914601c65e48f2f6db975f066;p=xonotic%2Fxonotic-data.pk3dir.git Fix locked camera angles if you spectate a particular player via the quickmenu while observing --- diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 6426ce1a2..ce5557064 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -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");