]> granicus.if.org Git - nethack/commitdiff
shopkeeper messages outside the shop
authorcohrs <cohrs>
Wed, 10 Sep 2003 21:11:21 +0000 (21:11 +0000)
committercohrs <cohrs>
Wed, 10 Sep 2003 21:11:21 +0000 (21:11 +0000)
remove_rooms() was trying to be clever and truncate the maximum room bounds
in partially overlapping rooms.  In the process, it would truncate the
bounds of L shaped rooms incorrectly, leaving some locations outside the
bounds with the roomno field set.  Since the maximum bounds really do not
have to actually match the largest extent of the room in the case of
irregular rooms, it was easiest to just remove the code that was performing
the incorrect truncation.  Due to the way remove_room() is coded, this
could result in shopkeeper messages (or, less likely, priest messages,
although that has not been reported yet) occuring for locations to the
right (or the upper/lower right corner) of the MAP on the Bustling Town level.

doc/fixes34.3
src/mkmap.c

index d39d68503c41f081be515bc9e742776e503fc3f4..8ae309ed283d11314f9a1dadb0350cad104fd801 100644 (file)
@@ -11,6 +11,8 @@ you could exceed the limits on nazgul and erinys counts via bones files
 fix inconsistency where you can't kick something out of a pit, but you can
        escape the pit and still pick it up; items are now assumed to be at 
        the bottom of pit
+room cleanup, eg on Bustling Town, could incorrectly truncate room bounds
+       for rooms that become L shared due to partial overlap with the MAP
 
 
 Platform- and/or Interface-Specific Fixes
index 931775cde772fcb8244b0fa14459574529aa756a..ed24ac9d7f2dc43606a59e22c8f2412336a86e27 100644 (file)
@@ -388,18 +388,6 @@ remove_rooms(lx, ly, hx, hy)
            /* TODO: ensure remaining parts of room are still joined */
 
            if (!croom->irregular) impossible("regular room in joined map");
-
-           /* if a "donut" or even disconnected room, leave bounds alone */
-           if ((croom->lx < lx && croom->hx >= hx) ||
-               (croom->ly < ly && croom->hy >= hy)) {
-               continue;
-           }
-
-           /* truncate the side(s) that are covered by the region */
-           if (croom->lx < lx && croom->hx < hx) croom->hx = lx - 1;
-           if (croom->lx >= lx && croom->hx >= hx) croom->lx = hx;
-           if (croom->ly < ly && croom->hy < hy) croom->hy = ly - 1;
-           if (croom->ly >= ly && croom->hy >= hy) croom->ly = hy;
        } else {
            /* total overlap, remove the room */
            remove_room((unsigned)i);