mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Disable error friction in no rubberband or angle too far
This commit is contained in:
parent
3591df6060
commit
153396d99c
1 changed files with 8 additions and 0 deletions
|
|
@ -13261,9 +13261,17 @@ fixed_t K_PlayerBaseFriction(const player_t *player, fixed_t original)
|
||||||
// If bots are moving in the wrong direction relative to where they want to look, add some extra grip.
|
// If bots are moving in the wrong direction relative to where they want to look, add some extra grip.
|
||||||
angle_t MAXERROR = ANGLE_45;
|
angle_t MAXERROR = ANGLE_45;
|
||||||
angle_t MINERROR = 0;
|
angle_t MINERROR = 0;
|
||||||
|
angle_t BLINDSPOT = ANGLE_135;
|
||||||
fixed_t MAXERRORFRICTION = FixedMul(FRACUNIT >> 3, factor);
|
fixed_t MAXERRORFRICTION = FixedMul(FRACUNIT >> 3, factor);
|
||||||
|
|
||||||
fixed_t errorfrict = Easing_InCubic(min(FRACUNIT, FixedDiv(player->botvars.predictionError, MAXERROR)), 0, MAXERRORFRICTION);
|
fixed_t errorfrict = Easing_InCubic(min(FRACUNIT, FixedDiv(player->botvars.predictionError, MAXERROR)), 0, MAXERRORFRICTION);
|
||||||
|
|
||||||
|
const botcontroller_t *botController = K_GetBotController(player->mo);
|
||||||
|
if (botController != NULL && (botController->flags & TMBOT_NORUBBERBAND) == TMBOT_NORUBBERBAND)
|
||||||
|
MAXERRORFRICTION = 0; // Don't grip to setpieces...
|
||||||
|
if (player->botvars.predictionError > BLINDSPOT)
|
||||||
|
MAXERRORFRICTION = 0; // ...or "tar pit" narrow waypoints.
|
||||||
|
|
||||||
if (player->currentwaypoint && player->currentwaypoint->mobj)
|
if (player->currentwaypoint && player->currentwaypoint->mobj)
|
||||||
{
|
{
|
||||||
INT16 myradius = FixedDiv(player->currentwaypoint->mobj->radius, mapobjectscale) / FRACUNIT;
|
INT16 myradius = FixedDiv(player->currentwaypoint->mobj->radius, mapobjectscale) / FRACUNIT;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue