Fix hearable rain in Nether and End dimensions
This commit is contained in:
parent
b4f1d2c521
commit
10a0819790
2 changed files with 8 additions and 2 deletions
|
@ -45,7 +45,7 @@ rain.add_rain_particles = function(player)
|
|||
rain.last_rp_count = 0
|
||||
for i=rain.particles_count, 1,-1 do
|
||||
local random_pos_x, random_pos_y, random_pos_z = weather.get_random_pos_by_player_look_dir(player)
|
||||
if minetest.get_node_light({x=random_pos_x, y=random_pos_y, z=random_pos_z}, 0.5) == 15 then
|
||||
if weather.is_outdoor({x=random_pos_x, y=random_pos_y, z=random_pos_z}) then
|
||||
rain.last_rp_count = rain.last_rp_count + 1
|
||||
minetest.add_particle({
|
||||
pos = {x=random_pos_x, y=random_pos_y, z=random_pos_z},
|
||||
|
@ -159,6 +159,7 @@ rain.make_weather = function()
|
|||
|
||||
for _, player in ipairs(minetest.get_connected_players()) do
|
||||
if (weather.is_underwater(player) or not mcl_util.has_weather(player:getpos())) then
|
||||
rain.remove_sound(player)
|
||||
return false
|
||||
end
|
||||
rain.add_player(player)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue