summaryrefslogtreecommitdiff
path: root/src/cgame/cg_view.c
diff options
context:
space:
mode:
authorChristopher Schwarz <lakitu7@gmail.com>2009-10-03 12:30:01 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:01 +0000
commited462a3158d795d9effc9826e08f97d920330d04 (patch)
tree17258f6934046ca96a088615e3994929d9b41a8e /src/cgame/cg_view.c
parent3a2aa83e582deb28d29f38f5a3dcb2e697863de0 (diff)
* Fix thirdperson death cam view for suicides
Diffstat (limited to 'src/cgame/cg_view.c')
-rw-r--r--src/cgame/cg_view.c11
1 files changed, 8 insertions, 3 deletions
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