diff --git a/weather/rain.lua b/weather/rain.lua index 4b20da1..94917db 100644 --- a/weather/rain.lua +++ b/weather/rain.lua @@ -1,6 +1,6 @@ -- Rain 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 local ppos = player:getpos() @@ -11,7 +11,7 @@ minetest.register_globalstep(function(dtime) local maxp = addvectors(ppos, {x= 9, y=7, z= 9}) 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, minpos=minp, maxpos=maxp,