From 48241fae7292d1718e12c4ac8a685259aa65e61c Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 5 May 2002 09:34:36 +0000 Subject: [PATCH] persistente befehle - fix einladen einer einzelnen plane mit -p --- src/common/kernel/save.c | 6 +++++- src/eressea/main.c | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/common/kernel/save.c b/src/common/kernel/save.c index d9770fcf1..054b8bae8 100644 --- a/src/common/kernel/save.c +++ b/src/common/kernel/save.c @@ -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); } diff --git a/src/eressea/main.c b/src/eressea/main.c index 5788fc229..d0059344d 100644 --- a/src/eressea/main.c +++ b/src/eressea/main.c @@ -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