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

View File

@@ -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