diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index c98cd28e5..d2b0a4964 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1506,6 +1506,7 @@ since introduction in 3.1.0, the definition for Mitre of Holiness has specified no 'defends' capability for it since carrying should encompass that if a tree and a boulder or statue were at the same location, applying an axe would break the boulder or statue rather than chop the tree +avoid premapping outside Sokoban map to prevent showing stone glyphs Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/detect.c b/src/detect.c index cb6dc2458..0d1de0c83 100644 --- a/src/detect.c +++ b/src/detect.c @@ -38,6 +38,7 @@ staticfn void foundone(coordxy, coordxy, int); staticfn void findone(coordxy, coordxy, genericptr_t); staticfn void openone(coordxy, coordxy, genericptr_t); staticfn int mfind0(struct monst *, boolean); +staticfn boolean skip_premap_detect(coordxy, coordxy); staticfn int reveal_terrain_getglyph(coordxy, coordxy, unsigned, int, unsigned); @@ -2117,6 +2118,16 @@ warnreveal(void) } } +/* skip premap detection of areas outside Sokoban map */ +staticfn boolean +skip_premap_detect(coordxy x, coordxy y) +{ + if ((levl[x][y].typ == STONE) + && (levl[x][y].wall_info & (W_NONDIGGABLE | W_NONPASSWALL)) != 0) + return TRUE; + return FALSE; +} + /* Pre-map (the sokoban) levels */ void premap_detect(void) @@ -2128,6 +2139,8 @@ premap_detect(void) /* Map the background and boulders */ for (x = 1; x < COLNO; x++) for (y = 0; y < ROWNO; y++) { + if (skip_premap_detect(x, y)) + continue; levl[x][y].seenv = SVALL; levl[x][y].waslit = TRUE; if (levl[x][y].typ == SDOOR)