From 547a7b3304056e186a9f014c80217f98eb694a2d Mon Sep 17 00:00:00 2001 From: paramat Date: Sun, 2 Aug 2015 05:16:01 +0100 Subject: [PATCH] Default/functions: Reduce lavacooling ABM/sound overload --- mods/default/functions.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 6cd25456..fd759275 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -90,19 +90,21 @@ end default.cool_lava_source = function(pos) minetest.set_node(pos, {name = "default:obsidian"}) - minetest.sound_play("default_cool_lava", {pos = pos, gain = 0.25}) + minetest.sound_play("default_cool_lava", + {pos = pos, max_hear_distance = 16, gain = 0.25}) end default.cool_lava_flowing = function(pos) minetest.set_node(pos, {name = "default:stone"}) - minetest.sound_play("default_cool_lava", {pos = pos, gain = 0.25}) + minetest.sound_play("default_cool_lava", + {pos = pos, max_hear_distance = 16, gain = 0.25}) end minetest.register_abm({ nodenames = {"default:lava_flowing"}, neighbors = {"group:water"}, interval = 1, - chance = 1, + chance = 2, action = function(...) default.cool_lava_flowing(...) end, @@ -112,7 +114,7 @@ minetest.register_abm({ nodenames = {"default:lava_source"}, neighbors = {"group:water"}, interval = 1, - chance = 1, + chance = 2, action = function(...) default.cool_lava_source(...) end, -- 2.25.1