From 451ad75610a7a39316163f2a7b4d9deb1d3c7ef2 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Thu, 2 Jun 2022 21:36:16 -0400 Subject: [PATCH 1/2] 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. --- src/k_kart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index cb0b3e12..88712f74 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5032,8 +5032,9 @@ static INT16 K_GetKartDriftValue(player_t *player, fixed_t countersteer) INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue) { - fixed_t p_maxspeed = FixedMul(K_GetKartSpeed(player, false), 3*FRACUNIT); - fixed_t adjustangle = FixedDiv((p_maxspeed>>16) - (player->speed>>16), (p_maxspeed>>16) + player->kartweight); + fixed_t p_curspeed = min(player->speed, K_GetKartSpeed(player, false) * 2); + 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) return turnvalue; From c3ce70299f7418988bfa2f00ae240674d1198342 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Thu, 2 Jun 2022 22:10:05 -0400 Subject: [PATCH 2/2] Store K_GetKartSpeed result --- src/k_kart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 88712f74..0e86f46e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5032,8 +5032,9 @@ static INT16 K_GetKartDriftValue(player_t *player, fixed_t countersteer) INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue) { - fixed_t p_curspeed = min(player->speed, K_GetKartSpeed(player, false) * 2); - fixed_t p_maxspeed = K_GetKartSpeed(player, false) * 3; + fixed_t p_topspeed = K_GetKartSpeed(player, false); + fixed_t p_curspeed = min(player->speed, p_topspeed * 2); + fixed_t p_maxspeed = p_topspeed * 3; fixed_t adjustangle = FixedDiv((p_maxspeed>>16) - (p_curspeed>>16), (p_maxspeed>>16) + player->kartweight); if (player->spectator)