Warning when a waypoint is unreachable

This commit is contained in:
ineedbots 2021-06-13 15:40:47 -06:00
parent dfd5d4009f
commit c2146508e3
3 changed files with 2491 additions and 2480 deletions

View File

@ -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