From ddb034f0564c04d3d12c413384224064425b57e7 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Fri, 22 Aug 2025 18:36:59 -0400 Subject: [PATCH] Point to the back quarter of racers Instead of everyone behind 1st being considered for average, only consider the last 25% of players. Speed assist is stronger again to make up for this (+25% again) --- src/k_kart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index c3a9abd5d..f88eee6bf 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3964,7 +3964,7 @@ static fixed_t K_GetKartSpeedAssist(const player_t *player) if (player->loneliness < 0) return FRACUNIT; - fixed_t MAX_SPEED_ASSIST = FRACUNIT/7; + fixed_t MAX_SPEED_ASSIST = FRACUNIT/4; return FRACUNIT + FixedMul(player->loneliness, MAX_SPEED_ASSIST); } @@ -10003,7 +10003,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) if (playeringame[i] == false || players[i].spectator == true || players[i].exiting) continue; - if (players[i].position != 1) + if (players[i].position != 1 && players[i].position >= (D_NumPlayersInRace()*3)/4) //Not in 1st, but also back quarter of the average { counted++; average += K_UndoMapScaling(players[i].distancetofinish); @@ -10025,7 +10025,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) UINT32 TOO_CLOSE = average + 7000; // Start gaining here, lose if closer UINT32 WAY_TOO_CLOSE = average + 6000; // Lose at max rate here - fixed_t MAX_GAIN_PER_SEC = FRACUNIT/30; // % assist to gain per sec when REALLY_FAR + fixed_t MAX_GAIN_PER_SEC = FRACUNIT/20; // % assist to gain per sec when REALLY_FAR fixed_t MAX_LOSS_PER_SEC = FRACUNIT/5; // % assist to lose per sec when WAY_TOO_CLOSE UINT32 gaingap = REALLY_FAR - TOO_CLOSE;