Fix blowing up TNT near worldedit markers

This commit is contained in:
sfan5 2016-10-12 19:38:41 +02:00
parent 5abe1cee3d
commit df6b54d2f5

@ -153,7 +153,11 @@ minetest.register_entity(":worldedit:region_cube", {
end
end,
on_punch = function(self, hitter)
for _, entity in ipairs(worldedit.marker_region[self.player_name]) do
local markers = worldedit.marker_region[self.player_name]
if not markers then
return
end
for _, entity in ipairs(markers) do
entity:remove()
end
worldedit.marker_region[self.player_name] = nil