Declare flare particle id before use, fixes #20
This commit is contained in:
parent
7349be8ab5
commit
0533d52142
1 changed files with 2 additions and 2 deletions
|
@ -68,8 +68,6 @@ minetest.register_entity("shooter:flare_entity", {
|
||||||
node.name ~= "default:water_flowing" then
|
node.name ~= "default:water_flowing" then
|
||||||
minetest.place_node(pos, {name="shooter:flare_light"})
|
minetest.place_node(pos, {name="shooter:flare_light"})
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_int("particle_id", id)
|
|
||||||
meta:set_int("init_time", os.time())
|
|
||||||
pos.y = pos.y - 0.1
|
pos.y = pos.y - 0.1
|
||||||
local id = minetest.add_particlespawner(
|
local id = minetest.add_particlespawner(
|
||||||
1000, 30, pos, pos,
|
1000, 30, pos, pos,
|
||||||
|
@ -77,6 +75,8 @@ minetest.register_entity("shooter:flare_entity", {
|
||||||
{x=2, y=-2, z=-2}, {x=2, y=-2, z=2},
|
{x=2, y=-2, z=-2}, {x=2, y=-2, z=2},
|
||||||
0.1, 0.75, 1, 8, false, "shooter_flare_particle.png"
|
0.1, 0.75, 1, 8, false, "shooter_flare_particle.png"
|
||||||
)
|
)
|
||||||
|
meta:set_int("particle_id", id)
|
||||||
|
meta:set_int("init_time", os.time())
|
||||||
local sound = minetest.sound_play("shooter_flare_burn", {
|
local sound = minetest.sound_play("shooter_flare_burn", {
|
||||||
object = self.player,
|
object = self.player,
|
||||||
loop = true,
|
loop = true,
|
||||||
|
|
Loading…
Reference in a new issue