From fac381cdf1c6f7480b3bd214c857460f354bda13 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sun, 24 Dec 2023 14:29:57 -0500 Subject: [PATCH] Fix spindash behavior regression from abde576c --- src/k_bot.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/k_bot.cpp b/src/k_bot.cpp index 784746c85..b2475791f 100644 --- a/src/k_bot.cpp +++ b/src/k_bot.cpp @@ -939,7 +939,6 @@ static UINT8 K_TrySpindash(const player_t *player, ticcmd_t *cmd) if (player->spindashboost || player->tiregrease // You just released a spindash, you don't need to try again yet, jeez. || P_IsObjectOnGround(player->mo) == false) // Not in a state where we want 'em to spindash. { - cmd->bot.spindashconfirm = 0; return 0; } @@ -1898,7 +1897,16 @@ void K_UpdateBotGameplayVars(player_t *player) player->botvars.rubberband = K_UpdateRubberband(player); player->botvars.turnconfirm += player->cmd.bot.turnconfirm; - player->botvars.spindashconfirm += player->cmd.bot.spindashconfirm; + + if (player->spindashboost || player->tiregrease // You just released a spindash, you don't need to try again yet, jeez. + || P_IsObjectOnGround(player->mo) == false) // Not in a state where we want 'em to spindash. + { + player->botvars.spindashconfirm = 0; + } + else + { + player->botvars.spindashconfirm += player->cmd.bot.spindashconfirm; + } if (K_TryRingShooter(player) == true) {