diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-12-15 23:14:31 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-12-15 23:16:51 +0100 |
commit | 8ebc43ee9846018f1828a0c757a8a9094db08dc2 (patch) | |
tree | 11601285f1da0b1341dc670cfaa0e89be01f2599 /crawl-ref/source/target.cc | |
parent | 3381686bf661ac2af3c41bc418f5d5bd80dbfb4b (diff) | |
download | crawl-ref-8ebc43ee9846018f1828a0c757a8a9094db08dc2.tar.gz crawl-ref-8ebc43ee9846018f1828a0c757a8a9094db08dc2.zip |
Limit cloud spells to caster's LOS.
Diffstat (limited to 'crawl-ref/source/target.cc')
-rw-r--r-- | crawl-ref/source/target.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/target.cc b/crawl-ref/source/target.cc index 82bd85dd9f..6a5f43235c 100644 --- a/crawl-ref/source/target.cc +++ b/crawl-ref/source/target.cc @@ -571,6 +571,9 @@ bool targetter_cloud::set_aim(coord_def a) for (adjacent_iterator ai(c); ai; ++ai) if (_cloudable(*ai) && !seen.count(*ai)) { + if (agent && !cell_see_cell(*ai, agent->pos(), LOS_NO_TRANS)) + continue; + unsigned int d2 = d1 + ((*ai - c).abs() == 1 ? 5 : 7); if (d2 >= queue.size()) queue.resize(d2 + 1); |