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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user