w.solid = SOLID_TRIGGER;
setorigin(w, (m1 + m2) * 0.5);
setsize(w, m1 - w.origin, m2 - w.origin);
- if (vlen(w.size) > 0)
+ if (w.size)
w.wpisbox = true;
if(!w.wpisbox)
{
if(!(f & WAYPOINTFLAG_GENERATED))
{
- LOG_TRACE("Killed a waypoint that was stuck in solid at ", vtos(w.origin), "\n");
+ LOG_TRACE("Killed a waypoint that was stuck in solid at ", vtos(w.origin));
delete(w);
return NULL;
}
}
else
wp.model = "";
- wp.wpisbox = vlen(wp.size) > 0;
+ wp.wpisbox = vdist(wp.size, >, 0);
wp.enemy = NULL;
if (!(wp.wpflags & WAYPOINTFLAG_PERSONAL))
wp.owner = NULL;
{
LOG_TRACE("waypoint links load from ");
LOG_TRACE(filename);
- LOG_TRACE(" failed\n");
+ LOG_TRACE(" failed");
return false;
}
if(!found)
{
- LOG_TRACE("waypoint_load_links: couldn't find 'from' waypoint at ", vtos(wp_from.origin),"\n");
+ LOG_TRACE("waypoint_load_links: couldn't find 'from' waypoint at ", vtos(wp_from.origin));
continue;
}
if(!found)
{
- LOG_TRACE("waypoint_load_links: couldn't find 'to' waypoint at ", vtos(wp_to.origin),"\n");
+ LOG_TRACE("waypoint_load_links: couldn't find 'to' waypoint at ", vtos(wp_to.origin));
continue;
}
fclose(file);
- LOG_TRACE("loaded ", ftos(c), " waypoint links from maps/", mapname, ".waypoints.cache\n");
+ LOG_TRACE("loaded ", ftos(c), " waypoint links from maps/", mapname, ".waypoints.cache");
botframe_cachedwaypointlinks = true;
return true;
if (file < 0)
{
- LOG_TRACE("waypoint links load from ", filename, " failed\n");
+ LOG_TRACE("waypoint links load from ", filename, " failed");
return;
}
fclose(file);
- LOG_TRACE("loaded ", ftos(c), " waypoint links from maps/", mapname, ".waypoints.hardwired\n");
+ LOG_TRACE("loaded ", ftos(c), " waypoint links from maps/", mapname, ".waypoints.hardwired");
}
entity waypoint_get_link(entity w, float i)
cwb = cwb + 1;
}
fclose(file);
- LOG_TRACE("loaded ", ftos(cwp), " waypoints and ", ftos(cwb), " wayboxes from maps/", mapname, ".waypoints\n");
+ LOG_TRACE("loaded ", ftos(cwp), " waypoints and ", ftos(cwb), " wayboxes from maps/", mapname, ".waypoints");
}
else
{
- LOG_TRACE("waypoint load from ", filename, " failed\n");
+ LOG_TRACE("waypoint load from ", filename, " failed");
}
return cwp + cwb;
}
void botframe_deleteuselesswaypoints()
{
- FOREACH_ENTITY_FLOAT(bot_pickup, true,
+ IL_EACH(g_items, it.bot_pickup,
{
// NOTE: this protects waypoints if they're the ONLY nearest
// waypoint. That's the intention.