-float fsnap(float val,float fsize)
-{
- return rint(val / fsize) * fsize;
-}
+#include "utility.qh"
-vector vsnap(vector point,float fsize)
-{
- vector vret;
-
- vret_x = rint(point_x / fsize) * fsize;
- vret_y = rint(point_y / fsize) * fsize;
- vret_z = ceil(point_z / fsize) * fsize;
-
- return vret;
-}
+#include "pathlib.qh"
float location_isok(vector point, float water_isok, float air_isok)
{
++pathlib_searched_cnt;
- where_x = fsnap(where_x,pathlib_gridsize);
- where_y = fsnap(where_y,pathlib_gridsize);
+ where.x = fsnap(where.x,pathlib_gridsize);
+ where.y = fsnap(where.y,pathlib_gridsize);
node = findradius(where,pathlib_gridsize * 0.5);
while(node)
{
- if(node.is_path_node == TRUE)
+ if(node.is_path_node == true)
return node;
node = node.chain;
}
float tile_check_cross(vector where)
-{
+{SELFPARAM();
vector p,f,r;
f = PLIB_FORWARD * tile_check_size;
}
float tile_check_plus(vector where)
-{
+{SELFPARAM();
vector p,f,r;
f = PLIB_FORWARD * tile_check_size;
}
float tile_check_plus2(vector where)
-{
+{SELFPARAM();
vector p,f,r;
float i = 0, e = 0;