From e151a8d14e0bf5a582090efaddbb48154dd08c4f Mon Sep 17 00:00:00 2001 From: deskull Date: Wed, 12 Jun 2019 08:30:49 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#39076=20=E5=86=97=E9=95=B7?= =?utf8?q?=E3=81=AA=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92=E5=89=8A?= =?utf8?q?=E9=99=A4=20(/*=20Skip=20illegal=20grids=20*/)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/object2.c | 1 - src/spells2.c | 4 ---- src/trap.c | 1 - 3 files changed, 6 deletions(-) diff --git a/src/object2.c b/src/object2.c index 10724e523..bd6885a3a 100644 --- a/src/object2.c +++ b/src/object2.c @@ -4639,7 +4639,6 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION ty = y + dy; tx = x + dx; - /* Skip illegal grids */ if (!in_bounds(ty, tx)) continue; /* Require line of projection */ diff --git a/src/spells2.c b/src/spells2.c index b687ccdd6..b9ccad051 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -1398,7 +1398,6 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate) { for (x = (x1 - r); x <= (x1 + r); x++) { - /* Skip illegal grids */ if (!in_bounds(y, x)) continue; /* Extract the distance */ @@ -1567,7 +1566,6 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate) { for (x = (x1 - r); x <= (x1 + r); x++) { - /* Skip illegal grids */ if (!in_bounds(y, x)) continue; /* Extract the distance */ @@ -1697,7 +1695,6 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx) yy = cy + dy; xx = cx + dx; - /* Skip illegal grids */ if (!in_bounds(yy, xx)) continue; /* Skip distant grids */ @@ -2036,7 +2033,6 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx) yy = cy + dy; xx = cx + dx; - /* Skip illegal grids */ if (!in_bounds(yy, xx)) continue; /* Skip distant grids */ diff --git a/src/trap.c b/src/trap.c index 529c4e4c0..2ffd9476a 100644 --- a/src/trap.c +++ b/src/trap.c @@ -611,7 +611,6 @@ void hit_trap(bool break_trap) POSITION x1 = rand_spread(x, 7); POSITION y1 = rand_spread(y, 5); - /* Skip illegal grids */ if (!in_bounds(y1, x1)) continue; /* Require line of projection */ -- 2.11.0