fix rain not showing for freshly joined players

This commit is contained in:
cora 2021-09-24 01:07:00 +02:00
parent 9b42b0d5c7
commit a35c5b66cb
1 changed files with 6 additions and 0 deletions

View File

@ -130,6 +130,12 @@ mcl_weather.rain.add_player = function(player)
end
end
minetest.register_on_joinplayer(function(player)
if mcl_weather.rain.raining then
mcl_weather.rain.add_player(player)
end
end)
-- remove player from player list effected by rain.
-- be sure to remove sound before removing player otherwise soundhandler reference will be lost.
mcl_weather.rain.remove_player = function(player)