summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 5c1d1356..37a63a6e 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -557,6 +557,7 @@ void G_LeaveTeam( gentity_t *self )
G_StopFromFollowing( self );
G_TeamVote( self, qfalse );
+ ent->suicideTime = 0;
for( i = 0; i < level.num_entities; i++ )
{
@@ -2665,10 +2666,6 @@ qboolean G_FollowNewClient( gentity_t *ent, int dir )
if( clientnum == original && !selectAny )
continue; //effectively break;
- // can't follow self
- if( &level.clients[ clientnum ] == ent->client )
- continue;
-
// can only follow connected clients
if( level.clients[ clientnum ].pers.connected != CON_CONNECTED )
continue;
@@ -2688,6 +2685,10 @@ 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;