OSDN Git Service

忍者は暗闇の洞窟で地形やアイテムが丸見えだったが, モンスターがこれに
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 20 Jun 2003 14:34:35 +0000 (14:34 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 20 Jun 2003 14:34:35 +0000 (14:34 +0000)
合っていなかったため, MAX_SIGHT範囲のモンスターも見えるように修正.

src/cave.c
src/monster2.c

index a8c6212..b59d8a3 100644 (file)
@@ -3190,6 +3190,9 @@ void update_mon_lite(void)
 
        s16b end_temp;
 
+       /* Non-Ninja player in the darkness */
+       bool in_darkness = (d_info[dungeon_type].flags1 & DF1_DARKNESS) && (p_ptr->see_nocto < MAX_SIGHT);
+
        /* Clear all monster lit squares */
        for (i = 0; i < mon_lite_n; i++)
        {
@@ -3216,7 +3219,7 @@ void update_mon_lite(void)
                if (!m_ptr->r_idx) continue;
 
                /* Is it too far away? */
-               if (m_ptr->cdis > ((d_info[dungeon_type].flags1 & DF1_DARKNESS) ? MAX_SIGHT / 2 + 1 : MAX_SIGHT + 3)) continue;
+               if (m_ptr->cdis > (in_darkness ? MAX_SIGHT / 2 + 1 : MAX_SIGHT + 3)) continue;
 
                /* Get lite radius */
                rad = 0;
index ca6df59..910df90 100644 (file)
@@ -2367,6 +2367,9 @@ void update_mon(int m_idx, bool full)
        /* Seen by vision */
        bool easy = FALSE;
 
+       /* Non-Ninja player in the darkness */
+       bool in_darkness = (d_info[dungeon_type].flags1 & DF1_DARKNESS) && (p_ptr->see_nocto < MAX_SIGHT);
+
        /* Do disturb? */
        if (disturb_high)
        {
@@ -2408,9 +2411,9 @@ void update_mon(int m_idx, bool full)
 
 
        /* Nearby */
-       if (d <= ((d_info[dungeon_type].flags1 & DF1_DARKNESS) ? MAX_SIGHT / 2 : MAX_SIGHT))
+       if (d <= (in_darkness ? MAX_SIGHT / 2 : MAX_SIGHT))
        {
-               if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS) || (d <= MAX_SIGHT / 4))
+               if (!in_darkness || (d <= MAX_SIGHT / 4))
                {
                        if (p_ptr->special_defense & KATA_MUSOU)
                        {