mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-04 16:53:46 +01:00
remove unnecessary on_dimensionchange
parent
c146426c5c
commit
53715212a2
@ -29,7 +29,7 @@ local psdef= {
|
|||||||
minpos = vector.new(-6,3,-6),
|
minpos = vector.new(-6,3,-6),
|
||||||
maxpos = vector.new(6,15,6),
|
maxpos = vector.new(6,15,6),
|
||||||
minvel = vector.new(-vel,-falling_speed,-vel),
|
minvel = vector.new(-vel,-falling_speed,-vel),
|
||||||
maxvel = math.random(vel,-falling_speed+vel,vel),
|
maxvel = vector.new(vel,-falling_speed+vel,vel),
|
||||||
minacc = vector.new(0,0,0),
|
minacc = vector.new(0,0,0),
|
||||||
maxacc = vector.new(0,-0.4,0),
|
maxacc = vector.new(0,-0.4,0),
|
||||||
minexptime = 0.5,
|
minexptime = 0.5,
|
||||||
@ -119,19 +119,6 @@ function mcl_weather.rain.remove_player(player)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_worlds.register_on_dimension_change(function(player, dimension)
|
|
||||||
if dimension ~= "overworld" and dimension ~= "void" then
|
|
||||||
mcl_weather.rain.remove_sound(player)
|
|
||||||
mcl_weather.rain.remove_player(player)
|
|
||||||
elseif dimension == "overworld" then
|
|
||||||
mcl_weather.rain.update_sound(player)
|
|
||||||
if mcl_weather.rain.raining then
|
|
||||||
mcl_weather.rain.add_rain_particles(player)
|
|
||||||
mcl_weather.rain.add_player(player)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- adds and removes rain sound depending how much rain particles around player currently exist.
|
-- adds and removes rain sound depending how much rain particles around player currently exist.
|
||||||
-- have few seconds delay before each check to avoid on/off sound too often
|
-- have few seconds delay before each check to avoid on/off sound too often
|
||||||
-- when player stay on 'edge' where sound should play and stop depending from random raindrop appearance.
|
-- when player stay on 'edge' where sound should play and stop depending from random raindrop appearance.
|
||||||
|
Loading…
Reference in New Issue
Block a user