mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-02 07:43:48 +01:00
Tweak appearance of snowflakes
parent
ab56d592ae
commit
081366855d
@ -13,13 +13,14 @@ mcl_weather.snow.add_snow_particles = function(player)
|
|||||||
mcl_weather.rain.last_rp_count = mcl_weather.rain.last_rp_count + 1
|
mcl_weather.rain.last_rp_count = mcl_weather.rain.last_rp_count + 1
|
||||||
minetest.add_particle({
|
minetest.add_particle({
|
||||||
pos = {x=random_pos_x, y=random_pos_y, z=random_pos_z},
|
pos = {x=random_pos_x, y=random_pos_y, z=random_pos_z},
|
||||||
velocity = {x = math.random(-1,-0.5), y = math.random(-2,-1), z = math.random(-1,-0.5)},
|
velocity = {x = math.random(-100,100)*0.001, y = math.random(-300,-100)*0.004, z = math.random(-100,100)*0.001},
|
||||||
acceleration = {x = math.random(-1,-0.5), y=-0.5, z = math.random(-1,-0.5)},
|
acceleration = {x = 0, y=0, z = 0},
|
||||||
expirationtime = 3.0,
|
expirationtime = 8.0,
|
||||||
size = math.random(0.5, 2),
|
size = 1,
|
||||||
collisiondetection = true,
|
collisiondetection = true,
|
||||||
collision_removal = true,
|
collision_removal = true,
|
||||||
vertical = true,
|
object_collision = false,
|
||||||
|
vertical = false,
|
||||||
texture = mcl_weather.snow.get_texture(),
|
texture = mcl_weather.snow.get_texture(),
|
||||||
playername = player:get_player_name()
|
playername = player:get_player_name()
|
||||||
})
|
})
|
||||||
@ -49,14 +50,7 @@ end
|
|||||||
|
|
||||||
-- Simple random texture getter
|
-- Simple random texture getter
|
||||||
mcl_weather.snow.get_texture = function()
|
mcl_weather.snow.get_texture = function()
|
||||||
local texture_name
|
return "weather_pack_snow_snowflake"..math.random(1,2)..".png"
|
||||||
local random_number = math.random()
|
|
||||||
if random_number > 0.5 then
|
|
||||||
texture_name = "weather_pack_snow_snowflake1.png"
|
|
||||||
else
|
|
||||||
texture_name = "weather_pack_snow_snowflake2.png"
|
|
||||||
end
|
|
||||||
return texture_name;
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local timer = 0
|
local timer = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user