mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-09 08:22:28 +00:00
Smoothlanding leniency
This commit is contained in:
parent
9bbd850d74
commit
b03056e4c8
3 changed files with 17 additions and 5 deletions
15
src/k_kart.c
15
src/k_kart.c
|
|
@ -3936,6 +3936,14 @@ boolean K_CheckStumble(player_t *player, angle_t oldPitch, angle_t oldRoll, bool
|
|||
return false;
|
||||
}
|
||||
|
||||
if (fromAir && player->airtime < STUMBLE_AIRTIME
|
||||
&& player->airtime > 1) // ACHTUNG HACK, sorry. Ground-to-ground transitions sometimes have 1-tic airtime because collision blows
|
||||
{
|
||||
// Short airtime with no reaction window, probably a track traversal setpiece.
|
||||
// Don't punish for these.
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((player->mo->pitch == oldPitch)
|
||||
&& (player->mo->roll == oldRoll))
|
||||
{
|
||||
|
|
@ -4099,6 +4107,9 @@ void K_UpdateStumbleIndicator(player_t *player)
|
|||
mobj->renderflags &= ~RF_HORIZONTALFLIP;
|
||||
}
|
||||
|
||||
if (air && player->airtime < STUMBLE_AIRTIME)
|
||||
delta = 0;
|
||||
|
||||
steepRange = ANGLE_90 - steepVal;
|
||||
delta = max(0, abs(delta) - ((signed)steepVal));
|
||||
trans = ((FixedDiv(AngleFixed(delta), AngleFixed(steepRange)) * (NUMTRANSMAPS - 2)) + (FRACUNIT/2)) / FRACUNIT;
|
||||
|
|
@ -8253,9 +8264,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
player->incontrol++;
|
||||
}
|
||||
|
||||
player->incontrol = min(player->incontrol, 5*TICRATE);
|
||||
player->incontrol = max(player->incontrol, -5*TICRATE);
|
||||
|
||||
if (player->tumbleBounces > 0)
|
||||
{
|
||||
K_HandleTumbleSound(player);
|
||||
|
|
@ -10436,6 +10444,7 @@ static void K_KartSpindash(player_t *player)
|
|||
// Update fastfall.
|
||||
player->fastfall = player->mo->momz;
|
||||
player->spindash = 0;
|
||||
player->mo->roll = 0;
|
||||
|
||||
if (player->fastfallBase == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,8 +40,10 @@ Make sure this matches the actual number of states
|
|||
|
||||
#define RR_PROJECTILE_FUSE (8*TICRATE)
|
||||
|
||||
#define STUMBLE_STEEP_VAL ANG60
|
||||
#define STUMBLE_STEEP_VAL_AIR (ANG30 + ANG10)
|
||||
// 2023-08-26 +ang20 to Sal's OG values to make them friendlier - Tyron
|
||||
#define STUMBLE_STEEP_VAL (ANG60 + ANG20)
|
||||
#define STUMBLE_STEEP_VAL_AIR (ANG30 + ANG10 + ANG20)
|
||||
#define STUMBLE_AIRTIME TICRATE*3
|
||||
|
||||
#define MAXRINGVOLUME 255
|
||||
#define MINRINGVOLUME 100
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ static void DashRingLaunch(player_t *player, mobj_t *ring)
|
|||
player->dashRingPushTics = DASHRING_PUSH_TICS;
|
||||
|
||||
player->mo->rollangle = 0;
|
||||
player->mo->roll = 0;
|
||||
player->flashing = 0;
|
||||
player->fastfall = 0;
|
||||
K_TumbleInterrupt(player);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue