mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-27 10:22:32 +00:00
Review fixups
This commit is contained in:
parent
93b62bf823
commit
77ecab8464
2 changed files with 7 additions and 4 deletions
|
|
@ -13216,15 +13216,16 @@ fixed_t K_PlayerBaseFriction(const player_t *player, fixed_t original)
|
|||
frict -= extraFriction;
|
||||
|
||||
// If bots are moving in the wrong direction relative to where they want to look, add some extra grip.
|
||||
angle_t MAXERROR = 45*ANG1;
|
||||
angle_t MAXERROR = ANGLE_45;
|
||||
fixed_t errorfrict = Easing_Linear(min(FRACUNIT, FixedDiv(player->botvars.predictionError, MAXERROR)), 0, FRACUNIT>>2);
|
||||
|
||||
if (player->currentwaypoint && player->currentwaypoint->mobj)
|
||||
{
|
||||
fixed_t myradius = FixedInt(FixedDiv(player->currentwaypoint->mobj->radius, mapobjectscale));
|
||||
INT16 myradius = FixedDiv(player->currentwaypoint->mobj->radius, mapobjectscale) / FRACUNIT;
|
||||
INT16 SMALL_WAYPOINT = 450;
|
||||
|
||||
if (myradius < 400)
|
||||
errorfrict += errorfrict/100 * (300 - myradius);
|
||||
if (myradius < SMALL_WAYPOINT)
|
||||
errorfrict *= 2;
|
||||
}
|
||||
|
||||
errorfrict = min(errorfrict, frict/4);
|
||||
|
|
|
|||
|
|
@ -2313,6 +2313,8 @@ static void P_UpdatePlayerAngle(player_t *player)
|
|||
}
|
||||
}
|
||||
|
||||
player->botvars.predictionError = 0;
|
||||
|
||||
// Don't apply steering just yet. If we make a correction, we'll need to adjust it.
|
||||
INT16 targetsteering = K_UpdateSteeringValue(player->steering, player->cmd.turning);
|
||||
angleChange = K_GetKartTurnValue(player, targetsteering) << TICCMD_REDUCE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue