From 77d1aa4f46923bd8a55fe60f3169ffbb53c17d0c Mon Sep 17 00:00:00 2001 From: Hourier Date: Fri, 3 Sep 2021 20:58:50 +0900 Subject: [PATCH] [Refactor] #1444 Removed player_has_los_grid() and replaced it to is_view() --- src/grid/feature.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/grid/feature.cpp b/src/grid/feature.cpp index 6f7b86577..5b2027c7f 100644 --- a/src/grid/feature.cpp +++ b/src/grid/feature.cpp @@ -192,12 +192,6 @@ FEAT_IDX feat_jammed_door_random(int door_type) } /* - * Determine if a "legal" grid is within "los" of the player * - * Note the use of comparison to zero to force a "boolean" result - */ -static bool player_has_los_grid(grid_type *g_ptr) { return (g_ptr->info & CAVE_VIEW) != 0; } - -/* * Change the "feat" flag for a grid, and notice/redraw the grid */ void cave_set_feat(player_type *player_ptr, POSITION y, POSITION x, FEAT_IDX feat) @@ -259,7 +253,7 @@ void cave_set_feat(player_type *player_ptr, POSITION y, POSITION x, FEAT_IDX fea cc_ptr = &floor_ptr->grid_array[yy][xx]; cc_ptr->info |= CAVE_GLOW; - if (player_has_los_grid(cc_ptr)) { + if (cc_ptr->is_view()) { if (cc_ptr->m_idx) update_monster(player_ptr, cc_ptr->m_idx, false); note_spot(player_ptr, yy, xx); -- 2.11.0