diff options
author | Blockhead <jbis1337@hotmail.com> | 2020-11-01 17:34:13 +1100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2020-11-02 12:12:41 +0100 |
commit | 8d58bd51cd1a48b6e82b75a1452f8a0b8ed9f6cb (patch) | |
tree | a5e0c329eee8a830beebc7a182da630ef9af221e | |
parent | b616ae4425b26d0163e9d5f5cb98121fa103e003 (diff) | |
download | advtrains-8d58bd51cd1a48b6e82b75a1452f8a0b8ed9f6cb.tar.gz advtrains-8d58bd51cd1a48b6e82b75a1452f8a0b8ed9f6cb.tar.bz2 advtrains-8d58bd51cd1a48b6e82b75a1452f8a0b8ed9f6cb.zip |
Workaround to destroy looping sounds
Needed for linetrack boat sound bug
-rw-r--r-- | advtrains/wagons.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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 |