[fire_charge] Fix critical attempt to index local 'ent'
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 shootpos = vector.add(pos, vector.multiply(dropdir, 0.51))
|
||||||
local fireball = add_entity(shootpos, "mobs_mc:blaze_fireball")
|
local fireball = add_entity(shootpos, "mobs_mc:blaze_fireball")
|
||||||
local ent = fireball:get_luaentity()
|
local ent = fireball:get_luaentity()
|
||||||
ent._shot_from_dispenser = true
|
if ent then
|
||||||
local v = ent.velocity or 1
|
ent._shot_from_dispenser = true
|
||||||
fireball:set_velocity(vector.multiply(dropdir, v))
|
local v = ent.velocity or 1
|
||||||
ent.switch = 1
|
fireball:set_velocity(vector.multiply(dropdir, v))
|
||||||
stack:take_item()
|
ent.switch = 1
|
||||||
|
stack:take_item()
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue