From 8ae9cc0583992f15b63ed4f62a063e46676df607 Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Sat, 3 Oct 2009 11:51:03 +0000 Subject: Un-merge bits of svn because they interfere with stickypsec (oops) --- src/game/g_cmds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 9a835acd..efcf4938 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2662,6 +2662,10 @@ qboolean G_FollowNewClient( gentity_t *ent, int dir ) if( clientnum < 0 ) clientnum = level.maxclients - 1; + // can't follow self + if( level.clients[ clientnum ].pers.connected != CON_CONNECTED ) + continue; + // avoid selecting existing follow target if( clientnum == original && !selectAny ) continue; //effectively break; @@ -2685,10 +2689,6 @@ qboolean G_FollowNewClient( gentity_t *ent, int dir ) ent->client->pers.teamSelection ) ) continue; - // can't follow dead client - if( level.clients[ clientnum ].ps.stats[ STAT_HEALTH ] <= 0 ) - continue; - // this is good, we can use it ent->client->sess.spectatorClient = clientnum; ent->client->sess.spectatorState = SPECTATOR_FOLLOW; -- cgit