diff options
author | Tim Angus <tim@ngus.net> | 2005-07-02 19:29:17 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2005-07-02 19:29:17 +0000 |
commit | 5097748e7b51a85e46047659a429532793d3fc93 (patch) | |
tree | 864553da08e07dde2227cc462e9d229e608bd1b6 /src/cgame/cg_view.c | |
parent | 7c13523d9b02f1319dec7dd0dece68f96f17ed35 (diff) |
* Fixed the PTRC system interfering with the observer mode
* Refactored observer mode code
* Fixed poison cloud being distorted in observer mode (by not rendering it)
* Fixed walking wall smoothing being distorted in observer mode (by not performing any smoothing)
Diffstat (limited to 'src/cgame/cg_view.c')
-rw-r--r-- | src/cgame/cg_view.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index e88bb8f8..12772a3d 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -577,7 +577,8 @@ static void CG_OffsetFirstPersonView( void ) cg.upMoveTime = cg.time; } - if( cg.predictedPlayerState.stats[ STAT_STATE ] & SS_POISONCLOUDED ) + if( cg.predictedPlayerState.stats[ STAT_STATE ] & SS_POISONCLOUDED && + !( cg.snap->ps.pm_flags & PMF_FOLLOW ) ) { float fraction = sin( ( (float)cg.time / 1000.0f ) * M_PI * 2 * PCLOUD_ROLL_FREQUENCY ); float pitchFraction = sin( ( (float)cg.time / 1000.0f ) * M_PI * 5 * PCLOUD_ROLL_FREQUENCY ); @@ -788,7 +789,8 @@ static int CG_CalcFov( void ) inwater = qfalse; if( cg.predictedPlayerState.stats[ STAT_STATE ] & SS_POISONCLOUDED && - cg.predictedPlayerState.stats[ STAT_HEALTH ] > 0 ) + cg.predictedPlayerState.stats[ STAT_HEALTH ] > 0 && + !( cg.snap->ps.pm_flags & PMF_FOLLOW ) ) { phase = cg.time / 1000.0 * PCLOUD_ZOOM_FREQUENCY * M_PI * 2; v = PCLOUD_ZOOM_AMPLITUDE * sin( phase ); @@ -948,6 +950,12 @@ static void CG_smoothWWTransitions( playerState_t *ps, const vec3_t in, vec3_t o qboolean performed = qfalse; vec3_t inAxis[ 3 ], lastAxis[ 3 ], outAxis[ 3 ]; + if( cg.snap->ps.pm_flags & PMF_FOLLOW ) + { + VectorCopy( in, out ); + return; + } + //set surfNormal if( !( ps->stats[ STAT_STATE ] & SS_WALLCLIMBINGCEILING ) ) VectorCopy( ps->grapplePoint, surfNormal ); @@ -990,7 +998,7 @@ static void CG_smoothWWTransitions( playerState_t *ps, const vec3_t in, vec3_t o timeMod = 1.0f; } - + //add the op CG_addSmoothOp( rotAxis, rotAngle, timeMod ); } @@ -1042,6 +1050,12 @@ static void CG_smoothWJTransitions( playerState_t *ps, const vec3_t in, vec3_t o qboolean performed = qfalse; vec3_t inAxis[ 3 ], outAxis[ 3 ]; + if( cg.snap->ps.pm_flags & PMF_FOLLOW ) + { + VectorCopy( in, out ); + return; + } + AnglesToAxis( in, inAxis ); //iterate through ops |