diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-09-05 15:42:21 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-09-05 15:42:21 +0200 |
commit | 08addcdbc69564dad9373f3b5bee906de956cc88 (patch) | |
tree | fd7e8ed38a1fb818372ff85be69828b78a3c93d0 /crawl-ref/source/losglobal.cc | |
parent | d1be8d8da1f0db2214d888616b14cdfe663ccf5d (diff) | |
download | crawl-ref-08addcdbc69564dad9373f3b5bee906de956cc88.tar.gz crawl-ref-08addcdbc69564dad9373f3b5bee906de956cc88.zip |
Straighten the two cell_see_cell() confusion.
There were two functions: one used no cache and ignored clouds, another one
has a cache and accepts different LOS models.
I added a new cached model: LOS_SOLID (using opc_solid). All but one uses
of opc_fullyopaque (two-argument cell_see_cell()) were bugs to me, so they
were moved to a different model.
This makes Refrigeration not work through glass walls anymore (it still
works though clouds).
Diffstat (limited to 'crawl-ref/source/losglobal.cc')
-rw-r--r-- | crawl-ref/source/losglobal.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/losglobal.cc b/crawl-ref/source/losglobal.cc index 27be7fb388..2ed15d574d 100644 --- a/crawl-ref/source/losglobal.cc +++ b/crawl-ref/source/losglobal.cc @@ -87,6 +87,13 @@ static void _update_globallos_at(const coord_def& p, los_type l) _save_los(&los, l); break; } + case LOS_SOLID: + { + los_def los(p, opc_solid); + los.update(); + _save_los(&los, l); + break; + } default: die("invalid opacity"); } |