Move bubble particle spawner to playerplus
This commit is contained in:
parent
c4094e17ea
commit
75cfe51b54
4 changed files with 22 additions and 28 deletions
|
@ -139,6 +139,27 @@ minetest.register_globalstep(function(dtime)
|
|||
end
|
||||
end
|
||||
|
||||
-- Spawn bubble particles when underwater
|
||||
|
||||
if minetest.get_item_group(playerplus[name].nod_head, "water") ~= 0 then
|
||||
minetest.add_particlespawner({
|
||||
amount = 10,
|
||||
time = 0.15,
|
||||
minpos = { x = -0.25, y = 0.3, z = -0.25 },
|
||||
maxpos = { x = 0.25, y = 0.7, z = 0.75 },
|
||||
attached = player,
|
||||
minvel = {x = -0.2, y = 0, z = -0.2},
|
||||
maxvel = {x = 0.5, y = 0, z = 0.5},
|
||||
minacc = {x = -0.4, y = 4, z = -0.4},
|
||||
maxacc = {x = 0.5, y = 1, z = 0.5},
|
||||
minexptime = 0.3,
|
||||
maxexptime = 0.8,
|
||||
minsize = 0.7,
|
||||
maxsize = 2.4,
|
||||
texture = "mcl_particles_bubble.png"
|
||||
})
|
||||
end
|
||||
|
||||
-- Show positions of barriers when player is wielding a barrier
|
||||
if player:get_wielded_item():get_name() == "mcl_core:barrier" then
|
||||
local pos = vector.round(player:getpos())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue