diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_cmds.c | 9 | ||||
-rw-r--r-- | src/game/g_combat.c | 1 |
2 files changed, 5 insertions, 5 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; diff --git a/src/game/g_combat.c b/src/game/g_combat.c index a7ba4c59..3d2bcb21 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -308,7 +308,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int ScoreboardMessage( g_entities + i ); } - self->client->pers.classSelection = PCL_NONE; // reset the classtype VectorCopy( self->s.origin, self->client->pers.lastDeathLocation ); self->takedamage = qfalse; // can still be gibbed |