Subtract your distance to the nextwaypoint from the distance to predict ahead

Helps the GHZ turn out a LOT, and other instances with waypoints far apart from each other
This commit is contained in:
Sally Cochenour 2020-04-26 13:06:53 -04:00
parent 372544d28f
commit 4ec61a2e11

View file

@ -220,7 +220,9 @@ static botprediction_t *K_CreateBotPrediction(player_t *player)
size_t nwp;
size_t i;
if (distance <= 0)
distanceleft -= P_AproxDistance(player->mo->x - wp->mobj->x, player->mo->y - wp->mobj->y) / FRACUNIT;
if (distanceleft <= 0)
{
predict->x = wp->mobj->x;
predict->y = wp->mobj->y;