OSDN Git Service

変数distの場所の変更.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 9 Jul 2003 13:08:31 +0000 (13:08 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 9 Jul 2003 13:08:31 +0000 (13:08 +0000)
src/mspells2.c

index e53b240..a5b573f 100644 (file)
@@ -386,13 +386,13 @@ bool monst_spell_monst(int m_idx)
                        {
                                int real_y = y;
                                int real_x = x;
-                               int dist;
 
                                get_project_point(m_ptr->fy, m_ptr->fx, &real_y, &real_x, 0L);
-                               dist = distance(real_y, real_x, py, px);
 
                                if (los(real_y, real_x, py, px))
                                {
+                                       int dist = distance(real_y, real_x, py, px);
+
                                        if (dist <= 2)
                                        {
                                                f4 &= ~(RF4_BALL_MASK & ~(RF4_ROCKET));