]> granicus.if.org Git - nethack/commitdiff
Fix birth statistics for pets after #wizmakemap
authorPasi Kallinen <paxed@alt.org>
Tue, 31 Mar 2020 17:19:29 +0000 (20:19 +0300)
committerPasi Kallinen <paxed@alt.org>
Tue, 31 Mar 2020 17:19:33 +0000 (20:19 +0300)
src/cmd.c

index bd62da96cfd085ea37ad3340d54dff8acd4d436d..eebfee01ddf7fa117c647f9c9cad89a15c9b680d 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -778,6 +778,10 @@ boolean pre, wiztower;
     struct monst *mtmp;
 
     if (pre) {
+        /* keep steed and other adjacent pets after releasing them
+           from traps, stopping eating, &c as if hero were ascending */
+        keepdogs(TRUE); /* (pets-only; normally we'd be using 'FALSE' here) */
+
         rm_mapseen(ledger_no(&u.uz));
         for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
             int ndx = monsndx(mtmp->data);
@@ -833,9 +837,6 @@ boolean pre, wiztower;
         u.uinwater = 0;
         u.uundetected = 0; /* not hidden, even if means are available */
         dmonsfree(); /* purge dead monsters from 'fmon' */
-        /* keep steed and other adjacent pets after releasing them
-           from traps, stopping eating, &c as if hero were ascending */
-        keepdogs(TRUE); /* (pets-only; normally we'd be using 'FALSE' here) */
 
         /* discard current level; "saving" is used to release dynamic data */
         zero_nhfile(&tmpnhfp);  /* also sets fd to -1 as desired */