Code: Select all
Index: game/engines/default/engine/interface/ActorProject.lua
===================================================================
--- game/engines/default/engine/interface/ActorProject.lua (revision 2410)
+++ game/engines/default/engine/interface/ActorProject.lua (working copy)
@@ -85,6 +85,7 @@
end
if typ.ball and typ.ball > 0 then
core.fov.calc_circle(radius_x, radius_y, typ.ball, function(_, px, py)
+ if not game.level.map(px, py) then return true end
-- Deal damage: ball
addGrid(px, py)
if typ.block_radius and typ:block_radius(px, py) then return true end
@@ -92,6 +93,7 @@
addGrid(lx, ly)
elseif typ.cone and typ.cone > 0 then
core.fov.calc_beam(radius_x, radius_y, typ.cone, initial_dir, typ.cone_angle, function(_, px, py)
+ if not game.level.map(px, py) then return true end
-- Deal damage: cone
addGrid(px, py)
if typ.block_radius and typ:block_radius(px, py) then return true end
@@ -250,6 +252,7 @@
if typ.ball and typ.ball > 0 then
core.fov.calc_circle(rx, ry, typ.ball, function(_, px, py)
+ if not game.level.map(px, py) then return true end
-- Deal damage: ball
addGrid(px, py)
if typ.block_radius and typ:block_radius(px, py) then return true end
@@ -258,6 +261,7 @@
elseif typ.cone and typ.cone > 0 then
local initial_dir = lx and util.getDir(lx, ly, x, y) or 5
core.fov.calc_beam(rx, ry, typ.cone, initial_dir, typ.cone_angle, function(_, px, py)
+ if not game.level.map(px, py) then return true end
-- Deal damage: cone
addGrid(px, py)
if typ.block_radius and typ:block_radius(px, py) then return true end