Leave bot friction alone on dash pads

Should fix #752, otherwise probably isn't harmful though.
This commit is contained in:
Sally Coolatta 2023-12-19 08:59:01 -05:00
parent 47fdab3bdd
commit 54e62bbd8f

View file

@ -11191,23 +11191,26 @@ fixed_t K_PlayerBaseFriction(player_t *player, fixed_t original)
); );
fixed_t frict = original; fixed_t frict = original;
if (K_PodiumSequence() == true) if (player->dashpadcooldown == 0) // attempt to fix Hot Shelter
{ {
frict -= FixedMul(FRACUNIT >> 4, factor); if (K_PodiumSequence() == true)
}
else if (K_PlayerUsesBotMovement(player) == true)
{
// A bit extra friction to help them without drifting.
// Remove this line once they can drift.
frict -= FixedMul(FRACUNIT >> 5, factor);
// Bots gain more traction as they rubberband.
fixed_t traction_value = FixedMul(player->botvars.rubberband, max(FRACUNIT, K_BotMapModifier()));
if (traction_value > FRACUNIT)
{ {
const fixed_t extraFriction = FixedMul(FRACUNIT >> 5, factor); frict -= FixedMul(FRACUNIT >> 4, factor);
const fixed_t mul = traction_value - FRACUNIT; }
frict -= FixedMul(extraFriction, mul); else if (K_PlayerUsesBotMovement(player) == true)
{
// A bit extra friction to help them without drifting.
// Remove this line once they can drift.
frict -= FixedMul(FRACUNIT >> 5, factor);
// Bots gain more traction as they rubberband.
fixed_t traction_value = FixedMul(player->botvars.rubberband, max(FRACUNIT, K_BotMapModifier()));
if (traction_value > FRACUNIT)
{
const fixed_t extraFriction = FixedMul(FRACUNIT >> 5, factor);
const fixed_t mul = traction_value - FRACUNIT;
frict -= FixedMul(extraFriction, mul);
}
} }
} }