diff options
Diffstat (limited to 'src/game/bg_pmove.c')
-rw-r--r-- | src/game/bg_pmove.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index c9a57fc0..a6b8a63b 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -3110,9 +3110,14 @@ void PM_UpdateViewAngles( playerState_t *ps, const usercmd_t *cmd ) while( diff < -180.0f ) diff += 360.0f; - if( diff < 0 ) + if( diff < -90.0f ) + ps->delta_angles[ i ] += ANGLE2SHORT( fabs( diff ) - 90.0f ); + else if( diff > 90.0f ) + ps->delta_angles[ i ] -= ANGLE2SHORT( fabs( diff ) - 90.0f ); + + if( diff < 0.0f ) ps->delta_angles[ i ] += ANGLE2SHORT( fabs( diff ) * 0.05f ); - else if( diff > 0 ) + else if( diff > 0.0f ) ps->delta_angles[ i ] -= ANGLE2SHORT( fabs( diff ) * 0.05f ); } } |