quick fix
This commit is contained in:
parent
299f29824e
commit
2b411bba53
|
@ -4,4 +4,5 @@ read_globals = {
|
|||
"minetest",
|
||||
"dump", "vector",
|
||||
"VoxelManip", "VoxelArea",
|
||||
table = { fields = { "copy" } }
|
||||
}
|
|
@ -47,7 +47,7 @@ function weather_mod.register_downfall(id,def)
|
|||
ndef.amount = 10
|
||||
end
|
||||
if not ndef.exptime then
|
||||
ndef.exptime = ndef.max_pos.y / (math.sqr(ndef.falling_acceleration) + ndef.falling_speed)
|
||||
ndef.exptime = ndef.max_pos.y / (math.sqrt(ndef.falling_acceleration) + ndef.falling_speed)
|
||||
end
|
||||
if not ndef.texture then
|
||||
error("no texture given")
|
||||
|
@ -60,7 +60,7 @@ end
|
|||
|
||||
minetest.register_globalstep(function()
|
||||
if weather.type=="none" then
|
||||
for id,el in pairs(weather_mod.registered_downfalls) do
|
||||
for id,_ in pairs(weather_mod.registered_downfalls) do
|
||||
if math.random(1, 50000) == 1 then
|
||||
weather.wind = {}
|
||||
weather.wind.x = math.random(0,10)
|
||||
|
|
|
@ -6,7 +6,8 @@ minetest.register_privilege("weather", {
|
|||
-- Set weather
|
||||
minetest.register_chatcommand("setweather", {
|
||||
params = "<weather>",
|
||||
description = "Set weather to a registered type of downfall or show all types when nor parameters are given", -- full description
|
||||
description = "Set weather to a registered type of downfall\
|
||||
show all types when nor parameters are given", -- full description
|
||||
privs = {weather = true},
|
||||
func = function(name, param)
|
||||
if param == nil or param == "" then
|
||||
|
|
Loading…
Reference in New Issue