From 487f1f7ccc4cf0af89954c000a1b3b76d70f366a Mon Sep 17 00:00:00 2001 From: Patric Mueller Date: Thu, 8 Sep 2022 09:23:57 +0200 Subject: [PATCH] room stocking would put multiple items on the same spot --- doc/fixes3-7-0.txt | 1 + src/mklev.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 803503437..479fc5c57 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1020,6 +1020,7 @@ lit candles generated by wishing could have wrong light radius better feedback from detect unseen make public server admin messages use urgent_pline cannot kick while squeezed on top of a boulder +room stocking would put multiple items on the same spot Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/mklev.c b/src/mklev.c index 2316f4521..38a7e882d 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -838,7 +838,9 @@ fill_ordinary_room(struct mkroom *croom) impossible("trycnt overflow4"); break; } - (void) mkobj_at(RANDOM_CLASS, pos.x, pos.y, TRUE); + if (somexyspace(croom, &pos)) { + (void) mkobj_at(RANDOM_CLASS, pos.x, pos.y, TRUE); + } } } }