From e1bd9b46d0d8cd9cedca8d7a73b8b54a4ec7aeb1 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 23 Nov 2024 18:31:45 -0600 Subject: [PATCH] Sound fix, preserve _itemstring as well --- mods/ITEMS/mcl_bows/arrow.lua | 2 +- mods/ITEMS/vl_projectile/init.lua | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index 3f4c4f8c4..98933fa24 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -43,7 +43,7 @@ local arrow_entity = { _fire_damage_resistant = true, _save_fields = { - "last_pos", "startpos", "damage", "is_critical", "stuck", "stuckin", "stuckin_player", "time_in_air", "vl_projectile", "collectable", "arrow_item", + "last_pos", "startpos", "damage", "is_critical", "stuck", "stuckin", "stuckin_player", "time_in_air", "vl_projectile", "collectable", "arrow_item", "itemstring" }, _damage=1, -- Damage on impact diff --git a/mods/ITEMS/vl_projectile/init.lua b/mods/ITEMS/vl_projectile/init.lua index 9aa6764f6..22e287c60 100644 --- a/mods/ITEMS/vl_projectile/init.lua +++ b/mods/ITEMS/vl_projectile/init.lua @@ -310,15 +310,15 @@ local function stuck_on_step(self, dtime, entity_def, projectile_def) if arrow_item and minetest.registered_items[arrow_item] and obj:get_inventory():room_for_item("main", arrow_item) then obj:get_inventory():add_item("main", arrow_item) self._picked_up = true - - minetest.sound_play("item_drop_pickup", { - pos = pos, - max_hear_distance = 16, - gain = 1.0, - }, true) end end + minetest.sound_play("item_drop_pickup", { + pos = pos, + max_hear_distance = 16, + gain = 1.0, + }, true) + mcl_burning.extinguish(self.object) mcl_util.remove_entity(self) return true