forked from VoxeLibre/VoxeLibre
[fire_charge] Fix critical attempt to index local 'ent'
This commit is contained in:
parent
35f07a8b66
commit
163ca9a653
|
@ -49,11 +49,13 @@ minetest.register_craftitem("mcl_fire:fire_charge", {
|
|||
local shootpos = vector.add(pos, vector.multiply(dropdir, 0.51))
|
||||
local fireball = add_entity(shootpos, "mobs_mc:blaze_fireball")
|
||||
local ent = fireball:get_luaentity()
|
||||
if ent then
|
||||
ent._shot_from_dispenser = true
|
||||
local v = ent.velocity or 1
|
||||
fireball:set_velocity(vector.multiply(dropdir, v))
|
||||
ent.switch = 1
|
||||
stack:take_item()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue