mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-27 10:22:32 +00:00
Adjust wall detection
Wall detection range was doubled, how much the prediction is adjusted was halved. This is a much nicer middle-ground compared to what it was doing before.
This commit is contained in:
parent
59fa615cc8
commit
bbfad3a544
2 changed files with 3 additions and 3 deletions
|
|
@ -573,7 +573,7 @@ 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 startDist = (DEFAULT_WAYPOINT_RADIUS * mapobjectscale) / FRACUNIT;
|
||||
const INT32 startDist = (768 * mapobjectscale) / FRACUNIT;
|
||||
const INT32 distance = ((FixedMul(speed, distreduce) / FRACUNIT) * futuresight) + startDist;
|
||||
|
||||
botprediction_t *predict = Z_Calloc(sizeof(botprediction_t), PU_LEVEL, NULL);
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ fixed_t K_BotReducePrediction(player_t *player)
|
|||
INT32 xl, xh, yl, yh, bx, by;
|
||||
|
||||
globalsmuggle.botmo = player->mo;
|
||||
globalsmuggle.distancetocheck = (player->mo->radius * 16);
|
||||
globalsmuggle.distancetocheck = (player->mo->radius * 32);
|
||||
globalsmuggle.closestlinedist = INT32_MAX;
|
||||
|
||||
tmx = player->mo->x;
|
||||
|
|
@ -419,7 +419,7 @@ fixed_t K_BotReducePrediction(player_t *player)
|
|||
return FRACUNIT;
|
||||
}
|
||||
|
||||
return FixedDiv(globalsmuggle.closestlinedist, globalsmuggle.distancetocheck);
|
||||
return (FRACUNIT/2) + (FixedDiv(globalsmuggle.closestlinedist, globalsmuggle.distancetocheck) / 2);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue