]> granicus.if.org Git - nethack/commitdiff
Prevent impossible with secret doors in sokoban
authorPasi Kallinen <paxed@alt.org>
Fri, 23 Jul 2021 17:52:38 +0000 (20:52 +0300)
committerPasi Kallinen <paxed@alt.org>
Fri, 23 Jul 2021 17:58:45 +0000 (20:58 +0300)
Doesn't currently happen as no Soko levels use secret doors,
but handle them anyway gracefully.

Secret doors have their doormask set, but it's overloaded wall_info.
The display routines aren't happy with D_CLOSED in wall_info.

src/detect.c

index 8c4edb1c136408cd6189639f206698ef32b3ade1..c251c047d86069c32fd72c2cc64da3da48475748 100644 (file)
@@ -1851,6 +1851,8 @@ sokoban_detect(void)
         for (y = 0; y < ROWNO; y++) {
             levl[x][y].seenv = SVALL;
             levl[x][y].waslit = TRUE;
+            if (levl[x][y].typ == SDOOR)
+                levl[x][y].wall_info = 0; /* see rm.h for explanation */
             map_background(x, y, 1);
             if ((obj = sobj_at(BOULDER, x, y)) != 0)
                 map_object(obj, 1);