commit e43c3e396fb172f7d18529b89a00c0c4e18c6e79 Author: devhc Date: Thu Apr 21 21:08:41 2011 +0200 when stopping follow mode, keep the view origin and stop diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 2303227..6004c8a 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2638,10 +2638,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( ); }