don't spectate spectators

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2713 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-09-20 16:46:44 +00:00
parent 49dbe77bcc
commit c01d40f4ab
+2 -2
View File
@@ -985,14 +985,14 @@ playerent *updatefollowplayer(int shiftdirection)
if(!shiftdirection)
{
playerent *f = players.inrange(player1->followplayercn) ? players[player1->followplayercn] : NULL;
if(f) return f;
if(f && !f->isspectating()) return f;
}
vector<playerent *> available;
loopv(players) if(players[i])
{
if(m_teammode && !isteam(players[i]->team, player1->team)) continue;
if(players[i]->state==CS_DEAD) continue;
if(players[i]->state==CS_DEAD || players[i]->isspectating()) continue;
available.add(players[i]);
}
if(!available.length()) return NULL;