#include "utility.qh"
-#include "pathlib.qh"
+#include <common/stats.qh>
+#include <common/weapons/_all.qh>
+#include <server/pathlib/pathlib.qh>
bool location_isok(vector point, bool waterok, bool air_isok)
{
where.x = fsnap(where.x,pathlib_gridsize);
where.y = fsnap(where.y,pathlib_gridsize);
- FOREACH_ENTITY_RADIUS(where, pathlib_gridsize * 0.5, it.is_path_node,
+ entity found = NULL; // TODO: using FOREACH_ENTITY_RADIUS here causes mutex loop warnings, this may need a proper fix!
+ IL_EACH(g_pathlib_nodes, it.is_path_node && vdist(it.origin - where, <, pathlib_gridsize * 0.5),
{
- return it;
+ found = it;
+ break;
});
- return NULL;
+ return found;
}
bool tile_check_cross(entity this, vector where)