From cf4f35ea410a7cb87d96f4cee1de0da0197c71b5 Mon Sep 17 00:00:00 2001 From: copperwater Date: Sun, 24 May 2020 14:59:50 -0400 Subject: [PATCH] Fix: irregular rooms' walls were not part of the room This was leading to problems with special themed rooms which were irregular. Walls of ordinary rooms count as part of the room, and irregular rooms should be no different. This also makes doors on the room edge be considered as part of the room, which affected special room entry messages and filling. All irregular rooms' walls getting marked as SHARED instead of their own room is probably a latent bug in upstream NetHack, but will prevent future issues for when/if themed rooms that involve special rooms/subrooms get added. --- src/mkmap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mkmap.c b/src/mkmap.c index 96e97a333..14f7973d8 100644 --- a/src/mkmap.c +++ b/src/mkmap.c @@ -193,7 +193,10 @@ boolean anyroom; levl[ii][jj].edge = 1; if (lit) levl[ii][jj].lit = lit; - if ((int) levl[ii][jj].roomno != rmno) + + if (levl[ii][jj].roomno == NO_ROOM) + levl[ii][jj].roomno = rmno; + else if ((int) levl[ii][jj].roomno != rmno) levl[ii][jj].roomno = SHARED; } } -- 2.50.1