mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-19 06:22:26 +00:00
Reduce rubberbanding on ice & in offroad
This commit is contained in:
parent
b8e3ac465e
commit
dc8a3e712a
1 changed files with 12 additions and 0 deletions
|
|
@ -654,6 +654,18 @@ fixed_t K_BotRubberband(const player_t *player)
|
||||||
|
|
||||||
rubberband = FixedDiv(distdiff + spacing, spacing * 2);
|
rubberband = FixedDiv(distdiff + spacing, spacing * 2);
|
||||||
|
|
||||||
|
if (player->boostpower < FRACUNIT)
|
||||||
|
{
|
||||||
|
// Do not let bots cheese offroad as much.
|
||||||
|
rubberband = FixedMul(rubberband, player->boostpower);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (P_MobjWasRemoved(player->mo) == false && player->mo->movefactor < FRACUNIT)
|
||||||
|
{
|
||||||
|
// Do not let bots speed up on ice too much.
|
||||||
|
rubberband = FixedMul(rubberband, player->mo->movefactor);
|
||||||
|
}
|
||||||
|
|
||||||
if (rubberband > FRACUNIT)
|
if (rubberband > FRACUNIT)
|
||||||
{
|
{
|
||||||
rubberband = FRACUNIT;
|
rubberband = FRACUNIT;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue