From c01d40f4aba27aba21a90ee0fd3de99dadd689e4 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sat, 20 Sep 2008 16:46:44 +0000 Subject: [PATCH] don't spectate spectators git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2713 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index fd8c4e38..f2c18db8 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -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 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;