diff --git a/src/k_kart.c b/src/k_kart.c index 49f199932..f019eef50 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -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.) diff --git a/src/p_mobj.c b/src/p_mobj.c index ad79f6353..428880478 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -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);