if (file < 0)
{
LOG_TRACE("waypoint links load from ", filename, " failed");
+ waypoint_schedulerelinkall();
return false;
}
else
{
LOG_TRACE("automatically updating...");
+ waypoint_schedulerelinkall();
fclose(file);
return false;
}
{
// bad file format
fclose(file);
+ waypoint_schedulerelinkall(); // link all the autogenerated waypoints (teleporters)
return false;
}
LOG_TRACE("loaded ", ftos(c), " waypoint links from ", filename);
+ bool scheduled = false;
+ IL_EACH(g_waypoints, it.wpflags & WAYPOINTFLAG_ITEM,
+ {
+ if (!it.wp00)
+ {
+ waypoint_schedulerelink(it);
+ scheduled = true;
+ }
+ });
+ if (scheduled)
+ return false;
+
botframe_cachedwaypointlinks = true;
return true;
}