mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Cap camera tilt at 45 degrees; remove excess airborne easing
This commit is contained in:
parent
a8c443f2aa
commit
7e74a1d823
1 changed files with 7 additions and 3 deletions
10
src/p_user.c
10
src/p_user.c
|
|
@ -4313,14 +4313,18 @@ DoABarrelRoll (player_t *player)
|
|||
slope = 0;
|
||||
}
|
||||
|
||||
if (AbsAngle(slope) > ANGLE_45)
|
||||
{
|
||||
slope = slope & ANGLE_180 ? InvAngle(ANGLE_45) : ANGLE_45;
|
||||
}
|
||||
|
||||
slope -= Quaketilt(player);
|
||||
|
||||
delta = slope - player->tilt;
|
||||
smoothing = FixedDiv(AbsAngle(slope), ANGLE_45);
|
||||
|
||||
delta =
|
||||
FixedDiv(delta, (33 + min(4, player->airtime) * 22)
|
||||
* FixedDiv(FRACUNIT, FRACUNIT + smoothing));
|
||||
delta = FixedDiv(delta, 33 *
|
||||
FixedDiv(FRACUNIT, FRACUNIT + smoothing));
|
||||
|
||||
if (delta)
|
||||
player->tilt += delta;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue