From dc8a3e712ace529db8d9fba089d29507a3245042 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Wed, 17 Jan 2024 16:31:07 -0500 Subject: [PATCH] Reduce rubberbanding on ice & in offroad --- src/k_bot.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/k_bot.cpp b/src/k_bot.cpp index 372200883..40a1cff60 100644 --- a/src/k_bot.cpp +++ b/src/k_bot.cpp @@ -654,6 +654,18 @@ fixed_t K_BotRubberband(const player_t *player) rubberband = FixedDiv(distdiff + spacing, spacing * 2); + if (player->boostpower < FRACUNIT) + { + // Do not let bots cheese offroad as much. + rubberband = FixedMul(rubberband, player->boostpower); + } + + if (P_MobjWasRemoved(player->mo) == false && player->mo->movefactor < FRACUNIT) + { + // Do not let bots speed up on ice too much. + rubberband = FixedMul(rubberband, player->mo->movefactor); + } + if (rubberband > FRACUNIT) { rubberband = FRACUNIT;