Skip to content
Snippets Groups Projects
Commit 8c9c2d37 authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@3115 51575b47-30f0-44d4-a5cc-537603b46e54
parent 8565ba29
No related branches found
No related tags found
No related merge requests found
......@@ -857,7 +857,7 @@ function core.fov.circle_grids(x, y, radius, block)
core.fov.calc_circle(x, y, game.level.map.w, game.level.map.h, radius, function(_, lx, ly)
if block and game.level.map:checkEntity(lx, ly, engine.Map.TERRAIN, "block_move") then return true end
end,
function()
function(_, lx, ly)
if not grids[lx] then grids[lx] = {} end
grids[lx][ly] = true
end, nil)
......@@ -875,7 +875,7 @@ function core.fov.beam_grids(x, y, radius, dir, angle, block)
core.fov.calc_beam(x, y, game.level.map.w, game.level.map.h, radius, dir, angle, function(_, lx, ly)
if block and game.level.map:checkEntity(lx, ly, engine.Map.TERRAIN, "block_move") then return true end
end,
function()
function(_, lx, ly)
if not grids[lx] then grids[lx] = {} end
grids[lx][ly] = true
end, nil)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment