From 6e68a036f077ab547407e72e19dbe47781e555f8 Mon Sep 17 00:00:00 2001 From: deskull Date: Sun, 3 Nov 2019 08:16:55 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#38997=20next=5Fmirror()=20?= =?utf8?q?=E3=81=AB=20player=5Ftype=20*=20=E5=BC=95=E6=95=B0=E3=82=92?= =?utf8?q?=E8=BF=BD=E5=8A=A0=EF=BC=8E=20/=20Add=20player=5Ftype=20*=20argu?= =?utf8?q?ment=20to=20next=5Fmirror().?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/spells1.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/spells1.c b/src/spells1.c index e36063514..10017af33 100644 --- a/src/spells1.c +++ b/src/spells1.c @@ -201,18 +201,18 @@ const magic_type technic_info[NUM_TECHNIC][32] = * @param cury 現在の鏡のy座標 * @param curx 現在の鏡のx座標 */ -static void next_mirror(POSITION* next_y, POSITION* next_x, POSITION cury, POSITION curx) +static void next_mirror(player_type *creature_ptr, POSITION* next_y, POSITION* next_x, POSITION cury, POSITION curx) { POSITION mirror_x[10], mirror_y[10]; /* 鏡はもっと少ない */ int mirror_num = 0; /* 鏡の数 */ POSITION x, y; int num; - for (x = 0; x < p_ptr->current_floor_ptr->width; x++) + for (x = 0; x < creature_ptr->current_floor_ptr->width; x++) { - for (y = 0; y < p_ptr->current_floor_ptr->height; y++) + for (y = 0; y < creature_ptr->current_floor_ptr->height; y++) { - if (is_mirror_grid(&p_ptr->current_floor_ptr->grid_array[y][x])) { + if (is_mirror_grid(&creature_ptr->current_floor_ptr->grid_array[y][x])) { mirror_y[mirror_num] = y; mirror_x[mirror_num] = x; mirror_num++; @@ -5801,7 +5801,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da monster_target_x = x; remove_mirror(y, x); - next_mirror(&oy, &ox, y, x); + next_mirror(p_ptr, &oy, &ox, y, x); path_n = i + project_path(&(path_g[i + 1]), (project_length ? project_length : MAX_RANGE), y, x, oy, ox, flg); for (j = last_i; j <= i; j++) -- 2.11.0