forked from mtcontrib/weather_pack
minor code cleanup
This commit is contained in:
parent
ea242fb8c3
commit
da308cbac2
|
@ -28,7 +28,7 @@ end
|
|||
|
||||
-- creating manually parctiles instead of particles spawner because of easier to control
|
||||
-- spawn position.
|
||||
rain.add_rain_particles = function(player, dtime)
|
||||
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)
|
||||
|
@ -141,7 +141,7 @@ rain.make_weather = function()
|
|||
return false
|
||||
end
|
||||
rain.add_player(player)
|
||||
rain.add_rain_particles(player, dtime)
|
||||
rain.add_rain_particles(player)
|
||||
rain.update_sound(player)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ snow = {}
|
|||
snow.particles_count = 25
|
||||
|
||||
-- calculates coordinates and draw particles for snow weather
|
||||
snow.add_rain_particles = function(player, dtime)
|
||||
snow.add_rain_particles = function(player)
|
||||
rain.last_rp_count = 0
|
||||
for i=snow.particles_count, 1,-1 do
|
||||
local random_pos_x, random_pos_y, random_pos_z = weather.get_random_pos_by_player_look_dir(player)
|
||||
|
@ -47,7 +47,7 @@ minetest.register_globalstep(function(dtime)
|
|||
if (weather.is_underwater(player)) then
|
||||
return false
|
||||
end
|
||||
snow.add_rain_particles(player, dtime)
|
||||
snow.add_rain_particles(player)
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user