]> granicus.if.org Git - nethack/commitdiff
fix github issue #483 - map display while engulfed
authorPatR <rankin@nethack.org>
Thu, 1 Apr 2021 20:43:21 +0000 (13:43 -0700)
committerPatR <rankin@nethack.org>
Thu, 1 Apr 2021 20:43:21 +0000 (13:43 -0700)
Report raises two issues:
1) if you perform magic mapping while engulfed (or underwater) the
map got updated and player could view it with cursor+autodescribe,
but when done viewing it did not switch back to the limited engulfed
(or underwater) display.
2) when picking a teleport destination while engulfed/underwater you
have to pick the spot while seeing only the limited view of the map
that is shown while engulfed/underwater.

This fixes #1.  I'm inclined to classify #2 as traditional behavior
and am not going to try to figure out a fix for it.

Fixes #483

doc/fixes37.0
src/detect.c

index fa7704cd84b213e46c9e4d45616c9eda13b49885..0db05901e2e3a6a5e40e4ff6ac79a884125b04dc 100644 (file)
@@ -434,6 +434,8 @@ attempt to make corpse or statue of a named player character would yield that
        of a random monster instead when 'record' was empty; could result in
        statues of non-stonable creatures in cockatrice nests
 homemade tin of very low nutrition corpse gave more nutrition than the corpse
+magic mapping performed while engulfed or underwater would display whole map
+       but then not switch back to the engulfed or underwater restricted view
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 1f8c5515eb00253a2726c3b72eabefcb205b7155..8c4edb1c136408cd6189639f206698ef32b3ade1 100644 (file)
@@ -1334,9 +1334,12 @@ do_mapping(void)
         /* browse_map() instead of display_nhwindow(WIN_MAP, TRUE) */
         browse_map(TER_DETECT | TER_MAP | TER_TRP | TER_OBJ,
                    "anything of interest");
-        docrt();
+        map_redisplay(); /* calls reconstrain_map() and docrt() */
+    } else {
+        /* we only get here when unconstrained is False, so reconstrain_map
+           will be a no-op; call it anyway */
+        reconstrain_map();
     }
-    reconstrain_map();
     exercise(A_WIS, TRUE);
 }