mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-04-26 07:34:50 +00:00
Warning when a waypoint is unreachable
This commit is contained in:
parent
dfd5d4009f
commit
c2146508e3
@ -620,6 +620,21 @@ checkForWarnings()
|
||||
if(!isDefined(level.waypoints[i].angles) && (level.waypoints[i].type == "claymore" || level.waypoints[i].type == "tube" || (level.waypoints[i].type == "crouch" && level.waypoints[i].children.size == 1) || level.waypoints[i].type == "climb" || level.waypoints[i].type == "grenade"))
|
||||
self iprintln("WARNING: waypoint "+i+" angles is undefined");
|
||||
}
|
||||
|
||||
// check reachability, assume bidirectional graph
|
||||
|
||||
wpIdx = randomInt(level.waypointCount);
|
||||
|
||||
for(i = 0; i < level.waypointCount; i++)
|
||||
{
|
||||
if (i % 5 == 0)
|
||||
wait 0.05;
|
||||
|
||||
astar = AStarSearch(level.waypoints[wpIdx].origin, level.waypoints[i].origin, undefined, true);
|
||||
|
||||
if (astar.size <= 0)
|
||||
self iprintln("WARNING: waypoint "+wpIdx+" has no path to waypoint " + i);
|
||||
}
|
||||
}
|
||||
|
||||
UnLinkWaypoint(nwp)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user