Cap camera tilt at 45 degrees; remove excess airborne easing

This commit is contained in:
James R 2021-04-06 21:53:14 -07:00
parent a8c443f2aa
commit 7e74a1d823

View file

@ -4313,14 +4313,18 @@ DoABarrelRoll (player_t *player)
slope = 0; slope = 0;
} }
if (AbsAngle(slope) > ANGLE_45)
{
slope = slope & ANGLE_180 ? InvAngle(ANGLE_45) : ANGLE_45;
}
slope -= Quaketilt(player); slope -= Quaketilt(player);
delta = slope - player->tilt; delta = slope - player->tilt;
smoothing = FixedDiv(AbsAngle(slope), ANGLE_45); smoothing = FixedDiv(AbsAngle(slope), ANGLE_45);
delta = delta = FixedDiv(delta, 33 *
FixedDiv(delta, (33 + min(4, player->airtime) * 22) FixedDiv(FRACUNIT, FRACUNIT + smoothing));
* FixedDiv(FRACUNIT, FRACUNIT + smoothing));
if (delta) if (delta)
player->tilt += delta; player->tilt += delta;