mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 15:00:18 +01:00
TNT centre node adheres to protection
Make sure tnt.boom() doesnt replace centre node when explode_centre is true and ignore_protection is false. Fixes: https://github.com/minetest/minetest_game/issues/2663
This commit is contained in:
parent
0648252056
commit
7cac67f097
@ -408,7 +408,7 @@ function tnt.boom(pos, def)
|
||||
def.damage_radius = def.damage_radius or def.radius * 2
|
||||
local meta = minetest.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
if not def.explode_center then
|
||||
if not def.explode_center and def.ignore_protection ~= true then
|
||||
minetest.set_node(pos, {name = "tnt:boom"})
|
||||
end
|
||||
local sound = def.sound or "tnt_explode"
|
||||
|
Loading…
Reference in New Issue
Block a user