mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix drift end kick-out regression from SRB2Kart
This commit is contained in:
parent
2eae5b2ef6
commit
4c9b9f0e64
1 changed files with 12 additions and 8 deletions
18
src/k_kart.c
18
src/k_kart.c
|
|
@ -10336,7 +10336,7 @@ static INT16 K_GetKartDriftValue(const player_t *player, fixed_t countersteer)
|
|||
}
|
||||
#endif
|
||||
|
||||
return basedrift + (FixedMul(driftadjust * FRACUNIT, countersteer) / FRACUNIT);
|
||||
return basedrift + FixedMul(driftadjust, countersteer);
|
||||
}
|
||||
|
||||
INT16 K_UpdateSteeringValue(INT16 inputSteering, INT16 destSteering)
|
||||
|
|
@ -10477,17 +10477,21 @@ INT16 K_GetKartTurnValue(const player_t *player, INT16 turnvalue)
|
|||
|
||||
if (player->drift != 0 && P_IsObjectOnGround(player->mo))
|
||||
{
|
||||
fixed_t countersteer = FixedDiv(turnfixed, KART_FULLTURN*FRACUNIT);
|
||||
|
||||
// If we're drifting we have a completely different turning value
|
||||
|
||||
if (player->pflags & PF_DRIFTEND)
|
||||
{
|
||||
countersteer = FRACUNIT;
|
||||
// Sal: K_GetKartDriftValue is short-circuited to give a weird additive magic number,
|
||||
// instead of an entirely replaced turn value. This gaslit me years ago when I was doing a
|
||||
// code readability pass, where I missed that fact because it also returned early.
|
||||
turnfixed += K_GetKartDriftValue(player, FRACUNIT) * FRACUNIT;
|
||||
return (turnfixed / FRACUNIT);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
// If we're drifting we have a completely different turning value
|
||||
fixed_t countersteer = FixedDiv(turnfixed, KART_FULLTURN * FRACUNIT);
|
||||
return K_GetKartDriftValue(player, countersteer);
|
||||
}
|
||||
}
|
||||
|
||||
fixed_t finalhandleboost = player->handleboost;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue