1
0
mirror of https://gitlab.com/rautars/weather_pack.git synced 2025-07-16 05:40:22 +02:00

minor code cleanup

This commit is contained in:
Arturas Norkus
2016-06-05 22:24:54 +03:00
parent 7b5f74c3aa
commit 257504bbde
3 changed files with 8 additions and 16 deletions

View File

@ -31,7 +31,7 @@ end
rain.add_rain_particles = function(player, dtime)
rain.last_rp_count = 0
for i=rain.particles_count, 1,-1 do
local random_pos_x, random_pos_y, random_pos_z = get_random_pos_by_player_look_dir(player)
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
rain.last_rp_count = rain.last_rp_count + 1
minetest.add_particle({
@ -136,7 +136,7 @@ end)
rain.make_weather = function()
rain.raining = true
for _, player in ipairs(minetest.get_connected_players()) do
if (is_underwater(player)) then
if (weather.is_underwater(player)) then
return false
end
rain.add_player(player)