mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Leave bot friction alone on dash pads
Should fix #752, otherwise probably isn't harmful though.
This commit is contained in:
parent
47fdab3bdd
commit
54e62bbd8f
1 changed files with 18 additions and 15 deletions
33
src/k_kart.c
33
src/k_kart.c
|
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue