From 0d3b6c57b0f9ea33c35e4b40ffe7466322ceb347 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Mon, 31 Jul 2023 03:04:13 -0700 Subject: [PATCH 1/2] Don't ringboost-scale speedlines past 2x (3x with tripwire leniency) --- src/k_kart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index 718563c7a..ee19e5332 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1841,7 +1841,7 @@ static void K_SpawnGenericSpeedLines(player_t *player, boolean top) fast->angle = K_MomentumAngle(player->mo); if (player->ringboost) { - P_SetScale(fast, fast->scale + (fast->scale / 300 * player->ringboost)); + P_SetScale(fast, min(fast->scale * 2, fast->scale + (fast->scale / 300 * player->ringboost))); } if (player->tripwireLeniency) { From 4cfa163cf53d9b74a04747b1fc116bedcfbd743f Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Mon, 31 Jul 2023 03:15:27 -0700 Subject: [PATCH 2/2] Save a math operation sometimes --- src/k_kart.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index ee19e5332..274ce9da6 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1841,7 +1841,10 @@ static void K_SpawnGenericSpeedLines(player_t *player, boolean top) fast->angle = K_MomentumAngle(player->mo); if (player->ringboost) { - P_SetScale(fast, min(fast->scale * 2, fast->scale + (fast->scale / 300 * player->ringboost))); + fixed_t bunky = fast->scale; + if (player->ringboost < 300) + bunky /= (300 * player->ringboost); + P_SetScale(fast, fast->scale + bunky); } if (player->tripwireLeniency) {