mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-19 20:12:01 +00:00
Add minimum distance to prediction
This commit is contained in:
parent
7eac54a749
commit
6142963ff9
1 changed files with 3 additions and 1 deletions
|
|
@ -572,7 +572,9 @@ static botprediction_t *K_CreateBotPrediction(player_t *player)
|
|||
|
||||
const tic_t futuresight = (TICRATE * normal) / max(1, handling); // How far ahead into the future to try and predict
|
||||
const fixed_t speed = max(P_AproxDistance(player->mo->momx, player->mo->momy), K_GetKartSpeed(player, false) / 4);
|
||||
const INT32 distance = (FixedMul(speed, distreduce) / FRACUNIT) * futuresight;
|
||||
|
||||
const INT32 startDist = (DEFAULT_WAYPOINT_RADIUS * mapobjectscale) / FRACUNIT;
|
||||
const INT32 distance = ((FixedMul(speed, distreduce) / FRACUNIT) * futuresight) + startDist;
|
||||
|
||||
botprediction_t *predict = Z_Calloc(sizeof(botprediction_t), PU_LEVEL, NULL);
|
||||
waypoint_t *wp = player->nextwaypoint;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue