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.
This commit is contained in:
@@ -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
|
||||
|
||||
12
src/mkmap.c
12
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);
|
||||
|
||||
Reference in New Issue
Block a user