diff --git a/main_shared/maps/mp/bots/_bot_internal.gsc b/main_shared/maps/mp/bots/_bot_internal.gsc index 06d06b5..632a93e 100644 --- a/main_shared/maps/mp/bots/_bot_internal.gsc +++ b/main_shared/maps/mp/bots/_bot_internal.gsc @@ -1051,6 +1051,9 @@ isInRange(dist, curweap) return true; } +/* + Will kill the walk threads and do it again after a time +*/ killWalkCauseNoWaypoints() { self endon("disconnect"); @@ -1269,6 +1272,9 @@ killWalkOnEvents() self notify("kill_goal"); } +/* + Does the notify for goal completion for outside scripts +*/ doWalkScriptNotify() { self endon("disconnect"); @@ -1298,11 +1304,13 @@ doWalk(goal, dist, isScriptGoal) self thread watchOnGoal(goal, distsq); current = self initAStar(goal); + // if a waypoint is closer than the goal //if (current >= 0 && DistanceSquared(self.origin, level.waypoints[self.bot.astar[current]].origin) < DistanceSquared(self.origin, goal)) //{ while(current >= 0) { - for (;;) + // skip down the line of waypoints and go to the waypoint we have a direct path too + /*for (;;) { if (current <= 0) break; @@ -1315,7 +1323,7 @@ doWalk(goal, dist, isScriptGoal) break; current = self removeAStar(); - } + }*/ self.bot.next_wp = self.bot.astar[current]; self.bot.second_next_wp = -1;