mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Soften bot bumps, lower minimum complexity
This commit is contained in:
parent
77ecab8464
commit
786dbe46e2
2 changed files with 6 additions and 2 deletions
|
|
@ -582,7 +582,7 @@ fixed_t K_BotMapModifier(void)
|
|||
{
|
||||
constexpr INT32 complexity_scale = 10000;
|
||||
fixed_t modifier_max = FRACUNIT * 2;
|
||||
fixed_t modifier_min = 4 * FRACUNIT / 10;
|
||||
fixed_t modifier_min = 3 * FRACUNIT / 10;
|
||||
modifier_min -= FRACUNIT;
|
||||
|
||||
const fixed_t complexity_value = std::clamp<fixed_t>(
|
||||
|
|
|
|||
|
|
@ -741,6 +741,7 @@ static fixed_t K_PlayerWeight(mobj_t *mobj, mobj_t *against)
|
|||
// Applies rubberbanding, to prevent rubberbanding bots
|
||||
// from causing super crazy bumps.
|
||||
fixed_t spd = K_GetKartSpeed(mobj->player, false, true);
|
||||
fixed_t unmodifiedspd = K_GetKartSpeed(mobj->player, false, false);
|
||||
|
||||
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)
|
||||
weight += FixedDiv((mobj->player->speed - spd), speedfactor);
|
||||
weight += FixedDiv(
|
||||
FixedDiv((mobj->player->speed - spd), speedfactor),
|
||||
FixedDiv(spd, unmodifiedspd)
|
||||
);
|
||||
}
|
||||
|
||||
return weight;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue