From e5ca4576724d9e7532d59649ad38059a076b4f0e Mon Sep 17 00:00:00 2001 From: INeedBots Date: Sun, 25 Oct 2020 14:54:58 -0600 Subject: [PATCH] more expensive --- main_shared/maps/mp/bots/_bot_utility.gsc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main_shared/maps/mp/bots/_bot_utility.gsc b/main_shared/maps/mp/bots/_bot_utility.gsc index 66c4c09..3bb2935 100644 --- a/main_shared/maps/mp/bots/_bot_utility.gsc +++ b/main_shared/maps/mp/bots/_bot_utility.gsc @@ -1636,6 +1636,7 @@ AStarSearch(start, goal, team, greedy_path) { child = level.waypoints[bestNode.index].children[i]; childorg = level.waypoints[child].origin; + childtype = level.waypoints[child].type; penalty = 1; if(!greedy_path && isdefined(team)) @@ -1644,6 +1645,10 @@ AStarSearch(start, goal, team, greedy_path) if(temppen > 1) penalty = temppen; } + + // have certain types of nodes more expensive + if (childtype == "climb" || childtype == "prone") + penalty++; //calc the total path we have took newg = bestNode.g + DistanceSquared(nodeorg, childorg)*penalty;//bots on same team's path are more expensive