Fix ancient subroom location bug

Randomly placed subrooms were never generated touching
the right or bottom walls of the parent room.

This bug has been present since at least 3.1.0
This commit is contained in:
Pasi Kallinen
2023-01-23 19:41:29 +02:00
parent ae6bb2420b
commit 83eaa85dd8
3 changed files with 4 additions and 3 deletions

View File

@@ -197,7 +197,6 @@ themerooms = {
end,
-- Room in a room
-- FIXME: subroom location is too often left/top?
function()
des.room({ type = "ordinary", filled = 1,
contents = function()

View File

@@ -1092,6 +1092,8 @@ polymorphing into fire elemental allows you eat flammable items
hitting sleeping monsters will cause them to wake up noisily
demon gating happens more in Gehennom and less outside it
intelligent peacefuls avoid digging shop or temple walls
fix bug making random subrooms never touching the right or bottom
wall of the parent room
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -1648,9 +1648,9 @@ create_subroom(
if (h == -1)
h = rnd(height - 3);
if (x == -1)
x = rnd(width - w - 1) - 1;
x = rnd(width - w);
if (y == -1)
y = rnd(height - h - 1) - 1;
y = rnd(height - h);
if (x == 1)
x = 0;
if (y == 1)