forked from github/server
actually, rconnect is better, since we don't always need the entire scan.
This commit is contained in:
parent
b81fe4e244
commit
c87944afad
|
@ -149,14 +149,12 @@ static region **internal_path_find(region * handle_start, const region * target,
|
|||
fset(handle_start, RF_MARK);
|
||||
|
||||
while (n != NULL) {
|
||||
region *adj[MAXDIRECTIONS];
|
||||
region *r = n->r;
|
||||
int depth = n->distance + 1;
|
||||
if (n->distance >= maxlen)
|
||||
break;
|
||||
get_neighbours(r, adj);
|
||||
for (d = 0; d != MAXDIRECTIONS; ++d) {
|
||||
region *rn = adj[d];
|
||||
region *rn = rconnect(r, d);
|
||||
if (rn && !fval(rn, RF_MARK) && allowed(r, rn)) {
|
||||
if (rn == target) {
|
||||
int i = depth;
|
||||
|
|
Loading…
Reference in New Issue