From 5903e1f1464ed204a2ca6893cadca55cf1286a46 Mon Sep 17 00:00:00 2001 From: habu Date: Thu, 21 Feb 2013 11:26:49 +0000 Subject: [PATCH] Change location of setting CAVE_KNOWN flag 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cave.c b/src/cave.c index 4e31970fa..5cc3058dc 100644 --- a/src/cave.c +++ b/src/cave.c @@ -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++;}\ -- 2.11.0