When player stops following a player, keep view angles

Now player keeps looking the same direction instead of facing somewhere else
which is slightly disorienting.
This commit is contained in:
Zack Middleton 2014-12-19 22:04:56 -06:00
parent 5cf45c5937
commit 4463af85fb

View file

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