From c2393344b7cd861d4b9b56c96e70fe64fb4d1fad Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Fri, 29 Jul 2022 12:17:47 -0400 Subject: [PATCH] Don't show corridors as lit in #terrain Because back_to_glyph assumes the hero can directly see the spot, when used for #terrain (e.g. when a spot was covered by a remembered object) it would display corridors as lit if lit_corridor was enabled. Instead of trying to suppress back_to_glyph's S_litcorr result only under circumstances where it would be unusual, just show all corridor spots with S_corr, so that none of them appear as "lit corridor". This is consistent with what is already done for room spots for #terrain (S_darkroom is forced to the basic S_room across the board). --- src/detect.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/detect.c b/src/detect.c index 4336222dd..78311aa13 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1981,8 +1981,11 @@ reveal_terrain_getglyph(coordxy x, coordxy y, int full, unsigned swallowed, } } } + /* FIXME: dirty hack */ if (glyph == cmap_to_glyph(S_darkroom)) - glyph = cmap_to_glyph(S_room); /* FIXME: dirty hack */ + glyph = cmap_to_glyph(S_room); + else if (glyph == cmap_to_glyph(S_litcorr)) + glyph = cmap_to_glyph(S_corr); return glyph; }