forked from github/server
fix für autoseed-inselfindung
This commit is contained in:
parent
4ab81ae614
commit
f4e2573b58
|
@ -308,22 +308,17 @@ autoseed(newfaction ** players, int nsize)
|
||||||
direction_t d;
|
direction_t d;
|
||||||
for (d=0;d!=MAXDIRECTIONS;++d) {
|
for (d=0;d!=MAXDIRECTIONS;++d) {
|
||||||
region * rn = rconnect(r, d);
|
region * rn = rconnect(r, d);
|
||||||
if (rn && rn->land) break;
|
if (rn && rn->land) {
|
||||||
|
rmin = rn;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (d!=MAXDIRECTIONS) rmin = r;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rmin!=NULL) {
|
if (rmin!=NULL) {
|
||||||
region_list * rlist = NULL, * rptr;
|
region_list * rlist = NULL, * rptr;
|
||||||
faction * f;
|
faction * f;
|
||||||
direction_t d;
|
get_island(rmin, &rlist);
|
||||||
for (d=0;d!=MAXDIRECTIONS;++d) {
|
|
||||||
region * rn = rconnect(rmin, d);
|
|
||||||
if (rn && rn->land) {
|
|
||||||
get_island(rn, &rlist);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (rptr=rlist;rptr;rptr=rptr->next) {
|
for (rptr=rlist;rptr;rptr=rptr->next) {
|
||||||
region * r = rlist->data;
|
region * r = rlist->data;
|
||||||
unit * u;
|
unit * u;
|
||||||
|
|
Loading…
Reference in New Issue