From 8dce94ddbd1ea4c0cdc23bdd7528af4ecd50f3fa Mon Sep 17 00:00:00 2001 From: nothere Date: Wed, 15 Oct 2003 14:39:37 +0000 Subject: [PATCH] =?utf8?q?cave=5Fempty=5Fbold2()=E5=86=85=E3=81=A7?= =?utf8?q?=E3=81=AE=E6=AF=94=E8=BC=83=E3=81=A8=E5=90=8C=E3=81=98=E3=81=93?= =?utf8?q?=E3=81=A8=E3=82=922=E9=87=8D=E3=81=AB=E6=AF=94=E8=BC=83=E3=81=99?= =?utf8?q?=E3=82=8B=E9=83=A8=E5=88=86=E3=81=AE=E5=89=8A=E9=99=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/cmd5.c | 2 +- src/monster2.c | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/cmd5.c b/src/cmd5.c index 432791a1a..8290af803 100644 --- a/src/cmd5.c +++ b/src/cmd5.c @@ -5582,7 +5582,7 @@ bool do_riding(bool force) if (p_ptr->riding) { /* Skip non-empty grids */ - if (!cave_empty_bold2(y, x) || c_ptr->m_idx) + if (!cave_empty_bold2(y, x)) { #ifdef JP msg_print("¤½¤Á¤é¤Ë¤Ï¹ß¤ê¤é¤ì¤Þ¤»¤ó¡£"); diff --git a/src/monster2.c b/src/monster2.c index a57cd0da4..989c3f26c 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -2917,7 +2917,8 @@ byte get_mspeed(monster_race *r_ptr) */ static bool place_monster_one(int who, int y, int x, int r_idx, u32b mode) { - cave_type *c_ptr; + /* Access the location */ + cave_type *c_ptr = &cave[y][x]; monster_type *m_ptr; @@ -2932,10 +2933,10 @@ static bool place_monster_one(int who, int y, int x, int r_idx, u32b mode) if (!in_bounds(y, x)) return (FALSE); /* Require empty space (if not ghostly) */ - if (!(!dun_level && (cave[y][x].feat == FEAT_MOUNTAIN) && ((r_ptr->flags8 & RF8_WILD_MOUNTAIN) || (r_ptr->flags7 & RF7_CAN_FLY))) && + if (!(!dun_level && (c_ptr->feat == FEAT_MOUNTAIN) && ((r_ptr->flags8 & RF8_WILD_MOUNTAIN) || (r_ptr->flags7 & RF7_CAN_FLY))) && !(cave_empty_bold2(y, x) || (mode & PM_IGNORE_TERRAIN)) && !((r_ptr->flags2 & RF2_PASS_WALL) && - !(cave_perma_bold(y, x) || cave[y][x].m_idx || + !(cave_perma_bold(y, x) || c_ptr->m_idx || player_bold(y, x)))) return (FALSE); /* Paranoia */ @@ -2945,12 +2946,12 @@ static bool place_monster_one(int who, int y, int x, int r_idx, u32b mode) if (!r_ptr->name) return (FALSE); /* Nor on the Pattern */ - if ((cave[y][x].feat >= FEAT_PATTERN_START) - && (cave[y][x].feat <= FEAT_PATTERN_XTRA2)) + if ((c_ptr->feat >= FEAT_PATTERN_START) + && (c_ptr->feat <= FEAT_PATTERN_XTRA2)) return (FALSE); if (!(mode & PM_IGNORE_TERRAIN) && - !monster_can_cross_terrain(cave[y][x].feat, r_ptr)) + !monster_can_cross_terrain(c_ptr->feat, r_ptr)) { return FALSE; } @@ -3009,9 +3010,6 @@ static bool place_monster_one(int who, int y, int x, int r_idx, u32b mode) } } - /* Access the location */ - c_ptr = &cave[y][x]; - if (is_glyph_grid(c_ptr)) { if (randint1(BREAK_GLYPH) < (r_ptr->level+20)) @@ -3422,8 +3420,6 @@ static bool mon_scatter(int *yp, int *xp, int y, int x, int max_dist) /* Walls and Monsters block flow */ if (!cave_empty_bold2(ny, nx)) continue; - if (cave[ny][nx].m_idx) continue; - if (player_bold(ny, nx)) continue; /* ... nor on the Pattern */ if ((cave[ny][nx].feat >= FEAT_PATTERN_START) && -- 2.11.0