From 6bdaccfb8c194bfa0bb0b6769babc3710d570b45 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sun, 8 Nov 2009 16:29:24 +0100 Subject: Move see_cell_no_trans into player. Also collect actor/player LOS code in actor-los.cc. --- crawl-ref/source/los.cc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'crawl-ref/source/los.cc') 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)); } -- cgit v1.2.3-54-g00ecf