From ceb51161c896f17a951b0ba2bbd4b48f8fead13a Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Fri, 6 Nov 2009 20:39:11 +0100 Subject: Replace global see_cell by observe_cell and disambiguate old uses. Calls to plain see_cell(pos) were replaced with either observe_cell(pos) or you.see_cell(pos). observe_cell where related to drawing the interface and messaging, you.see_cell for game mechanics, and one or the other in less clear cases (targetting, say). --- crawl-ref/source/los.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/los.cc') diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc index 5d93a9ef90..543e71b0de 100644 --- a/crawl-ref/source/los.cc +++ b/crawl-ref/source/los.cc @@ -1031,8 +1031,9 @@ bool see_cell(const env_show_grid &show, return (false); } -// Answers the question: "Is a cell within character's line of sight?" -bool see_cell(const coord_def &p) +// Answers the question: Is the cell visible to the observer? +// Usually the same as player LOS. +bool observe_cell(const coord_def &p) { return (((crawl_state.arena || crawl_state.arena_suspended) && crawl_view.in_grid_los(p)) @@ -1049,5 +1050,5 @@ bool see_cell_no_trans(const coord_def &p) // Is the cell visible, but a translucent wall is in the way? bool trans_wall_blocking(const coord_def &p) { - return see_cell(p) && !see_cell_no_trans(p); + return you.see_cell(p) && !see_cell_no_trans(p); } -- cgit v1.2.3-54-g00ecf