From bbb1a2402335d7b11ea898d371933a3ef0c638d5 Mon Sep 17 00:00:00 2001 From: mogami Date: Mon, 7 Jul 2003 09:42:36 +0000 Subject: [PATCH] =?utf8?q?gcc=E3=81=AE=E3=83=AF=E3=83=BC=E3=83=8B=E3=83=B3?= =?utf8?q?=E3=82=B0=E5=AF=BE=E7=AD=96=E3=81=A7=E6=9B=B8=E3=81=8D=E6=8F=9B?= =?utf8?q?=E3=81=88=E3=80=82=20=E3=83=AB=E3=83=BC=E3=83=97=E4=B8=AD?= =?utf8?q?=E3=81=A7=E5=88=9D=E3=82=81=E3=81=A6=E4=BB=A3=E5=85=A5=E3=81=95?= =?utf8?q?=E3=82=8C=E3=82=8B=E5=A4=89=E6=95=B0=E3=82=92=E3=80=81=E5=A4=96?= =?utf8?q?=E3=81=A7=E4=BD=BF=E3=81=86=E3=81=A8=E6=9C=AA=E5=AE=9A=E7=BE=A9?= =?utf8?q?=E3=81=A8=E5=8C=BA=E5=88=A5=E3=81=8C=E4=BB=98=E3=81=8B=E3=81=9A?= =?utf8?q?=E3=80=81=20=E3=83=AF=E3=83=BC=E3=83=8B=E3=83=B3=E3=82=B0?= =?utf8?q?=E3=81=8C=E5=87=BA=E3=82=8B=E3=81=AE=E3=81=A7=E9=81=BF=E3=81=91?= =?utf8?q?=E3=82=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/spells3.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/spells3.c b/src/spells3.c index 37cedfa05..d2971084b 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -148,7 +148,6 @@ void teleport_monster_to(int m_idx, int ty, int tx, int power) int attempts = 500; int dis = 2; bool look = TRUE; - cave_type *c_ptr; monster_type *m_ptr = &m_list[m_idx]; @@ -178,6 +177,8 @@ void teleport_monster_to(int m_idx, int ty, int tx, int power) /* Try several locations */ for (i = 0; i < 500; i++) { + cave_type *c_ptr; + /* Pick a (possibly illegal) location */ while (1) { @@ -226,7 +227,7 @@ void teleport_monster_to(int m_idx, int ty, int tx, int power) sound(SOUND_TPOTHER); /* Update the new location */ - c_ptr->m_idx = m_idx; + cave[ny][nx].m_idx = m_idx; /* Update the old location */ cave[oy][ox].m_idx = 0; @@ -520,7 +521,6 @@ msg_print(" void teleport_level(int m_idx) { bool go_up; - monster_type *m_ptr; char m_name[160]; bool see_m = TRUE; @@ -534,7 +534,7 @@ void teleport_level(int m_idx) } else /* To monster */ { - m_ptr = &m_list[m_idx]; + monster_type *m_ptr = &m_list[m_idx]; /* Get the monster name (or "it") */ monster_desc(m_name, m_ptr, 0); @@ -683,6 +683,8 @@ void teleport_level(int m_idx) /* Monster level teleportation is simple deleting now */ if (m_idx > 0) { + monster_type *m_ptr = &m_list[m_idx]; + /* Check for quest completion */ check_quest_completion(m_ptr); -- 2.11.0