* Zweiter Teil Autoseeding (vergessen in letzter Commitmeldung)

This commit is contained in:
Enno Rehling 2002-05-25 07:02:20 +00:00
parent 80e3d47d1a
commit 5c9e21f039
1 changed files with 8 additions and 1 deletions

View File

@ -277,6 +277,7 @@ preferred_terrain(const struct race * rc)
#define REGIONS_PER_FACTION 2
#define MINFACTIONS 1
#define MAXAGEDIFF 5
int
mkisland(int nsize)
@ -299,7 +300,13 @@ mkisland(int nsize)
for (r=regions;r;r=r->next) {
struct plane * p = rplane(r);
if (p==NULL && (rmin==NULL || r->age<=rmin->age)) rmin=r;
if (p==NULL && (rmin==NULL || r->age<=MAXAGEDIFF)) {
direction_t d;
for (d=0;d!=MAXDIRECTIONS;++d) {
if (rconnect(r, d)==NULL) break;
}
if (d!=MAXDIRECTIONS) rmin=r;
}
}
r = NULL;
for (dist=1;r!=rmin;++dist) {