+ i = 0;
+ entity start;
+ start = findchainflags(flags, FL_ITEM);
+ for(e = start; e; e = e.chain)
+ {
+ e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE | EF_BRIGHTLIGHT;
+ }
+ for(e = start; e; e = e.chain)
+ {
+ if(navigation_findnearestwaypoint(e, FALSE))
+ {
+ }
+ else
+ {
+ print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+ e.effects |= EF_NODEPTHTEST | EF_RED | EF_BRIGHTLIGHT;
+ ++i;
+ }
+ }
+ if(i)
+ print(ftos(i), " items have no nearest waypoint and cannot be walked away from (marked with red light)\n");
+ i = 0;
+ for(e = start; e; e = e.chain)
+ {
+ org = e.origin;
+ if(navigation_findnearestwaypoint(e, TRUE))
+ {
+ }
+ else
+ {
+ print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+ e.effects |= EF_NODEPTHTEST | EF_BLUE | EF_BRIGHTLIGHT;
+ ++i;
+ }
+ }
+ if(i)
+ print(ftos(i), " items have no nearest waypoint and cannot be walked to (marked with blue light)\n");