summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/los.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-08 16:29:24 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-08 17:01:14 +0100
commit6bdaccfb8c194bfa0bb0b6769babc3710d570b45 (patch)
treedce34efa2202539e5a8ea704cdaa46b17fd1969c /crawl-ref/source/los.cc
parent19c3c95b8dba465b3efacf8eb96798af69c170fc (diff)
downloadcrawl-ref-6bdaccfb8c194bfa0bb0b6769babc3710d570b45.tar.gz
crawl-ref-6bdaccfb8c194bfa0bb0b6769babc3710d570b45.zip
Move see_cell_no_trans into player.
Also collect actor/player LOS code in actor-los.cc.
Diffstat (limited to 'crawl-ref/source/los.cc')
-rw-r--r--crawl-ref/source/los.cc14
1 files changed, 1 insertions, 13 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc
index c3d06066f5..909ed97922 100644
--- a/crawl-ref/source/los.cc
+++ b/crawl-ref/source/los.cc
@@ -929,12 +929,7 @@ void losight_permissive(env_show_grid &sh, const coord_def& center)
void calc_show_los()
{
if (!crawl_state.arena && !crawl_state.arena_suspended)
- {
you.update_los();
- // What would be visible, if all of the translucent walls were
- // made opaque.
- losight(env.no_trans_show, you.pos(), opc_no_trans);
- }
}
bool see_cell(const env_show_grid &show,
@@ -963,15 +958,8 @@ bool observe_cell(const coord_def &p)
|| you.see_cell(p));
}
-// Answers the question: "Would a cell be within character's line of sight,
-// even if all translucent/clear walls were made opaque?"
-bool see_cell_no_trans(const coord_def &p)
-{
- return see_cell(env.no_trans_show, you.pos(), p);
-}
-
// Is the cell visible, but a translucent wall is in the way?
bool trans_wall_blocking(const coord_def &p)
{
- return you.see_cell(p) && !see_cell_no_trans(p);
+ return (you.see_cell(p) && !you.see_cell_no_trans(p));
}