]> granicus.if.org Git - nethack/commitdiff
Fix: irregular rooms' walls were not part of the room
authorcopperwater <aosdict@gmail.com>
Sun, 24 May 2020 18:59:50 +0000 (14:59 -0400)
committerPasi Kallinen <paxed@alt.org>
Mon, 28 Sep 2020 17:00:12 +0000 (20:00 +0300)
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

index 96e97a3333b3804e6ef839e79b11da9ff11d20f0..14f7973d8749e63de450e8c0052c030a55fc8b43 100644 (file)
@@ -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;
                     }
         }