From 1bb7a5d7acdb96415c0070cab194f8a00defaa28 Mon Sep 17 00:00:00 2001 From: aurhat Date: Sun, 16 Feb 2014 13:50:06 +0100 Subject: [PATCH] Restoring previous conditions in setfollowplayer(). Current conditions appeared with commit: https://github.com/assaultcube/AC/commit/8f39911eb0725b22bb4dc3a50d3e89702afcc49c The problem with its is, that when player is SPECTATOR, then "/setfollowplayer CN" command works only on players in CLA team, and should work on all, like "changefollowplayer". This commit fixes that. Thread related to this bug: http://forum.cubers.net/thread-7495.html --- source/src/clientgame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 59e89e93..c5543177 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -1687,7 +1687,7 @@ void setfollowplayer(int cn) // silently ignores invalid player-cn value passed if(players.inrange(cn) && players[cn]) { - if(!(m_teammode && !watchingdemo && team_base(players[cn]->team) != team_base(player1->team))) + if(!(m_teammode && player1->team != TEAM_SPECT && !watchingdemo && team_base(players[cn]->team) != team_base(player1->team))) { player1->followplayercn = cn; if(player1->spectatemode == SM_FLY) player1->spectatemode = SM_FOLLOW1ST;