float autocvar_g_turrets_unit_ewheel_speed_stop;
float autocvar_g_turrets_unit_ewheel_turnrate;
-const float ewheel_anim_stop = 0;
-const float ewheel_anim_fwd_slow = 1;
-const float ewheel_anim_fwd_fast = 2;
-const float ewheel_anim_bck_slow = 3;
-const float ewheel_anim_bck_fast = 4;
+const int ewheel_anim_stop = 0;
+const int ewheel_anim_fwd_slow = 1;
+const int ewheel_anim_fwd_fast = 2;
+const int ewheel_anim_bck_slow = 3;
+const int ewheel_anim_bck_fast = 4;
void ewheel_move_path(entity this)
{
-#ifdef EWHEEL_FANCYPATH
- // Are we close enougth to a path node to switch to the next?
+ // Are we close enough to a path node to switch to the next?
if(vdist(this.origin - this.pathcurrent.origin, <, 64))
+ {
+#ifdef EWHEEL_FANCYPATH
if (this.pathcurrent.path_next == NULL)
{
// Path endpoint reached
}
else
this.pathcurrent = this.pathcurrent.path_next;
-
#else
- if(vdist(this.origin - this.pathcurrent.origin, <, 64))
this.pathcurrent = this.pathcurrent.enemy;
#endif
+ }
if (this.pathcurrent)
{
void ewheel_move_enemy(entity this)
{
- float newframe;
+ int newframe;
this.steerto = steerlib_arrive(this, this.enemy.origin,this.target_range_optimal);
- this.moveto = this.origin + this.steerto * 128;
+ this.moveto = this.origin + this.steerto * 128;
if (this.tur_dist_enemy > this.target_range_optimal)
{
e = find(NULL, targetname, it.target);
if (!e)
{
- LOG_TRACE("Initital waypoint for ewheel does NOT exsist, fix your map!");
+ LOG_TRACE("Initital waypoint for ewheel does NOT exist, fix your map!");
it.target = "";
}
if (e.classname != "turret_checkpoint")
- LOG_TRACE("Warning: not a turrret path");
+ LOG_TRACE("Warning: not a turret path");
else
{
#ifdef EWHEEL_FANCYPATH
- it.pathcurrent = WALKER_PATH(it, it.origin, e.origin);
+ it.pathcurrent = pathlib_astar(it, it.origin, e.origin);
it.pathgoal = e;
#else
it.pathcurrent = e;
{
//h(n) = D * (abs(n.x-goal.x) + abs(n.y-goal.y))
- float h;
- h = fabs(a.x - b.x);
+ float h = fabs(a.x - b.x);
h += fabs(a.y - b.y);
h *= pathlib_gridsize;
float pathlib_h_diagonal(vector a,vector b)
{
//h(n) = D * max(abs(n.x-goal.x), abs(n.y-goal.y))
- float h,x,y;
- x = fabs(a.x - b.x);
- y = fabs(a.y - b.y);
- h = pathlib_movecost * max(x,y);
+ float hx = fabs(a.x - b.x);
+ float hy = fabs(a.y - b.y);
+ float h = pathlib_movecost * max(hx,hy);
return h;
}
**/
float pathlib_h_diagonal2(vector a,vector b)
{
- float h_diag,h_str,h,x,y;
-
/*
h_diagonal(n) = min(abs(n.x-goal.x), abs(n.y-goal.y))
h_straight(n) = (abs(n.x-goal.x) + abs(n.y-goal.y))
h(n) = D2 * h_diagonal(n) + D * (h_straight(n) - 2*h_diagonal(n)))
*/
- x = fabs(a.x - b.x);
- y = fabs(a.y - b.y);
+ float hx = fabs(a.x - b.x);
+ float hy = fabs(a.y - b.y);
- h_diag = min(x,y);
- h_str = x + y;
+ float h_diag = min(hx,hy);
+ float h_str = hx + hy;
- h = pathlib_movecost_diag * h_diag;
+ float h = pathlib_movecost_diag * h_diag;
h += pathlib_movecost * (h_str - 2 * h_diag);
return h;
**/
float pathlib_h_diagonal2sdp(vector preprev,vector prev,vector point,vector end)
{
- float h_diag,h_str,h,x,y,z;
-
//h_diagonal(n) = min(abs(n.x-goal.x), abs(n.y-goal.y))
//h_straight(n) = (abs(n.x-goal.x) + abs(n.y-goal.y))
//h(n) = D2 * h_diagonal(n) + D * (h_straight(n) - 2*h_diagonal(n)))
- x = fabs(point.x - end.x);
- y = fabs(point.y - end.y);
- z = fabs(point.z - end.z);
+ float hx = fabs(point.x - end.x);
+ float hy = fabs(point.y - end.y);
+ float hz = fabs(point.z - end.z);
- h_diag = min3(x,y,z);
- h_str = x + y + z;
+ float h_diag = min3(hx,hy,hz);
+ float h_str = hx + hy + hz;
- h = pathlib_movecost_diag * h_diag;
+ float h = pathlib_movecost_diag * h_diag;
h += pathlib_movecost * (h_str - 2 * h_diag);
- float m;
- vector d1,d2;
-
- d1 = normalize(preprev - point);
- d2 = normalize(prev - point);
- m = vlen(d1-d2);
+ vector d1 = normalize(preprev - point);
+ vector d2 = normalize(prev - point);
+ float m = vlen(d1-d2);
return h * m;
}
float pathlib_h_diagonal3(vector a,vector b)
{
- float h_diag,h_str,h,x,y,z;
-
- x = fabs(a.x - b.x);
- y = fabs(a.y - b.y);
- z = fabs(a.z - b.z);
+ float hx = fabs(a.x - b.x);
+ float hy = fabs(a.y - b.y);
+ float hz = fabs(a.z - b.z);
- h_diag = min3(x,y,z);
- h_str = x + y + z;
+ float h_diag = min3(hx,hy,hz);
+ float h_str = hx + hy + hz;
- h = pathlib_movecost_diag * h_diag;
+ float h = pathlib_movecost_diag * h_diag;
h += pathlib_movecost * (h_str - 2 * h_diag);
return h;
float pathlib_expandnode_starf(entity node, vector start, vector goal)
{
- vector where,f,r,t;
- float fc,c;
- entity nap;
+ float fc;
- where = node.origin;
+ vector where = node.origin;
- f = PLIB_FORWARD * pathlib_gridsize;
- r = PLIB_RIGHT * pathlib_gridsize;
+ vector f = PLIB_FORWARD * pathlib_gridsize;
+ vector r = PLIB_RIGHT * pathlib_gridsize;
// Forward
plib_points[0] = where + f;
for(int i=0;i < 8; ++i)
{
- t = plib_points[i];
+ vector t = plib_points[i];
fc = pathlib_heuristic(t,goal) + pathlib_cost(node, t, pathlib_gridsize);
plib_fvals[i] = fc;
int fc2 = 0;
for(int i = 0; i < 8; ++i)
{
- c = 0;
- nap = pathlib_nodeatpoint(plib_points[i]);
+ bool c = false;
+ entity nap = pathlib_nodeatpoint(plib_points[i]);
if(nap)
+ {
if(nap.owner == openlist)
- c = 1;
+ c = true;
+ }
else
- c = 1;
+ c = true;
if(c)
if(plib_fvals[i] < fc)
float pathlib_expandnode_star(entity node, vector start, vector goal)
{
- vector point, where, f, r;
+ vector point;
- where = node.origin;
+ vector where = node.origin;
- f = PLIB_FORWARD * pathlib_gridsize;
- r = PLIB_RIGHT * pathlib_gridsize;
+ vector f = PLIB_FORWARD * pathlib_gridsize;
+ vector r = PLIB_RIGHT * pathlib_gridsize;
if (node.pathlib_node_edgeflags == pathlib_node_edgeflag_unknown)
node.pathlib_node_edgeflags = tile_check_plus2(node, node.origin);
float pathlib_expandnode_octagon(entity node, vector start, vector goal)
{
- vector point,where,f,r;
+ vector point;
- where = node.origin;
+ vector where = node.origin;
- f = PLIB_FORWARD * pathlib_gridsize;
- r = PLIB_RIGHT * pathlib_gridsize;
+ vector f = PLIB_FORWARD * pathlib_gridsize;
+ vector r = PLIB_RIGHT * pathlib_gridsize;
// Forward
point = where + f;
});
}
-//#define PATHLIB_NODEEXPIRE 0.05
-const float PATHLIB_NODEEXPIRE = 20;
+const float PATHLIB_NODEEXPIRE = 20; // 0.05
void dumpnode(entity n)
{
entity pathlib_mknode(vector where,entity parent)
{
- entity node;
-
- node = pathlib_nodeatpoint(where);
+ entity node = pathlib_nodeatpoint(where);
if(node)
{
#ifdef TURRET_DEBUG
node.owner = openlist;
node.path_prev = parent;
-
setsize(node, '0 0 0', '0 0 0');
setorigin(node, where);
return node;
}
-float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector goal,float cost)
+bool pathlib_makenode_adaptive(entity parent,vector start, vector to, vector goal,float cost)
{
- entity node;
- float h,g,f,doedge = 0;
- vector where;
+ bool dodge = false;
+ float f, h, g;
++pathlib_searched_cnt;
pathlib_expandnode = pathlib_expandnode_star;
pathlib_movenode = pathlib_walknode;
- doedge = 1;
+ dodge = true;
}
}
- node = pathlib_nodeatpoint(to);
+ entity node = pathlib_nodeatpoint(to);
if(node)
{
LOG_TRACE("NodeAtPoint");
if(node.owner == openlist)
{
h = pathlib_heuristic(node.origin,goal);
- g = pathlib_cost(parent,node.origin,cost);
+ float g = pathlib_cost(parent,node.origin,cost);
f = g + h;
if(node.pathlib_node_g > g)
best_open_node = node;
}
- return 1;
+ return true;
}
- where = pathlib_movenode(parent, parent.origin, to, 0);
+ vector where = pathlib_movenode(parent, parent.origin, to, 0);
if (!pathlib_movenode_goodnode)
{
//pathlib_showsquare(where, 0 ,30);
//pathlib_showsquare(parent.origin, 1 ,30);
LOG_TRACE("pathlib_movenode_goodnode = 0");
- return 0;
+ return false;
}
//pathlib_showsquare(where, 1 ,30);
LOG_TRACE("NAP WHERE :",vtos(where));
LOG_TRACE("not NAP TO:",vtos(to));
LOG_TRACE("NAP-NNAP:",ftos(vlen(to-where)));
- return 0;
+ return false;
}
- if(doedge)
+ if(dodge)
if (!tile_check(parent, where))
{
LOG_TRACE("tile_check fail");
#if DEBUGPATHING
pathlib_showsquare(where, 0 ,30);
#endif
- return 0;
+ return false;
}
else if(best_open_node.pathlib_node_f > node.pathlib_node_f)
best_open_node = node;
- return 1;
+ return true;
}
entity pathlib_getbestopen()
void pathlib_close_node(entity node,vector goal)
{
-
if(node.owner == closedlist)
{
LOG_TRACE("Pathlib: Tried to close a closed node!");
//return;
- entity node;
-
- node = findfloat(NULL,is_path_node, true);
- while(node)
+ FOREACH_ENTITY_FLOAT(is_path_node, true,
{
- /*
- node.owner = openlist;
- node.pathlib_node_g = 0;
- node.pathlib_node_h = 0;
- node.pathlib_node_f = 0;
- node.path_prev = NULL;
- */
-
- dumpnode(node);
- node = findfloat(node,is_path_node, true);
- }
+ dumpnode(it);
+ });
if(openlist)
delete(openlist);
openlist = NULL;
closedlist = NULL;
-
}
float Cosine_Interpolate(float a, float b, float c)
{
- float ft,f;
-
- ft = c * 3.1415927;
- f = (1 - cos(ft)) * 0.5;
+ float ft = c * 3.1415927;
+ float f = (1 - cos(ft)) * 0.5;
return a*(1-f) + b*f;
}
-float buildpath_nodefilter_directional(vector n,vector c,vector p)
+bool buildpath_nodefilter_directional(vector n,vector c,vector p)
{
- vector d1,d2;
-
- d2 = normalize(p - c);
- d1 = normalize(c - n);
+ vector d2 = normalize(p - c);
+ vector d1 = normalize(c - n);
if(vdist(d1 - d2, <, 0.25))
{
//mark_error(c,30);
- return 1;
+ return true;
}
//mark_info(c,30);
- return 0;
+ return false;
}
-float buildpath_nodefilter_moveskip(entity this, vector n,vector c,vector p)
+bool buildpath_nodefilter_moveskip(entity this, vector n,vector c,vector p)
{
pathlib_walknode(this, p, n, 1);
if(pathlib_movenode_goodnode)
- return 1;
+ return true;
- return 0;
+ return false;
}
-float buildpath_nodefilter_none(vector n,vector c,vector p)
+bool buildpath_nodefilter_none(vector n,vector c,vector p)
{
- return 0;
+ return false;
}
entity path_build(entity next, vector where, entity prev, entity start)
{
- entity path;
-
if(prev && next)
if(buildpath_nodefilter)
if(buildpath_nodefilter(next.origin,where,prev.origin))
return next;
- path = spawn();
+ entity path = spawn();
path.owner = start;
path.path_next = next;
return path;
}
-entity pathlib_astar(entity this, vector from,vector to)
+entity pathlib_astar(entity this, vector from, vector to)
{
- entity path, start, end, open, n, ln;
- float ptime, ftime, ctime;
-
- ptime = gettime(GETTIME_REALTIME);
+ entity open;
+ float ptime = gettime(GETTIME_REALTIME);
pathlib_starttime = ptime;
pathlib_cleanup();
//to_z += 32;
LOG_TRACE("AStar init");
- path = pathlib_mknode(from, NULL);
+ entity path = pathlib_mknode(from, NULL);
pathlib_close_node(path, to);
if(pathlib_foundgoal)
{
}
best_open_node = pathlib_getbestopen();
- n = best_open_node;
+ entity n = best_open_node;
pathlib_close_node(best_open_node, to);
if(inwater(n.origin))
pathlib_expandnode_box(n, from, to);
if(pathlib_foundgoal)
{
LOG_TRACE("Target found. Rebuilding and filtering path...");
- ftime = gettime(GETTIME_REALTIME);
+ float ftime = gettime(GETTIME_REALTIME);
ptime = ftime - ptime;
- start = path_build(NULL,path.origin,NULL,NULL);
- end = path_build(NULL,goal_node.origin,NULL,start);
- ln = end;
+ entity start = path_build(NULL,path.origin,NULL,NULL);
+ entity end = path_build(NULL,goal_node.origin,NULL,start);
+ entity ln = end;
open = goal_node;
for(open = goal_node; open.path_prev != path; open = open.path_prev)
n.path_prev = start;
ftime = gettime(GETTIME_REALTIME) - ftime;
- ctime = gettime(GETTIME_REALTIME);
+ float ctime = gettime(GETTIME_REALTIME);
pathlib_cleanup();
ctime = gettime(GETTIME_REALTIME) - ctime;
#pragma once
-float buildpath_nodefilter_none(vector n,vector c,vector p);
+bool buildpath_nodefilter_none(vector n,vector c,vector p);
entity path_build(entity next, vector where, entity prev, entity start);
{
vector surface;
- pathlib_movenode_goodnode = 0;
+ pathlib_movenode_goodnode = false;
end.x = fsnap(end.x, pathlib_gridsize);
end.y = fsnap(end.y, pathlib_gridsize);
tracebox(start + '0 0 64', movenode_boxmin,movenode_boxmax, end + '0 0 64', MOVE_WORLDONLY, this);
if(trace_fraction == 1)
- pathlib_movenode_goodnode = 1;
+ pathlib_movenode_goodnode = true;
if(fabs(surface.z - end.z) > 32)
- pathlib_movenode_goodnode = 0;
+ pathlib_movenode_goodnode = false;
return end;
}
vector pathlib_swimnode(entity this, vector start, vector end, float doedge)
{
- pathlib_movenode_goodnode = 0;
+ pathlib_movenode_goodnode = false;
if(pointcontents(start) != CONTENT_WATER)
return end;
tracebox(start, movenode_boxmin,movenode_boxmax, end, MOVE_WORLDONLY, this);
if(trace_fraction == 1)
- pathlib_movenode_goodnode = 1;
+ pathlib_movenode_goodnode = true;
return end;
}
vector pathlib_flynode(entity this, vector start, vector end, float doedge)
{
- pathlib_movenode_goodnode = 0;
+ pathlib_movenode_goodnode = false;
end.x = fsnap(end.x, pathlib_gridsize);
end.y = fsnap(end.y, pathlib_gridsize);
tracebox(start, movenode_boxmin,movenode_boxmax, end, MOVE_WORLDONLY, this);
if(trace_fraction == 1)
- pathlib_movenode_goodnode = 1;
+ pathlib_movenode_goodnode = true;
return end;
}
vector pathlib_walknode(entity this, vector start, vector end, float doedge)
{
- vector direction,point,last_point,s,e;
- float steps, distance, i;
+ vector point;
LOG_TRACE("Walking node from ", vtos(start), " to ", vtos(end));
- pathlib_movenode_goodnode = 0;
+ pathlib_movenode_goodnode = false;
end.x = fsnap(end.x,pathlib_gridsize);
end.y = fsnap(end.y,pathlib_gridsize);
start = trace_endpos;
// Find the direcion, without Z
- s = start; e = end;
+ vector s = start;
+ vector e = end;
//e_z = 0; s_z = 0;
- direction = normalize(e - s);
+ vector direction = normalize(e - s);
- distance = vlen(start - end);
- steps = rint(distance / movenode_stepsize);
+ float distance = vlen(start - end);
+ int steps = rint(distance / movenode_stepsize);
- last_point = start;
- for(i = 1; i < steps; ++i)
+ vector last_point = start;
+ for(int i = 1; i < steps; ++i)
{
point = last_point + (direction * movenode_stepsize);
traceline(point + movenode_stepup,point - movenode_maxdrop,MOVE_WORLDONLY,this);
if(trace_fraction != 1.0)
return trace_endpos;
- pathlib_movenode_goodnode = 1;
+ pathlib_movenode_goodnode = true;
return last_point;
}
vector tile_check_up;
vector tile_check_down;
float tile_check_size;
-float tile_check_cross(entity this, vector where);
-float tile_check_plus(entity this, vector where);
-float tile_check_star(entity this, vector where);
-var float tile_check(entity this, vector where);
+bool tile_check_cross(entity this, vector where);
+bool tile_check_plus(entity this, vector where);
+bool tile_check_star(entity this, vector where);
+var bool tile_check(entity this, vector where);
float movenode_stepsize;
vector movenode_stepup;
vector movenode_boxup;
vector movenode_boxmax;
vector movenode_boxmin;
-float pathlib_movenode_goodnode;
+bool pathlib_movenode_goodnode;
vector pathlib_wateroutnode(entity this, vector start, vector end, float doedge);
vector pathlib_swimnode(entity this, vector start, vector end, float doedge);
float pathlib_h_none(vector preprev, vector prev) { return 0; }
var float pathlib_heuristic(vector from, vector to);
-var float pathlib_makenode(entity parent,vector start, vector to, vector goal,float cost);
-var float buildpath_nodefilter(vector n,vector c,vector p);
+var bool pathlib_makenode(entity parent,vector start, vector to, vector goal,float cost);
+var bool buildpath_nodefilter(vector n,vector c,vector p);
var float pathlib_wpp_waypointcallback(entity wp, entity wp_prev);
entity pathlib_nodeatpoint(vector where)
{
- entity node;
-
++pathlib_searched_cnt;
where.x = fsnap(where.x,pathlib_gridsize);
where.y = fsnap(where.y,pathlib_gridsize);
- node = findradius(where,pathlib_gridsize * 0.5);
- while(node)
+ FOREACH_ENTITY_RADIUS(where, pathlib_gridsize * 0.5, it.is_path_node,
{
- if(node.is_path_node == true)
- return node;
-
- node = node.chain;
- }
+ return it;
+ });
return NULL;
}
-float tile_check_cross(entity this, vector where)
+bool tile_check_cross(entity this, vector where)
{
- vector p,f,r;
-
- f = PLIB_FORWARD * tile_check_size;
- r = PLIB_RIGHT * tile_check_size;
+ vector p;
+ vector f = PLIB_FORWARD * tile_check_size;
+ vector r = PLIB_RIGHT * tile_check_size;
// forward-right
p = where + f + r;
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, this);
if (!location_isok(trace_endpos, 1, 0))
- return 0;
+ return false;
// Forward-left
p = where + f - r;
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, this);
if (!location_isok(trace_endpos, 1, 0))
- return 0;
+ return false;
// Back-right
p = where - f + r;
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, this);
if (!location_isok(trace_endpos, 1 ,0))
- return 0;
+ return false;
//Back-left
p = where - f - r;
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, this);
if (!location_isok(trace_endpos, 1, 0))
- return 0;
+ return false;
- return 1;
+ return true;
}
-float tile_check_plus(entity this, vector where)
+bool tile_check_plus(entity this, vector where)
{
- vector p,f,r;
+ vector p;
- f = PLIB_FORWARD * tile_check_size;
- r = PLIB_RIGHT * tile_check_size;
+ vector f = PLIB_FORWARD * tile_check_size;
+ vector r = PLIB_RIGHT * tile_check_size;
// forward
p = where + f;
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,this);
if (!location_isok(trace_endpos,1,0))
- return 0;
+ return false;
//left
p = where - r;
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,this);
if (!location_isok(trace_endpos,1,0))
- return 0;
+ return false;
// Right
p = where + r;
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,this);
if (!location_isok(trace_endpos,1,0))
- return 0;
+ return false;
//Back
p = where - f;
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,this);
if (!location_isok(trace_endpos,1,0))
- return 0;
+ return false;
- return 1;
+ return true;
}
float tile_check_plus2(entity this, vector where)
{
- vector p,f,r;
- float i = 0, e = 0;
+ vector p;
+ int j = 0, e = 0;
- f = PLIB_FORWARD * pathlib_gridsize;
- r = PLIB_RIGHT * pathlib_gridsize;
+ vector f = PLIB_FORWARD * pathlib_gridsize;
+ vector r = PLIB_RIGHT * pathlib_gridsize;
//#define pathlib_node_edgeflag_left 2
//#define pathlib_node_edgeflag_right 4
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,this);
if (location_isok(trace_endpos,1,0))
{
- ++i;
+ ++j;
e |= pathlib_node_edgeflag_forward;
}
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,this);
if (location_isok(trace_endpos,1,0))
{
- ++i;
+ ++j;
e |= pathlib_node_edgeflag_left;
}
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,this);
if (location_isok(trace_endpos,1,0))
{
- ++i;
+ ++j;
e |= pathlib_node_edgeflag_right;
}
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,this);
if (location_isok(trace_endpos,1,0))
{
- ++i;
+ ++j;
e |= pathlib_node_edgeflag_back;
}
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, this);
if (location_isok(trace_endpos, 1, 0))
{
- ++i;
+ ++j;
e |= pathlib_node_edgeflag_forwardright;
}
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, this);
if (location_isok(trace_endpos, 1, 0))
{
- ++i;
+ ++j;
e |= pathlib_node_edgeflag_forwardleft;
}
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, this);
if (location_isok(trace_endpos, 1 ,0))
{
- ++i;
+ ++j;
e |= pathlib_node_edgeflag_backright;
}
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, this);
if (location_isok(trace_endpos, 1, 0))
{
- ++i;
+ ++j;
e |= pathlib_node_edgeflag_backleft;
}
- if(i == 0)
+ if(j == 0)
e = pathlib_node_edgeflag_none;
return e;
}
-float tile_check_star(entity this, vector where)
+bool tile_check_star(entity this, vector where)
{
if(tile_check_plus(this, where))
return tile_check_cross(this, where);
- return 0;
+ return false;
}