mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 16:09:33 +01:00
Fix missing place sound when placing last torch
This commit is contained in:
parent
f9effa6082
commit
4157d52811
1 changed files with 3 additions and 2 deletions
|
@ -91,7 +91,9 @@ mcl_torches.register_torch = function(substring, description, icon, mesh_floor,
|
|||
end
|
||||
end
|
||||
|
||||
local fakestack = itemstack
|
||||
local itemstring = itemstack:get_name()
|
||||
local fakestack = ItemStack(itemstack)
|
||||
local idef = fakestack:get_definition()
|
||||
local retval
|
||||
|
||||
if wdir == 0 then
|
||||
|
@ -109,7 +111,6 @@ mcl_torches.register_torch = function(substring, description, icon, mesh_floor,
|
|||
itemstack, success = minetest.item_place(fakestack, placer, pointed_thing, wdir)
|
||||
itemstack:set_name(itemstring)
|
||||
|
||||
local idef = itemstack:get_definition()
|
||||
if success and idef.sounds and idef.sounds.place then
|
||||
minetest.sound_play(idef.sounds.place, {pos=under, gain=1})
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue