OSDN Git Service

find_hiding()のplayer_has_los_grid()をprojectable()に置き換え忘れてい
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 27 Nov 2003 14:11:21 +0000 (14:11 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 27 Nov 2003 14:11:21 +0000 (14:11 +0000)
て, 透明な壁の近くで集団の自然界モンスターがそのまま歩いてくるように
なるバグを修正.

src/melee2.c

index ac12138..d32bf98 100644 (file)
@@ -1021,8 +1021,6 @@ static bool find_hiding(int m_idx, int *yp, int *xp)
        int gy = 0, gx = 0, gdis = 999;
 
        sint *y_offsets, *x_offsets;
-       
-       cave_type *c_ptr;
 
        /* Start with adjacent locations, spread further */
        for (d = 1; d < 10; d++)
@@ -1038,17 +1036,15 @@ static bool find_hiding(int m_idx, int *yp, int *xp)
                {
                        y = fy + dy;
                        x = fx + dx;
-                       
+
                        /* Skip illegal locations */
                        if (!in_bounds(y, x)) continue;
 
-                       c_ptr = &cave[y][x];
-
                        /* Skip occupied locations */
                        if (!monster_can_enter(y, x, r_ptr, 0)) continue;
 
                        /* Check for hidden, available grid */
-                       if (!player_has_los_grid(c_ptr) && clean_shot(fy, fx, y, x, FALSE))
+                       if (!projectable(py, px, y, x) && clean_shot(fy, fx, y, x, FALSE))
                        {
                                /* Calculate distance from player */
                                dis = distance(y, x, py, px);