summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/los.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-06 20:39:11 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-06 20:41:29 +0100
commitceb51161c896f17a951b0ba2bbd4b48f8fead13a (patch)
tree6fb22b76e7cda0eeb93e82db1d853f664765fc13 /crawl-ref/source/los.cc
parentf858cfc60235a5cfb86dd2a2c510dde5e130a4bf (diff)
downloadcrawl-ref-ceb51161c896f17a951b0ba2bbd4b48f8fead13a.tar.gz
crawl-ref-ceb51161c896f17a951b0ba2bbd4b48f8fead13a.zip
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).
Diffstat (limited to 'crawl-ref/source/los.cc')
-rw-r--r--crawl-ref/source/los.cc7
1 files changed, 4 insertions, 3 deletions
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);
}