summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_los.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-09-05 15:42:21 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-09-05 15:42:21 +0200
commit08addcdbc69564dad9373f3b5bee906de956cc88 (patch)
treefd7e8ed38a1fb818372ff85be69828b78a3c93d0 /crawl-ref/source/l_los.cc
parentd1be8d8da1f0db2214d888616b14cdfe663ccf5d (diff)
downloadcrawl-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/l_los.cc')
-rw-r--r--crawl-ref/source/l_los.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/l_los.cc b/crawl-ref/source/l_los.cc
index 18ad20d8e9..3b1e92b471 100644
--- a/crawl-ref/source/l_los.cc
+++ b/crawl-ref/source/l_los.cc
@@ -11,6 +11,7 @@
#include "coord.h"
#include "libutil.h"
#include "los.h"
+#include "losglobal.h"
#include "ray.h"
#define RAY_METATABLE "dgn.ray"
@@ -55,7 +56,7 @@ LUAFN(los_cell_see_cell)
{
COORDS(p, 1, 2);
COORDS(q, 3, 4);
- PLUARET(number, cell_see_cell(p, q));
+ PLUARET(number, cell_see_cell(p, q, LOS_DEFAULT));
}
const struct luaL_reg los_dlib[] =