From 6577af3f11fe90b0d5ed3a6f12559082bff35dcc Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 23 Jul 2017 22:25:25 +0200 Subject: [PATCH] Fix fence gate sounds being heard globally --- mods/ITEMS/mcl_fences/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_fences/init.lua b/mods/ITEMS/mcl_fences/init.lua index d6aff9a4ba..e8ec01b788 100644 --- a/mods/ITEMS/mcl_fences/init.lua +++ b/mods/ITEMS/mcl_fences/init.lua @@ -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)