forked from github/server
persistente befehle - fix
einladen einer einzelnen plane mit -p
This commit is contained in:
parent
bcdcd556dd
commit
48241fae72
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue