From f5b4406f8da894a07a83e6cbc71342a7ea04ad65 Mon Sep 17 00:00:00 2001 From: cohrs Date: Fri, 7 Jun 2002 21:24:52 +0000 Subject: [PATCH] entering discover mode while restoring a game Reported directly to the list. If you are not the wizard and start nethack on the command line with the -D flag (or -X), the game reports that you're entering discover mode but does not actually do it. The flags.explore in the save file overwrote the new value. Save the flag while reading flags if discover mode was requested. --- doc/fixes34.1 | 2 ++ src/restore.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 954cafce7..076364f1c 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -116,6 +116,8 @@ Staff of Aesculapius did not always cure sliming correct singularization of fungi, liches, vortices prevent "remove_object: obj not on floor" panic for iron ball placement if riding while punished leads to a fall off steed when changing levels +specifying -D (or -X) to enter explore mode while restarting from a save + file was lost in the restore process Platform- and/or Interface-Specific Fixes diff --git a/src/restore.c b/src/restore.c index 5522aa042..d7c72c11b 100644 --- a/src/restore.c +++ b/src/restore.c @@ -355,6 +355,8 @@ restgamestate(fd, stuckid, steedid) register int fd; unsigned int *stuckid, *steedid; /* STEED */ { + /* discover is actually flags.explore */ + boolean remember_discover = discover; struct obj *otmp; int uid; @@ -371,6 +373,7 @@ unsigned int *stuckid, *steedid; /* STEED */ mread(fd, (genericptr_t) &flags, sizeof(struct flag)); flags.bypasses = 0; /* never use the saved value of bypasses */ + if (remember_discover) discover = remember_discover; role_init(); /* Reset the initial role, race, gender, and alignment */ #ifdef AMII_GRAPHICS -- 2.40.0