Don't use dead view angles after stop following a dead player

If ps.stats[STAT_HEALTH] is less or equal to 0, cgame uses fixed view angles.
When stop following a player, make sure health isn't less or equal to 0.
This commit is contained in:
Zack Middleton 2014-12-19 21:57:24 -06:00
parent a700b76722
commit 5cf45c5937

View file

@ -651,6 +651,11 @@ void StopFollowing( gentity_t *ent ) {
ent->client->ps.pm_flags &= ~PMF_FOLLOW;
ent->r.svFlags &= ~SVF_BOT;
ent->client->ps.clientNum = ent - g_entities;
// don't use dead view angles
if ( ent->client->ps.stats[STAT_HEALTH] <= 0 ) {
ent->client->ps.stats[STAT_HEALTH] = 1;
}
}
/*