parent
6a1dfd6951
commit
ed84e9f246
|
@ -1,6 +1,6 @@
|
||||||
-- Rain
|
-- Rain
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
if weather ~= "rain" then return end
|
if weather.tyoe ~= "rain" then return end
|
||||||
for _, player in ipairs(minetest.get_connected_players()) do
|
for _, player in ipairs(minetest.get_connected_players()) do
|
||||||
local ppos = player:getpos()
|
local ppos = player:getpos()
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
local maxp = addvectors(ppos, {x= 9, y=7, z= 9})
|
local maxp = addvectors(ppos, {x= 9, y=7, z= 9})
|
||||||
|
|
||||||
local vel = {x=0, y= -4, z=0}
|
local vel = {x=0, y= -4, z=0}
|
||||||
local acc = {x=0, y=-9.81, z=0}
|
local acc = {x=math.random()*weather.wind, y=-9.81, z=math.random()*weather.wind}
|
||||||
|
|
||||||
minetest.add_particlespawner({amount=25, time=0.5,
|
minetest.add_particlespawner({amount=25, time=0.5,
|
||||||
minpos=minp, maxpos=maxp,
|
minpos=minp, maxpos=maxp,
|
||||||
|
|
Loading…
Reference in New Issue