From 4b7692789f0d248a80317d17969da5836083eb62 Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Sun, 30 Oct 2022 19:01:14 -0400 Subject: [PATCH] hardcode choppy sound for backwards compatibility --- api.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api.lua b/api.lua index c7ec19d..cc14ce4 100644 --- a/api.lua +++ b/api.lua @@ -1367,12 +1367,12 @@ end ---@param damage number|integer ---@return boolean function XBowsEntityDef.on_punch(self, selfObj, puncher, time_from_last_punch, tool_capabilities, dir, damage) - local wood_sound_def = minetest.global_exists('default') and default.node_sound_wood_defaults() or nil + local pos = selfObj.object:get_pos() - if wood_sound_def then - minetest.sound_play(wood_sound_def.dig.name, { - pos = selfObj.object:get_pos(), - gain = wood_sound_def.dig.gain + if pos then + minetest.sound_play('default_dig_choppy', { + pos = pos, + gain = 0.4 }) end