From: PatR Date: Thu, 1 Apr 2021 20:43:21 +0000 (-0700) Subject: fix github issue #483 - map display while engulfed X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dcdce2aab1621403ad031a5bf0f52a6138cf3d7b;p=nethack fix github issue #483 - map display while engulfed 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 --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index fa7704cd8..0db05901e 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -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 diff --git a/src/detect.c b/src/detect.c index 1f8c5515e..8c4edb1c1 100644 --- a/src/detect.c +++ b/src/detect.c @@ -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); }