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.
This commit is contained in:
cohrs
2002-06-07 21:24:52 +00:00
parent 2e2ce4effa
commit f5b4406f8d
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -116,6 +116,8 @@ Staff of Aesculapius did not always cure sliming
correct singularization of fungi, liches, vortices correct singularization of fungi, liches, vortices
prevent "remove_object: obj not on floor" panic for iron ball placement if 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 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 Platform- and/or Interface-Specific Fixes
+3
View File
@@ -355,6 +355,8 @@ restgamestate(fd, stuckid, steedid)
register int fd; register int fd;
unsigned int *stuckid, *steedid; /* STEED */ unsigned int *stuckid, *steedid; /* STEED */
{ {
/* discover is actually flags.explore */
boolean remember_discover = discover;
struct obj *otmp; struct obj *otmp;
int uid; int uid;
@@ -371,6 +373,7 @@ unsigned int *stuckid, *steedid; /* STEED */
mread(fd, (genericptr_t) &flags, sizeof(struct flag)); mread(fd, (genericptr_t) &flags, sizeof(struct flag));
flags.bypasses = 0; /* never use the saved value of bypasses */ 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 */ role_init(); /* Reset the initial role, race, gender, and alignment */
#ifdef AMII_GRAPHICS #ifdef AMII_GRAPHICS