Circuit pathfinding
An alternative to the standard pathfind function. Instead of pathfinding to a specific waypoint, it always goes towards the finish line waypoint, but also won't stop when it reaches it. It only stops when it travels a far enough distance. This is basically a cleaner, less hacky, and optimized version of the pathfinding I gave to the bots; instead of doing 1-2 full pathfinds to do this (depending on if they are near the finish line or not), it will instead always do a single small pathfind. I also need it for shrink laser behavior.
This commit is contained in:
parent
5c1b15aeb6
commit
7edc6df916
1 changed files with 1 additions and 1 deletions
|
|
@ -769,7 +769,7 @@ static botprediction_t *K_CreateBotPrediction(player_t *player)
|
|||
distscaled = K_ScaleWPDistWithSlope(disttonext, angletonext, nextslope, P_MobjFlip(wp->mobj)) / FRACUNIT;
|
||||
|
||||
pathfindsuccess = K_PathfindThruCircuit(
|
||||
wp, (unsigned)distanceleft,
|
||||
player->nextwaypoint, (unsigned)distanceleft,
|
||||
&pathtofinish,
|
||||
useshortcuts, huntbackwards
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue