mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 00:19:32 +01:00
Fix crash that occurs when lingering or splash potions are used from a dispenser (#4335)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4335 Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land> Co-authored-by: teknomunk <teknomunk@protonmail.com> Co-committed-by: teknomunk <teknomunk@protonmail.com>
This commit is contained in:
parent
6394371e4f
commit
c4f4e7b6fc
2 changed files with 4 additions and 4 deletions
|
@ -173,8 +173,8 @@ function mcl_potions.register_lingering(name, descr, color, def)
|
|||
obj:set_velocity({x=dropdir.x*velocity,y=dropdir.y*velocity,z=dropdir.z*velocity})
|
||||
obj:set_acceleration({x=dropdir.x*-3, y=-9.8, z=dropdir.z*-3})
|
||||
local ent = obj:get_luaentity()
|
||||
ent._potency = item:get_meta():get_int("mcl_potions:potion_potent")
|
||||
ent._plus = item:get_meta():get_int("mcl_potions:potion_plus")
|
||||
ent._potency = stack:get_meta():get_int("mcl_potions:potion_potent")
|
||||
ent._plus = stack:get_meta():get_int("mcl_potions:potion_plus")
|
||||
ent._effect_list = def._effect_list
|
||||
end
|
||||
})
|
||||
|
|
|
@ -65,8 +65,8 @@ function mcl_potions.register_splash(name, descr, color, def)
|
|||
obj:set_velocity({x=dropdir.x*velocity,y=dropdir.y*velocity,z=dropdir.z*velocity})
|
||||
obj:set_acceleration({x=dropdir.x*-3, y=-9.8, z=dropdir.z*-3})
|
||||
local ent = obj:get_luaentity()
|
||||
ent._potency = item:get_meta():get_int("mcl_potions:potion_potent")
|
||||
ent._plus = item:get_meta():get_int("mcl_potions:potion_plus")
|
||||
ent._potency = stack:get_meta():get_int("mcl_potions:potion_potent")
|
||||
ent._plus = stack:get_meta():get_int("mcl_potions:potion_plus")
|
||||
ent._effect_list = def._effect_list
|
||||
end
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue