From 21317aa7c7d39ba5e84eb175d34ceee54c315a82 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 24 Sep 2019 18:17:27 +0200 Subject: [PATCH] Fix eating/drinking sounds to user --- mods/PLAYER/mcl_hunger/hunger.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/PLAYER/mcl_hunger/hunger.lua b/mods/PLAYER/mcl_hunger/hunger.lua index 7d7306bd04..eacec1bc5d 100644 --- a/mods/PLAYER/mcl_hunger/hunger.lua +++ b/mods/PLAYER/mcl_hunger/hunger.lua @@ -145,10 +145,10 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisontime, poiso if foodtype == 3 then -- Item is a drink, only play drinking sound (no particle) minetest.sound_play("survival_thirst_drink", { - pos = pos, max_hear_distance = 12, gain = 1.0, pitch = 1 + math.random(-10, 10)*0.005, + object = user, }) else -- Assume the item is a food @@ -184,10 +184,10 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisontime, poiso }) end minetest.sound_play("mcl_hunger_bite", { - pos = pos, max_hear_distance = 12, gain = 1.0, pitch = 1 + math.random(-10, 10)*0.005, + object = user, }) end