OSDN Git Service

scatter()、ネmon_scatter()、ホlos()、rojectable()、ヒハムケケ.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 6 Dec 2003 04:27:45 +0000 (04:27 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 6 Dec 2003 04:27:45 +0000 (04:27 +0000)
src/cave.c
src/monster2.c

index 519459f..aac2272 100644 (file)
@@ -4848,8 +4848,8 @@ void scatter(int *yp, int *xp, int y, int x, int d, int m)
                /* Ignore "excessively distant" locations */
                if ((d > 1) && (distance(y, x, ny, nx) > d)) continue;
 
-               /* Require "line of sight" */
-               if (los(y, x, ny, nx)) break;
+               /* Require "line of projection" */
+               if (projectable(y, x, ny, nx)) break;
        }
 
        /* Save the location */
index cc89031..6979431 100644 (file)
@@ -3416,8 +3416,8 @@ static bool mon_scatter(int r_idx, int *yp, int *xp, int y, int x, int max_dist)
                        /* Ignore annoying locations */
                        if (!in_bounds(ny, nx)) continue;
 
-                       /* Require "line of sight" */
-                       if (!los(y, x, ny, nx)) continue;
+                       /* Require "line of projection" */
+                       if (!projectable(y, x, ny, nx)) continue;
 
                        if (r_idx > 0)
                        {
@@ -3431,7 +3431,7 @@ static bool mon_scatter(int r_idx, int *yp, int *xp, int y, int x, int max_dist)
                        {
                                /* Walls and Monsters block flow */
                                if (!cave_empty_bold2(ny, nx)) continue;
-                               
+
                                /* ... nor on the Pattern */
                                if (pattern_tile(ny, nx)) continue;
                        }
@@ -3444,7 +3444,7 @@ static bool mon_scatter(int r_idx, int *yp, int *xp, int y, int x, int max_dist)
                        num[i]++;
 
                        /* random swap */
-                       if(one_in_(num[i]))
+                       if (one_in_(num[i]))
                        {
                                place_x[i] = nx;
                                place_y[i] = ny;