summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/l_los.cc8
-rw-r--r--crawl-ref/source/luadgn.cc9
-rw-r--r--crawl-ref/source/test/los_csc.lua4
3 files changed, 10 insertions, 11 deletions
diff --git a/crawl-ref/source/l_los.cc b/crawl-ref/source/l_los.cc
index 1ac2f9a3c7..b6e3463b89 100644
--- a/crawl-ref/source/l_los.cc
+++ b/crawl-ref/source/l_los.cc
@@ -34,9 +34,17 @@ LUAFN(los_find_ray)
return (0);
}
+LUAFN(los_cell_see_cell)
+{
+ COORDS(p, 1, 2);
+ COORDS(q, 3, 4);
+ PLUARET(number, cell_see_cell(p, q));
+}
+
const struct luaL_reg los_lib[] =
{
{ "findray", los_find_ray },
+ { "cell_see_cell", los_cell_see_cell },
{ NULL, NULL }
};
diff --git a/crawl-ref/source/luadgn.cc b/crawl-ref/source/luadgn.cc
index 5e7a366039..b34853f3c0 100644
--- a/crawl-ref/source/luadgn.cc
+++ b/crawl-ref/source/luadgn.cc
@@ -2989,13 +2989,6 @@ LUAFN(dgn_dismiss_monsters)
luaL_checkstring(ls, 1)));
}
-LUAFN(dgn_cell_see_cell)
-{
- COORDS(p, 1, 2);
- COORDS(q, 3, 4);
- PLUARET(number, cell_see_cell(p, q));
-}
-
LUAWRAP(_dgn_reset_level, dgn_reset_level())
static const struct luaL_reg dgn_lib[] =
@@ -3151,8 +3144,6 @@ static const struct luaL_reg dgn_lib[] =
{ "lev_floortile", dgn_lev_floortile },
{ "lev_rocktile", dgn_lev_rocktile },
- { "cell_see_cell", dgn_cell_see_cell },
-
{ NULL, NULL }
};
diff --git a/crawl-ref/source/test/los_csc.lua b/crawl-ref/source/test/los_csc.lua
index 499511a6c2..b54d251d8f 100644
--- a/crawl-ref/source/test/los_csc.lua
+++ b/crawl-ref/source/test/los_csc.lua
@@ -18,8 +18,8 @@ local function test_cellseecell_symmetry()
for x = -9, 9 do
local px, py = x + you_x, y + you_y
if (x ~= 0 or y ~= 0) and dgn.in_bounds(px, py) then
- local foreward = dgn.cell_see_cell(you_x, you_y, px, py)
- local backward = dgn.cell_see_cell(px, py, you_x, you_y)
+ local foreward = los.cell_see_cell(you_x, you_y, px, py)
+ local backward = los.cell_see_cell(px, py, you_x, you_y)
this_p = dgn.point(you_x, you_y)
other_p = dgn.point(px, py)
if not forward then