0
0
Fork 0

Fix eating/drinking sounds to user

This commit is contained in:
Wuzzy 2019-09-24 18:17:27 +02:00
parent dfe68e6820
commit 21317aa7c7
1 changed files with 2 additions and 2 deletions

View File

@ -145,10 +145,10 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisontime, poiso
if foodtype == 3 then if foodtype == 3 then
-- Item is a drink, only play drinking sound (no particle) -- Item is a drink, only play drinking sound (no particle)
minetest.sound_play("survival_thirst_drink", { minetest.sound_play("survival_thirst_drink", {
pos = pos,
max_hear_distance = 12, max_hear_distance = 12,
gain = 1.0, gain = 1.0,
pitch = 1 + math.random(-10, 10)*0.005, pitch = 1 + math.random(-10, 10)*0.005,
object = user,
}) })
else else
-- Assume the item is a food -- Assume the item is a food
@ -184,10 +184,10 @@ function mcl_hunger.item_eat(hunger_change, replace_with_item, poisontime, poiso
}) })
end end
minetest.sound_play("mcl_hunger_bite", { minetest.sound_play("mcl_hunger_bite", {
pos = pos,
max_hear_distance = 12, max_hear_distance = 12,
gain = 1.0, gain = 1.0,
pitch = 1 + math.random(-10, 10)*0.005, pitch = 1 + math.random(-10, 10)*0.005,
object = user,
}) })
end end