From ed462a3158d795d9effc9826e08f97d920330d04 Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Sat, 3 Oct 2009 12:30:01 +0000 Subject: * Fix thirdperson death cam view for suicides --- src/cgame/cg_view.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index e699b0c8..bc331133 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -309,10 +309,15 @@ void CG_OffsetThirdPersonView( void ) vec3_t killerPos; killerEntNum = cg.predictedPlayerState.stats[ STAT_VIEWLOCK ]; - VectorCopy( cg_entities[ killerEntNum ].lerpOrigin, killerPos ); + + // already looking at ourself + if( killerEntNum != cg.snap->ps.clientNum ) + { + VectorCopy( cg_entities[ killerEntNum ].lerpOrigin, killerPos ); - VectorSubtract( killerPos, cg.refdef.vieworg, killerPos ); - vectoangles( killerPos, cg.refdefViewAngles ); + VectorSubtract( killerPos, cg.refdef.vieworg, killerPos ); + vectoangles( killerPos, cg.refdefViewAngles ); + } } // get and rangecheck cg_thirdPersonRange -- cgit