Make explosions respect SHOOTER_ALLOW_NODES setting
This commit is contained in:
parent
da6d0640e9
commit
eba57b4152
1 changed files with 6 additions and 1 deletions
|
@ -343,7 +343,9 @@ function shooter:blast(pos, radius, fleshy, distance)
|
|||
local p1 = vector.subtract(pos, radius)
|
||||
local p2 = vector.add(pos, radius)
|
||||
minetest.sound_play("tnt_explode", {pos=pos, gain=1})
|
||||
if SHOOTER_ALLOW_NODES == true then
|
||||
minetest.set_node(pos, {name="tnt:boom"})
|
||||
end
|
||||
if SHOOTER_ENABLE_PARTICLE_FX == true then
|
||||
minetest.add_particlespawner(50, 0.1,
|
||||
p1, p2, {x=-0, y=-0, z=-0}, {x=0, y=0, z=0},
|
||||
|
@ -371,6 +373,9 @@ function shooter:blast(pos, radius, fleshy, distance)
|
|||
end
|
||||
end
|
||||
end
|
||||
if SHOOTER_ALLOW_NODES == false then
|
||||
return
|
||||
end
|
||||
local pr = PseudoRandom(os.time())
|
||||
local vm = VoxelManip()
|
||||
local min, max = vm:read_from_map(p1, p2)
|
||||
|
|
Loading…
Reference in a new issue