From 55feae7ad1a59e34c094c769feefdf43f64b810f Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 29 Apr 2016 18:32:46 -0700 Subject: [PATCH] unseen-monster vs pool of water From a bug report sent directly to devteam 16-Jan-2015 (subject: "NH343 (NAO version) - display bug"), if the hero was blind and levitating and searched next to 'I' (text) or '?' (tiles) which was displayed on top of a known pool and the remembered unseen monster was no longer there, the 'I'/'?' was removed but the spot was redrawn as floor rather than water. --- doc/fixes36.1 | 3 +++ src/display.c | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index c623afba..b36485f0 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -224,6 +224,9 @@ sortloot changed to place diluted potion of foo after potion of foo instead of listing all diluted potions followed by all non-diluted ones digging down on a grave converted the terrain to floor but did not create a pit and uncover the grave's contents; digging again--on floor--did +when feel_location removed a remembered-unseen-monster glyph from a known + water location while hero was levitating, the map was redrawn showing + floor instead of water at that spot post-3.6.0: fix "object lost" panic during pickup caused by sortloot revamp post-3.6.0: more sortloot revisions diff --git a/src/display.c b/src/display.c index 48101d43..e804aaf5 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 display.c $NHDT-Date: 1457207034 2016/03/05 19:43:54 $ $NHDT-Branch: chasonr $:$NHDT-Revision: 1.82 $ */ +/* NetHack 3.6 display.c $NHDT-Date: 1461979957 2016/04/30 01:32:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.83 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ @@ -572,6 +572,8 @@ xchar x, y; } else if (IS_DOOR(lev->typ)) { map_background(x, y, 1); } else if (IS_ROOM(lev->typ) || IS_POOL(lev->typ)) { + boolean do_room_glyph; + /* * An open room or water location. Normally we wouldn't touch * this, but we have to get rid of remembered boulder symbols. @@ -597,20 +599,18 @@ xchar x, y; * We could also just display what is currently on the top of the * object stack (if anything). */ - if (lev->glyph == objnum_to_glyph(BOULDER)) { - if (lev->typ != ROOM && lev->seenv) { + do_room_glyph = FALSE; + if (lev->glyph == objnum_to_glyph(BOULDER) + || glyph_is_invisible(lev->glyph)) { + if (lev->typ != ROOM && lev->seenv) map_background(x, y, 1); - } else { - lev->glyph = (flags.dark_room && iflags.use_color - && !Is_rogue_level(&u.uz)) - ? cmap_to_glyph(S_darkroom) - : (lev->waslit ? cmap_to_glyph(S_room) - : cmap_to_glyph(S_stone)); - show_glyph(x, y, lev->glyph); - } - } else if ((lev->glyph >= cmap_to_glyph(S_stone) - && lev->glyph < cmap_to_glyph(S_darkroom)) - || glyph_is_invisible(levl[x][y].glyph)) { + else + do_room_glyph = TRUE; + } else if (lev->glyph >= cmap_to_glyph(S_stone) + && lev->glyph < cmap_to_glyph(S_darkroom)) { + do_room_glyph = TRUE; + } + if (do_room_glyph) { lev->glyph = (flags.dark_room && iflags.use_color && !Is_rogue_level(&u.uz)) ? cmap_to_glyph(S_darkroom) -- 2.11.4.GIT