Soften bot bumps, lower minimum complexity

This commit is contained in:
Antonio Martinez 2025-06-04 14:58:04 -04:00
parent 77ecab8464
commit 786dbe46e2
2 changed files with 6 additions and 2 deletions

View file

@ -582,7 +582,7 @@ fixed_t K_BotMapModifier(void)
{ {
constexpr INT32 complexity_scale = 10000; constexpr INT32 complexity_scale = 10000;
fixed_t modifier_max = FRACUNIT * 2; fixed_t modifier_max = FRACUNIT * 2;
fixed_t modifier_min = 4 * FRACUNIT / 10; fixed_t modifier_min = 3 * FRACUNIT / 10;
modifier_min -= FRACUNIT; modifier_min -= FRACUNIT;
const fixed_t complexity_value = std::clamp<fixed_t>( const fixed_t complexity_value = std::clamp<fixed_t>(

View file

@ -741,6 +741,7 @@ static fixed_t K_PlayerWeight(mobj_t *mobj, mobj_t *against)
// Applies rubberbanding, to prevent rubberbanding bots // Applies rubberbanding, to prevent rubberbanding bots
// from causing super crazy bumps. // from causing super crazy bumps.
fixed_t spd = K_GetKartSpeed(mobj->player, false, true); fixed_t spd = K_GetKartSpeed(mobj->player, false, true);
fixed_t unmodifiedspd = K_GetKartSpeed(mobj->player, false, false);
fixed_t speedfactor = 8 * mapobjectscale; fixed_t speedfactor = 8 * mapobjectscale;
@ -757,7 +758,10 @@ static fixed_t K_PlayerWeight(mobj_t *mobj, mobj_t *against)
} }
if (mobj->player->speed > spd) if (mobj->player->speed > spd)
weight += FixedDiv((mobj->player->speed - spd), speedfactor); weight += FixedDiv(
FixedDiv((mobj->player->speed - spd), speedfactor),
FixedDiv(spd, unmodifiedspd)
);
} }
return weight; return weight;