Update rain.lua

makes rain sensible to wind
This commit is contained in:
theFox6 2018-04-10 19:08:15 +02:00 committed by GitHub
parent 6a1dfd6951
commit ed84e9f246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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,