Don't place tnt:boom when SHOOTER_ENABLE_BLASTING = false

This commit is contained in:
stujones11 2014-10-01 22:13:54 +01:00
parent a98c348cab
commit fad87d1ed3

View file

@ -355,7 +355,7 @@ function shooter:blast(pos, radius, fleshy, distance, user)
local p1 = vector.subtract(pos, radius) local p1 = vector.subtract(pos, radius)
local p2 = vector.add(pos, radius) local p2 = vector.add(pos, radius)
minetest.sound_play("tnt_explode", {pos=pos, gain=1}) minetest.sound_play("tnt_explode", {pos=pos, gain=1})
if SHOOTER_ALLOW_NODES == true then if SHOOTER_ALLOW_NODES == true and SHOOTER_ENABLE_BLASTING then
if SHOOTER_ENABLE_PROTECTION then if SHOOTER_ENABLE_PROTECTION then
if not minetest.is_protected(pos, name) then if not minetest.is_protected(pos, name) then
minetest.set_node(pos, {name="tnt:boom"}) minetest.set_node(pos, {name="tnt:boom"})