if (!e)
return;
+ if(e.blacklisted)
+ return;
+
//print("routerating ", etos(e), " = ", ftos(f), " - ", ftos(rangebias), "\n");
// Evaluate path using jetpack
}
else
{
+ float search;
+
+ search = TRUE;
+
+ if(e.flags & FL_ITEM)
+ {
+ if not(e.flags & FL_WEAPON)
+ if(e.nearestwaypoint)
+ search = FALSE;
+ }
+ else if (e.flags & FL_WEAPON)
+ {
+ if(e.classname != "droppedweapon")
+ if(e.nearestwaypoint)
+ search = FALSE;
+ }
+
+ if(search)
if (time > e.nearestwaypointtimeout)
{
nwp = navigation_findnearestwaypoint(e, TRUE);
if(nwp)
e.nearestwaypoint = nwp;
else
+ {
dprint("FAILED to find a nearest waypoint to '", e.classname, "' #", etos(e), "\n");
+ if(e.flags & FL_ITEM)
+ e.blacklisted = TRUE;
+ else if (e.flags & FL_WEAPON)
+ {
+ if(e.classname != "droppedweapon")
+ e.blacklisted = TRUE;
+ }
+
+ if(e.blacklisted)
+ {
+ dprint("The entity '", e.classname, "' is going to be excluded from path finding during this match\n");
+ return;
+ }
+ }
+
// TODO: Cleaner solution, probably handling this timeout from ctf.qc
if(e.classname=="item_flag_team")
e.nearestwaypointtimeout = time + 2;