From: cohrs Date: Wed, 10 Sep 2003 21:11:21 +0000 (+0000) Subject: shopkeeper messages outside the shop X-Git-Tag: MOVE2GIT~1800 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3415b354ab2a9a5c7f3c1c07469e3fb4c95b0d27;p=nethack shopkeeper messages outside the shop 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. --- diff --git a/doc/fixes34.3 b/doc/fixes34.3 index d39d68503..8ae309ed2 100644 --- a/doc/fixes34.3 +++ b/doc/fixes34.3 @@ -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 diff --git a/src/mkmap.c b/src/mkmap.c index 931775cde..ed24ac9d7 100644 --- a/src/mkmap.c +++ b/src/mkmap.c @@ -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);