mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-07-30 01:12:25 +01:00
Merge pull request #1352 from NeroOneTrueKing/patch-fix-maze_add_rooms-impossible
Fix mazerooms being unable to place a door
This commit is contained in:
commit
9b940dc3a0
1 changed files with 8 additions and 1 deletions
|
@ -947,7 +947,14 @@ int maxsize;
|
|||
hy = roompos.y + height;
|
||||
|
||||
/* validate location */
|
||||
if (!rectangle_in_mazewalk_area(lx, ly, hx, hy)) {
|
||||
if (!rectangle_in_mazewalk_area(lx, ly, hx, hy) || /* room itself has to fit */
|
||||
(
|
||||
/* a slightly larger room must also fit, to guarantee we can connect it into the larger maze */
|
||||
!rectangle_in_mazewalk_area(lx - 2, ly, hx, hy) &&
|
||||
!rectangle_in_mazewalk_area(lx, ly - 2, hx, hy) &&
|
||||
!rectangle_in_mazewalk_area(lx, ly, hx + 2, hy) &&
|
||||
!rectangle_in_mazewalk_area(lx, ly, hx, hy + 2)
|
||||
)) {
|
||||
/* can't place, out of bounds */
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue