From: copperwater Date: Sun, 24 May 2020 18:59:50 +0000 (-0400) Subject: Fix: irregular rooms' walls were not part of the room X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf4f35ea410a7cb87d96f4cee1de0da0197c71b5;p=nethack 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. --- 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; } }