mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Adjust prediction future sight based on the bot's handling
This commit is contained in:
parent
4ec61a2e11
commit
6b3e7c8e16
1 changed files with 3 additions and 1 deletions
|
|
@ -211,7 +211,9 @@ static fixed_t K_DistanceOfLineFromPoint(fixed_t v1x, fixed_t v1y, fixed_t v2x,
|
|||
|
||||
static botprediction_t *K_CreateBotPrediction(player_t *player)
|
||||
{
|
||||
const tic_t futuresight = (3*TICRATE/4); // How far ahead into the future to try and predict
|
||||
const INT16 handling = K_GetKartTurnValue(player, KART_FULLTURN); // Reduce prediction based on how fast you can turn
|
||||
const INT16 normal = KART_FULLTURN; // "Standard" handling to compare to
|
||||
const tic_t futuresight = (TICRATE * normal) / max(1, handling); // How far ahead into the future to try and predict
|
||||
const INT32 distance = (player->speed / FRACUNIT) * futuresight;
|
||||
INT32 distanceleft = distance;
|
||||
botprediction_t *predict = Z_Calloc(sizeof(botprediction_t), PU_LEVEL, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue