mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-28 05:43:00 +00:00
Fix fence gate sounds being heard globally
This commit is contained in:
parent
3584995293
commit
6577af3f11
1 changed files with 2 additions and 2 deletions
|
@ -100,11 +100,11 @@ mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups,
|
|||
local tmp_node2
|
||||
if state2 == 1 then
|
||||
state2 = 0
|
||||
minetest.sound_play(sound_close, {gain = sound_gain_close, max_hear_distance = 10})
|
||||
minetest.sound_play(sound_close, {gain = sound_gain_close, max_hear_distance = 10, pos = pos})
|
||||
tmp_node2 = {name=gate_id, param1=node.param1, param2=node.param2}
|
||||
else
|
||||
state2 = 1
|
||||
minetest.sound_play(sound_open, {gain = sound_gain_open, max_hear_distance = 10})
|
||||
minetest.sound_play(sound_open, {gain = sound_gain_open, max_hear_distance = 10, pos = pos})
|
||||
tmp_node2 = {name=open_gate_id, param1=node.param1, param2=node.param2}
|
||||
end
|
||||
update_gate(pos, tmp_node2)
|
||||
|
|
Loading…
Reference in a new issue