mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
Added security in invtweak in case node breakers dig nodes
This commit is contained in:
parent
4b2944e11b
commit
eafe217291
@ -272,7 +272,7 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
|
||||
local new = item:get_wear()
|
||||
|
||||
if old ~= new then
|
||||
if old > 0 and new == 0 then
|
||||
if old and old > 0 and new == 0 then
|
||||
wielded.wear[name] = new
|
||||
minetest.sound_play("invtweak_tool_break", {
|
||||
pos = digger:getpos(),
|
||||
|
Loading…
Reference in New Issue
Block a user