From 8d58bd51cd1a48b6e82b75a1452f8a0b8ed9f6cb Mon Sep 17 00:00:00 2001 From: Blockhead Date: Sun, 1 Nov 2020 17:34:13 +1100 Subject: Workaround to destroy looping sounds Needed for linetrack boat sound bug --- advtrains/wagons.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua index 5564fa5..ad4a5ab 100644 --- a/advtrains/wagons.lua +++ b/advtrains/wagons.lua @@ -527,6 +527,10 @@ function wagon:on_step(dtime) if not players_in then if advtrains.outside_range(pos) then --atdebug("wagon",self.id,"unloading (too far away)") + -- Workaround until minetest engine deletes attached sounds + if self.sound_loop_handle then + minetest.sound_stop(self.sound_loop_handle) + end self.object:remove() end end -- cgit v1.2.3