Skip to content

Commit

Permalink
Declare flare particle id before use, fixes #20
Browse files Browse the repository at this point in the history
  • Loading branch information
stujones11 committed Sep 25, 2016
1 parent 7349be8 commit 0533d52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flaregun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ minetest.register_entity("shooter:flare_entity", {
node.name ~= "default:water_flowing" then
minetest.place_node(pos, {name="shooter:flare_light"})
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
local id = minetest.add_particlespawner(
1000, 30, pos, pos,
{x=-1, y=1, z=-1}, {x=1, y=1, z=1},
{x=2, y=-2, z=-2}, {x=2, y=-2, z=2},
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", {
object = self.player,
loop = true,
Expand Down

0 comments on commit 0533d52

Please sign in to comment.