forked from github/server
remove_empty_factions nur bei -x nach dem einladen ausführen
This commit is contained in:
parent
d323582109
commit
35419af1b2
|
@ -729,6 +729,7 @@ readgame(boolean backup)
|
||||||
ship *sh, **shp;
|
ship *sh, **shp;
|
||||||
unit *u;
|
unit *u;
|
||||||
FILE * F;
|
FILE * F;
|
||||||
|
int rmax = maxregions;
|
||||||
|
|
||||||
sprintf(buf, "%s/%d", datapath(), turn);
|
sprintf(buf, "%s/%d", datapath(), turn);
|
||||||
if (backup) create_backup(buf);
|
if (backup) create_backup(buf);
|
||||||
|
@ -838,8 +839,8 @@ readgame(boolean backup)
|
||||||
/* Regionen */
|
/* Regionen */
|
||||||
|
|
||||||
n = ri(F);
|
n = ri(F);
|
||||||
if (maxregions<0) maxregions = n;
|
if (rmax<0) rmax = n;
|
||||||
printf(" - Einzulesende Regionen: %d/%d\r", maxregions, n);
|
printf(" - Einzulesende Regionen: %d/%d\r", rmax, n);
|
||||||
|
|
||||||
while (--n >= 0) {
|
while (--n >= 0) {
|
||||||
unit **up;
|
unit **up;
|
||||||
|
@ -853,15 +854,15 @@ readgame(boolean backup)
|
||||||
} else {
|
} else {
|
||||||
firstx=0;
|
firstx=0;
|
||||||
firsty=0;
|
firsty=0;
|
||||||
if (maxregions>0) maxregions = min(n, maxregions)-1;
|
if (rmax>0) rmax = min(n, rmax)-1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (maxregions==0) {
|
if (rmax==0) {
|
||||||
if (dirtyload) break;
|
if (dirtyload) break;
|
||||||
skip = true;
|
skip = true;
|
||||||
}
|
}
|
||||||
if ((n%1024)==0) { /* das spart extrem Zeit */
|
if ((n%1024)==0) { /* das spart extrem Zeit */
|
||||||
printf(" - Einzulesende Regionen: %d/%d ", maxregions, n);
|
printf(" - Einzulesende Regionen: %d/%d ", rmax, n);
|
||||||
printf("* %d,%d \r", x, y);
|
printf("* %d,%d \r", x, y);
|
||||||
}
|
}
|
||||||
if (skip) {
|
if (skip) {
|
||||||
|
@ -871,7 +872,7 @@ readgame(boolean backup)
|
||||||
} while (r && buf[0]!='\n');
|
} while (r && buf[0]!='\n');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
--maxregions;
|
--rmax;
|
||||||
|
|
||||||
r = readregion(F, x, y);
|
r = readregion(F, x, y);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue