From a284f3aa74fa543ad6384f56779d55a8d96d6a51 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Sun, 13 Jul 2014 16:53:23 +0200 Subject: when stopping follow mode, keep the view origin and stop --- src/game/g_cmds.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 85dd24f9..a83d386a 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2604,10 +2604,19 @@ void G_StopFollowing( gentity_t *ent ) ent->client->ps.stats[ STAT_STATE ] = 0; ent->client->ps.stats[ STAT_VIEWLOCK ] = 0; ent->client->ps.eFlags &= ~( EF_WALLCLIMB | EF_WALLCLIMBCEILING ); - ent->client->ps.viewangles[ PITCH ] = 0.0f; ent->client->ps.clientNum = ent - g_entities; ent->client->ps.persistant[ PERS_CREDIT ] = ent->client->pers.credit; + if( ent->client->pers.teamSelection == TEAM_NONE ) + { + vec3_t viewOrigin, angles; + + BG_GetClientViewOrigin( &ent->client->ps, viewOrigin ); + VectorCopy( ent->client->ps.viewangles, angles ); + angles[ ROLL ] = 0; + TeleportPlayer( ent, viewOrigin, angles, qfalse ); + } + CalculateRanks( ); } -- cgit