diff --git a/src/k_kart.c b/src/k_kart.c index bd57b4079..eff9c5044 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -13261,9 +13261,17 @@ fixed_t K_PlayerBaseFriction(const player_t *player, fixed_t original) // If bots are moving in the wrong direction relative to where they want to look, add some extra grip. angle_t MAXERROR = ANGLE_45; angle_t MINERROR = 0; + angle_t BLINDSPOT = ANGLE_135; fixed_t MAXERRORFRICTION = FixedMul(FRACUNIT >> 3, factor); + fixed_t errorfrict = Easing_InCubic(min(FRACUNIT, FixedDiv(player->botvars.predictionError, MAXERROR)), 0, MAXERRORFRICTION); + const botcontroller_t *botController = K_GetBotController(player->mo); + if (botController != NULL && (botController->flags & TMBOT_NORUBBERBAND) == TMBOT_NORUBBERBAND) + MAXERRORFRICTION = 0; // Don't grip to setpieces... + if (player->botvars.predictionError > BLINDSPOT) + MAXERRORFRICTION = 0; // ...or "tar pit" narrow waypoints. + if (player->currentwaypoint && player->currentwaypoint->mobj) { INT16 myradius = FixedDiv(player->currentwaypoint->mobj->radius, mapobjectscale) / FRACUNIT;