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
1 changed files with 1 additions and 3 deletions
|
@ -149,14 +149,12 @@ static region **internal_path_find(region * handle_start, const region * target,
|
||||||
fset(handle_start, RF_MARK);
|
fset(handle_start, RF_MARK);
|
||||||
|
|
||||||
while (n != NULL) {
|
while (n != NULL) {
|
||||||
region *adj[MAXDIRECTIONS];
|
|
||||||
region *r = n->r;
|
region *r = n->r;
|
||||||
int depth = n->distance + 1;
|
int depth = n->distance + 1;
|
||||||
if (n->distance >= maxlen)
|
if (n->distance >= maxlen)
|
||||||
break;
|
break;
|
||||||
get_neighbours(r, adj);
|
|
||||||
for (d = 0; d != MAXDIRECTIONS; ++d) {
|
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 && !fval(rn, RF_MARK) && allowed(r, rn)) {
|
||||||
if (rn == target) {
|
if (rn == target) {
|
||||||
int i = depth;
|
int i = depth;
|
||||||
|
|
Loading…
Reference in a new issue