From 3a7a537d0ea49b973e7fe0be3d3d59118d671fc4 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 24 Sep 2020 19:59:24 -0700 Subject: [PATCH] Require slope angle > 11.25 to tilt camera --- src/p_user.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index f17ffecd6..32e8cec31 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4208,12 +4208,22 @@ DoABarrelRoll (player_t *player) if (player->mo->standingslope) { - delta = ( player->mo->angle - player->mo->standingslope->xydirection ); - slope = -(FixedMul(FINESINE (delta>>ANGLETOFINESHIFT), - player->mo->standingslope->zangle)); + slope = player->mo->standingslope->zangle; } else + { slope = 0; + } + + if (abs((INT32)slope) > ANGLE_11hh) + { + delta = ( player->mo->angle - player->mo->standingslope->xydirection ); + slope = -(FixedMul(FINESINE (delta>>ANGLETOFINESHIFT), slope)); + } + else + { + slope = 0; + } slope -= Quaketilt(player);