From d2c010ea0112f4fdff532649a8a7699fc55b8467 Mon Sep 17 00:00:00 2001 From: GenericHeroGuy Date: Sun, 31 Aug 2025 22:33:26 +0200 Subject: [PATCH] Switch to a difficulty-based drift skill formula This will get reworked later down the line (hopefully), but for now, I think it ought to be consistent regardless of stats. Should make driftpoint placement less of a nightmare at least --- src/k_bot.cpp | 7 ++++--- src/k_bot.h | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/k_bot.cpp b/src/k_bot.cpp index 372d8f2cc..6e50bc152 100644 --- a/src/k_bot.cpp +++ b/src/k_bot.cpp @@ -1067,10 +1067,11 @@ static void K_DrawPredictionDebug(botdata_t *bd, const player_t *player) } } -// Calculates drift skill for a player based on stats. -fixed_t K_BotDetermineDriftSkill(const player_t *player) +// Calculates drift skill for a player based on ~~stats~~ difficulty. +static fixed_t K_BotDetermineDriftSkill(const player_t *player) { - return ((FRACUNIT * (player->kartspeed + player->kartweight)) / 18); + return FRACUNIT/8 + (FRACUNIT * player->botvars.difficulty) / DIFFICULTBOT; + //return ((FRACUNIT * (player->kartspeed + player->kartweight)) / 18); } static void K_WaypointGetDirectionVector(waypoint_t *wp1, waypoint_t *wp2, vector3_t *a_o) diff --git a/src/k_bot.h b/src/k_bot.h index 294403b01..5b371007e 100644 --- a/src/k_bot.h +++ b/src/k_bot.h @@ -405,8 +405,6 @@ void K_BotReborn(const player_t *player); void K_BotResetItemConfirm(const player_t *player, boolean setdelay); -fixed_t K_BotDetermineDriftSkill(const player_t *player); - void K_BotSetDriftState(const player_t *player, botdrift_e newstate, tic_t lockout); botdata_t *K_GetBotData(UINT8 num);