diff options
author | Adam Borowski <kilobyte@angband.pl> | 2010-11-01 13:09:56 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2010-11-01 17:08:12 +0100 |
commit | 735b435cf68caf955c6e4daae6955d9e23c6bd61 (patch) | |
tree | 47edf843d8fff815c55d7faa3f4e83424eedc2a7 /crawl-ref/source/actor-los.cc | |
parent | 9565a76022b7cf2ac271bec55382e7068f5ff4cc (diff) | |
download | crawl-ref-735b435cf68caf955c6e4daae6955d9e23c6bd61.tar.gz crawl-ref-735b435cf68caf955c6e4daae6955d9e23c6bd61.zip |
Fix a crash in tiles with wizard x-ray / Ash scrying out of map bounds.
Diffstat (limited to 'crawl-ref/source/actor-los.cc')
-rw-r--r-- | crawl-ref/source/actor-los.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/actor-los.cc b/crawl-ref/source/actor-los.cc index c2a5bcf8b0..8ea7c31e5f 100644 --- a/crawl-ref/source/actor-los.cc +++ b/crawl-ref/source/actor-los.cc @@ -24,9 +24,11 @@ bool actor::see_cell(const coord_def &p) const bool player::see_cell(const coord_def &p) const { + if (!map_bounds(p)) + return (false); if (crawl_state.game_is_arena() && this == &you) return (true); - else if (xray_vision) + if (xray_vision) return ((pos() - p).abs() <= dist_range(you.current_vision)); return (actor::see_cell(p)); } |