From 1c53c4993c873e8ca12a445991fa65e17d7a47d1 Mon Sep 17 00:00:00 2001 From: mogami Date: Thu, 16 Oct 2003 19:03:49 +0000 Subject: [PATCH] =?utf8?q?=E5=9F=8E=E3=81=AE=E3=83=80=E3=83=B3=E3=82=B8?= =?utf8?q?=E3=83=A7=E3=83=B3(NO=5FCAVE)=E3=81=A7=E3=80=81=E9=83=A8?= =?utf8?q?=E5=B1=8B=E3=81=AE=E9=85=8D=E7=BD=AE=E6=B3=95=E3=82=92=E5=A4=89?= =?utf8?q?=E6=9B=B4=E3=80=82find=5Fspace()=E5=86=85=E3=81=A7=E9=85=8D?= =?utf8?q?=E7=BD=AE=E4=BD=8D=E7=BD=AE=E3=81=AE=E5=80=99=E8=A3=9C=E3=81=AE?= =?utf8?q?=E4=B8=AD=E3=81=8B=E3=82=89=E5=B8=B8=E3=81=AB=E7=9C=9F=E3=82=93?= =?utf8?q?=E4=B8=AD=E3=81=AE1=E3=81=A4=E3=82=92=E9=81=B8=E3=81=B6=E4=BA=8B?= =?utf8?q?=E3=81=A7=E3=80=81=E3=83=95=E3=83=AD=E3=82=A2=E3=81=8C=E3=81=8B?= =?utf8?q?=E3=81=AA=E3=82=8A=E7=A7=A9=E5=BA=8F=E7=AB=8B=E3=81=A3=E3=81=9F?= =?utf8?q?=E9=85=8D=E7=BD=AE=E3=81=AB=E3=81=AA=E3=82=8B=E3=82=88=E3=81=86?= =?utf8?q?=E3=81=AB=E3=81=97=E3=81=9F=E3=80=82(=E9=80=9A=E5=B8=B8=E3=81=AF?= =?utf8?q?=E5=80=99=E8=A3=9C=E3=81=AE=E4=B8=AD=E3=81=8B=E3=82=89=E3=83=A9?= =?utf8?q?=E3=83=B3=E3=83=80=E3=83=A0=E3=81=AB=E9=81=B8=E3=81=B6=E3=80=82)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/rooms.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/rooms.c b/src/rooms.c index b783f40bd..eec7f4b83 100644 --- a/src/rooms.c +++ b/src/rooms.c @@ -373,8 +373,19 @@ static bool find_space(int *y, int *x, int height, int width) return FALSE; } - /* Choose a random one */ - pick = randint1(candidates); + /* Normal dungeon */ + if (!(d_info[dungeon_type].flags1 & DF1_NO_CAVE)) + { + /* Choose a random one */ + pick = randint1(candidates); + } + + /* NO_CAVE dungeon (Castle) */ + else + { + /* Always choose the center one */ + pick = candidates/2 + 1; + } /* Pick up the choosen location */ for (block_y = dun->row_rooms - blocks_high; block_y >= 0; block_y--) -- 2.11.0