Make it the tiniest bit more aggressive again

- Do it while falling agaaainnn
- Double even-out speed
- Fix Mario Kart 64
This commit is contained in:
Sally Coolatta 2022-03-28 22:37:43 -04:00
parent 60d72b5c20
commit f06be5ce1d
2 changed files with 13 additions and 12 deletions

View file

@ -3412,17 +3412,23 @@ static angle_t K_TumbleSlope(mobj_t *mobj, angle_t pitch, angle_t roll)
fixed_t pitchMul = -FINESINE(mobj->angle >> ANGLETOFINESHIFT);
fixed_t rollMul = FINECOSINE(mobj->angle >> ANGLETOFINESHIFT);
return FixedMul(pitch, pitchMul) + FixedMul(roll, rollMul);
angle_t slope = FixedMul(pitch, pitchMul) + FixedMul(roll, rollMul);
if (slope > ANGLE_180)
{
slope = InvAngle(slope);
}
return slope;
}
#define STEEP_VAL (ANGLE_45)
#define STEEP_VAL (FixedAngle(40*FRACUNIT))
void K_CheckSlopeTumble(player_t *player, angle_t oldPitch, angle_t oldRoll)
{
fixed_t gravityadjust;
angle_t oldSlope, newSlope;
angle_t slopeDelta;
angle_t oldSteepness;
// If you don't land upright on a slope, then you tumble,
// kinda like Kirby Air Ride
@ -3435,13 +3441,7 @@ void K_CheckSlopeTumble(player_t *player, angle_t oldPitch, angle_t oldRoll)
oldSlope = K_TumbleSlope(player->mo, oldPitch, oldRoll);
oldSteepness = oldSlope;
if (oldSteepness > ANGLE_180)
{
oldSteepness = InvAngle(oldSteepness);
}
if (oldSteepness <= STEEP_VAL)
if (oldSlope <= STEEP_VAL)
{
// Transferring from flat ground to a steep slope
// is a free action. (The other way around isn't, though.)

View file

@ -2811,9 +2811,10 @@ void P_PlayerZMovement(mobj_t *mo)
// Even out pitch & roll slowly over time when falling.
// Helps give OpenGL models a bit of the tumble tell.
if (P_MobjFlip(mo) * mo->momz <= 0)
{
const angle_t speed = ANG1;
angle_t dest = ANGLE_45 + (ANG10 >> 1);
const angle_t speed = ANG2;
angle_t dest = FixedAngle(50*FRACUNIT);
INT32 pitchDelta = AngleDeltaSigned(mo->pitch, 0);
INT32 rollDelta = AngleDeltaSigned(mo->roll, 0);