persistente befehle - fix

einladen einer einzelnen plane mit -p
This commit is contained in:
Enno Rehling 2002-05-05 09:34:36 +00:00
parent bcdcd556dd
commit 48241fae72
2 changed files with 10 additions and 1 deletions

View File

@ -578,6 +578,8 @@ inner_world(region * r)
}
int maxregions = -1;
int loadplane = 0;
boolean dirtyload = false;
enum {
@ -843,6 +845,7 @@ readgame(boolean backup)
boolean skip = false;
int x = ri(F);
int y = ri(F);
plane * pl = findplane(x, y);
if (firstx && firsty) {
if (x!=firstx || y!=firsty) {
@ -853,6 +856,7 @@ readgame(boolean backup)
if (rmax>0) rmax = min(n, rmax)-1;
}
}
if (loadplane && (!pl || pl->id!=loadplane)) skip = true;
if (rmax==0) {
if (dirtyload) break;
skip = true;
@ -1037,7 +1041,7 @@ readgame(boolean backup)
if(findfaction(0)) {
findfaction(0)->alive = 1;
}
if (maxregions>=0) {
if (loadplane || maxregions>=0) {
remove_empty_factions(false);
}

View File

@ -100,6 +100,8 @@ extern boolean nobattle;
extern boolean nobattledebug;
extern boolean dirtyload;
extern int loadplane;
extern void debug_messagetypes(FILE * out);
extern void free_region(region * r);
extern void render_init(void);
@ -526,6 +528,9 @@ read_args(int argc, char **argv)
if (i<argc) orders = argv[++i];
else return usage(argv[0], argv[i]);
break;
case 'p':
loadplane = atoi(argv[++i]);
break;
case 'x':
maxregions = atoi(argv[++i]);
maxregions = (maxregions*81+80) / 81;