fix sound pos bug

This commit is contained in:
tenplus1 2025-01-01 07:49:29 +00:00
parent f71fc25ee6
commit 5427f59dcc

View File

@ -45,7 +45,8 @@ minetest.register_node("moonflower:moonflower_closed", {
text_col .. S(">>> You can suddenly see much clearer in the moonlight!"))
minetest.sound_play("default_place_node", {
pitch = 1.4, pos = pos, gain = 1.0, max_hear_distance = 5}, true)
pitch = 1.4, pos = player:get_pos(), gain = 1.0,
max_hear_distance = 5}, true)
minetest.after(moonflower.interval, function(player)
@ -57,7 +58,8 @@ minetest.register_node("moonflower:moonflower_closed", {
text_col .. S(">>> Your vision returns to normal!"))
minetest.sound_play("default_place_node", {
pitch = 1.2, pos = pos, gain = 1.0, max_hear_distance = 5}, true)
pitch = 1.2, pos = player:get_pos(), gain = 1.0,
max_hear_distance = 5}, true)
end
end, player)