- // do two scans, because box test is cheaper
- IL_EACH(g_waypoints, it != ent && it != except && !(it.wpflags & WAYPOINTFLAG_TELEPORT),
+ if (autocvar_g_waypointeditor && !IS_BOT_CLIENT(ent))
+ {
+ // this code allows removing waypoints in the air and seeing jumppad/telepport waypoint links
+ // FIXME it causes a bug where a waypoint spawned really close to another one (max 16 qu)
+ // isn't detected as the nearest waypoint
+ IL_EACH(g_waypoints, it != ent && it != except,
+ {
+ if (boxesoverlap(pm1, pm2, it.absmin, it.absmax))
+ return it;
+ });
+ }
+ else