1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-22 23:10:17 +01:00

weather: Fix error caused by missing biomes

This commit is contained in:
SmallJoker 2020-08-16 09:49:27 +02:00 committed by sfan5
parent 9d419bfac6
commit c1b236b4e3

View File

@ -88,7 +88,8 @@ local function update_clouds()
local n_speedz = nobj_speedz:get_2d({x = time, y = 0}) -- -1 to 1 local n_speedz = nobj_speedz:get_2d({x = time, y = 0}) -- -1 to 1
for _, player in ipairs(minetest.get_connected_players()) do for _, player in ipairs(minetest.get_connected_players()) do
local humid = minetest.get_humidity(player:get_pos()) -- Fallback to mid-value 50 for very old worlds
local humid = minetest.get_humidity(player:get_pos()) or 50
-- Default and classic density value is 0.4, make this happen -- Default and classic density value is 0.4, make this happen
-- at humidity midvalue 50 when n_density is at midvalue 0.5. -- at humidity midvalue 50 when n_density is at midvalue 0.5.
-- density_max = 0.25 at humid = 0. -- density_max = 0.25 at humid = 0.