OSDN Git Service

Change location of setting CAVE_KNOWN flag
authorhabu <habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 21 Feb 2013 11:26:49 +0000 (11:26 +0000)
committerhabu <habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 21 Feb 2013 11:26:49 +0000 (11:26 +0000)
Location of setting CAVE_KNOWN flag is changed from cave_lite_hack()
and cave_view_hack() to note_spot().
note_spot() is better place than before, and it works well when
playing Ninja.

src/cave.c

index 4e31970..5cc3058 100644 (file)
@@ -1528,6 +1528,9 @@ void note_spot(int y, int x)
                        c_ptr->info |= (CAVE_MARK);
                }
        }
+
+       /* Memorize terrain of the grid */
+       c_ptr->info |= (CAVE_KNOWN);
 }
 
 
@@ -2540,7 +2543,7 @@ void forget_lite(void)
 {\
        if (!(cave[Y][X].info & (CAVE_LITE))) \
        { \
-               cave[Y][X].info |= (CAVE_LITE | CAVE_KNOWN); \
+               cave[Y][X].info |= (CAVE_LITE); \
                lite_y[lite_n] = (Y); \
                lite_x[lite_n++] = (X); \
        } \
@@ -3358,7 +3361,6 @@ void forget_view(void)
 {\
     if (!((C)->info & (CAVE_VIEW))){\
     (C)->info |= (CAVE_VIEW); \
-    if ((C)->info & (CAVE_GLOW)) (C)->info |= (CAVE_KNOWN); \
     view_y[view_n] = (Y); \
     view_x[view_n] = (X); \
     view_n++;}\