We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d103426 commit d8082b8Copy full SHA for d8082b8
mods/ctf/ctf_landmine/init.lua
@@ -159,12 +159,16 @@ core.register_node("ctf_landmine:landmine", {
159
160
add_landmine(pos, name, pteam)
161
end,
162
- on_punch = function(pos, _node, puncher, pointed_thing)
+ on_punch = function(pos, node, puncher, pointed_thing)
163
pos = pos:round()
164
local hash = core.hash_node_position(pos)
165
166
- if not is_self_landmine(puncher, landmines[hash]) then
167
- landmine_explode(pos)
+ if landmines[hash] then
+ if not is_self_landmine(puncher, landmines[hash]) then
168
+ landmine_explode(pos)
169
+ end
170
+ elseif node.name == "ctf_landmine:landmine" then
171
+ core.remove_node(pos)
172
end
173
174
on_dig = function(pos, node, digger)
0 commit comments