diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-08 16:29:24 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-08 17:01:14 +0100 |
commit | 6bdaccfb8c194bfa0bb0b6769babc3710d570b45 (patch) | |
tree | dce34efa2202539e5a8ea704cdaa46b17fd1969c /crawl-ref/source/misc.cc | |
parent | 19c3c95b8dba465b3efacf8eb96798af69c170fc (diff) | |
download | crawl-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/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 39271c1592..f209c8153f 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1256,7 +1256,7 @@ void search_around(bool only_adjacent) for (radius_iterator ri(you.pos(), max_dist); ri; ++ri ) { // Must have LOS, with no translucent walls in the way. - if (see_cell_no_trans(*ri)) + if (you.see_cell_no_trans(*ri)) { // Maybe we want distance() instead of feat_distance()? int dist = grid_distance(*ri, you.pos()); @@ -2776,12 +2776,12 @@ bool mons_is_safe(const monsters *mon, bool want_move, // Only seen through glass walls or within water? // Assuming that there are no water-only/lava-only // monsters capable of throwing or zapping wands. - || (!see_cell_no_trans(mon->pos()) + || (!you.see_cell_no_trans(mon->pos()) || mons_class_habitat(mon->type) == HT_WATER || mons_class_habitat(mon->type) == HT_LAVA) && !_mons_has_path_to_player(mon) && !mons_has_los_attack(mon) - && (!see_cell_no_trans(mon->pos()) + && (!you.see_cell_no_trans(mon->pos()) || !mons_has_ranged_ability(mon))); #ifdef CLUA_BINDINGS |