diff --git a/mods/ENVIRONMENT/mcl_weather/rain.lua b/mods/ENVIRONMENT/mcl_weather/rain.lua index 1db69ec2..9fc8f910 100644 --- a/mods/ENVIRONMENT/mcl_weather/rain.lua +++ b/mods/ENVIRONMENT/mcl_weather/rain.lua @@ -87,19 +87,21 @@ mcl_weather.rain.add_rain_particlespawner = function(name) end end - minetest.add_particlespawner({ - amount = mcl_weather.rain.particles_count, - time=1, - minpos = minp, maxpos = maxp, - minvel = vel, maxvel = vel, - minacc = acc, maxacc = acc, - minexptime = exp, maxexptime = exp, - minsize = size, maxsize= size, - collisiondetection = true, collision_removal = true, - vertical = true, - texture = texture, - playername = player:get_player_name() - }) + if mcl_weather.is_outdoor(player:get_pos()) then + minetest.add_particlespawner({ + amount = math.random(mcl_weather.rain.particles_count-100,mcl_weather.rain.particles_count+100), + time=1, + minpos = minp, maxpos = maxp, + minvel = vel, maxvel = vel, + minacc = acc, maxacc = acc, + minexptime = exp, maxexptime = exp, + minsize = size, maxsize= size, + collisiondetection = true, collision_removal = true, + vertical = true, + texture = texture, + playername = player:get_player_name() + }) + end mcl_weather.rain.init_done = true end