Cap on turn dampening

Fixes high speed bugs without removing the ability to turn at those speeds. Similar fix to what is in Ring Racers.
This commit is contained in:
Sally Coolatta 2022-06-02 21:36:16 -04:00
parent 71de39bcbc
commit 451ad75610

View file

@ -5032,8 +5032,9 @@ static INT16 K_GetKartDriftValue(player_t *player, fixed_t countersteer)
INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue) INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue)
{ {
fixed_t p_maxspeed = FixedMul(K_GetKartSpeed(player, false), 3*FRACUNIT); fixed_t p_curspeed = min(player->speed, K_GetKartSpeed(player, false) * 2);
fixed_t adjustangle = FixedDiv((p_maxspeed>>16) - (player->speed>>16), (p_maxspeed>>16) + player->kartweight); fixed_t p_maxspeed = K_GetKartSpeed(player, false) * 3;
fixed_t adjustangle = FixedDiv((p_maxspeed>>16) - (p_curspeed>>16), (p_maxspeed>>16) + player->kartweight);
if (player->spectator) if (player->spectator)
return turnvalue; return turnvalue;