From 4ec61a2e111bd14aa4cf6c9fb39cd7f9898348c4 Mon Sep 17 00:00:00 2001 From: Sally Cochenour Date: Sun, 26 Apr 2020 13:06:53 -0400 Subject: [PATCH] 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 --- src/k_bot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/k_bot.c b/src/k_bot.c index c85a396df..bc480a9d6 100644 --- a/src/k_bot.c +++ b/src/k_bot.c @@ -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;