From 4c9ee2c0245be98c0e781c984da2954fc2e44041 Mon Sep 17 00:00:00 2001 From: nothere Date: Sun, 8 Feb 2004 14:51:11 +0000 Subject: [PATCH] =?utf8?q?=E3=83=86=E3=83=AC=E3=83=9D=E3=83=BC=E3=83=88?= =?utf8?q?=E5=85=88=E5=80=99=E8=A3=9C=E3=81=8C1=E3=83=9E=E3=82=B9=E3=81=97?= =?utf8?q?=E3=81=8B=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88=E3=81=ABcur=5Fcand?= =?utf8?q?idates=20=3D=3D=200=E3=81=AE=E7=8A=B6=E6=85=8B=E3=81=A7=E5=85=A8?= =?utf8?q?=E5=80=99=20=E8=A3=9C=E3=81=AE50%=E4=BB=A5=E4=B8=8A=E3=81=A8?= =?utf8?q?=E8=A6=8B=E3=81=AA=E3=81=95=E3=82=8C,=20=E3=83=80=E3=83=B3?= =?utf8?q?=E3=82=B8=E3=83=A7=E3=83=B3=E3=81=AE=E5=A4=96=E5=A3=81=E3=82=92?= =?utf8?q?=E5=90=AB=E3=82=80=E4=B8=8D=E6=AD=A3=E3=81=AA=E4=BD=8D=E7=BD=AE?= =?utf8?q?=E3=81=AB=E3=83=86=E3=83=AC=E3=83=9D=E3=83=BC=E3=83=88=E3=81=97?= =?utf8?q?=20=E3=81=A6=E5=A4=89=E6=84=9A=E8=9B=AE=E6=80=92=E3=81=8C?= =?utf8?q?=E8=90=BD=E3=81=A1=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=8C=E3=81=82?= =?utf8?q?=E3=82=8B=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3.=20?= =?utf8?q?=E3=81=BE=E3=81=9F,=20teleport=5Fplayer=5Faux()=E3=81=A7=20?= =?utf8?q?=E3=81=AE2=E7=95=AA=E7=9B=AE=E3=81=AEcave=5Fplayer=5Fteleportabl?= =?utf8?q?e=5Fbold()=E3=81=AE=E5=BC=95=E6=95=B0nonmagical=E3=81=8CFALSE?= =?utf8?q?=E5=9B=BA=E5=AE=9A=20=E3=81=A0=E3=81=A3=E3=81=9F=E3=83=90?= =?utf8?q?=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/spells3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spells3.c b/src/spells3.c index 2a0da695e..ebc603394 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -379,7 +379,7 @@ bool teleport_player_aux(int dis, bool passive, bool nonmagical) cur_candidates += candidates_at[min]; /* 50% of all candidates will have an equal chance to be choosen. */ - if (cur_candidates >= total_candidates / 2) break; + if (cur_candidates && (cur_candidates >= total_candidates / 2)) break; } /* Pick up a single location randomly */ @@ -393,7 +393,7 @@ bool teleport_player_aux(int dis, bool passive, bool nonmagical) int d; /* Skip illegal locations */ - if (!cave_player_teleportable_bold(y, x, passive, FALSE)) continue; + if (!cave_player_teleportable_bold(y, x, passive, nonmagical)) continue; /* Calculate distance */ d = distance(py, px, y, x); -- 2.11.0