mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-24 11:31:09 +01:00
Sound fix, preserve _itemstring as well
This commit is contained in:
parent
8d5a1ac9cc
commit
5914b789a7
2 changed files with 7 additions and 7 deletions
|
@ -43,7 +43,7 @@ local arrow_entity = {
|
||||||
_fire_damage_resistant = true,
|
_fire_damage_resistant = true,
|
||||||
|
|
||||||
_save_fields = {
|
_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
|
_damage=1, -- Damage on impact
|
||||||
|
|
|
@ -310,14 +310,14 @@ 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
|
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)
|
obj:get_inventory():add_item("main", arrow_item)
|
||||||
self._picked_up = true
|
self._picked_up = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
minetest.sound_play("item_drop_pickup", {
|
minetest.sound_play("item_drop_pickup", {
|
||||||
pos = pos,
|
pos = pos,
|
||||||
max_hear_distance = 16,
|
max_hear_distance = 16,
|
||||||
gain = 1.0,
|
gain = 1.0,
|
||||||
}, true)
|
}, true)
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
mcl_burning.extinguish(self.object)
|
mcl_burning.extinguish(self.object)
|
||||||
mcl_util.remove_entity(self)
|
mcl_util.remove_entity(self)
|
||||||
|
|
Loading…
Reference in a new issue