OSDN Git Service

replace realm_subinfo's char[n] to cptr
[hengband/hengband.git] / src / cave.c
index ed4496a..4e31970 100644 (file)
@@ -2540,7 +2540,7 @@ void forget_lite(void)
 {\
        if (!(cave[Y][X].info & (CAVE_LITE))) \
        { \
-               cave[Y][X].info |= (CAVE_LITE); \
+               cave[Y][X].info |= (CAVE_LITE | CAVE_KNOWN); \
                lite_y[lite_n] = (Y); \
                lite_x[lite_n++] = (X); \
        } \
@@ -3358,6 +3358,7 @@ 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++;}\
@@ -4304,6 +4305,9 @@ void map_area(int range)
 
                        c_ptr = &cave[y][x];
 
+                       /* Memorize terrain of the grid */
+                       c_ptr->info |= (CAVE_KNOWN);
+
                        /* Feature code (applying "mimic" field) */
                        feat = get_feat_mimic(c_ptr);
                        f_ptr = &f_info[feat];
@@ -4392,6 +4396,9 @@ void wiz_lite(bool ninja)
                {
                        cave_type *c_ptr = &cave[y][x];
 
+                       /* Memorize terrain of the grid */
+                       c_ptr->info |= (CAVE_KNOWN);
+
                        /* Feature code (applying "mimic" field) */
                        feat = get_feat_mimic(c_ptr);
                        f_ptr = &f_info[feat];
@@ -4471,7 +4478,7 @@ void wiz_dark(void)
                        cave_type *c_ptr = &cave[y][x];
 
                        /* Process the grid */
-                       c_ptr->info &= ~(CAVE_MARK | CAVE_IN_DETECT);
+                       c_ptr->info &= ~(CAVE_MARK | CAVE_IN_DETECT | CAVE_KNOWN);
                        c_ptr->info |= (CAVE_UNSAFE);
                }
        }
@@ -4505,6 +4512,9 @@ void wiz_dark(void)
                o_ptr->marked &= OM_TOUCHED;
        }
 
+       /* Forget travel route when we have forgotten map */
+       forget_travel_flow();
+
        /* Mega-Hack -- Forget the view and lite */
        p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
 
@@ -5047,7 +5057,7 @@ void disturb(int stop_search, int stop_travel)
        }
 
 #ifdef TRAVEL
-       if (stop_travel < 1)
+       if (stop_travel)
        {
                /* Cancel */
                travel.run = 0;